SCIP Doxygen Documentation
 
Loading...
Searching...
No Matches
prob.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* SCIP --- Solving Constraint Integer Programs */
5/* */
6/* Copyright (c) 2002-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file prob.h
26 * @ingroup INTERNALAPI
27 * @brief internal methods for storing and manipulating the main problem
28 * @author Tobias Achterberg
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_PROB_H__
34#define __SCIP_PROB_H__
35
36
37#include "scip/def.h"
39#include "scip/type_retcode.h"
40#include "scip/type_set.h"
41#include "scip/type_stat.h"
42#include "scip/type_event.h"
43#include "scip/type_lp.h"
44#include "scip/type_var.h"
45#include "scip/type_implics.h"
46#include "scip/type_prob.h"
47#include "scip/type_primal.h"
48#include "scip/type_tree.h"
49#include "scip/type_reopt.h"
50#include "scip/type_branch.h"
51#include "scip/type_cons.h"
53#include "scip/type_message.h"
54
55#include "scip/struct_prob.h"
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61/*
62 * problem creation
63 */
64
65/** creates problem data structure by copying the source problem;
66 * If the problem type requires the use of variable pricers, these pricers should be activated with calls
67 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
68 */
70 SCIP_PROB** prob, /**< pointer to problem data structure */
71 BMS_BLKMEM* blkmem, /**< block memory */
72 SCIP_SET* set, /**< global SCIP settings */
73 const char* name, /**< problem name */
74 SCIP* sourcescip, /**< source SCIP data structure */
75 SCIP_PROB* sourceprob, /**< source problem structure */
76 SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of source variables corresponding
77 * target variables, or NULL */
78 SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
79 * target constraints, or NULL */
80 SCIP_Bool original, /**< copy original or transformed problem? */
81 SCIP_Bool global /**< create a global or a local copy? */
82 );
83
84/** creates problem data structure
85 * If the problem type requires the use of variable pricers, these pricers should be activated with calls
86 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
87 */
89 SCIP_PROB** prob, /**< pointer to problem data structure */
90 BMS_BLKMEM* blkmem, /**< block memory */
91 SCIP_SET* set, /**< global SCIP settings */
92 const char* name, /**< problem name */
93 SCIP_DECL_PROBDELORIG ((*probdelorig)), /**< frees user data of original problem */
94 SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
95 SCIP_DECL_PROBDELTRANS((*probdeltrans)), /**< frees user data of transformed problem */
96 SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
97 SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
98 SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
99 SCIP_PROBDATA* probdata, /**< user problem data set by the reader */
100 SCIP_Bool transformed /**< is this the transformed problem? */
101 );
102
103/** sets callback to free user data of original problem */
105 SCIP_PROB* prob, /**< problem */
106 SCIP_DECL_PROBDELORIG ((*probdelorig)) /**< frees user data of original problem */
107 );
108
109/** sets callback to create user data of transformed problem by transforming original user data */
111 SCIP_PROB* prob, /**< problem */
112 SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
113 );
114
115/** sets callback to free user data of transformed problem */
117 SCIP_PROB* prob, /**< problem */
118 SCIP_DECL_PROBDELTRANS((*probdeltrans)) /**< frees user data of transformed problem */
119 );
120
121/** sets solving process initialization callback of transformed data */
123 SCIP_PROB* prob, /**< problem */
124 SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization callback of transformed data */
125 );
126
127/** sets solving process deinitialization callback of transformed data */
129 SCIP_PROB* prob, /**< problem */
130 SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization callback of transformed data */
131 );
132
133/** sets callback to copy user data to copy it to a subscip, or NULL */
134void SCIPprobSetCopy(
135 SCIP_PROB* prob, /**< problem */
136 SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
137 );
138
139/** frees problem data structure */
141 SCIP_PROB** prob, /**< pointer to problem data structure */
142 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
143 BMS_BLKMEM* blkmem, /**< block memory buffer */
144 SCIP_SET* set, /**< global SCIP settings */
145 SCIP_STAT* stat, /**< dynamic problem statistics */
146 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
147 SCIP_LP* lp /**< current LP data (or NULL, if it's the original problem) */
148 );
149
150/** transform problem data into normalized form */
152 SCIP_PROB* source, /**< problem to transform */
153 BMS_BLKMEM* blkmem, /**< block memory buffer */
154 SCIP_SET* set, /**< global SCIP settings */
155 SCIP_STAT* stat, /**< problem statistics */
156 SCIP_PRIMAL* primal, /**< primal data */
157 SCIP_TREE* tree, /**< branch and bound tree */
158 SCIP_REOPT* reopt, /**< reoptimization data structure */
159 SCIP_LP* lp, /**< current LP data */
160 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
161 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
162 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
163 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
164 SCIP_PROB** target /**< pointer to target problem data structure */
165 );
166
167/** resets the global and local bounds of original variables in original problem to their original values */
169 SCIP_PROB* prob, /**< original problem data */
170 BMS_BLKMEM* blkmem, /**< block memory */
171 SCIP_SET* set, /**< global SCIP settings */
172 SCIP_STAT* stat /**< problem statistics */
173 );
174
175/** (Re)Sort the variables, which appear in the four categories (binary, integer, implicit, continuous) after presolve
176 * with respect to their original index (within their categories). Adjust the problem index afterwards which is
177 * supposed to reflect the position in the variable array. This additional (re)sorting is supposed to get more robust
178 * against the order presolving fixed variables. (We also reobtain a possible block structure induced by the user
179 * model)
180 */
182 SCIP_PROB* prob /**< problem data */
183 );
184
185/** possibly create and sort the constraints according to check priorties */
187 SCIP_PROB* prob /**< problem data */
188 );
189
190/*
191 * problem modification
192 */
193
194/** sets user problem data */
195void SCIPprobSetData(
196 SCIP_PROB* prob, /**< problem */
197 SCIP_PROBDATA* probdata /**< user problem data to use */
198 );
199
200/** adds variable's name to the namespace */
202 SCIP_PROB* prob, /**< problem data */
203 SCIP_VAR* var /**< variable */
204 );
205
206/** removes variable's name from the namespace */
208 SCIP_PROB* prob, /**< problem data */
209 SCIP_VAR* var /**< variable */
210 );
211
212/** adds variable to the problem and captures it */
214 SCIP_PROB* prob, /**< problem data */
215 BMS_BLKMEM* blkmem, /**< block memory buffers */
216 SCIP_SET* set, /**< global SCIP settings */
217 SCIP_LP* lp, /**< current LP data */
218 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
219 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
220 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
221 SCIP_VAR* var /**< variable to add */
222 );
223
224/** marks variable to be removed from the problem; however, the variable is NOT removed from the constraints */
226 SCIP_PROB* prob, /**< problem data */
227 BMS_BLKMEM* blkmem, /**< block memory */
228 SCIP_SET* set, /**< global SCIP settings */
229 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
230 SCIP_VAR* var, /**< problem variable */
231 SCIP_Bool* deleted /**< pointer to store whether marking variable to be deleted was successful */
232 );
233
234/** actually removes the deleted variables from the problem and releases them */
236 SCIP_PROB* prob, /**< problem data */
237 BMS_BLKMEM* blkmem, /**< block memory */
238 SCIP_SET* set, /**< global SCIP settings */
239 SCIP_STAT* stat, /**< dynamic problem statistics */
240 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
241 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
242 SCIP_LP* lp, /**< current LP data (may be NULL) */
243 SCIP_BRANCHCAND* branchcand /**< branching candidate storage */
244 );
245
246/** changes the type of a variable in the problem */
248 SCIP_PROB* prob, /**< problem data */
249 BMS_BLKMEM* blkmem, /**< block memory */
250 SCIP_SET* set, /**< global SCIP settings */
251 SCIP_PRIMAL* primal, /**< primal data */
252 SCIP_LP* lp, /**< current LP data */
253 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
254 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
255 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
256 SCIP_VAR* var, /**< variable to add */
257 SCIP_VARTYPE vartype /**< new type of variable */
258 );
259
260/** informs problem, that the given loose problem variable changed its status */
262 SCIP_PROB* prob, /**< problem data */
263 BMS_BLKMEM* blkmem, /**< block memory */
264 SCIP_SET* set, /**< global SCIP settings */
265 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
266 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
267 SCIP_VAR* var /**< problem variable */
268 );
269
270/** adds constraint's name to the namespace */
272 SCIP_PROB* prob, /**< problem data */
273 SCIP_CONS* cons /**< constraint */
274 );
275
276/** remove constraint's name from the namespace */
278 SCIP_PROB* prob, /**< problem data */
279 SCIP_CONS* cons /**< constraint */
280 );
281
282/** adds constraint to the problem and captures it;
283 * a local constraint is automatically upgraded into a global constraint
284 */
286 SCIP_PROB* prob, /**< problem data */
287 SCIP_SET* set, /**< global SCIP settings */
288 SCIP_STAT* stat, /**< dynamic problem statistics */
289 SCIP_CONS* cons /**< constraint to add */
290 );
291
292/** releases and removes constraint from the problem; if the user has not captured the constraint for his own use, the
293 * constraint may be invalid after the call
294 */
296 SCIP_PROB* prob, /**< problem data */
297 BMS_BLKMEM* blkmem, /**< block memory */
298 SCIP_SET* set, /**< global SCIP settings */
299 SCIP_STAT* stat, /**< dynamic problem statistics */
300 SCIP_CONS* cons /**< constraint to remove */
301 );
302
303/** remembers the current number of constraints in the problem's internal data structure
304 * - resets maximum number of constraints to current number of constraints
305 * - remembers current number of constraints as starting number of constraints
306 */
308 SCIP_PROB* prob /**< problem data */
309 );
310
311/** sets objective sense: minimization or maximization */
313 SCIP_PROB* prob, /**< problem data */
314 SCIP_OBJSENSE objsense /**< new objective sense */
315 );
316
317/** adds value to objective offset */
319 SCIP_PROB* prob, /**< problem data */
320 SCIP_Real addval /**< value to add to objective offset */
321 );
322
323/** sets the dual bound on objective function */
325 SCIP_PROB* prob, /**< problem data */
326 SCIP_Real dualbound /**< external dual bound */
327 );
328
329/** sets limit on objective function, such that only solutions better than this limit are accepted */
331 SCIP_PROB* prob, /**< problem data */
332 SCIP_Real objlim /**< external objective limit */
333 );
334
335/** informs the problem, that its objective value is always integral in every feasible solution */
337 SCIP_PROB* prob /**< problem data */
338 );
339
340/** sets integral objective value flag, if all variables with non-zero objective values are integral and have
341 * integral objective value and also updates the cutoff bound if primal solution is already known
342 */
344 SCIP_PROB* transprob, /**< tranformed problem data */
345 SCIP_PROB* origprob, /**< original problem data */
346 BMS_BLKMEM* blkmem, /**< block memory */
347 SCIP_SET* set, /**< global SCIP settings */
348 SCIP_STAT* stat, /**< problem statistics data */
349 SCIP_PRIMAL* primal, /**< primal data */
350 SCIP_TREE* tree, /**< branch and bound tree */
351 SCIP_REOPT* reopt, /**< reoptimization data structure */
352 SCIP_LP* lp, /**< current LP data */
353 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
354 SCIP_EVENTQUEUE* eventqueue /**< event queue */
355 );
356
357/** if possible, scales objective function such that it is integral with gcd = 1 */
359 SCIP_PROB* transprob, /**< tranformed problem data */
360 SCIP_PROB* origprob, /**< original problem data */
361 BMS_BLKMEM* blkmem, /**< block memory */
362 SCIP_SET* set, /**< global SCIP settings */
363 SCIP_STAT* stat, /**< problem statistics data */
364 SCIP_PRIMAL* primal, /**< primal data */
365 SCIP_TREE* tree, /**< branch and bound tree */
366 SCIP_REOPT* reopt, /**< reoptimization data structure */
367 SCIP_LP* lp, /**< current LP data */
368 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
369 SCIP_EVENTQUEUE* eventqueue /**< event queue */
370 );
371
372/** remembers the current solution as root solution in the problem variables */
374 SCIP_PROB* prob, /**< problem data */
375 SCIP_SET* set, /**< global SCIP settings */
376 SCIP_STAT* stat, /**< SCIP statistics */
377 SCIP_LP* lp, /**< current LP data */
378 SCIP_Bool roothaslp /**< is the root solution from LP? */
379 );
380
381/** remembers the best solution w.r.t. root reduced cost propagation as root solution in the problem variables */
383 SCIP_PROB* prob, /**< problem data */
384 SCIP_SET* set, /**< global SCIP settings */
385 SCIP_STAT* stat, /**< problem statistics */
386 SCIP_LP* lp /**< current LP data */
387 );
388
389/** informs problem, that the presolving process was finished, and updates all internal data structures */
391 SCIP_PROB* prob, /**< problem data */
392 SCIP_SET* set /**< global SCIP settings */
393 );
394
395/** initializes problem for branch and bound process */
397 SCIP_PROB* prob, /**< problem data */
398 SCIP_SET* set /**< global SCIP settings */
399 );
400
401/** deinitializes problem after branch and bound process, and converts all COLUMN variables back into LOOSE variables */
403 SCIP_PROB* prob, /**< problem data */
404 BMS_BLKMEM* blkmem, /**< block memory */
405 SCIP_SET* set, /**< global SCIP settings */
406 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
407 SCIP_LP* lp, /**< current LP data */
408 SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
409 );
410
411
412
413
414/*
415 * problem information
416 */
417
418/** sets problem name */
420 SCIP_PROB* prob, /**< problem data */
421 const char* name /**< name to be set */
422 );
423
424/** returns the number of implicit binary variables, meaning variable of vartype != SCIP_VARTYPE_BINARY and !=
425 * SCIP_VARTYPE_CONTINUOUS but with global bounds [0,1]
426 *
427 * @note this number needs to be computed, because it cannot be update like the othe counters for binary and interger
428 * variables, each time the variable type changes(, we would need to update this counter each time a global bound
429 * changes), even at the end of presolving this cannot be computed, because some variable can change to an
430 * implicit binary status
431 */
433 SCIP_PROB* prob /**< problem data */
434 );
435
436/** returns the number of variables with non-zero objective coefficient */
438 SCIP_PROB* prob, /**< problem data */
439 SCIP_SET* set /**< global SCIP settings */
440 );
441
442/** returns the minimal absolute non-zero objective coefficient
443 *
444 * @note currently, this is only used for statistics and printed after the solving process. if this information is
445 * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the minimal
446 * absolute non-zero coefficient every time an objective coefficient has changed.
447 */
449 SCIP_PROB* prob, /**< problem data */
450 SCIP_SET* set /**< global SCIP settings */
451 );
452
453/** returns the maximal absolute non-zero objective coefficient
454 *
455 * @note currently, this is only used for statistics and printed after the solving process. if this information is
456 * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the maximal
457 * absolute non-zero coefficient every time an objective coefficient has changed.
458 */
460 SCIP_PROB* prob, /**< problem data */
461 SCIP_SET* set /**< global SCIP settings */
462 );
463
464/** update the number of variables with non-zero objective coefficient */
466 SCIP_PROB* prob, /**< problem data */
467 SCIP_SET* set, /**< global SCIP settings */
468 SCIP_Real oldobj, /**< old objective value for variable */
469 SCIP_Real newobj /**< new objective value for variable */
470 );
471
472/** update the dual bound if its better as the current one */
474 SCIP_PROB* prob, /**< problem data */
475 SCIP_Real newbound /**< new dual bound for the node (if it's tighter than the old one) */
476 );
477
478/** invalidates the dual bound */
480 SCIP_PROB* prob /**< problem data */
481 );
482
483/** returns the external value of the given internal objective value */
485 SCIP_PROB* transprob, /**< tranformed problem data */
486 SCIP_PROB* origprob, /**< original problem data */
487 SCIP_SET* set, /**< global SCIP settings */
488 SCIP_Real objval /**< internal objective value */
489 );
490
491/** returns the internal value of the given external objective value */
493 SCIP_PROB* transprob, /**< tranformed problem data */
494 SCIP_PROB* origprob, /**< original problem data */
495 SCIP_SET* set, /**< global SCIP settings */
496 SCIP_Real objval /**< external objective value */
497 );
498
499/** returns variable of the problem with given name */
501 SCIP_PROB* prob, /**< problem data */
502 const char* name /**< name of variable to find */
503 );
504
505/** returns constraint of the problem with given name */
507 SCIP_PROB* prob, /**< problem data */
508 const char* name /**< name of variable to find */
509 );
510
511/** displays current pseudo solution */
513 SCIP_PROB* prob, /**< problem data */
514 SCIP_SET* set, /**< global SCIP settings */
515 SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
516 );
517
518/** outputs problem statistics */
520 SCIP_PROB* prob, /**< problem data */
521 SCIP_SET* set, /**< global SCIP settings */
522 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
523 FILE* file /**< output file (or NULL for standard output) */
524 );
525
526
527#ifndef NDEBUG
528
529/* In debug mode, the following methods are implemented as function calls to ensure
530 * type validity.
531 */
532
533/** is the problem permuted */
535 SCIP_PROB* prob
536 );
537
538/** mark the problem as permuted */
540 SCIP_PROB* prob
541 );
542
543/** is the problem data transformed */
545 SCIP_PROB* prob /**< problem data */
546 );
547
548/** returns whether the objective value is known to be integral in every feasible solution */
550 SCIP_PROB* prob /**< problem data */
551 );
552
553/** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
554 * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
555 */
557 SCIP_PROB* prob, /**< problem data */
558 SCIP_SET* set, /**< global SCIP settings */
559 SCIP_LP* lp /**< current LP data */
560 );
561
562/** gets limit on objective function in external space */
564 SCIP_PROB* prob, /**< problem data */
565 SCIP_SET* set /**< global SCIP settings */
566 );
567
568/** gets user problem data */
570 SCIP_PROB* prob /**< problem */
571 );
572
573/** gets problem name */
574const char* SCIPprobGetName(
575 SCIP_PROB* prob /**< problem data */
576 );
577
578/** gets number of problem variables */
580 SCIP_PROB* prob /**< problem data */
581 );
582
583/** gets number of binary problem variables */
585 SCIP_PROB* prob /**< problem data */
586 );
587
588/** gets number of integer problem variables */
590 SCIP_PROB* prob /**< problem data */
591 );
592
593/** gets number of implicit integer problem variables */
595 SCIP_PROB* prob /**< problem data */
596 );
597
598/** gets number of continuous problem variables */
600 SCIP_PROB* prob /**< problem data */
601 );
602
603/** gets problem variables */
605 SCIP_PROB* prob /**< problem data */
606 );
607
608/** gets number of problem constraints */
610 SCIP_PROB* prob /**< problem data */
611 );
612
613/** gets the objective offset */
615 SCIP_PROB* prob /**< problem data */
616 );
617
618/** gets the objective scalar */
620 SCIP_PROB* prob /**< problem data */
621 );
622
623/** is constraint compression enabled for this problem? */
625 SCIP_PROB* prob /**< problem data */
626 );
627
628/** enable problem compression, i.e., constraints can reduce memory size by removing fixed variables during creation */
630 SCIP_PROB* prob /**< problem data */
631 );
632
633#else
634
635/* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
636 * speed up the algorithms.
637 */
638
639#define SCIPprobIsPermuted(prob) ((prob)->permuted)
640#define SCIPprobMarkPermuted(prob) ((prob)->permuted = TRUE)
641#define SCIPprobIsTransformed(prob) ((prob)->transformed)
642#define SCIPprobIsObjIntegral(prob) ((prob)->objisintegral)
643#define SCIPprobAllColsInLP(prob,set,lp) (SCIPlpGetNCols(lp) == (prob)->ncolvars && (set)->nactivepricers == 0)
644#define SCIPprobGetObjlim(prob,set) \
645 ((prob)->objlim >= SCIP_INVALID ? (SCIP_Real)((prob)->objsense) * SCIPsetInfinity(set) : (prob)->objlim)
646#define SCIPprobGetData(prob) ((prob)->probdata)
647#define SCIPprobGetName(prob) ((prob)->name)
648#define SCIPprobGetName(prob) ((prob)->name)
649#define SCIPprobGetNVars(prob) ((prob)->nvars)
650#define SCIPprobGetNBinVars(prob) ((prob)->nbinvars)
651#define SCIPprobGetNIntVars(prob) ((prob)->nintvars)
652#define SCIPprobGetNImplVars(prob) ((prob)->nimplvars)
653#define SCIPprobGetNContVars(prob) ((prob)->ncontvars)
654#define SCIPprobGetVars(prob) ((prob)->vars)
655#define SCIPprobGetNConss(prob) ((prob)->nconss)
656#define SCIPprobGetObjoffset(prob) ((prob)->objoffset)
657#define SCIPprobGetObjscale(prob) ((prob)->objscale)
658#define SCIPprobIsConsCompressionEnabled(prob) ((prob)->conscompression)
659#define SCIPprobEnableConsCompression(prob) ((prob)->conscompression = TRUE)
660#endif
661
662
663#ifdef __cplusplus
664}
665#endif
666
667#endif
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition def.h:91
#define SCIP_Real
Definition def.h:172
SCIP_Real objval
SCIP_VAR * var
SCIP_Real newobj
SCIP_Real oldobj
memory allocation routines
struct BMS_BlkMem BMS_BLKMEM
Definition memory.h:437
void SCIPprobSetDelorig(SCIP_PROB *prob,)
Definition prob.c:351
SCIP_RETCODE SCIPprobScaleObj(SCIP_PROB *transprob, SCIP_PROB *origprob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue)
Definition prob.c:1646
void SCIPprobSetExitsol(SCIP_PROB *prob,)
Definition prob.c:395
void SCIPprobPrintStatistics(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition prob.c:2261
void SCIPprobSetCopy(SCIP_PROB *prob,)
Definition prob.c:406
SCIP_Bool SCIPprobIsPermuted(SCIP_PROB *prob)
Definition prob.c:2308
SCIP_RETCODE SCIPprobExitPresolve(SCIP_PROB *prob, SCIP_SET *set)
Definition prob.c:1903
void SCIPprobUpdateNObjVars(SCIP_PROB *prob, SCIP_SET *set, SCIP_Real oldobj, SCIP_Real newobj)
Definition prob.c:1592
int SCIPprobGetNContVars(SCIP_PROB *prob)
Definition prob.c:2429
SCIP_RETCODE SCIPprobAddConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition prob.c:1282
void SCIPprobInvalidateDualbound(SCIP_PROB *prob)
Definition prob.c:1636
SCIP_RETCODE SCIPprobAddVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition prob.c:939
void SCIPprobSetObjIntegral(SCIP_PROB *prob)
Definition prob.c:1516
SCIP_RETCODE SCIPprobAddVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var)
Definition prob.c:970
SCIP_RETCODE SCIPprobVarChangedStatus(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BRANCHCAND *branchcand, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var)
Definition prob.c:1224
const char * SCIPprobGetName(SCIP_PROB *prob)
Definition prob.c:2384
SCIP_Real SCIPprobGetObjoffset(SCIP_PROB *prob)
Definition prob.c:2456
int SCIPprobGetNConss(SCIP_PROB *prob)
Definition prob.c:2447
int SCIPprobGetNObjVars(SCIP_PROB *prob, SCIP_SET *set)
Definition prob.c:2060
SCIP_Real SCIPprobGetAbsMinObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition prob.c:2107
SCIP_RETCODE SCIPprobPerformVarDeletions(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand)
Definition prob.c:1104
void SCIPprobSetTrans(SCIP_PROB *prob,)
Definition prob.c:362
SCIP_Real SCIPprobGetAbsMaxObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition prob.c:2134
SCIP_RETCODE SCIPprobRemoveVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition prob.c:955
int SCIPprobGetNImplBinVars(SCIP_PROB *prob)
Definition prob.c:2043
SCIP_Real SCIPprobGetObjlim(SCIP_PROB *prob, SCIP_SET *set)
Definition prob.c:2362
void SCIPprobUpdateDualbound(SCIP_PROB *prob, SCIP_Real newbound)
Definition prob.c:1609
SCIP_RETCODE SCIPprobInitSolve(SCIP_PROB *prob, SCIP_SET *set)
Definition prob.c:1912
void SCIPprobMarkNConss(SCIP_PROB *prob)
Definition prob.c:1455
SCIP_RETCODE SCIPprobTransform(SCIP_PROB *source, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CONFLICTSTORE *conflictstore, SCIP_PROB **target)
Definition prob.c:536
void SCIPprobPrintPseudoSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition prob.c:2239
SCIP_RETCODE SCIPprobSetName(SCIP_PROB *prob, const char *name)
Definition prob.c:2022
void SCIPprobSetData(SCIP_PROB *prob, SCIP_PROBDATA *probdata)
Definition prob.c:745
SCIP_Real SCIPprobGetObjscale(SCIP_PROB *prob)
Definition prob.c:2465
void SCIPprobAddObjoffset(SCIP_PROB *prob, SCIP_Real addval)
Definition prob.c:1481
SCIP_RETCODE SCIPprobCheckObjIntegral(SCIP_PROB *transprob, SCIP_PROB *origprob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue)
Definition prob.c:1528
SCIP_VAR * SCIPprobFindVar(SCIP_PROB *prob, const char *name)
Definition prob.c:2201
int SCIPprobGetNImplVars(SCIP_PROB *prob)
Definition prob.c:2420
SCIP_RETCODE SCIPprobExitSolve(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Bool restart)
Definition prob.c:1947
SCIP_RETCODE SCIPprobCreate(SCIP_PROB **prob, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata, SCIP_Bool transformed)
Definition prob.c:270
void SCIPprobSetObjlim(SCIP_PROB *prob, SCIP_Real objlim)
Definition prob.c:1505
SCIP_RETCODE SCIPprobDelVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Bool *deleted)
Definition prob.c:1043
SCIP_Bool SCIPprobIsObjIntegral(SCIP_PROB *prob)
Definition prob.c:2338
void SCIPprobEnableConsCompression(SCIP_PROB *prob)
Definition prob.c:2484
SCIP_CONS * SCIPprobFindCons(SCIP_PROB *prob, const char *name)
Definition prob.c:2220
void SCIPprobMarkPermuted(SCIP_PROB *prob)
Definition prob.c:2318
SCIP_RETCODE SCIPprobRemoveConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition prob.c:1297
int SCIPprobGetNIntVars(SCIP_PROB *prob)
Definition prob.c:2411
SCIP_RETCODE SCIPprobDelCons(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition prob.c:1390
int SCIPprobGetNVars(SCIP_PROB *prob)
Definition prob.c:2393
SCIP_PROBDATA * SCIPprobGetData(SCIP_PROB *prob)
Definition prob.c:2374
void SCIPprobSetInitsol(SCIP_PROB *prob,)
Definition prob.c:384
SCIP_RETCODE SCIPprobChgVarType(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_VARTYPE vartype)
Definition prob.c:1175
SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition prob.c:2157
void SCIPprobResortVars(SCIP_PROB *prob)
Definition prob.c:663
SCIP_RETCODE SCIPprobFree(SCIP_PROB **prob, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition prob.c:417
SCIP_RETCODE SCIPprobCopy(SCIP_PROB **prob, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP *sourcescip, SCIP_PROB *sourceprob, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool original, SCIP_Bool global)
Definition prob.c:206
SCIP_RETCODE SCIPprobAddCons(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition prob.c:1319
SCIP_RETCODE SCIPprobResetBounds(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition prob.c:637
void SCIPprobSetDualbound(SCIP_PROB *prob, SCIP_Real dualbound)
Definition prob.c:1494
void SCIPprobStoreRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool roothaslp)
Definition prob.c:1778
int SCIPprobGetNBinVars(SCIP_PROB *prob)
Definition prob.c:2402
SCIP_VAR ** SCIPprobGetVars(SCIP_PROB *prob)
Definition prob.c:2438
void SCIPprobSetDeltrans(SCIP_PROB *prob,)
Definition prob.c:373
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
Definition prob.c:2350
void SCIPprobUpdateBestRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
Definition prob.c:1805
SCIP_Bool SCIPprobIsTransformed(SCIP_PROB *prob)
Definition prob.c:2328
SCIP_Bool SCIPprobIsConsCompressionEnabled(SCIP_PROB *prob)
Definition prob.c:2474
void SCIPprobSetObjsense(SCIP_PROB *prob, SCIP_OBJSENSE objsense)
Definition prob.c:1468
SCIP_Real SCIPprobInternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition prob.c:2179
SCIP_RETCODE SCIPprobSortConssCheck(SCIP_PROB *prob)
Definition prob.c:715
datastructures for storing and manipulating the main problem
type definitions for branching rules
struct SCIP_BranchCand SCIP_BRANCHCAND
Definition type_branch.h:55
type definitions for conflict store
struct SCIP_ConflictStore SCIP_CONFLICTSTORE
type definitions for constraints and constraint handlers
struct SCIP_Cons SCIP_CONS
Definition type_cons.h:63
type definitions for managing events
struct SCIP_EventFilter SCIP_EVENTFILTER
Definition type_event.h:174
struct SCIP_EventQueue SCIP_EVENTQUEUE
Definition type_event.h:175
type definitions for implications, variable bounds, and cliques
struct SCIP_CliqueTable SCIP_CLIQUETABLE
type definitions for LP management
struct SCIP_Lp SCIP_LP
Definition type_lp.h:110
type definitions for message output methods
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
struct SCIP_HashMap SCIP_HASHMAP
Definition type_misc.h:105
type definitions for collecting primal CIP solutions and primal informations
struct SCIP_Primal SCIP_PRIMAL
Definition type_primal.h:39
type definitions for storing and manipulating the main problem
#define SCIP_DECL_PROBCOPY(x)
Definition type_prob.h:150
#define SCIP_DECL_PROBDELTRANS(x)
Definition type_prob.h:95
#define SCIP_DECL_PROBEXITSOL(x)
Definition type_prob.h:119
struct SCIP_ProbData SCIP_PROBDATA
Definition type_prob.h:53
struct SCIP_Prob SCIP_PROB
Definition type_prob.h:52
#define SCIP_DECL_PROBDELORIG(x)
Definition type_prob.h:64
#define SCIP_DECL_PROBTRANS(x)
Definition type_prob.h:83
#define SCIP_DECL_PROBINITSOL(x)
Definition type_prob.h:106
enum SCIP_Objsense SCIP_OBJSENSE
Definition type_prob.h:50
type definitions for collecting reoptimization information
struct SCIP_Reopt SCIP_REOPT
Definition type_reopt.h:39
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
Definition type_scip.h:39
type definitions for global SCIP settings
struct SCIP_Set SCIP_SET
Definition type_set.h:71
type definitions for problem statistics
struct SCIP_Stat SCIP_STAT
Definition type_stat.h:69
type definitions for branch and bound tree
struct SCIP_Tree SCIP_TREE
Definition type_tree.h:65
type definitions for problem variables
struct SCIP_Var SCIP_VAR
Definition type_var.h:119
enum SCIP_Vartype SCIP_VARTYPE
Definition type_var.h:73