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-2017 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 email to scip@zib.de. */
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  */
77 extern
79  SCIP_PROB** prob, /**< pointer to problem data structure */
80  BMS_BLKMEM* blkmem, /**< block memory */
81  SCIP_SET* set, /**< global SCIP settings */
82  const char* name, /**< problem name */
83  SCIP_DECL_PROBDELORIG ((*probdelorig)), /**< frees user data of original problem */
84  SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
85  SCIP_DECL_PROBDELTRANS((*probdeltrans)), /**< frees user data of transformed problem */
86  SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
87  SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
88  SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
89  SCIP_PROBDATA* probdata, /**< user problem data set by the reader */
90  SCIP_Bool transformed /**< is this the transformed problem? */
91  );
92 
93 /** sets callback to free user data of original problem */
94 extern
96  SCIP_PROB* prob, /**< problem */
97  SCIP_DECL_PROBDELORIG ((*probdelorig)) /**< frees user data of original problem */
98  );
99 
100 /** sets callback to create user data of transformed problem by transforming original user data */
101 extern
102 void SCIPprobSetTrans(
103  SCIP_PROB* prob, /**< problem */
104  SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
105  );
106 
107 /** sets callback to free user data of transformed problem */
108 extern
110  SCIP_PROB* prob, /**< problem */
111  SCIP_DECL_PROBDELTRANS((*probdeltrans)) /**< frees user data of transformed problem */
112  );
113 
114 /** sets solving process initialization callback of transformed data */
115 extern
116 void SCIPprobSetInitsol(
117  SCIP_PROB* prob, /**< problem */
118  SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization callback of transformed data */
119  );
120 
121 /** sets solving process deinitialization callback of transformed data */
122 extern
123 void SCIPprobSetExitsol(
124  SCIP_PROB* prob, /**< problem */
125  SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization callback of transformed data */
126  );
127 
128 /** sets callback to copy user data to copy it to a subscip, or NULL */
129 extern
130 void SCIPprobSetCopy(
131  SCIP_PROB* prob, /**< problem */
132  SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
133  );
134 
135 /** frees problem data structure */
136 extern
138  SCIP_PROB** prob, /**< pointer to problem data structure */
139  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
140  BMS_BLKMEM* blkmem, /**< block memory buffer */
141  SCIP_SET* set, /**< global SCIP settings */
142  SCIP_STAT* stat, /**< dynamic problem statistics */
143  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
144  SCIP_LP* lp /**< current LP data (or NULL, if it's the original problem) */
145  );
146 
147 /** transform problem data into normalized form */
148 extern
150  SCIP_PROB* source, /**< problem to transform */
151  BMS_BLKMEM* blkmem, /**< block memory buffer */
152  SCIP_SET* set, /**< global SCIP settings */
153  SCIP_STAT* stat, /**< problem statistics */
154  SCIP_PRIMAL* primal, /**< primal data */
155  SCIP_TREE* tree, /**< branch and bound tree */
156  SCIP_REOPT* reopt, /**< reoptimization data structure */
157  SCIP_LP* lp, /**< current LP data */
158  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
159  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
160  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
161  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
162  SCIP_PROB** target /**< pointer to target problem data structure */
163  );
164 
165 /** resets the global and local bounds of original variables in original problem to their original values */
166 extern
168  SCIP_PROB* prob, /**< original problem data */
169  BMS_BLKMEM* blkmem, /**< block memory */
170  SCIP_SET* set, /**< global SCIP settings */
171  SCIP_STAT* stat /**< problem statistics */
172  );
173 
174 /** (Re)Sort the variables, which appear in the four categories (binary, integer, implicit, continuous) after presolve
175  * with respect to their original index (within their categories). Adjust the problem index afterwards which is
176  * supposed to reflect the position in the variable array. This additional (re)sorting is supposed to get more robust
177  * against the order presolving fixed variables. (We also reobtain a possible block structure induced by the user
178  * model)
179  */
180 extern
181 void SCIPprobResortVars(
182  SCIP_PROB* prob /**< problem data */
183  );
184 
185 
186 /*
187  * problem modification
188  */
189 
190 /** sets user problem data */
191 extern
192 void SCIPprobSetData(
193  SCIP_PROB* prob, /**< problem */
194  SCIP_PROBDATA* probdata /**< user problem data to use */
195  );
196 
197 /** adds variable's name to the namespace */
198 extern
200  SCIP_PROB* prob, /**< problem data */
201  SCIP_VAR* var /**< variable */
202  );
203 
204 /** removes variable's name from the namespace */
205 extern
207  SCIP_PROB* prob, /**< problem data */
208  SCIP_VAR* var /**< variable */
209  );
210 
211 /** adds variable to the problem and captures it */
212 extern
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 */
225 extern
227  SCIP_PROB* prob, /**< problem data */
228  BMS_BLKMEM* blkmem, /**< block memory */
229  SCIP_SET* set, /**< global SCIP settings */
230  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
231  SCIP_VAR* var, /**< problem variable */
232  SCIP_Bool* deleted /**< pointer to store whether marking variable to be deleted was successful */
233  );
234 
235 /** actually removes the deleted variables from the problem and releases them */
236 extern
238  SCIP_PROB* prob, /**< problem data */
239  BMS_BLKMEM* blkmem, /**< block memory */
240  SCIP_SET* set, /**< global SCIP settings */
241  SCIP_STAT* stat, /**< dynamic problem statistics */
242  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
243  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
244  SCIP_LP* lp, /**< current LP data (may be NULL) */
245  SCIP_BRANCHCAND* branchcand /**< branching candidate storage */
246  );
247 
248 /** changes the type of a variable in the problem */
249 extern
251  SCIP_PROB* prob, /**< problem data */
252  BMS_BLKMEM* blkmem, /**< block memory */
253  SCIP_SET* set, /**< global SCIP settings */
254  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
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 */
261 extern
263  SCIP_PROB* prob, /**< problem data */
264  BMS_BLKMEM* blkmem, /**< block memory */
265  SCIP_SET* set, /**< global SCIP settings */
266  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
267  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
268  SCIP_VAR* var /**< problem variable */
269  );
270 
271 /** adds constraint's name to the namespace */
272 extern
274  SCIP_PROB* prob, /**< problem data */
275  SCIP_CONS* cons /**< constraint */
276  );
277 
278 /** remove constraint's name from the namespace */
279 extern
281  SCIP_PROB* prob, /**< problem data */
282  SCIP_CONS* cons /**< constraint */
283  );
284 
285 /** adds constraint to the problem and captures it;
286  * a local constraint is automatically upgraded into a global constraint
287  */
288 extern
290  SCIP_PROB* prob, /**< problem data */
291  SCIP_SET* set, /**< global SCIP settings */
292  SCIP_STAT* stat, /**< dynamic problem statistics */
293  SCIP_CONS* cons /**< constraint to add */
294  );
295 
296 /** releases and removes constraint from the problem; if the user has not captured the constraint for his own use, the
297  * constraint may be invalid after the call
298  */
299 extern
301  SCIP_PROB* prob, /**< problem data */
302  BMS_BLKMEM* blkmem, /**< block memory */
303  SCIP_SET* set, /**< global SCIP settings */
304  SCIP_STAT* stat, /**< dynamic problem statistics */
305  SCIP_CONS* cons /**< constraint to remove */
306  );
307 
308 /** remembers the current number of constraints in the problem's internal data structure
309  * - resets maximum number of constraints to current number of constraints
310  * - remembers current number of constraints as starting number of constraints
311  */
312 extern
313 void SCIPprobMarkNConss(
314  SCIP_PROB* prob /**< problem data */
315  );
316 
317 /** sets objective sense: minimization or maximization */
318 extern
320  SCIP_PROB* prob, /**< problem data */
321  SCIP_OBJSENSE objsense /**< new objective sense */
322  );
323 
324 /** adds value to objective offset */
325 extern
327  SCIP_PROB* prob, /**< problem data */
328  SCIP_Real addval /**< value to add to objective offset */
329  );
330 
331 /** sets the dual bound on objective function */
332 extern
334  SCIP_PROB* prob, /**< problem data */
335  SCIP_Real dualbound /**< external dual bound */
336  );
337 
338 /** sets limit on objective function, such that only solutions better than this limit are accepted */
339 extern
340 void SCIPprobSetObjlim(
341  SCIP_PROB* prob, /**< problem data */
342  SCIP_Real objlim /**< external objective limit */
343  );
344 
345 /** informs the problem, that its objective value is always integral in every feasible solution */
346 extern
348  SCIP_PROB* prob /**< problem data */
349  );
350 
351 /** sets integral objective value flag, if all variables with non-zero objective values are integral and have
352  * integral objective value and also updates the cutoff bound if primal solution is already known
353  */
354 extern
356  SCIP_PROB* transprob, /**< tranformed problem data */
357  SCIP_PROB* origprob, /**< original problem data */
358  BMS_BLKMEM* blkmem, /**< block memory */
359  SCIP_SET* set, /**< global SCIP settings */
360  SCIP_STAT* stat, /**< problem statistics data */
361  SCIP_PRIMAL* primal, /**< primal data */
362  SCIP_TREE* tree, /**< branch and bound tree */
363  SCIP_REOPT* reopt, /**< reoptimization data structure */
364  SCIP_LP* lp, /**< current LP data */
365  SCIP_EVENTQUEUE* eventqueue /**< event queue */
366  );
367 
368 /** if possible, scales objective function such that it is integral with gcd = 1 */
369 extern
371  SCIP_PROB* transprob, /**< tranformed problem data */
372  SCIP_PROB* origprob, /**< original problem data */
373  BMS_BLKMEM* blkmem, /**< block memory */
374  SCIP_SET* set, /**< global SCIP settings */
375  SCIP_STAT* stat, /**< problem statistics data */
376  SCIP_PRIMAL* primal, /**< primal data */
377  SCIP_TREE* tree, /**< branch and bound tree */
378  SCIP_REOPT* reopt, /**< reoptimization data structure */
379  SCIP_LP* lp, /**< current LP data */
380  SCIP_EVENTQUEUE* eventqueue /**< event queue */
381  );
382 
383 /** remembers the current solution as root solution in the problem variables */
384 extern
386  SCIP_PROB* prob, /**< problem data */
387  SCIP_SET* set, /**< global SCIP settings */
388  SCIP_STAT* stat, /**< SCIP statistics */
389  SCIP_LP* lp, /**< current LP data */
390  SCIP_Bool roothaslp /**< is the root solution from LP? */
391  );
392 
393 /** remembers the best solution w.r.t. root reduced cost propagation as root solution in the problem variables */
394 extern
396  SCIP_PROB* prob, /**< problem data */
397  SCIP_SET* set, /**< global SCIP settings */
398  SCIP_STAT* stat, /**< problem statistics */
399  SCIP_LP* lp /**< current LP data */
400  );
401 
402 /** informs problem, that the presolving process was finished, and updates all internal data structures */
403 extern
405  SCIP_PROB* prob, /**< problem data */
406  SCIP_SET* set /**< global SCIP settings */
407  );
408 
409 /** initializes problem for branch and bound process */
410 extern
412  SCIP_PROB* prob, /**< problem data */
413  SCIP_SET* set /**< global SCIP settings */
414  );
415 
416 /** deinitializes problem after branch and bound process, and converts all COLUMN variables back into LOOSE variables */
417 extern
419  SCIP_PROB* prob, /**< problem data */
420  BMS_BLKMEM* blkmem, /**< block memory */
421  SCIP_SET* set, /**< global SCIP settings */
422  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
423  SCIP_LP* lp, /**< current LP data */
424  SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
425  );
426 
427 
428 
429 
430 /*
431  * problem information
432  */
433 
434 /** sets problem name */
435 extern
437  SCIP_PROB* prob, /**< problem data */
438  const char* name /**< name to be set */
439  );
440 
441 /** returns the number of implicit binary variables, meaning variable of vartype != SCIP_VARTYPE_BINARY and !=
442  * SCIP_VARTYPE_CONTINUOUS but with global bounds [0,1]
443  *
444  * @note this number needs to be computed, because it cannot be update like the othe counters for binary and interger
445  * variables, each time the variable type changes(, we would need to update this counter each time a global bound
446  * changes), even at the end of presolving this cannot be computed, because some variable can change to an
447  * implicit binary status
448  */
449 extern
451  SCIP_PROB* prob /**< problem data */
452  );
453 
454 /** returns the number of variables with non-zero objective coefficient */
455 extern
457  SCIP_PROB* prob, /**< problem data */
458  SCIP_SET* set /**< global SCIP settings */
459  );
460 
461 /** returns the minimal absolute non-zero objective coefficient
462  *
463  * @note currently, this is only used for statistics and printed after the solving process. if this information is
464  * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the minimal
465  * absolute non-zero coefficient every time an objective coefficient has changed.
466  */
467 extern
469  SCIP_PROB* prob, /**< problem data */
470  SCIP_SET* set /**< global SCIP settings */
471  );
472 
473 /** returns the maximal absolute non-zero objective coefficient
474  *
475  * @note currently, this is only used for statistics and printed after the solving process. if this information is
476  * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the maximal
477  * absolute non-zero coefficient every time an objective coefficient has changed.
478  */
479 extern
481  SCIP_PROB* prob, /**< problem data */
482  SCIP_SET* set /**< global SCIP settings */
483  );
484 
485 /** update the number of variables with non-zero objective coefficient */
486 extern
488  SCIP_PROB* prob, /**< problem data */
489  SCIP_SET* set, /**< global SCIP settings */
490  SCIP_Real oldobj, /**< old objective value for variable */
491  SCIP_Real newobj /**< new objective value for variable */
492  );
493 
494 /** update the dual bound if its better as the current one */
495 extern
497  SCIP_PROB* prob, /**< problem data */
498  SCIP_Real newbound /**< new dual bound for the node (if it's tighter than the old one) */
499  );
500 
501 /** invalidates the dual bound */
502 extern
504  SCIP_PROB* prob /**< problem data */
505  );
506 
507 /** returns the external value of the given internal objective value */
508 extern
510  SCIP_PROB* transprob, /**< tranformed problem data */
511  SCIP_PROB* origprob, /**< original problem data */
512  SCIP_SET* set, /**< global SCIP settings */
513  SCIP_Real objval /**< internal objective value */
514  );
515 
516 /** returns the internal value of the given external objective value */
517 extern
519  SCIP_PROB* transprob, /**< tranformed problem data */
520  SCIP_PROB* origprob, /**< original problem data */
521  SCIP_SET* set, /**< global SCIP settings */
522  SCIP_Real objval /**< external objective value */
523  );
524 
525 /** returns variable of the problem with given name */
526 extern
528  SCIP_PROB* prob, /**< problem data */
529  const char* name /**< name of variable to find */
530  );
531 
532 /** returns constraint of the problem with given name */
533 extern
535  SCIP_PROB* prob, /**< problem data */
536  const char* name /**< name of variable to find */
537  );
538 
539 /** displays current pseudo solution */
540 extern
542  SCIP_PROB* prob, /**< problem data */
543  SCIP_SET* set, /**< global SCIP settings */
544  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
545  );
546 
547 /** outputs problem statistics */
548 extern
550  SCIP_PROB* prob, /**< problem data */
551  SCIP_SET* set, /**< global SCIP settings */
552  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
553  FILE* file /**< output file (or NULL for standard output) */
554  );
555 
556 
557 #ifndef NDEBUG
558 
559 /* In debug mode, the following methods are implemented as function calls to ensure
560  * type validity.
561  */
562 
563 /** is the problem permuted */
564 extern
566  SCIP_PROB* prob
567  );
568 
569 /** mark the problem as permuted */
570 extern
572  SCIP_PROB* prob
573  );
574 
575 /** is the problem data transformed */
576 extern
578  SCIP_PROB* prob /**< problem data */
579  );
580 
581 /** returns whether the objective value is known to be integral in every feasible solution */
582 extern
584  SCIP_PROB* prob /**< problem data */
585  );
586 
587 /** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
588  * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
589  */
590 extern
592  SCIP_PROB* prob, /**< problem data */
593  SCIP_SET* set, /**< global SCIP settings */
594  SCIP_LP* lp /**< current LP data */
595  );
596 
597 /** gets limit on objective function in external space */
598 extern
600  SCIP_PROB* prob, /**< problem data */
601  SCIP_SET* set /**< global SCIP settings */
602  );
603 
604 /** gets user problem data */
605 extern
607  SCIP_PROB* prob /**< problem */
608  );
609 
610 /** gets problem name */
611 extern
612 const char* SCIPprobGetName(
613  SCIP_PROB* prob /**< problem data */
614  );
615 
616 /** gets number of problem variables */
617 extern
618 int SCIPprobGetNVars(
619  SCIP_PROB* prob /**< problem data */
620  );
621 
622 /** gets number of binary problem variables */
623 extern
625  SCIP_PROB* prob /**< problem data */
626  );
627 
628 /** gets number of integer problem variables */
629 extern
631  SCIP_PROB* prob /**< problem data */
632  );
633 
634 /** gets number of implicit integer problem variables */
635 extern
637  SCIP_PROB* prob /**< problem data */
638  );
639 
640 /** gets number of continuous problem variables */
641 extern
643  SCIP_PROB* prob /**< problem data */
644  );
645 
646 /** gets problem variables */
647 extern
649  SCIP_PROB* prob /**< problem data */
650  );
651 
652 /** gets number of problem constraints */
653 extern
655  SCIP_PROB* prob /**< problem data */
656  );
657 
658 /** gets the objective offset */
659 extern
661  SCIP_PROB* prob /**< problem data */
662  );
663 
664 /** gets the objective scalar */
665 extern
667  SCIP_PROB* prob /**< problem data */
668  );
669 
670 /** is constraint compression enabled for this problem? */
671 extern
673  SCIP_PROB* prob /**< problem data */
674  );
675 
676 /** enable problem compression, i.e., constraints can reduce memory size by removing fixed variables during creation */
677 extern
679  SCIP_PROB* prob /**< problem data */
680  );
681 
682 #else
683 
684 /* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
685  * speed up the algorithms.
686  */
687 
688 #define SCIPprobIsPermuted(prob) ((prob)->permuted)
689 #define SCIPprobMarkPermuted(prob) ((prob)->permuted = TRUE)
690 #define SCIPprobIsTransformed(prob) ((prob)->transformed)
691 #define SCIPprobIsObjIntegral(prob) ((prob)->objisintegral)
692 #define SCIPprobAllColsInLP(prob,set,lp) (SCIPlpGetNCols(lp) == (prob)->ncolvars && (set)->nactivepricers == 0)
693 #define SCIPprobGetObjlim(prob,set) \
694  ((prob)->objlim >= SCIP_INVALID ? (SCIP_Real)((prob)->objsense) * SCIPsetInfinity(set) : (prob)->objlim)
695 #define SCIPprobGetData(prob) ((prob)->probdata)
696 #define SCIPprobGetName(prob) ((prob)->name)
697 #define SCIPprobGetName(prob) ((prob)->name)
698 #define SCIPprobGetNVars(prob) ((prob)->nvars)
699 #define SCIPprobGetNBinVars(prob) ((prob)->nbinvars)
700 #define SCIPprobGetNIntVars(prob) ((prob)->nintvars)
701 #define SCIPprobGetNImplVars(prob) ((prob)->nimplvars)
702 #define SCIPprobGetNContVars(prob) ((prob)->ncontvars)
703 #define SCIPprobGetVars(prob) ((prob)->vars)
704 #define SCIPprobGetNConss(prob) ((prob)->nconss)
705 #define SCIPprobGetObjoffset(prob) ((prob)->objoffset)
706 #define SCIPprobGetObjscale(prob) ((prob)->objscale)
707 #define SCIPprobIsConsCompressionEnabled(prob) ((prob)->conscompression)
708 #define SCIPprobEnableConsCompression(prob) ((prob)->conscompression = TRUE)
709 #endif
710 
711 
712 #ifdef __cplusplus
713 }
714 #endif
715 
716 #endif
SCIP_Bool SCIPprobIsObjIntegral(SCIP_PROB *prob)
Definition: prob.c:2250
SCIP_Real SCIPprobGetObjoffset(SCIP_PROB *prob)
Definition: prob.c:2368
SCIP_PROBDATA * SCIPprobGetData(SCIP_PROB *prob)
Definition: prob.c:2286
SCIP_RETCODE SCIPprobRemoveVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition: prob.c:899
int SCIPprobGetNVars(SCIP_PROB *prob)
Definition: prob.c:2305
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:249
int SCIPprobGetNObjVars(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1972
#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:372
int SCIPprobGetNContVars(SCIP_PROB *prob)
Definition: prob.c:2341
SCIP_RETCODE SCIPprobChgVarType(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BRANCHCAND *branchcand, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_VARTYPE vartype)
Definition: prob.c:1125
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:504
void SCIPprobSetInitsol(SCIP_PROB *prob, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: prob.c:361
void SCIPprobSetTrans(SCIP_PROB *prob, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: prob.c:339
SCIP_Bool SCIPprobIsConsCompressionEnabled(SCIP_PROB *prob)
Definition: prob.c:2386
SCIP_Bool SCIPprobIsTransformed(SCIP_PROB *prob)
Definition: prob.c:2240
#define SCIP_DECL_PROBDELTRANS(x)
Definition: type_prob.h:86
void SCIPprobResortVars(SCIP_PROB *prob)
Definition: prob.c:631
SCIP_RETCODE SCIPprobAddConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1229
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
int SCIPprobGetNImplVars(SCIP_PROB *prob)
Definition: prob.c:2332
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:1530
#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:328
void SCIPprobPrintPseudoSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: prob.c:2151
type definitions for branching rules
type definitions for problem statistics
void SCIPprobSetCopy(SCIP_PROB *prob, SCIP_DECL_PROBCOPY((*probcopy)))
Definition: prob.c:383
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:186
void SCIPprobSetObjlim(SCIP_PROB *prob, SCIP_Real objlim)
Definition: prob.c:1444
type definitions for LP management
void SCIPprobPrintStatistics(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: prob.c:2173
SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2069
int SCIPprobGetNConss(SCIP_PROB *prob)
Definition: prob.c:2359
SCIP_CONS * SCIPprobFindCons(SCIP_PROB *prob, const char *name)
Definition: prob.c:2132
SCIP_RETCODE SCIPprobSetName(SCIP_PROB *prob, const char *name)
Definition: prob.c:1934
SCIP_RETCODE SCIPprobDelVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: prob.c:993
void SCIPprobSetDeltrans(SCIP_PROB *prob, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: prob.c:350
void SCIPprobEnableConsCompression(SCIP_PROB *prob)
Definition: prob.c:2396
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:914
void SCIPprobSetDualbound(SCIP_PROB *prob, SCIP_Real dualbound)
Definition: prob.c:1433
SCIP_RETCODE SCIPprobResetBounds(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: prob.c:605
void SCIPprobMarkPermuted(SCIP_PROB *prob)
Definition: prob.c:2230
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_EVENTQUEUE *eventqueue)
Definition: prob.c:1584
SCIP_VAR * SCIPprobFindVar(SCIP_PROB *prob, const char *name)
Definition: prob.c:2113
int SCIPprobGetNIntVars(SCIP_PROB *prob)
Definition: prob.c:2323
type definitions for problem variables
void SCIPprobUpdateBestRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
Definition: prob.c:1742
SCIP_RETCODE SCIPprobRemoveConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1244
type definitions for managing events
int SCIPprobGetNBinVars(SCIP_PROB *prob)
Definition: prob.c:2314
void SCIPprobSetObjIntegral(SCIP_PROB *prob)
Definition: prob.c:1455
#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:394
#define SCIP_Bool
Definition: def.h:61
#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:1171
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
SCIP_Bool SCIPprobIsPermuted(SCIP_PROB *prob)
Definition: prob.c:2220
SCIP_RETCODE SCIPprobInitSolve(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1849
type definitions for branch and bound tree
SCIP_RETCODE SCIPprobExitPresolve(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1840
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
Definition: prob.c:2262
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:1266
SCIP_Real SCIPprobGetObjlim(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2274
datastructures for storing and manipulating the main problem
SCIP_Real SCIPprobGetObjscale(SCIP_PROB *prob)
Definition: prob.c:2377
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:1054
void SCIPprobAddObjoffset(SCIP_PROB *prob, SCIP_Real addval)
Definition: prob.c:1420
SCIP_RETCODE SCIPprobAddVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition: prob.c:883
void SCIPprobUpdateDualbound(SCIP_PROB *prob, SCIP_Real newbound)
Definition: prob.c:1547
struct SCIP_ProbData SCIP_PROBDATA
Definition: type_prob.h:44
SCIP_RETCODE SCIPprobExitSolve(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Bool restart)
Definition: prob.c:1884
void SCIPprobMarkNConss(SCIP_PROB *prob)
Definition: prob.c:1394
SCIP_Real SCIPprobGetAbsMaxObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2046
void SCIPprobInvalidateDualbound(SCIP_PROB *prob)
Definition: prob.c:1574
#define SCIP_Real
Definition: def.h:149
SCIP_RETCODE SCIPprobDelCons(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition: prob.c:1334
SCIP_Real SCIPprobGetAbsMinObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2019
void SCIPprobSetData(SCIP_PROB *prob, SCIP_PROBDATA *probdata)
Definition: prob.c:689
int SCIPprobGetNImplBinVars(SCIP_PROB *prob)
Definition: prob.c:1955
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:60
SCIP_VAR ** SCIPprobGetVars(SCIP_PROB *prob)
Definition: prob.c:2350
void SCIPprobSetObjsense(SCIP_PROB *prob, SCIP_OBJSENSE objsense)
Definition: prob.c:1407
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:419
const char * SCIPprobGetName(SCIP_PROB *prob)
Definition: prob.c:2296
SCIP_Real SCIPprobInternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2091
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_EVENTQUEUE *eventqueue)
Definition: prob.c:1467
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:1715
memory allocation routines