Scippy

SCIP

Solving Constraint Integer Programs

pub_var.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-2016 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 pub_var.h
17  * @ingroup PUBLICMETHODS
18  * @brief public methods for problem variables
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_VAR_H__
25 #define __SCIP_PUB_VAR_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_misc.h"
31 #include "scip/type_history.h"
32 #include "scip/type_var.h"
33 #include "scip/type_implics.h"
34 #include "scip/type_cons.h"
35 
36 #ifdef NDEBUG
37 #include "scip/struct_var.h"
38 #include "scip/implics.h"
39 #include "scip/history.h"
40 #endif
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /*
47  * methods for variables
48  */
49 
50 /** gets number of locks for rounding down */
51 extern
53  SCIP_VAR* var /**< problem variable */
54  );
55 
56 /** gets number of locks for rounding up */
57 extern
59  SCIP_VAR* var /**< problem variable */
60  );
61 
62 /** is it possible, to round variable down and stay feasible? */
63 extern
65  SCIP_VAR* var /**< problem variable */
66  );
67 
68 /** is it possible, to round variable up and stay feasible? */
69 extern
71  SCIP_VAR* var /**< problem variable */
72  );
73 
74 /** compares the index of two variables, only active or negated variables are allowed, if a variable
75  * is negated then the index of the corresponding active variable is taken, returns -1 if first is
76  * smaller than, and +1 if first is greater than second variable index; returns 0 if both indices
77  * are equal, which means both variables are equal
78  */
79 extern
81  SCIP_VAR* var1, /**< first problem variable */
82  SCIP_VAR* var2 /**< second problem variable */
83  );
84 
85 /** comparison method for sorting active and negated variables by non-decreasing index, active and negated
86  * variables are handled as the same variables
87  */
88 extern
89 SCIP_DECL_SORTPTRCOMP(SCIPvarCompActiveAndNegated);
90 
91 /** compares the index of two variables, returns -1 if first is smaller than, and +1 if first is greater than second
92  * variable index; returns 0 if both indices are equal, which means both variables are equal
93  */
94 extern
95 int SCIPvarCompare(
96  SCIP_VAR* var1, /**< first problem variable */
97  SCIP_VAR* var2 /**< second problem variable */
98  );
99 
100 /** comparison method for sorting variables by non-decreasing index */
101 extern
102 SCIP_DECL_SORTPTRCOMP(SCIPvarComp);
103 
104 /** comparison method for sorting variables by non-decreasing objective coefficient */
105 extern
106 SCIP_DECL_SORTPTRCOMP(SCIPvarCompObj);
107 
108 /** hash key retrieval function for variables */
109 extern
110 SCIP_DECL_HASHGETKEY(SCIPvarGetHashkey);
111 
112 /** returns TRUE iff the indices of both variables are equal */
113 extern
114 SCIP_DECL_HASHKEYEQ(SCIPvarIsHashkeyEq);
115 
116 /** returns the hash value of the key */
117 extern
118 SCIP_DECL_HASHKEYVAL(SCIPvarGetHashkeyVal);
119 
120 
121 /** gets corresponding active, fixed, or multi-aggregated problem variables of given variables,
122  * @note the content of the given array will/might change
123  */
124 extern
125 void SCIPvarsGetProbvar(
126  SCIP_VAR** vars, /**< array of problem variables */
127  int nvars /**< number of variables */
128  );
129 
130 /** gets corresponding active, fixed, or multi-aggregated problem variable of a variable */
131 extern
133  SCIP_VAR* var /**< problem variable */
134  );
135 
136 /** gets corresponding active, fixed, or multi-aggregated problem variables of binary variables and
137  * updates the given negation status of each variable
138  */
139 extern
141  SCIP_VAR*** vars, /**< pointer to binary problem variables */
142  SCIP_Bool** negatedarr, /**< pointer to corresponding array to update the negation status */
143  int nvars /**< number of variables and values in vars and negated array */
144  );
145 
146 /** gets corresponding active, fixed, or multi-aggregated problem variable of a binary variable and
147  * updates the given negation status
148  */
149 extern
151  SCIP_VAR** var, /**< pointer to binary problem variable */
152  SCIP_Bool* negated /**< pointer to update the negation status */
153  );
154 
155 /** transforms given variable, boundtype and bound to the corresponding active, fixed, or multi-aggregated variable
156  * values
157  */
158 extern
160  SCIP_VAR** var, /**< pointer to problem variable */
161  SCIP_Real* bound, /**< pointer to bound value to transform */
162  SCIP_BOUNDTYPE* boundtype /**< pointer to type of bound: lower or upper bound */
163  );
164 
165 /** transforms given variable and domain hole to the corresponding active, fixed, or multi-aggregated variable
166  * values
167  */
168 extern
170  SCIP_VAR** var, /**< pointer to problem variable */
171  SCIP_Real* left, /**< pointer to left bound of open interval in hole to transform */
172  SCIP_Real* right /**< pointer to right bound of open interval in hole to transform */
173  );
174 
175 /** retransforms given variable, scalar and constant to the corresponding original variable, scalar
176  * and constant, if possible; if the retransformation is impossible, NULL is returned as variable
177  */
178 extern
180  SCIP_VAR** var, /**< pointer to problem variable x in sum a*x + c */
181  SCIP_Real* scalar, /**< pointer to scalar a in sum a*x + c */
182  SCIP_Real* constant /**< pointer to constant c in sum a*x + c */
183  );
184 
185 /** returns whether the given variable is the direct counterpart of an original problem variable */
186 extern
188  SCIP_VAR* var /**< problem variable */
189  );
190 
191 /** returns the number of times, a bound of the variable was changed in given direction due to branching */
192 extern
194  SCIP_VAR* var, /**< problem variable */
195  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
196  );
197 
198 /** returns the number of times, a bound of the variable was changed in given direction due to branching
199  * in the current run
200  */
201 extern
203  SCIP_VAR* var, /**< problem variable */
204  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
205  );
206 
207 /** returns the number of inferences branching on this variable in given direction triggered */
208 extern
210  SCIP_VAR* var, /**< problem variable */
211  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
212  );
213 
214 /** returns the number of inferences branching on this variable in given direction triggered
215  * in the current run
216  */
217 extern
219  SCIP_VAR* var, /**< problem variable */
220  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
221  );
222 
223 /** returns the number of cutoffs branching on this variable in given direction produced */
224 extern
226  SCIP_VAR* var, /**< problem variable */
227  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
228  );
229 
230 /** returns the number of cutoffs branching on this variable in given direction produced in the current run */
231 extern
233  SCIP_VAR* var, /**< problem variable */
234  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
235  );
236 
237 /** returns the average depth of bound changes in given direction due to branching on the variable */
238 extern
240  SCIP_VAR* var, /**< problem variable */
241  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
242  );
243 
244 /** returns the average depth of bound changes in given direction due to branching on the variable
245  * in the current run
246  */
247 extern
249  SCIP_VAR* var, /**< problem variable */
250  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
251  );
252 
253 /** returns whether there is an implication x == varfixing -> y <= b or y >= b in the implication graph;
254  * implications that are represented as cliques in the clique table are not regarded (use SCIPvarsHaveCommonClique());
255  * both variables must be active, variable x must be binary
256  */
257 extern
259  SCIP_VAR* var, /**< problem variable x */
260  SCIP_Bool varfixing, /**< FALSE if y should be searched in implications for x == 0, TRUE for x == 1 */
261  SCIP_VAR* implvar, /**< variable y to search for */
262  SCIP_BOUNDTYPE impltype /**< type of implication y <=/>= b to search for */
263  );
264 
265 /** returns whether there is an implication x == varfixing -> y == implvarfixing in the implication graph;
266  * implications that are represented as cliques in the clique table are not regarded (use SCIPvarsHaveCommonClique());
267  * both variables must be active binary variables
268  */
269 extern
271  SCIP_VAR* var, /**< problem variable x */
272  SCIP_Bool varfixing, /**< FALSE if y should be searched in implications for x == 0, TRUE for x == 1 */
273  SCIP_VAR* implvar, /**< variable y to search for */
274  SCIP_Bool implvarfixing /**< value of the implied variable to search for */
275  );
276 
277 /** returns whether there is a clique that contains both given variable/value pairs;
278  * the variables must be active binary variables;
279  * if regardimplics is FALSE, only the cliques in the clique table are looked at;
280  * if regardimplics is TRUE, both the cliques and the implications of the implication graph are regarded
281  */
282 extern
284  SCIP_VAR* var1, /**< first variable */
285  SCIP_Bool value1, /**< value of first variable */
286  SCIP_VAR* var2, /**< second variable */
287  SCIP_Bool value2, /**< value of second variable */
288  SCIP_Bool regardimplics /**< should the implication graph also be searched for a clique? */
289  );
290 
291 /** gets corresponding objective value of active, fixed, or multi-aggregated problem variable of given variable
292  * e.g. obj(x) = 1 this method returns for ~x the value -1
293  */
294 extern
296  SCIP_VAR* var, /**< problem variable */
297  SCIP_Real* aggrobj /**< pointer to store the aggregated objective value */
298  );
299 
300 /** sets the initial flag of a variable; only possible for original or loose variables */
301 extern
303  SCIP_VAR* var, /**< problem variable */
304  SCIP_Bool initial /**< initial flag */
305  );
306 
307 /** sets the removable flag of a variable; only possible for original or loose variables */
308 extern
310  SCIP_VAR* var, /**< problem variable */
311  SCIP_Bool removable /**< removable flag */
312  );
313 
314 /** returns the name of the variable
315  *
316  * @note to change the name of a variable, use SCIPchgVarName() from scip.h
317  */
318 extern
319 const char* SCIPvarGetName(
320  SCIP_VAR* var /**< problem variable */
321  );
322 
323 /** gets number of times, the variable is currently captured */
324 extern
325 int SCIPvarGetNUses(
326  SCIP_VAR* var /**< problem variable */
327  );
328 
329 /** returns the user data of the variable */
330 extern
332  SCIP_VAR* var /**< problem variable */
333  );
334 
335 /** sets the user data for the variable */
336 extern
337 void SCIPvarSetData(
338  SCIP_VAR* var, /**< problem variable */
339  SCIP_VARDATA* vardata /**< user variable data */
340  );
341 
342 /** sets method to free user data for the original variable */
343 extern
345  SCIP_VAR* var, /**< problem variable */
346  SCIP_DECL_VARDELORIG ((*vardelorig)) /**< frees user data of original variable */
347  );
348 
349 /** sets method to transform user data of the variable */
350 extern
352  SCIP_VAR* var, /**< problem variable */
353  SCIP_DECL_VARTRANS ((*vartrans)) /**< creates transformed user data by transforming original user data */
354  );
355 
356 /** sets method to free transformed user data for the variable */
357 extern
359  SCIP_VAR* var, /**< problem variable */
360  SCIP_DECL_VARDELTRANS ((*vardeltrans)) /**< frees user data of transformed variable */
361  );
362 
363 /** sets method to copy this variable into sub-SCIPs */
364 extern
365 void SCIPvarSetCopyData(
366  SCIP_VAR* var, /**< problem variable */
367  SCIP_DECL_VARCOPY ((*varcopy)) /**< copy method of the variable */
368  );
369 
370 /** gets status of variable */
371 extern
373  SCIP_VAR* var /**< problem variable */
374  );
375 
376 /** returns whether the variable belongs to the original problem */
377 extern
379  SCIP_VAR* var /**< problem variable */
380  );
381 
382 /** returns whether the variable belongs to the transformed problem */
383 extern
385  SCIP_VAR* var /**< problem variable */
386  );
387 
388 /** returns whether the variable was created by negation of a different variable */
389 extern
391  SCIP_VAR* var /**< problem variable */
392  );
393 
394 /** gets type of variable */
395 extern
397  SCIP_VAR* var /**< problem variable */
398  );
399 
400 /** returns TRUE if the variable is of binary type; this is the case if:
401  * (1) variable type is binary
402  * (2) variable type is integer or implicit integer and
403  * (i) the lazy lower bound or the global lower bound is greater or equal to zero
404  * (ii) the lazy upper bound or the global upper bound is less tor equal to one
405  */
406 extern
408  SCIP_VAR* var /**< problem variable */
409  );
410 
411 /** returns whether variable is of integral type (binary, integer, or implicit integer) */
412 extern
414  SCIP_VAR* var /**< problem variable */
415  );
416 
417 /** returns whether variable's column should be present in the initial root LP */
418 extern
420  SCIP_VAR* var /**< problem variable */
421  );
422 
423 /** returns whether variable's column is removable from the LP (due to aging or cleanup) */
424 extern
426  SCIP_VAR* var /**< problem variable */
427  );
428 
429 /** returns whether the variable was deleted from the problem */
430 extern
432  SCIP_VAR* var /**< problem variable */
433  );
434 
435 /** marks the variable to be deletable, i.e., it may be deleted completely from the problem;
436  * method can only be called before the variable is added to the problem by SCIPaddVar() or SCIPaddPricedVar()
437  */
438 extern
440  SCIP_VAR* var /**< problem variable */
441  );
442 
443 /** marks the variable to be not deletable from the problem */
444 extern
446  SCIP_VAR* var
447  );
448 
449 /** returns whether variable is allowed to be deleted completely from the problem */
450 extern
452  SCIP_VAR* var
453  );
454 
455 /** returns whether variable is an active (neither fixed nor aggregated) variable */
456 extern
458  SCIP_VAR* var /**< problem variable */
459  );
460 
461 /** gets unique index of variable */
462 extern
463 int SCIPvarGetIndex(
464  SCIP_VAR* var /**< problem variable */
465  );
466 
467 /** gets position of variable in problem, or -1 if variable is not active */
468 extern
470  SCIP_VAR* var /**< problem variable */
471  );
472 
473 /** gets transformed variable of ORIGINAL variable */
474 extern
476  SCIP_VAR* var /**< problem variable */
477  );
478 
479 /** gets column of COLUMN variable */
480 extern
482  SCIP_VAR* var /**< problem variable */
483  );
484 
485 /** returns whether the variable is a COLUMN variable that is member of the current LP */
486 extern
488  SCIP_VAR* var /**< problem variable */
489  );
490 
491 /** gets aggregation variable y of an aggregated variable x = a*y + c */
492 extern
494  SCIP_VAR* var /**< problem variable */
495  );
496 
497 /** gets aggregation scalar a of an aggregated variable x = a*y + c */
498 extern
500  SCIP_VAR* var /**< problem variable */
501  );
502 
503 /** gets aggregation constant c of an aggregated variable x = a*y + c */
504 extern
506  SCIP_VAR* var /**< problem variable */
507  );
508 
509 /** gets number n of aggregation variables of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
510 extern
512  SCIP_VAR* var /**< problem variable */
513  );
514 
515 /** gets vector of aggregation variables y of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
516 extern
518  SCIP_VAR* var /**< problem variable */
519  );
520 
521 /** gets vector of aggregation scalars a of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
522 extern
524  SCIP_VAR* var /**< problem variable */
525  );
526 
527 /** gets aggregation constant c of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
528 extern
530  SCIP_VAR* var /**< problem variable */
531  );
532 
533 /** gets the negation of the given variable; may return NULL, if no negation is existing yet */
534 extern
536  SCIP_VAR* var /**< negated problem variable */
537  );
538 
539 /** gets the negation variable x of a negated variable x' = offset - x */
540 extern
542  SCIP_VAR* var /**< negated problem variable */
543  );
544 
545 /** gets the negation offset of a negated variable x' = offset - x */
546 extern
548  SCIP_VAR* var /**< negated problem variable */
549  );
550 
551 /** gets objective function value of variable */
552 extern
554  SCIP_VAR* var /**< problem variable */
555  );
556 
557 /** gets the unchanged objective function value of variable (ignoring temproray changes performed in probing mode) */
558 extern
560  SCIP_VAR* var /**< problem variable */
561  );
562 
563 /** gets original lower bound of original problem variable (i.e. the bound set in problem creation) */
564 extern
566  SCIP_VAR* var /**< original problem variable */
567  );
568 
569 /** gets original upper bound of original problem variable (i.e. the bound set in problem creation) */
570 extern
572  SCIP_VAR* var /**< original problem variable */
573  );
574 
575 /** gets the original hole list of an original variable */
576 extern
578  SCIP_VAR* var /**< problem variable */
579  );
580 
581 /** gets global lower bound of variable */
582 extern
584  SCIP_VAR* var /**< problem variable */
585  );
586 
587 /** gets global upper bound of variable */
588 extern
590  SCIP_VAR* var /**< problem variable */
591  );
592 
593 /** gets the global hole list of an active variable */
594 extern
596  SCIP_VAR* var /**< problem variable */
597  );
598 
599 /** gets best global bound of variable with respect to the objective function */
600 extern
602  SCIP_VAR* var /**< problem variable */
603  );
604 
605 /** gets worst global bound of variable with respect to the objective function */
606 extern
608  SCIP_VAR* var /**< problem variable */
609  );
610 
611 /** gets current lower bound of variable */
612 extern
614  SCIP_VAR* var /**< problem variable */
615  );
616 
617 /** gets current upper bound of variable */
618 extern
620  SCIP_VAR* var /**< problem variable */
621  );
622 
623 /** gets the current hole list of an active variable */
624 extern
626  SCIP_VAR* var /**< problem variable */
627  );
628 
629 /** gets best local bound of variable with respect to the objective function */
630 extern
632  SCIP_VAR* var /**< problem variable */
633  );
634 
635 /** gets worst local bound of variable with respect to the objective function */
636 extern
638  SCIP_VAR* var /**< problem variable */
639  );
640 
641 /** gets type (lower or upper) of best bound of variable with respect to the objective function */
642 extern
644  SCIP_VAR* var /**< problem variable */
645  );
646 
647 /** gets type (lower or upper) of worst bound of variable with respect to the objective function */
648 extern
650  SCIP_VAR* var /**< problem variable */
651  );
652 
653 /** gets lazy lower bound of variable */
654 extern
656  SCIP_VAR* var /**< problem variable */
657  );
658 
659 /** gets lazy upper bound of variable */
660 extern
662  SCIP_VAR* var /**< problem variable */
663  );
664 
665 /** gets the branch factor of the variable; this value can be used in the branching methods to scale the score
666  * values of the variables; higher factor leads to a higher probability that this variable is chosen for branching
667  */
668 extern
670  SCIP_VAR* var /**< problem variable */
671  );
672 
673 /** gets the branch priority of the variable; variables with higher priority should always be preferred to variables
674  * with lower priority
675  */
676 extern
678  SCIP_VAR* var /**< problem variable */
679  );
680 
681 /** gets the preferred branch direction of the variable (downwards, upwards, or auto) */
682 extern
684  SCIP_VAR* var /**< problem variable */
685  );
686 
687 /** gets number of variable lower bounds x >= b_i*z_i + d_i of given variable x */
688 extern
689 int SCIPvarGetNVlbs(
690  SCIP_VAR* var /**< problem variable */
691  );
692 
693 /** gets array with bounding variables z_i in variable lower bounds x >= b_i*z_i + d_i of given variable x;
694  * the variable bounds are sorted by increasing variable index of the bounding variable z_i (see SCIPvarGetIndex())
695  */
696 extern
698  SCIP_VAR* var /**< problem variable */
699  );
700 
701 /** gets array with bounding coefficients b_i in variable lower bounds x >= b_i*z_i + d_i of given variable x */
702 extern
704  SCIP_VAR* var /**< problem variable */
705  );
706 
707 /** gets array with bounding constants d_i in variable lower bounds x >= b_i*z_i + d_i of given variable x */
708 extern
710  SCIP_VAR* var /**< problem variable */
711  );
712 
713 /** gets number of variable upper bounds x <= b_i*z_i + d_i of given variable x */
714 extern
715 int SCIPvarGetNVubs(
716  SCIP_VAR* var /**< problem variable */
717  );
718 
719 /** gets array with bounding variables z_i in variable upper bounds x <= b_i*z_i + d_i of given variable x;
720  * the variable bounds are sorted by increasing variable index of the bounding variable z_i (see SCIPvarGetIndex())
721  */
722 extern
724  SCIP_VAR* var /**< problem variable */
725  );
726 
727 /** gets array with bounding coefficients b_i in variable upper bounds x <= b_i*z_i + d_i of given variable x */
728 extern
730  SCIP_VAR* var /**< problem variable */
731  );
732 
733 /** gets array with bounding constants d_i in variable upper bounds x <= b_i*z_i + d_i of given variable x */
734 extern
736  SCIP_VAR* var /**< problem variable */
737  );
738 
739 /** gets number of implications y <= b or y >= b for x == 0 or x == 1 of given active problem variable x,
740  * there are no implications for nonbinary variable x
741  */
742 extern
743 int SCIPvarGetNImpls(
744  SCIP_VAR* var, /**< active problem variable */
745  SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
746  );
747 
748 /** gets array with implication variables y of implications y <= b or y >= b for x == 0 or x == 1 of given active
749  * problem variable x, there are no implications for nonbinary variable x;
750  * the implications are sorted such that implications with binary implied variables precede the ones with non-binary
751  * implied variables, and as a second criteria, the implied variables are sorted by increasing variable index
752  * (see SCIPvarGetIndex())
753  */
754 extern
756  SCIP_VAR* var, /**< active problem variable */
757  SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
758  );
759 
760 /** gets array with implication types of implications y <= b or y >= b for x == 0 or x == 1 of given active problem
761  * variable x (SCIP_BOUNDTYPE_UPPER if y <= b, SCIP_BOUNDTYPE_LOWER if y >= b),
762  * there are no implications for nonbinary variable x
763  */
764 extern
766  SCIP_VAR* var, /**< active problem variable */
767  SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
768  );
769 
770 /** gets array with implication bounds b of implications y <= b or y >= b for x == 0 or x == 1 of given active problem
771  * variable x, there are no implications for nonbinary variable x
772  */
773 extern
775  SCIP_VAR* var, /**< active problem variable */
776  SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
777  );
778 
779 /** Gets array with unique ids of implications y <= b or y >= b for x == 0 or x == 1 of given active problem variable x,
780  * there are no implications for nonbinary variable x.
781  * If an implication is a shortcut, i.e., it was added as part of the transitive closure of another implication,
782  * its id is negative, otherwise it is nonnegative.
783  */
784 extern
785 int* SCIPvarGetImplIds(
786  SCIP_VAR* var, /**< active problem variable */
787  SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
788  );
789 
790 /** gets number of cliques, the active variable is contained in */
791 extern
793  SCIP_VAR* var, /**< active problem variable */
794  SCIP_Bool varfixing /**< FALSE for cliques containing x == 0, TRUE for x == 1 */
795  );
796 
797 /** gets array of cliques, the active variable is contained in */
798 extern
800  SCIP_VAR* var, /**< active problem variable */
801  SCIP_Bool varfixing /**< FALSE for cliques containing x == 0, TRUE for x == 1 */
802  );
803 
804 /** gets primal LP solution value of variable */
805 extern
807  SCIP_VAR* var /**< problem variable */
808  );
809 
810 /** gets primal NLP solution value of variable */
811 extern
813  SCIP_VAR* var /**< problem variable */
814  );
815 
816 /** return lower bound change info at requested position */
817 extern
819  SCIP_VAR* var, /**< problem variable */
820  int pos /**< requested position */
821  );
822 
823 /** gets the number of lower bound change info array */
824 extern
826  SCIP_VAR* var /**< problem variable */
827  );
828 
829 /** return upper bound change info at requested position */
830 extern
832  SCIP_VAR* var, /**< problem variable */
833  int pos /**< requested position */
834  );
835 
836 /** gets the number upper bound change info array */
837 extern
839  SCIP_VAR* var /**< problem variable */
840  );
841 
842 /** returns the value based history for the variable */
843 extern
845  SCIP_VAR* var /**< problem variable */
846  );
847 
848 #ifdef NDEBUG
849 
850 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
851  * speed up the algorithms.
852  */
853 
854 #define SCIPvarGetName(var) (var)->name
855 #define SCIPvarGetNUses(var) (var)->nuses
856 #define SCIPvarGetData(var) (var)->vardata
857 #define SCIPvarSetData(var,vdata) (var)->vardata = (vdata)
858 #define SCIPvarSetDelorigData(var,func) (var)->vardelorig = (func)
859 #define SCIPvarSetTransData(var,func) (var)->vartrans = (func)
860 #define SCIPvarSetDeltransData(var,func) (var)->vardeltrans = (func)
861 #define SCIPvarGetStatus(var) (SCIP_VARSTATUS)((var)->varstatus)
862 #define SCIPvarIsOriginal(var) ((var)->varstatus == SCIP_VARSTATUS_ORIGINAL \
863  || ((var)->varstatus == SCIP_VARSTATUS_NEGATED && (var)->negatedvar->varstatus == SCIP_VARSTATUS_ORIGINAL))
864 #define SCIPvarIsTransformed(var) ((var)->varstatus != SCIP_VARSTATUS_ORIGINAL \
865  && ((var)->varstatus != SCIP_VARSTATUS_NEGATED || (var)->negatedvar->varstatus != SCIP_VARSTATUS_ORIGINAL))
866 #define SCIPvarIsNegated(var) ((var)->varstatus == SCIP_VARSTATUS_NEGATED)
867 #define SCIPvarGetType(var) ((SCIP_VARTYPE)((var)->vartype))
868 #define SCIPvarIsBinary(var) ((var)->vartype == SCIP_VARTYPE_BINARY || \
869  ((var)->vartype != SCIP_VARTYPE_CONTINUOUS && MAX((var)->glbdom.lb, (var)->lazylb) >= 0.0 && MIN((var)->glbdom.ub, (var)->lazyub) <= 1.0))
870 #define SCIPvarIsIntegral(var) ((var)->vartype != SCIP_VARTYPE_CONTINUOUS)
871 #define SCIPvarIsInitial(var) (var)->initial
872 #define SCIPvarIsRemovable(var) (var)->removable
873 #define SCIPvarIsDeleted(var) (var)->deleted
874 #define SCIPvarMarkDeletable(var) (var)->deletable = TRUE
875 #define SCIPvarMarkNotDeletable(var) (var)->deletable = FALSE
876 #define SCIPvarIsDeletable(var) (var)->deletable
877 #define SCIPvarIsActive(var) ((var)->probindex >= 0)
878 #define SCIPvarGetIndex(var) (var)->index
879 #define SCIPvarGetProbindex(var) (var)->probindex
880 #define SCIPvarGetTransVar(var) (var)->data.original.transvar
881 #define SCIPvarGetCol(var) (var)->data.col
882 #define SCIPvarIsInLP(var) ((var)->varstatus == SCIP_VARSTATUS_COLUMN && SCIPcolIsInLP((var)->data.col))
883 /* use different name for var - otherwise we have clash with the var at the end */
884 #define SCIPvarGetAggrVar(war) (war)->data.aggregate.var
885 #define SCIPvarGetAggrScalar(var) (var)->data.aggregate.scalar
886 #define SCIPvarGetAggrConstant(var) (var)->data.aggregate.constant
887 #define SCIPvarGetMultaggrNVars(var) (var)->data.multaggr.nvars
888 #define SCIPvarGetMultaggrVars(var) (var)->data.multaggr.vars
889 #define SCIPvarGetMultaggrScalars(var) (var)->data.multaggr.scalars
890 #define SCIPvarGetMultaggrConstant(var) (var)->data.multaggr.constant
891 #define SCIPvarGetNegatedVar(var) (var)->negatedvar
892 #define SCIPvarGetNegationVar(var) (var)->negatedvar
893 #define SCIPvarGetNegationConstant(var) (var)->data.negate.constant
894 #define SCIPvarGetObj(var) (var)->obj
895 #define SCIPvarGetLbOriginal(var) ((var)->varstatus == SCIP_VARSTATUS_ORIGINAL \
896  ? (var)->data.original.origdom.lb \
897  : (var)->data.negate.constant - (var)->negatedvar->data.original.origdom.ub)
898 #define SCIPvarGetUbOriginal(var) ((var)->varstatus == SCIP_VARSTATUS_ORIGINAL \
899  ? (var)->data.original.origdom.ub \
900  : (var)->data.negate.constant - (var)->negatedvar->data.original.origdom.lb)
901 #define SCIPvarGetHolelistOriginal(var) ((var)->varstatus == SCIP_VARSTATUS_ORIGINAL \
902  ? (var)->data.original.origdom.holelist \
903  : NULL)
904 #define SCIPvarGetLbGlobal(var) (var)->glbdom.lb
905 #define SCIPvarGetUbGlobal(var) (var)->glbdom.ub
906 #define SCIPvarGetHolelistGlobal(var) (var)->glbdom.holelist
907 #define SCIPvarGetBestBoundGlobal(var) ((var)->obj >= 0.0 ? (var)->glbdom.lb : (var)->glbdom.ub)
908 #define SCIPvarGetWorstBoundGlobal(var) ((var)->obj >= 0.0 ? (var)->glbdom.ub : (var)->glbdom.lb)
909 #define SCIPvarGetLbLocal(var) (var)->locdom.lb
910 #define SCIPvarGetUbLocal(var) (var)->locdom.ub
911 #define SCIPvarGetHolelistLocal(var) (var)->locdom.holelist
912 #define SCIPvarGetBestBoundLocal(var) ((var)->obj >= 0.0 ? (var)->locdom.lb : (var)->locdom.ub)
913 #define SCIPvarGetWorstBoundLocal(var) ((var)->obj >= 0.0 ? (var)->locdom.ub : (var)->locdom.lb)
914 #define SCIPvarGetBestBoundType(var) ((var)->obj >= 0.0 ? SCIP_BOUNDTYPE_LOWER : SCIP_BOUNDTYPE_UPPER)
915 #define SCIPvarGetWorstBoundType(var) ((var)->obj >= 0.0 ? SCIP_BOUNDTYPE_UPPER : SCIP_BOUNDTYPE_LOWER)
916 #define SCIPvarGetLbLazy(var) (var)->lazylb
917 #define SCIPvarGetUbLazy(var) (var)->lazyub
918 #define SCIPvarGetBranchFactor(var) (var)->branchfactor
919 #define SCIPvarGetBranchPriority(var) (var)->branchpriority
920 #define SCIPvarGetBranchDirection(var) (var)->branchdirection
921 #define SCIPvarGetNVlbs(var) (SCIPvboundsGetNVbds((var)->vlbs))
922 #define SCIPvarGetVlbVars(var) (SCIPvboundsGetVars((var)->vlbs))
923 #define SCIPvarGetVlbCoefs(var) (SCIPvboundsGetCoefs((var)->vlbs))
924 #define SCIPvarGetVlbConstants(var) (SCIPvboundsGetConstants((var)->vlbs))
925 #define SCIPvarGetNVubs(var) (SCIPvboundsGetNVbds((var)->vubs))
926 #define SCIPvarGetVubVars(var) (SCIPvboundsGetVars((var)->vubs))
927 #define SCIPvarGetVubCoefs(var) (SCIPvboundsGetCoefs((var)->vubs))
928 #define SCIPvarGetVubConstants(var) (SCIPvboundsGetConstants((var)->vubs))
929 #define SCIPvarGetNImpls(var, fix) (SCIPimplicsGetNImpls((var)->implics, fix))
930 #define SCIPvarGetImplVars(var, fix) (SCIPimplicsGetVars((var)->implics, fix))
931 #define SCIPvarGetImplTypes(var, fix) (SCIPimplicsGetTypes((var)->implics, fix))
932 #define SCIPvarGetImplBounds(var, fix) (SCIPimplicsGetBounds((var)->implics, fix))
933 #define SCIPvarGetImplIds(var, fix) (SCIPimplicsGetIds((var)->implics, fix))
934 #define SCIPvarGetNCliques(var, fix) (SCIPcliquelistGetNCliques((var)->cliquelist, fix))
935 #define SCIPvarGetCliques(var, fix) (SCIPcliquelistGetCliques((var)->cliquelist, fix))
936 #define SCIPvarGetLPSol(var) ((var)->varstatus == SCIP_VARSTATUS_COLUMN ? SCIPcolGetPrimsol((var)->data.col) : SCIPvarGetLPSol_rec(var))
937 #define SCIPvarGetNLPSol(var) (((var)->varstatus == SCIP_VARSTATUS_COLUMN || ((var)->varstatus == SCIP_VARSTATUS_LOOSE)) ? (var)->nlpsol : SCIPvarGetNLPSol_rec(var))
938 #define SCIPvarGetBdchgInfoLb(var, pos) (&((var)->lbchginfos[pos]))
939 #define SCIPvarGetNBdchgInfosLb(var) ((var)->nlbchginfos)
940 #define SCIPvarGetBdchgInfoUb(var, pos) (&((var)->ubchginfos[pos]))
941 #define SCIPvarGetNBdchgInfosUb(var) ((var)->nubchginfos)
942 #define SCIPvarGetValuehistory(var) (var)->valuehistory
943 
944 #endif
945 
946 /** gets primal LP solution value of variable */
947 extern
949  SCIP_VAR* var /**< problem variable */
950  );
951 
952 /** gets primal NLP solution value of variable */
953 extern
955  SCIP_VAR* var /**< problem variable */
956  );
957 
958 /** gets pseudo solution value of variable at current node */
959 extern
961  SCIP_VAR* var /**< problem variable */
962  );
963 
964 /** gets current LP or pseudo solution value of variable */
965 extern
967  SCIP_VAR* var, /**< problem variable */
968  SCIP_Bool getlpval /**< should the LP solution value be returned? */
969  );
970 
971 /** returns the solution of the variable in the last root node's relaxation, if the root relaxation is not yet
972  * completely solved, zero is returned
973  */
974 extern
976  SCIP_VAR* var /**< problem variable */
977  );
978 
979 /** returns the best solution (w.r.t. root reduced cost propagation) of the variable in the root node's relaxation, if
980  * the root relaxation is not yet completely solved, zero is returned
981  */
982 extern
984  SCIP_VAR* var /**< problem variable */
985  );
986 
987 /** returns the best reduced costs (w.r.t. root reduced cost propagation) of the variable in the root node's relaxation,
988  * if the root relaxation is not yet completely solved, or the variable was no column of the root LP, SCIP_INVALID is
989  * returned
990  */
991 extern
993  SCIP_VAR* var /**< problem variable */
994  );
995 
996 /** returns the best objective value (w.r.t. root reduced cost propagation) of the root LP which belongs the root
997  * reduced cost which is accessible via SCIPvarGetRootRedcost() or the variable was no column of the root LP,
998  * SCIP_INVALID is returned
999  */
1000 extern
1002  SCIP_VAR* var /**< problem variable */
1003  );
1004 
1005 /** set the given solution as the best root solution w.r.t. root reduced cost propagation in the variables */
1006 extern
1008  SCIP_VAR* var, /**< problem variable */
1009  SCIP_Real rootsol, /**< root solution value */
1010  SCIP_Real rootredcost, /**< root reduced cost */
1011  SCIP_Real rootlpobjval /**< objective value of the root LP */
1012  );
1013 
1014 /** returns a weighted average solution value of the variable in all feasible primal solutions found so far */
1015 extern
1017  SCIP_VAR* var /**< problem variable */
1018  );
1019 
1020 /** returns the bound change information for the last lower bound change on given active problem variable before or
1021  * after the bound change with the given index was applied;
1022  * returns NULL, if no change to the lower bound was applied up to this point of time
1023  */
1024 extern
1026  SCIP_VAR* var, /**< active problem variable */
1027  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1028  SCIP_Bool after /**< should the bound change with given index be included? */
1029  );
1030 
1031 /** returns the bound change information for the last upper bound change on given active problem variable before or
1032  * after the bound change with the given index was applied;
1033  * returns NULL, if no change to the upper bound was applied up to this point of time
1034  */
1035 extern
1037  SCIP_VAR* var, /**< active problem variable */
1038  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1039  SCIP_Bool after /**< should the bound change with given index be included? */
1040  );
1041 
1042 /** returns the bound change information for the last lower or upper bound change on given active problem variable
1043  * before or after the bound change with the given index was applied;
1044  * returns NULL, if no change to the lower/upper bound was applied up to this point of time
1045  */
1046 extern
1048  SCIP_VAR* var, /**< active problem variable */
1049  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
1050  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1051  SCIP_Bool after /**< should the bound change with given index be included? */
1052  );
1053 
1054 /** returns lower bound of variable directly before or after the bound change given by the bound change index
1055  * was applied
1056  */
1057 extern
1059  SCIP_VAR* var, /**< problem variable */
1060  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1061  SCIP_Bool after /**< should the bound change with given index be included? */
1062  );
1063 
1064 /** returns upper bound of variable directly before or after the bound change given by the bound change index
1065  * was applied
1066  */
1067 extern
1069  SCIP_VAR* var, /**< problem variable */
1070  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1071  SCIP_Bool after /**< should the bound change with given index be included? */
1072  );
1073 
1074 /** returns lower or upper bound of variable directly before or after the bound change given by the bound change index
1075  * was applied
1076  */
1077 extern
1079  SCIP_VAR* var, /**< problem variable */
1080  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
1081  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1082  SCIP_Bool after /**< should the bound change with given index be included? */
1083  );
1084 
1085 /** returns whether the binary variable was fixed at the time given by the bound change index */
1086 extern
1088  SCIP_VAR* var, /**< problem variable */
1089  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1090  SCIP_Bool after /**< should the bound change with given index be included? */
1091  );
1092 
1093 /** returns the last bound change index, at which the bounds of the given variable were tightened */
1094 extern
1096  SCIP_VAR* var /**< problem variable */
1097  );
1098 
1099 /** returns the last depth level, at which the bounds of the given variable were tightened;
1100  * returns -2, if the variable's bounds are still the global bounds
1101  * returns -1, if the variable was fixed in presolving
1102  */
1103 extern
1105  SCIP_VAR* var /**< problem variable */
1106  );
1107 
1108 /** returns whether the first binary variable was fixed earlier than the second one;
1109  * returns FALSE, if the first variable is not fixed, and returns TRUE, if the first variable is fixed, but the
1110  * second one is not fixed
1111  */
1112 extern
1114  SCIP_VAR* var1, /**< first binary variable */
1115  SCIP_VAR* var2 /**< second binary variable */
1116  );
1117 
1118 /** returns whether first bound change index belongs to an earlier applied bound change than second one;
1119  * if a bound change index is NULL, the bound change index represents the current time, i.e. the time after the
1120  * last bound change was applied to the current node
1121  */
1122 extern
1124  SCIP_BDCHGIDX* bdchgidx1, /**< first bound change index, or NULL */
1125  SCIP_BDCHGIDX* bdchgidx2 /**< second bound change index, or NULL */
1126  );
1127 
1128 /** returns whether first bound change index belongs to an earlier applied bound change than second one */
1129 extern
1131  SCIP_BDCHGIDX* bdchgidx1, /**< first bound change index */
1132  SCIP_BDCHGIDX* bdchgidx2 /**< second bound change index */
1133  );
1134 
1135 /** returns old bound that was overwritten for given bound change information */
1136 extern
1138  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1139  );
1140 
1141 /** returns new bound installed for given bound change information */
1142 extern
1144  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1145  );
1146 
1147 /** returns variable that belongs to the given bound change information */
1148 extern
1150  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1151  );
1152 
1153 /** returns whether the bound change information belongs to a branching decision or a deduction */
1154 extern
1156  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1157  );
1158 
1159 /** returns whether the bound change information belongs to a lower or upper bound change */
1160 extern
1162  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1163  );
1164 
1165 /** returns depth level of given bound change information */
1166 extern
1168  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1169  );
1170 
1171 /** returns bound change position in its depth level of given bound change information */
1172 extern
1174  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1175  );
1176 
1177 /** returns bound change index of given bound change information */
1178 extern
1180  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1181  );
1182 
1183 /** returns inference variable of given bound change information */
1184 extern
1186  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1187  );
1188 
1189 /** returns inference constraint of given bound change information */
1190 extern
1192  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1193  );
1194 
1195 /** returns inference propagator of given bound change information, or NULL if no propagator was responsible */
1196 extern
1198  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1199  );
1200 
1201 /** returns inference user information of given bound change information */
1202 extern
1204  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1205  );
1206 
1207 /** returns inference bound of inference variable of given bound change information */
1208 extern
1210  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1211  );
1212 
1213 /** returns whether the bound change information belongs to a redundant bound change */
1214 extern
1216  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1217  );
1218 
1219 /** returns whether the bound change has an inference reason (constraint or propagator), that can be resolved */
1220 extern
1222  SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1223  );
1224 
1225 /** for two bound change informations belonging to the same variable and bound, returns whether the first bound change
1226  * has a tighter new bound as the second bound change
1227  */
1228 extern
1230  SCIP_BDCHGINFO* bdchginfo1, /**< first bound change information */
1231  SCIP_BDCHGINFO* bdchginfo2 /**< second bound change information */
1232  );
1233 
1234 /** returns the new value of the bound in the bound change data */
1235 extern
1237  SCIP_BOUNDCHG* boundchg /**< bound change data */
1238  );
1239 
1240 /** returns the variable of the bound change in the bound change data */
1241 extern
1243  SCIP_BOUNDCHG* boundchg /**< bound change data */
1244  );
1245 
1246 /** returns the bound change type of the bound change in the bound change data */
1247 extern
1249  SCIP_BOUNDCHG* boundchg /**< bound change data */
1250  );
1251 
1252 /** returns the bound type of the bound change in the bound change data */
1253 extern
1255  SCIP_BOUNDCHG* boundchg /**< bound change data */
1256  );
1257 
1258 /** returns whether the bound change is redundant due to a more global bound that is at least as strong */
1259 extern
1261  SCIP_BOUNDCHG* boundchg /**< bound change data */
1262  );
1263 
1264 /** returns the number of bound changes in the domain change data */
1265 extern
1267  SCIP_DOMCHG* domchg /**< domain change data */
1268  );
1269 
1270 /** returns a particular bound change in the domain change data */
1271 extern
1273  SCIP_DOMCHG* domchg, /**< domain change data */
1274  int pos /**< position of the bound change in the domain change data */
1275  );
1276 
1277 /** returns left bound of open interval in hole */
1278 extern
1280  SCIP_HOLELIST* holelist /**< hole list pointer to hole of interest */
1281  );
1282 
1283 /** returns right bound of open interval in hole */
1284 extern
1286  SCIP_HOLELIST* holelist /**< hole list pointer to hole of interest */
1287  );
1288 
1289 /** returns next hole in list or NULL */
1290 extern
1292  SCIP_HOLELIST* holelist /**< hole list pointer to hole of interest */
1293  );
1294 
1295 #ifdef NDEBUG
1296 
1297 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
1298  * speed up the algorithms.
1299  */
1300 
1301 #define SCIPbdchgidxIsEarlierNonNull(idx1,idx2) \
1302  ((idx1)->depth < (idx2)->depth || ((idx1)->depth == (idx2)->depth && (idx1)->pos < (idx2)->pos))
1303 #define SCIPbdchgidxIsEarlier(idx1,idx2) \
1304  ((idx1) != NULL && ((idx2) == NULL || SCIPbdchgidxIsEarlierNonNull(idx1, idx2)))
1305 #define SCIPbdchginfoGetOldbound(bdchginfo) (bdchginfo)->oldbound
1306 #define SCIPbdchginfoGetNewbound(bdchginfo) (bdchginfo)->newbound
1307 #define SCIPbdchginfoGetVar(bdchginfo) (bdchginfo)->var
1308 #define SCIPbdchginfoGetChgtype(bdchginfo) (SCIP_BOUNDCHGTYPE)((bdchginfo)->boundchgtype)
1309 #define SCIPbdchginfoGetBoundtype(bdchginfo) (SCIP_BOUNDTYPE)((bdchginfo)->boundtype)
1310 #define SCIPbdchginfoGetDepth(bdchginfo) (bdchginfo)->bdchgidx.depth
1311 #define SCIPbdchginfoGetPos(bdchginfo) (bdchginfo)->bdchgidx.pos
1312 #define SCIPbdchginfoGetIdx(bdchginfo) (&(bdchginfo)->bdchgidx)
1313 #define SCIPbdchginfoGetInferVar(bdchginfo) (bdchginfo)->inferencedata.var
1314 #define SCIPbdchginfoGetInferCons(bdchginfo) (bdchginfo)->inferencedata.reason.cons
1315 #define SCIPbdchginfoGetInferProp(bdchginfo) (bdchginfo)->inferencedata.reason.prop
1316 #define SCIPbdchginfoGetInferInfo(bdchginfo) (bdchginfo)->inferencedata.info
1317 #define SCIPbdchginfoGetInferBoundtype(bdchginfo) (SCIP_BOUNDTYPE)((bdchginfo)->inferboundtype)
1318 #define SCIPbdchginfoIsRedundant(bdchginfo) (bdchginfo)->redundant
1319 #define SCIPbdchginfoHasInferenceReason(bdchginfo) \
1320  (((bdchginfo)->boundchgtype == SCIP_BOUNDCHGTYPE_CONSINFER) \
1321  || ((bdchginfo)->boundchgtype == SCIP_BOUNDCHGTYPE_PROPINFER && (bdchginfo)->inferencedata.reason.prop != NULL))
1322 #define SCIPbdchginfoIsTighter(bdchginfo1,bdchginfo2) ((bdchginfo1)->boundtype == SCIP_BOUNDTYPE_LOWER \
1323  ? (bdchginfo1)->newbound > bdchginfo2->newbound : (bdchginfo1)->newbound < bdchginfo2->newbound)
1324 #define SCIPboundchgGetNewbound(boundchg) ((boundchg)->newbound)
1325 #define SCIPboundchgGetVar(boundchg) ((boundchg)->var)
1326 #define SCIPboundchgGetBoundchgtype(boundchg) ((SCIP_BOUNDCHGTYPE)((boundchg)->boundchgtype))
1327 #define SCIPboundchgGetBoundtype(boundchg) ((SCIP_BOUNDTYPE)((boundchg)->boundtype))
1328 #define SCIPboundchgIsRedundant(boundchg) ((boundchg)->redundant)
1329 #define SCIPdomchgGetNBoundchgs(domchg) ((domchg) != NULL ? (domchg)->domchgbound.nboundchgs : 0)
1330 #define SCIPdomchgGetBoundchg(domchg, pos) (&(domchg)->domchgbound.boundchgs[pos])
1331 #define SCIPholelistGetLeft(holelist) ((holelist)->hole.left)
1332 #define SCIPholelistGetRight(holelist) ((holelist)->hole.right)
1333 #define SCIPholelistGetNext(holelist) ((holelist)->next)
1334 
1335 #endif
1336 
1337 #ifdef __cplusplus
1338 }
1339 #endif
1340 
1341 #endif
SCIP_VAR ** SCIPvarGetImplVars(SCIP_VAR *var, SCIP_Bool varfixing)
void SCIPvarSetTransData(SCIP_VAR *var, SCIP_DECL_VARTRANS((*vartrans)))
SCIP_VAR * SCIPvarGetTransVar(SCIP_VAR *var)
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_Real SCIPvarGetMultaggrConstant(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
int SCIPvarGetNBdchgInfosUb(SCIP_VAR *var)
SCIP_Real SCIPvarGetAvgBranchdepthCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_BDCHGIDX * SCIPbdchginfoGetIdx(SCIP_BDCHGINFO *bdchginfo)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_BDCHGINFO * SCIPvarGetUbchgInfo(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_PROP * SCIPbdchginfoGetInferProp(SCIP_BDCHGINFO *bdchginfo)
struct SCIP_Cons SCIP_CONS
Definition: type_cons.h:48
SCIP_BOUNDCHGTYPE SCIPbdchginfoGetChgtype(SCIP_BDCHGINFO *bdchginfo)
void SCIPvarMarkDeletable(SCIP_VAR *var)
type definitions for miscellaneous datastructures
type definitions for implications, variable bounds, and cliques
void SCIPvarsGetProbvar(SCIP_VAR **vars, int nvars)
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
SCIP_BDCHGINFO * SCIPvarGetLbchgInfo(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
int SCIPbdchginfoGetDepth(SCIP_BDCHGINFO *bdchginfo)
#define SCIP_DECL_VARTRANS(x)
Definition: type_var.h:127
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR *var)
SCIP_Real SCIPvarGetSol(SCIP_VAR *var, SCIP_Bool getlpval)
SCIP_Real SCIPholelistGetLeft(SCIP_HOLELIST *holelist)
SCIP_Real SCIPvarGetBestRootLPObjval(SCIP_VAR *var)
SCIP_CLIQUE ** SCIPvarGetCliques(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_BDCHGINFO * SCIPvarGetBdchgInfo(SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_Real SCIPvarGetLbLazy(SCIP_VAR *var)
SCIP_RETCODE SCIPvarSetRemovable(SCIP_VAR *var, SCIP_Bool removable)
SCIP_DECL_HASHKEYEQ(SCIPvarIsHashkeyEq)
SCIP_Real SCIPvarGetBdAtIndex(SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Real * SCIPvarGetVubConstants(SCIP_VAR *var)
SCIP_Real SCIPvarGetPseudoSol(SCIP_VAR *var)
SCIP_VAR ** SCIPvarGetVlbVars(SCIP_VAR *var)
SCIP_Real SCIPvarGetAvgSol(SCIP_VAR *var)
SCIP_HOLELIST * SCIPvarGetHolelistLocal(SCIP_VAR *var)
SCIP_Longint SCIPvarGetNBranchingsCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_Bool SCIPvarHasBinaryImplic(SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_Bool implvarfixing)
SCIP_HOLELIST * SCIPvarGetHolelistOriginal(SCIP_VAR *var)
int SCIPvarGetNVubs(SCIP_VAR *var)
SCIP_RETCODE SCIPvarGetAggregatedObj(SCIP_VAR *var, SCIP_Real *aggrobj)
union SCIP_DomChg SCIP_DOMCHG
Definition: type_var.h:81
struct SCIP_VarData SCIP_VARDATA
Definition: type_var.h:96
SCIP_BOUNDTYPE SCIPvarGetBestBoundType(SCIP_VAR *var)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPvarGetProbvarBound(SCIP_VAR **var, SCIP_Real *bound, SCIP_BOUNDTYPE *boundtype)
SCIP_HOLELIST * SCIPvarGetHolelistGlobal(SCIP_VAR *var)
enum SCIP_Varstatus SCIP_VARSTATUS
Definition: type_var.h:48
SCIP_Bool SCIPbdchgidxIsEarlier(SCIP_BDCHGIDX *bdchgidx1, SCIP_BDCHGIDX *bdchgidx2)
SCIP_VAR * SCIPboundchgGetVar(SCIP_BOUNDCHG *boundchg)
SCIP_DECL_HASHKEYVAL(SCIPvarGetHashkeyVal)
#define SCIP_DECL_VARCOPY(x)
Definition: type_var.h:170
int SCIPdomchgGetNBoundchgs(SCIP_DOMCHG *domchg)
SCIP_Real SCIPholelistGetRight(SCIP_HOLELIST *holelist)
void SCIPvarSetBestRootSol(SCIP_VAR *var, SCIP_Real rootsol, SCIP_Real rootredcost, SCIP_Real rootlpobjval)
SCIP_Bool SCIPvarHasImplic(SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype)
SCIP_Real SCIPvarGetLbAtIndex(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
type definitions for return codes for SCIP methods
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_Bool SCIPvarIsInLP(SCIP_VAR *var)
int SCIPbdchginfoGetPos(SCIP_BDCHGINFO *bdchginfo)
SCIP_BDCHGINFO * SCIPvarGetBdchgInfoLb(SCIP_VAR *var, int pos)
SCIP_Real SCIPvarGetBranchFactor(SCIP_VAR *var)
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
struct SCIP_BdChgInfo SCIP_BDCHGINFO
Definition: type_var.h:84
SCIP_Real SCIPvarGetAggrConstant(SCIP_VAR *var)
int SCIPvarGetLastBdchgDepth(SCIP_VAR *var)
#define SCIP_DECL_VARDELTRANS(x)
Definition: type_var.h:140
void SCIPvarSetDelorigData(SCIP_VAR *var, SCIP_DECL_VARDELORIG((*vardelorig)))
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_BOUNDCHG * SCIPdomchgGetBoundchg(SCIP_DOMCHG *domchg, int pos)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetRootSol(SCIP_VAR *var)
SCIP_VAR * SCIPbdchginfoGetInferVar(SCIP_BDCHGINFO *bdchginfo)
SCIP_Real SCIPvarGetCutoffSumCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
struct SCIP_Prop SCIP_PROP
Definition: type_prop.h:37
SCIP_BOUNDTYPE SCIPbdchginfoGetBoundtype(SCIP_BDCHGINFO *bdchginfo)
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
SCIP_DECL_SORTPTRCOMP(SCIPvarCompActiveAndNegated)
SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
SCIP_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
struct SCIP_Clique SCIP_CLIQUE
Definition: type_implics.h:32
SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPvarsGetProbvarBinary(SCIP_VAR ***vars, SCIP_Bool **negatedarr, int nvars)
void SCIPvarSetDeltransData(SCIP_VAR *var, SCIP_DECL_VARDELTRANS((*vardeltrans)))
struct SCIP_Col SCIP_COL
Definition: type_lp.h:87
SCIP_VAR ** SCIPvarGetVubVars(SCIP_VAR *var)
SCIP_Real SCIPvarGetBestRootSol(SCIP_VAR *var)
SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbAtIndex(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_Bool SCIPvarIsInitial(SCIP_VAR *var)
SCIP_BDCHGIDX * SCIPvarGetLastBdchgIndex(SCIP_VAR *var)
SCIP_DECL_HASHGETKEY(SCIPvarGetHashkey)
SCIP_BOUNDCHGTYPE SCIPboundchgGetBoundchgtype(SCIP_BOUNDCHG *boundchg)
SCIP_Bool SCIPvarIsRemovable(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_Bool SCIPvarIsDeleted(SCIP_VAR *var)
struct SCIP_ValueHistory SCIP_VALUEHISTORY
Definition: type_history.h:49
SCIP_Bool SCIPbdchginfoIsRedundant(SCIP_BDCHGINFO *bdchginfo)
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
SCIP_BOUNDTYPE * SCIPvarGetImplTypes(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
type definitions for problem variables
int SCIPvarGetBranchPriority(SCIP_VAR *var)
SCIP_VARDATA * SCIPvarGetData(SCIP_VAR *var)
SCIP_RETCODE SCIPvarSetInitial(SCIP_VAR *var, SCIP_Bool initial)
int SCIPvarGetNUses(SCIP_VAR *var)
SCIP_Bool SCIPbdchginfoIsTighter(SCIP_BDCHGINFO *bdchginfo1, SCIP_BDCHGINFO *bdchginfo2)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLazy(SCIP_VAR *var)
void SCIPvarMarkNotDeletable(SCIP_VAR *var)
SCIP_Real SCIPboundchgGetNewbound(SCIP_BOUNDCHG *boundchg)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetNLPSol(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
#define SCIP_Bool
Definition: def.h:53
SCIP_Bool SCIPvarWasFixedAtIndex(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_Bool SCIPboundchgIsRedundant(SCIP_BOUNDCHG *boundchg)
int SCIPvarGetNImpls(SCIP_VAR *var, SCIP_Bool varfixing)
SCIP_Real SCIPvarGetBestBoundGlobal(SCIP_VAR *var)
SCIP_Real SCIPvarGetInferenceSum(SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_Real SCIPvarGetBestBoundLocal(SCIP_VAR *var)
SCIP_Real * SCIPvarGetVubCoefs(SCIP_VAR *var)
SCIP_Real SCIPvarGetUnchangedObj(SCIP_VAR *var)
SCIP_VALUEHISTORY * SCIPvarGetValuehistory(SCIP_VAR *var)
SCIP_Real SCIPvarGetWorstBoundGlobal(SCIP_VAR *var)
struct SCIP_Holelist SCIP_HOLELIST
Definition: type_var.h:89
SCIP_Real * SCIPvarGetVlbConstants(SCIP_VAR *var)
struct SCIP_BdChgIdx SCIP_BDCHGIDX
Definition: type_var.h:83
SCIP_Real SCIPvarGetNegationConstant(SCIP_VAR *var)
SCIP_HOLELIST * SCIPholelistGetNext(SCIP_HOLELIST *holelist)
int * SCIPvarGetImplIds(SCIP_VAR *var, SCIP_Bool varfixing)
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
int SCIPvarGetNVlbs(SCIP_VAR *var)
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
struct SCIP_Var SCIP_VAR
Definition: type_var.h:95
SCIP_BOUNDTYPE SCIPvarGetWorstBoundType(SCIP_VAR *var)
SCIP_BOUNDTYPE SCIPbdchginfoGetInferBoundtype(SCIP_BDCHGINFO *bdchginfo)
SCIP_RETCODE SCIPvarGetProbvarHole(SCIP_VAR **var, SCIP_Real *left, SCIP_Real *right)
SCIP_Real SCIPvarGetWorstBoundLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
#define SCIP_DECL_VARDELORIG(x)
Definition: type_var.h:107
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real * SCIPvarGetVlbCoefs(SCIP_VAR *var)
SCIP_Real SCIPbdchginfoGetOldbound(SCIP_BDCHGINFO *bdchginfo)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformedOrigvar(SCIP_VAR *var)
struct SCIP_BoundChg SCIP_BOUNDCHG
Definition: type_var.h:82
SCIP_Bool SCIPbdchgidxIsEarlierNonNull(SCIP_BDCHGIDX *bdchgidx1, SCIP_BDCHGIDX *bdchgidx2)
SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
SCIP_Real SCIPvarGetInferenceSumCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
int SCIPvarGetNBdchgInfosLb(SCIP_VAR *var)
#define SCIP_Real
Definition: def.h:127
void SCIPvarSetData(SCIP_VAR *var, SCIP_VARDATA *vardata)
int SCIPvarGetNCliques(SCIP_VAR *var, SCIP_Bool varfixing)
type definitions for branching and inference history
SCIP_Real SCIPvarGetLPSol_rec(SCIP_VAR *var)
SCIP_Real SCIPvarGetNLPSol_rec(SCIP_VAR *var)
SCIP_Bool SCIPvarMayRoundUp(SCIP_VAR *var)
SCIP_Bool SCIPvarWasFixedEarlier(SCIP_VAR *var1, SCIP_VAR *var2)
#define SCIP_Longint
Definition: def.h:112
int SCIPbdchginfoGetInferInfo(SCIP_BDCHGINFO *bdchginfo)
SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:58
SCIP_Real SCIPvarGetCutoffSum(SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
void SCIPvarSetCopyData(SCIP_VAR *var, SCIP_DECL_VARCOPY((*varcopy)))
SCIP_Real * SCIPvarGetImplBounds(SCIP_VAR *var, SCIP_Bool varfixing)
common defines and data types used in all packages of SCIP
SCIP_BOUNDTYPE SCIPboundchgGetBoundtype(SCIP_BOUNDCHG *boundchg)
enum SCIP_BoundchgType SCIP_BOUNDCHGTYPE
Definition: type_var.h:76
SCIP_Bool SCIPvarIsDeletable(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_CONS * SCIPbdchginfoGetInferCons(SCIP_BDCHGINFO *bdchginfo)
SCIP_BRANCHDIR SCIPvarGetBranchDirection(SCIP_VAR *var)
SCIP_Longint SCIPvarGetNBranchings(SCIP_VAR *var, SCIP_BRANCHDIR dir)
int SCIPvarGetNLocksDown(SCIP_VAR *var)
SCIP_Real SCIPvarGetAvgBranchdepth(SCIP_VAR *var, SCIP_BRANCHDIR dir)
SCIP_Real SCIPvarGetBestRootRedcost(SCIP_VAR *var)
type definitions for constraints and constraint handlers
SCIP_BDCHGINFO * SCIPvarGetBdchgInfoUb(SCIP_VAR *var, int pos)
SCIP_Bool SCIPbdchginfoHasInferenceReason(SCIP_BDCHGINFO *bdchginfo)
int SCIPvarCompareActiveAndNegated(SCIP_VAR *var1, SCIP_VAR *var2)