Scippy

SCIP

Solving Constraint Integer Programs

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-2021 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file prob.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for storing and manipulating the main problem
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PROB_H__
25 #define __SCIP_PROB_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/type_retcode.h"
31 #include "scip/type_set.h"
32 #include "scip/type_stat.h"
33 #include "scip/type_event.h"
34 #include "scip/type_lp.h"
35 #include "scip/type_var.h"
36 #include "scip/type_implics.h"
37 #include "scip/type_prob.h"
38 #include "scip/type_primal.h"
39 #include "scip/type_tree.h"
40 #include "scip/type_reopt.h"
41 #include "scip/type_branch.h"
42 #include "scip/type_cons.h"
44 
45 #include "scip/struct_prob.h"
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /*
52  * problem creation
53  */
54 
55 /** creates problem data structure by copying the source problem;
56  * If the problem type requires the use of variable pricers, these pricers should be activated with calls
57  * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
58  */
60  SCIP_PROB** prob, /**< pointer to problem data structure */
61  BMS_BLKMEM* blkmem, /**< block memory */
62  SCIP_SET* set, /**< global SCIP settings */
63  const char* name, /**< problem name */
64  SCIP* sourcescip, /**< source SCIP data structure */
65  SCIP_PROB* sourceprob, /**< source problem structure */
66  SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of source variables corresponding
67  * target variables, or NULL */
68  SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
69  * target constraints, or NULL */
70  SCIP_Bool global /**< create a global or a local copy? */
71  );
72 
73 /** creates problem data structure
74  * If the problem type requires the use of variable pricers, these pricers should be activated with calls
75  * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
76  */
78  SCIP_PROB** prob, /**< pointer to problem data structure */
79  BMS_BLKMEM* blkmem, /**< block memory */
80  SCIP_SET* set, /**< global SCIP settings */
81  const char* name, /**< problem name */
82  SCIP_DECL_PROBDELORIG ((*probdelorig)), /**< frees user data of original problem */
83  SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
84  SCIP_DECL_PROBDELTRANS((*probdeltrans)), /**< frees user data of transformed problem */
85  SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
86  SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
87  SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
88  SCIP_PROBDATA* probdata, /**< user problem data set by the reader */
89  SCIP_Bool transformed /**< is this the transformed problem? */
90  );
91 
92 /** sets callback to free user data of original problem */
94  SCIP_PROB* prob, /**< problem */
95  SCIP_DECL_PROBDELORIG ((*probdelorig)) /**< frees user data of original problem */
96  );
97 
98 /** sets callback to create user data of transformed problem by transforming original user data */
99 void SCIPprobSetTrans(
100  SCIP_PROB* prob, /**< problem */
101  SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
102  );
103 
104 /** sets callback to free user data of transformed problem */
106  SCIP_PROB* prob, /**< problem */
107  SCIP_DECL_PROBDELTRANS((*probdeltrans)) /**< frees user data of transformed problem */
108  );
109 
110 /** sets solving process initialization callback of transformed data */
111 void SCIPprobSetInitsol(
112  SCIP_PROB* prob, /**< problem */
113  SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization callback of transformed data */
114  );
115 
116 /** sets solving process deinitialization callback of transformed data */
117 void SCIPprobSetExitsol(
118  SCIP_PROB* prob, /**< problem */
119  SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization callback of transformed data */
120  );
121 
122 /** sets callback to copy user data to copy it to a subscip, or NULL */
123 void SCIPprobSetCopy(
124  SCIP_PROB* prob, /**< problem */
125  SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
126  );
127 
128 /** frees problem data structure */
130  SCIP_PROB** prob, /**< pointer to problem data structure */
131  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
132  BMS_BLKMEM* blkmem, /**< block memory buffer */
133  SCIP_SET* set, /**< global SCIP settings */
134  SCIP_STAT* stat, /**< dynamic problem statistics */
135  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
136  SCIP_LP* lp /**< current LP data (or NULL, if it's the original problem) */
137  );
138 
139 /** transform problem data into normalized form */
141  SCIP_PROB* source, /**< problem to transform */
142  BMS_BLKMEM* blkmem, /**< block memory buffer */
143  SCIP_SET* set, /**< global SCIP settings */
144  SCIP_STAT* stat, /**< problem statistics */
145  SCIP_PRIMAL* primal, /**< primal data */
146  SCIP_TREE* tree, /**< branch and bound tree */
147  SCIP_REOPT* reopt, /**< reoptimization data structure */
148  SCIP_LP* lp, /**< current LP data */
149  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
150  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
151  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
152  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
153  SCIP_PROB** target /**< pointer to target problem data structure */
154  );
155 
156 /** resets the global and local bounds of original variables in original problem to their original values */
158  SCIP_PROB* prob, /**< original problem data */
159  BMS_BLKMEM* blkmem, /**< block memory */
160  SCIP_SET* set, /**< global SCIP settings */
161  SCIP_STAT* stat /**< problem statistics */
162  );
163 
164 /** (Re)Sort the variables, which appear in the four categories (binary, integer, implicit, continuous) after presolve
165  * with respect to their original index (within their categories). Adjust the problem index afterwards which is
166  * supposed to reflect the position in the variable array. This additional (re)sorting is supposed to get more robust
167  * against the order presolving fixed variables. (We also reobtain a possible block structure induced by the user
168  * model)
169  */
170 void SCIPprobResortVars(
171  SCIP_PROB* prob /**< problem data */
172  );
173 
174 
175 /*
176  * problem modification
177  */
178 
179 /** sets user problem data */
180 void SCIPprobSetData(
181  SCIP_PROB* prob, /**< problem */
182  SCIP_PROBDATA* probdata /**< user problem data to use */
183  );
184 
185 /** adds variable's name to the namespace */
187  SCIP_PROB* prob, /**< problem data */
188  SCIP_VAR* var /**< variable */
189  );
190 
191 /** removes variable's name from the namespace */
193  SCIP_PROB* prob, /**< problem data */
194  SCIP_VAR* var /**< variable */
195  );
196 
197 /** adds variable to the problem and captures it */
199  SCIP_PROB* prob, /**< problem data */
200  BMS_BLKMEM* blkmem, /**< block memory buffers */
201  SCIP_SET* set, /**< global SCIP settings */
202  SCIP_LP* lp, /**< current LP data */
203  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
204  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
205  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
206  SCIP_VAR* var /**< variable to add */
207  );
208 
209 /** marks variable to be removed from the problem; however, the variable is NOT removed from the constraints */
211  SCIP_PROB* prob, /**< problem data */
212  BMS_BLKMEM* blkmem, /**< block memory */
213  SCIP_SET* set, /**< global SCIP settings */
214  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
215  SCIP_VAR* var, /**< problem variable */
216  SCIP_Bool* deleted /**< pointer to store whether marking variable to be deleted was successful */
217  );
218 
219 /** actually removes the deleted variables from the problem and releases them */
221  SCIP_PROB* prob, /**< problem data */
222  BMS_BLKMEM* blkmem, /**< block memory */
223  SCIP_SET* set, /**< global SCIP settings */
224  SCIP_STAT* stat, /**< dynamic problem statistics */
225  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
226  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
227  SCIP_LP* lp, /**< current LP data (may be NULL) */
228  SCIP_BRANCHCAND* branchcand /**< branching candidate storage */
229  );
230 
231 /** changes the type of a variable in the problem */
233  SCIP_PROB* prob, /**< problem data */
234  BMS_BLKMEM* blkmem, /**< block memory */
235  SCIP_SET* set, /**< global SCIP settings */
236  SCIP_PRIMAL* primal, /**< primal data */
237  SCIP_LP* lp, /**< current LP data */
238  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
239  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
240  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
241  SCIP_VAR* var, /**< variable to add */
242  SCIP_VARTYPE vartype /**< new type of variable */
243  );
244 
245 /** informs problem, that the given loose problem variable changed its status */
247  SCIP_PROB* prob, /**< problem data */
248  BMS_BLKMEM* blkmem, /**< block memory */
249  SCIP_SET* set, /**< global SCIP settings */
250  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
251  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
252  SCIP_VAR* var /**< problem variable */
253  );
254 
255 /** adds constraint's name to the namespace */
257  SCIP_PROB* prob, /**< problem data */
258  SCIP_CONS* cons /**< constraint */
259  );
260 
261 /** remove constraint's name from the namespace */
263  SCIP_PROB* prob, /**< problem data */
264  SCIP_CONS* cons /**< constraint */
265  );
266 
267 /** adds constraint to the problem and captures it;
268  * a local constraint is automatically upgraded into a global constraint
269  */
271  SCIP_PROB* prob, /**< problem data */
272  SCIP_SET* set, /**< global SCIP settings */
273  SCIP_STAT* stat, /**< dynamic problem statistics */
274  SCIP_CONS* cons /**< constraint to add */
275  );
276 
277 /** releases and removes constraint from the problem; if the user has not captured the constraint for his own use, the
278  * constraint may be invalid after the call
279  */
281  SCIP_PROB* prob, /**< problem data */
282  BMS_BLKMEM* blkmem, /**< block memory */
283  SCIP_SET* set, /**< global SCIP settings */
284  SCIP_STAT* stat, /**< dynamic problem statistics */
285  SCIP_CONS* cons /**< constraint to remove */
286  );
287 
288 /** remembers the current number of constraints in the problem's internal data structure
289  * - resets maximum number of constraints to current number of constraints
290  * - remembers current number of constraints as starting number of constraints
291  */
292 void SCIPprobMarkNConss(
293  SCIP_PROB* prob /**< problem data */
294  );
295 
296 /** sets objective sense: minimization or maximization */
298  SCIP_PROB* prob, /**< problem data */
299  SCIP_OBJSENSE objsense /**< new objective sense */
300  );
301 
302 /** adds value to objective offset */
304  SCIP_PROB* prob, /**< problem data */
305  SCIP_Real addval /**< value to add to objective offset */
306  );
307 
308 /** sets the dual bound on objective function */
310  SCIP_PROB* prob, /**< problem data */
311  SCIP_Real dualbound /**< external dual bound */
312  );
313 
314 /** sets limit on objective function, such that only solutions better than this limit are accepted */
315 void SCIPprobSetObjlim(
316  SCIP_PROB* prob, /**< problem data */
317  SCIP_Real objlim /**< external objective limit */
318  );
319 
320 /** informs the problem, that its objective value is always integral in every feasible solution */
322  SCIP_PROB* prob /**< problem data */
323  );
324 
325 /** sets integral objective value flag, if all variables with non-zero objective values are integral and have
326  * integral objective value and also updates the cutoff bound if primal solution is already known
327  */
329  SCIP_PROB* transprob, /**< tranformed problem data */
330  SCIP_PROB* origprob, /**< original problem data */
331  BMS_BLKMEM* blkmem, /**< block memory */
332  SCIP_SET* set, /**< global SCIP settings */
333  SCIP_STAT* stat, /**< problem statistics data */
334  SCIP_PRIMAL* primal, /**< primal data */
335  SCIP_TREE* tree, /**< branch and bound tree */
336  SCIP_REOPT* reopt, /**< reoptimization data structure */
337  SCIP_LP* lp, /**< current LP data */
338  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
339  SCIP_EVENTQUEUE* eventqueue /**< event queue */
340  );
341 
342 /** if possible, scales objective function such that it is integral with gcd = 1 */
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 /** remembers the current solution as root solution in the problem variables */
359  SCIP_PROB* prob, /**< problem data */
360  SCIP_SET* set, /**< global SCIP settings */
361  SCIP_STAT* stat, /**< SCIP statistics */
362  SCIP_LP* lp, /**< current LP data */
363  SCIP_Bool roothaslp /**< is the root solution from LP? */
364  );
365 
366 /** remembers the best solution w.r.t. root reduced cost propagation as root solution in the problem variables */
368  SCIP_PROB* prob, /**< problem data */
369  SCIP_SET* set, /**< global SCIP settings */
370  SCIP_STAT* stat, /**< problem statistics */
371  SCIP_LP* lp /**< current LP data */
372  );
373 
374 /** informs problem, that the presolving process was finished, and updates all internal data structures */
376  SCIP_PROB* prob, /**< problem data */
377  SCIP_SET* set /**< global SCIP settings */
378  );
379 
380 /** initializes problem for branch and bound process */
382  SCIP_PROB* prob, /**< problem data */
383  SCIP_SET* set /**< global SCIP settings */
384  );
385 
386 /** deinitializes problem after branch and bound process, and converts all COLUMN variables back into LOOSE variables */
388  SCIP_PROB* prob, /**< problem data */
389  BMS_BLKMEM* blkmem, /**< block memory */
390  SCIP_SET* set, /**< global SCIP settings */
391  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
392  SCIP_LP* lp, /**< current LP data */
393  SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
394  );
395 
396 
397 
398 
399 /*
400  * problem information
401  */
402 
403 /** sets problem name */
405  SCIP_PROB* prob, /**< problem data */
406  const char* name /**< name to be set */
407  );
408 
409 /** returns the number of implicit binary variables, meaning variable of vartype != SCIP_VARTYPE_BINARY and !=
410  * SCIP_VARTYPE_CONTINUOUS but with global bounds [0,1]
411  *
412  * @note this number needs to be computed, because it cannot be update like the othe counters for binary and interger
413  * variables, each time the variable type changes(, we would need to update this counter each time a global bound
414  * changes), even at the end of presolving this cannot be computed, because some variable can change to an
415  * implicit binary status
416  */
418  SCIP_PROB* prob /**< problem data */
419  );
420 
421 /** returns the number of variables with non-zero objective coefficient */
423  SCIP_PROB* prob, /**< problem data */
424  SCIP_SET* set /**< global SCIP settings */
425  );
426 
427 /** returns the minimal absolute non-zero objective coefficient
428  *
429  * @note currently, this is only used for statistics and printed after the solving process. if this information is
430  * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the minimal
431  * absolute non-zero coefficient every time an objective coefficient has changed.
432  */
434  SCIP_PROB* prob, /**< problem data */
435  SCIP_SET* set /**< global SCIP settings */
436  );
437 
438 /** returns the maximal absolute non-zero objective coefficient
439  *
440  * @note currently, this is only used for statistics and printed after the solving process. if this information is
441  * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the maximal
442  * absolute non-zero coefficient every time an objective coefficient has changed.
443  */
445  SCIP_PROB* prob, /**< problem data */
446  SCIP_SET* set /**< global SCIP settings */
447  );
448 
449 /** update the number of variables with non-zero objective coefficient */
451  SCIP_PROB* prob, /**< problem data */
452  SCIP_SET* set, /**< global SCIP settings */
453  SCIP_Real oldobj, /**< old objective value for variable */
454  SCIP_Real newobj /**< new objective value for variable */
455  );
456 
457 /** update the dual bound if its better as the current one */
459  SCIP_PROB* prob, /**< problem data */
460  SCIP_Real newbound /**< new dual bound for the node (if it's tighter than the old one) */
461  );
462 
463 /** invalidates the dual bound */
465  SCIP_PROB* prob /**< problem data */
466  );
467 
468 /** returns the external value of the given internal objective value */
470  SCIP_PROB* transprob, /**< tranformed problem data */
471  SCIP_PROB* origprob, /**< original problem data */
472  SCIP_SET* set, /**< global SCIP settings */
473  SCIP_Real objval /**< internal objective value */
474  );
475 
476 /** returns the internal value of the given external objective value */
478  SCIP_PROB* transprob, /**< tranformed problem data */
479  SCIP_PROB* origprob, /**< original problem data */
480  SCIP_SET* set, /**< global SCIP settings */
481  SCIP_Real objval /**< external objective value */
482  );
483 
484 /** returns variable of the problem with given name */
486  SCIP_PROB* prob, /**< problem data */
487  const char* name /**< name of variable to find */
488  );
489 
490 /** returns constraint of the problem with given name */
492  SCIP_PROB* prob, /**< problem data */
493  const char* name /**< name of variable to find */
494  );
495 
496 /** displays current pseudo solution */
498  SCIP_PROB* prob, /**< problem data */
499  SCIP_SET* set, /**< global SCIP settings */
500  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
501  );
502 
503 /** outputs problem statistics */
505  SCIP_PROB* prob, /**< problem data */
506  SCIP_SET* set, /**< global SCIP settings */
507  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
508  FILE* file /**< output file (or NULL for standard output) */
509  );
510 
511 
512 #ifndef NDEBUG
513 
514 /* In debug mode, the following methods are implemented as function calls to ensure
515  * type validity.
516  */
517 
518 /** is the problem permuted */
520  SCIP_PROB* prob
521  );
522 
523 /** mark the problem as permuted */
525  SCIP_PROB* prob
526  );
527 
528 /** is the problem data transformed */
530  SCIP_PROB* prob /**< problem data */
531  );
532 
533 /** returns whether the objective value is known to be integral in every feasible solution */
535  SCIP_PROB* prob /**< problem data */
536  );
537 
538 /** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
539  * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
540  */
542  SCIP_PROB* prob, /**< problem data */
543  SCIP_SET* set, /**< global SCIP settings */
544  SCIP_LP* lp /**< current LP data */
545  );
546 
547 /** gets limit on objective function in external space */
549  SCIP_PROB* prob, /**< problem data */
550  SCIP_SET* set /**< global SCIP settings */
551  );
552 
553 /** gets user problem data */
555  SCIP_PROB* prob /**< problem */
556  );
557 
558 /** gets problem name */
559 const char* SCIPprobGetName(
560  SCIP_PROB* prob /**< problem data */
561  );
562 
563 /** gets number of problem variables */
564 int SCIPprobGetNVars(
565  SCIP_PROB* prob /**< problem data */
566  );
567 
568 /** gets number of binary problem variables */
570  SCIP_PROB* prob /**< problem data */
571  );
572 
573 /** gets number of integer problem variables */
575  SCIP_PROB* prob /**< problem data */
576  );
577 
578 /** gets number of implicit integer problem variables */
580  SCIP_PROB* prob /**< problem data */
581  );
582 
583 /** gets number of continuous problem variables */
585  SCIP_PROB* prob /**< problem data */
586  );
587 
588 /** gets problem variables */
590  SCIP_PROB* prob /**< problem data */
591  );
592 
593 /** gets number of problem constraints */
595  SCIP_PROB* prob /**< problem data */
596  );
597 
598 /** gets the objective offset */
600  SCIP_PROB* prob /**< problem data */
601  );
602 
603 /** gets the objective scalar */
605  SCIP_PROB* prob /**< problem data */
606  );
607 
608 /** is constraint compression enabled for this problem? */
610  SCIP_PROB* prob /**< problem data */
611  );
612 
613 /** enable problem compression, i.e., constraints can reduce memory size by removing fixed variables during creation */
615  SCIP_PROB* prob /**< problem data */
616  );
617 
618 #else
619 
620 /* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
621  * speed up the algorithms.
622  */
623 
624 #define SCIPprobIsPermuted(prob) ((prob)->permuted)
625 #define SCIPprobMarkPermuted(prob) ((prob)->permuted = TRUE)
626 #define SCIPprobIsTransformed(prob) ((prob)->transformed)
627 #define SCIPprobIsObjIntegral(prob) ((prob)->objisintegral)
628 #define SCIPprobAllColsInLP(prob,set,lp) (SCIPlpGetNCols(lp) == (prob)->ncolvars && (set)->nactivepricers == 0)
629 #define SCIPprobGetObjlim(prob,set) \
630  ((prob)->objlim >= SCIP_INVALID ? (SCIP_Real)((prob)->objsense) * SCIPsetInfinity(set) : (prob)->objlim)
631 #define SCIPprobGetData(prob) ((prob)->probdata)
632 #define SCIPprobGetName(prob) ((prob)->name)
633 #define SCIPprobGetName(prob) ((prob)->name)
634 #define SCIPprobGetNVars(prob) ((prob)->nvars)
635 #define SCIPprobGetNBinVars(prob) ((prob)->nbinvars)
636 #define SCIPprobGetNIntVars(prob) ((prob)->nintvars)
637 #define SCIPprobGetNImplVars(prob) ((prob)->nimplvars)
638 #define SCIPprobGetNContVars(prob) ((prob)->ncontvars)
639 #define SCIPprobGetVars(prob) ((prob)->vars)
640 #define SCIPprobGetNConss(prob) ((prob)->nconss)
641 #define SCIPprobGetObjoffset(prob) ((prob)->objoffset)
642 #define SCIPprobGetObjscale(prob) ((prob)->objscale)
643 #define SCIPprobIsConsCompressionEnabled(prob) ((prob)->conscompression)
644 #define SCIPprobEnableConsCompression(prob) ((prob)->conscompression = TRUE)
645 #endif
646 
647 
648 #ifdef __cplusplus
649 }
650 #endif
651 
652 #endif
SCIP_Bool SCIPprobIsObjIntegral(SCIP_PROB *prob)
Definition: prob.c:2263
SCIP_Real SCIPprobGetObjoffset(SCIP_PROB *prob)
Definition: prob.c:2381
SCIP_PROBDATA * SCIPprobGetData(SCIP_PROB *prob)
Definition: prob.c:2299
SCIP_RETCODE SCIPprobRemoveVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition: prob.c:913
int SCIPprobGetNVars(SCIP_PROB *prob)
Definition: prob.c:2318
type definitions for implications, variable bounds, and cliques
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:255
int SCIPprobGetNObjVars(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1985
#define SCIP_DECL_PROBINITSOL(x)
Definition: type_prob.h:97
#define SCIP_DECL_PROBDELORIG(x)
Definition: type_prob.h:55
type definitions for conflict store
void SCIPprobSetExitsol(SCIP_PROB *prob, SCIP_DECL_PROBEXITSOL((*probexitsol)))
Definition: prob.c:378
int SCIPprobGetNContVars(SCIP_PROB *prob)
Definition: prob.c:2354
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:518
void SCIPprobSetInitsol(SCIP_PROB *prob, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: prob.c:367
void SCIPprobSetTrans(SCIP_PROB *prob, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: prob.c:345
SCIP_Bool SCIPprobIsConsCompressionEnabled(SCIP_PROB *prob)
Definition: prob.c:2399
SCIP_Bool SCIPprobIsTransformed(SCIP_PROB *prob)
Definition: prob.c:2253
#define SCIP_DECL_PROBDELTRANS(x)
Definition: type_prob.h:86
void SCIPprobResortVars(SCIP_PROB *prob)
Definition: prob.c:645
SCIP_RETCODE SCIPprobAddConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1240
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
int SCIPprobGetNImplVars(SCIP_PROB *prob)
Definition: prob.c:2345
type definitions for global SCIP settings
type definitions for return codes for SCIP methods
void SCIPprobUpdateNObjVars(SCIP_PROB *prob, SCIP_SET *set, SCIP_Real oldobj, SCIP_Real newobj)
Definition: prob.c:1542
#define SCIP_DECL_PROBCOPY(x)
Definition: type_prob.h:140
type definitions for collecting reoptimization information
void SCIPprobSetDelorig(SCIP_PROB *prob, SCIP_DECL_PROBDELORIG((*probdelorig)))
Definition: prob.c:334
void SCIPprobPrintPseudoSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: prob.c:2164
type definitions for branching rules
type definitions for problem statistics
void SCIPprobSetCopy(SCIP_PROB *prob, SCIP_DECL_PROBCOPY((*probcopy)))
Definition: prob.c:389
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 global)
Definition: prob.c:192
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:1133
void SCIPprobSetObjlim(SCIP_PROB *prob, SCIP_Real objlim)
Definition: prob.c:1455
type definitions for LP management
void SCIPprobPrintStatistics(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: prob.c:2186
SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2082
int SCIPprobGetNConss(SCIP_PROB *prob)
Definition: prob.c:2372
SCIP_CONS * SCIPprobFindCons(SCIP_PROB *prob, const char *name)
Definition: prob.c:2145
SCIP_RETCODE SCIPprobSetName(SCIP_PROB *prob, const char *name)
Definition: prob.c:1947
SCIP_RETCODE SCIPprobDelVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: prob.c:1001
void SCIPprobSetDeltrans(SCIP_PROB *prob, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: prob.c:356
void SCIPprobEnableConsCompression(SCIP_PROB *prob)
Definition: prob.c:2409
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:928
void SCIPprobSetDualbound(SCIP_PROB *prob, SCIP_Real dualbound)
Definition: prob.c:1444
SCIP_RETCODE SCIPprobResetBounds(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: prob.c:619
void SCIPprobMarkPermuted(SCIP_PROB *prob)
Definition: prob.c:2243
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:1478
SCIP_VAR * SCIPprobFindVar(SCIP_PROB *prob, const char *name)
Definition: prob.c:2126
int SCIPprobGetNIntVars(SCIP_PROB *prob)
Definition: prob.c:2336
type definitions for problem variables
void SCIPprobUpdateBestRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
Definition: prob.c:1755
SCIP_RETCODE SCIPprobRemoveConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1255
type definitions for managing events
int SCIPprobGetNBinVars(SCIP_PROB *prob)
Definition: prob.c:2327
void SCIPprobSetObjIntegral(SCIP_PROB *prob)
Definition: prob.c:1466
#define SCIP_DECL_PROBTRANS(x)
Definition: type_prob.h:74
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:400
#define SCIP_Bool
Definition: def.h:70
#define SCIP_DECL_PROBEXITSOL(x)
Definition: type_prob.h:110
SCIP_RETCODE SCIPprobVarChangedStatus(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BRANCHCAND *branchcand, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var)
Definition: prob.c:1182
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
SCIP_Bool SCIPprobIsPermuted(SCIP_PROB *prob)
Definition: prob.c:2233
SCIP_RETCODE SCIPprobInitSolve(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1862
type definitions for branch and bound tree
SCIP_RETCODE SCIPprobExitPresolve(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1853
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
Definition: prob.c:2275
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPprobAddCons(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition: prob.c:1277
SCIP_Real SCIPprobGetObjlim(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2287
datastructures for storing and manipulating the main problem
SCIP_Real SCIPprobGetObjscale(SCIP_PROB *prob)
Definition: prob.c:2390
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:1062
void SCIPprobAddObjoffset(SCIP_PROB *prob, SCIP_Real addval)
Definition: prob.c:1431
SCIP_RETCODE SCIPprobAddVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition: prob.c:897
void SCIPprobUpdateDualbound(SCIP_PROB *prob, SCIP_Real newbound)
Definition: prob.c:1559
struct SCIP_ProbData SCIP_PROBDATA
Definition: type_prob.h:44
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:1596
SCIP_RETCODE SCIPprobExitSolve(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Bool restart)
Definition: prob.c:1897
void SCIPprobMarkNConss(SCIP_PROB *prob)
Definition: prob.c:1405
SCIP_Real SCIPprobGetAbsMaxObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2059
void SCIPprobInvalidateDualbound(SCIP_PROB *prob)
Definition: prob.c:1586
#define SCIP_Real
Definition: def.h:163
SCIP_RETCODE SCIPprobDelCons(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition: prob.c:1345
SCIP_Real SCIPprobGetAbsMinObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2032
void SCIPprobSetData(SCIP_PROB *prob, SCIP_PROBDATA *probdata)
Definition: prob.c:703
int SCIPprobGetNImplBinVars(SCIP_PROB *prob)
Definition: prob.c:1968
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:60
SCIP_VAR ** SCIPprobGetVars(SCIP_PROB *prob)
Definition: prob.c:2363
void SCIPprobSetObjsense(SCIP_PROB *prob, SCIP_OBJSENSE objsense)
Definition: prob.c:1418
type definitions for collecting primal CIP solutions and primal informations
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:429
const char * SCIPprobGetName(SCIP_PROB *prob)
Definition: prob.c:2309
SCIP_Real SCIPprobInternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2104
type definitions for constraints and constraint handlers
void SCIPprobStoreRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool roothaslp)
Definition: prob.c:1728
memory allocation routines