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-2025 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file pub_var.h
26 * @ingroup PUBLICCOREAPI
27 * @brief public methods for problem variables
28 * @author Tobias Achterberg
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_PUB_VAR_H__
34#define __SCIP_PUB_VAR_H__
35
36
37#include "scip/def.h"
38#include "scip/type_cons.h"
39#include "scip/type_history.h"
40#include "scip/type_implics.h"
41#include "scip/type_lp.h"
42#include "scip/type_lpexact.h"
43#include "scip/type_misc.h"
44#include "scip/type_prop.h"
45#include "scip/type_result.h"
46#include "scip/type_retcode.h"
47#include "scip/type_scip.h"
48#include "scip/type_var.h"
49#include "scip/intervalarith.h"
50
51#ifdef NDEBUG
52#include "scip/struct_var.h"
53#include "scip/implics.h"
54#include "scip/history.h"
55#include "scip/pub_lp.h"
56#endif
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
62/*
63 * methods for variables
64 */
65
66/**@addtogroup PublicVariableMethods
67 *
68 * @{
69 */
70
71/** gets number of locks for rounding down
72 *
73 * @note This method will always return variable locks of type model
74 *
75 * @note It is recommented to use SCIPvarGetNLocksDownType()
76 */
77SCIP_EXPORT
79 SCIP_VAR* var /**< problem variable */
80 );
81
82/** gets number of locks for rounding up
83 *
84 * @note This method will always return variable locks of type model
85 *
86 * @note It is recommented to use SCIPvarGetNLocksUpType()
87 */
88SCIP_EXPORT
90 SCIP_VAR* var /**< problem variable */
91 );
92
93/** gets number of locks for rounding up of a special type */
94SCIP_EXPORT
96 SCIP_VAR* var, /**< problem variable */
97 SCIP_LOCKTYPE locktype /**< type of variable locks */
98 );
99
100/** gets number of locks for rounding down of a special type */
101SCIP_EXPORT
103 SCIP_VAR* var, /**< problem variable */
104 SCIP_LOCKTYPE locktype /**< type of variable locks */
105 );
106
107/** is it possible, to round variable down and stay feasible?
108 *
109 * @note This method will always check w.r.t variable locks of type model
110 */
111SCIP_EXPORT
113 SCIP_VAR* var /**< problem variable */
114 );
115
116/** is it possible, to round variable up and stay feasible?
117 *
118 * @note This method will always check w.r.t. variable locks of type model
119 */
120SCIP_EXPORT
122 SCIP_VAR* var /**< problem variable */
123 );
124
125/** compares the index of two variables, only active or negated variables are allowed, if a variable
126 * is negated then the index of the corresponding active variable is taken, returns -1 if first is
127 * smaller than, and +1 if first is greater than second variable index; returns 0 if both indices
128 * are equal, which means both variables are equal
129 */
130SCIP_EXPORT
132 SCIP_VAR* var1, /**< first problem variable */
133 SCIP_VAR* var2 /**< second problem variable */
134 );
135
136/** comparison method for sorting active and negated variables by non-decreasing index, active and negated
137 * variables are handled as the same variables
138 */
139SCIP_EXPORT
140SCIP_DECL_SORTPTRCOMP(SCIPvarCompActiveAndNegated);
141
142/** compares the index of two variables, returns -1 if first is smaller than, and +1 if first is greater than second
143 * variable index; returns 0 if both indices are equal, which means both variables are equal
144 */
145SCIP_EXPORT
147 SCIP_VAR* var1, /**< first problem variable */
148 SCIP_VAR* var2 /**< second problem variable */
149 );
150
151/** comparison method for sorting variables by non-decreasing index */
152SCIP_EXPORT
153SCIP_DECL_SORTPTRCOMP(SCIPvarComp);
154
155/** comparison method for sorting variables by non-decreasing objective coefficient */
156SCIP_EXPORT
157SCIP_DECL_SORTPTRCOMP(SCIPvarCompObj);
158
159/** hash key retrieval function for variables */
160SCIP_EXPORT
161SCIP_DECL_HASHGETKEY(SCIPvarGetHashkey);
162
163/** returns TRUE iff the indices of both variables are equal */
164SCIP_EXPORT
165SCIP_DECL_HASHKEYEQ(SCIPvarIsHashkeyEq);
166
167/** returns the hash value of the key */
168SCIP_EXPORT
169SCIP_DECL_HASHKEYVAL(SCIPvarGetHashkeyVal);
170
171
172/** gets corresponding active, fixed, or multi-aggregated problem variables of given variables,
173 * @note the content of the given array will/might change
174 */
175SCIP_EXPORT
177 SCIP_VAR** vars, /**< array of problem variables */
178 int nvars /**< number of variables */
179 );
180
181/** gets corresponding active, fixed, or multi-aggregated problem variable of a variable */
182SCIP_EXPORT
184 SCIP_VAR* var /**< problem variable */
185 );
186
187/** gets corresponding active, fixed, or multi-aggregated problem variables of binary variables and
188 * updates the given negation status of each variable
189 */
190SCIP_EXPORT
192 SCIP_VAR*** vars, /**< pointer to binary problem variables */
193 SCIP_Bool** negatedarr, /**< pointer to corresponding array to update the negation status */
194 int nvars /**< number of variables and values in vars and negated array */
195 );
196
197/** gets corresponding active, fixed, or multi-aggregated problem variable of a binary variable and
198 * updates the given negation status
199 */
200SCIP_EXPORT
202 SCIP_VAR** var, /**< pointer to binary problem variable */
203 SCIP_Bool* negated /**< pointer to update the negation status */
204 );
205
206/** transforms given variable, boundtype and bound to the corresponding active, fixed, or multi-aggregated variable
207 * values
208 */
209SCIP_EXPORT
211 SCIP_VAR** var, /**< pointer to problem variable */
212 SCIP_Real* bound, /**< pointer to bound value to transform */
213 SCIP_BOUNDTYPE* boundtype /**< pointer to type of bound: lower or upper bound */
214 );
215
216/** transforms given variable, boundtype and exact bound to the corresponding active, fixed, or multi-aggregated variable
217 * values
218 */
219SCIP_EXPORT
221 SCIP_VAR** var, /**< pointer to problem variable */
222 SCIP_RATIONAL* bound, /**< pointer to bound value to transform */
223 SCIP_BOUNDTYPE* boundtype /**< pointer to type of bound: lower or upper bound */
224 );
225
226/** transforms given variable and domain hole to the corresponding active, fixed, or multi-aggregated variable
227 * values
228 */
229SCIP_EXPORT
231 SCIP_VAR** var, /**< pointer to problem variable */
232 SCIP_Real* left, /**< pointer to left bound of open interval in hole to transform */
233 SCIP_Real* right /**< pointer to right bound of open interval in hole to transform */
234 );
235
236/** retransforms given variable, scalar and constant to the corresponding original variable, scalar
237 * and constant, if possible; if the retransformation is impossible, NULL is returned as variable
238 */
239SCIP_EXPORT
241 SCIP_VAR** var, /**< pointer to problem variable x in sum a*x + c */
242 SCIP_Real* scalar, /**< pointer to scalar a in sum a*x + c */
243 SCIP_Real* constant /**< pointer to constant c in sum a*x + c */
244 );
245
246/** retransforms given variable, scalar and constant to the corresponding original variable, scalar
247 * and constant, if possible; if the retransformation is impossible, NULL is returned as variable
248 */
249SCIP_EXPORT
251 SCIP_VAR** var, /**< pointer to problem variable x in sum a*x + c */
252 SCIP_RATIONAL* scalar, /**< pointer to scalar a in sum a*x + c */
253 SCIP_RATIONAL* constant /**< pointer to constant c in sum a*x + c */
254 );
255
256/** returns whether the given variable is the direct counterpart of an original problem variable */
257SCIP_EXPORT
259 SCIP_VAR* var /**< problem variable */
260 );
261
262/** returns the number of times, a bound of the variable was changed in given direction due to branching */
263SCIP_EXPORT
265 SCIP_VAR* var, /**< problem variable */
266 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
267 );
268
269/** returns the number of times, a bound of the variable was changed in given direction due to branching
270 * in the current run
271 */
272SCIP_EXPORT
274 SCIP_VAR* var, /**< problem variable */
275 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
276 );
277
278/** returns the number of inferences branching on this variable in given direction triggered */
279SCIP_EXPORT
281 SCIP_VAR* var, /**< problem variable */
282 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
283 );
284
285/** returns the number of inferences branching on this variable in given direction triggered
286 * in the current run
287 */
288SCIP_EXPORT
290 SCIP_VAR* var, /**< problem variable */
291 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
292 );
293
294/** returns the number of cutoffs branching on this variable in given direction produced */
295SCIP_EXPORT
297 SCIP_VAR* var, /**< problem variable */
298 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
299 );
300
301/** returns the number of cutoffs branching on this variable in given direction produced in the current run */
302SCIP_EXPORT
304 SCIP_VAR* var, /**< problem variable */
305 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
306 );
307
308/** returns the average depth of bound changes in given direction due to branching on the variable */
309SCIP_EXPORT
311 SCIP_VAR* var, /**< problem variable */
312 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
313 );
314
315/** returns the average depth of bound changes in given direction due to branching on the variable
316 * in the current run
317 */
318SCIP_EXPORT
320 SCIP_VAR* var, /**< problem variable */
321 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
322 );
323
324/** returns whether there is an implication x == varfixing -> y <= b or y >= b in the implication graph;
325 * implications that are represented as cliques in the clique table are not regarded (use SCIPvarsHaveCommonClique());
326 * both variables must be active, variable x must be binary
327 */
328SCIP_EXPORT
330 SCIP_VAR* var, /**< problem variable x */
331 SCIP_Bool varfixing, /**< FALSE if y should be searched in implications for x == 0, TRUE for x == 1 */
332 SCIP_VAR* implvar, /**< variable y to search for */
333 SCIP_BOUNDTYPE impltype /**< type of implication y <=/>= b to search for */
334 );
335
336/** returns whether there is an implication x == varfixing -> y == implvarfixing in the implication graph;
337 * implications that are represented as cliques in the clique table are not regarded (use SCIPvarsHaveCommonClique());
338 * both variables must be active binary variables
339 */
340SCIP_EXPORT
342 SCIP_VAR* var, /**< problem variable x */
343 SCIP_Bool varfixing, /**< FALSE if y should be searched in implications for x == 0, TRUE for x == 1 */
344 SCIP_VAR* implvar, /**< variable y to search for */
345 SCIP_Bool implvarfixing /**< value of the implied variable to search for */
346 );
347
348/** gets the values of b in implications x == varfixing -> y <= b or y >= b in the implication graph;
349 * the values are set to SCIP_INVALID if there is no implied bound
350 */
351SCIP_EXPORT
353 SCIP_VAR* var, /**< problem variable x */
354 SCIP_Bool varfixing, /**< FALSE if y should be searched in implications for x == 0, TRUE for x == 1 */
355 SCIP_VAR* implvar, /**< variable y to search for */
356 SCIP_Real* lb, /**< buffer to store the value of the implied lower bound */
357 SCIP_Real* ub /**< buffer to store the value of the implied upper bound */
358 );
359
360/** returns whether there is a clique that contains both given variable/value pairs;
361 * the variables must be active binary variables;
362 * if regardimplics is FALSE, only the cliques in the clique table are looked at;
363 * if regardimplics is TRUE, both the cliques and the implications of the implication graph are regarded
364 */
365SCIP_EXPORT
367 SCIP_VAR* var1, /**< first variable */
368 SCIP_Bool value1, /**< value of first variable */
369 SCIP_VAR* var2, /**< second variable */
370 SCIP_Bool value2, /**< value of second variable */
371 SCIP_Bool regardimplics /**< should the implication graph also be searched for a clique? */
372 );
373
374/** gets corresponding objective value of active, fixed, or multi-aggregated problem variable of given variable
375 * e.g. obj(x) = 1 this method returns for ~x the value -1
376 */
377SCIP_EXPORT
379 SCIP_VAR* var, /**< problem variable */
380 SCIP_Real* aggrobj /**< pointer to store the aggregated objective value */
381 );
382
383/** sets the initial flag of a variable; only possible for original or loose variables */
384SCIP_EXPORT
386 SCIP_VAR* var, /**< problem variable */
387 SCIP_Bool initial /**< initial flag */
388 );
389
390/** sets the removable flag of a variable; only possible for original or loose variables */
391SCIP_EXPORT
393 SCIP_VAR* var, /**< problem variable */
394 SCIP_Bool removable /**< removable flag */
395 );
396
397/** returns the name of the variable
398 *
399 * @note to change the name of a variable, use SCIPchgVarName() from scip.h
400 */
401SCIP_EXPORT
402const char* SCIPvarGetName(
403 SCIP_VAR* var /**< problem variable */
404 );
405
406/** gets number of times, the variable is currently captured */
407SCIP_EXPORT
409 SCIP_VAR* var /**< problem variable */
410 );
411
412/** returns the user data of the variable */
413SCIP_EXPORT
415 SCIP_VAR* var /**< problem variable */
416 );
417
418/** sets the user data for the variable */
419SCIP_EXPORT
420void SCIPvarSetData(
421 SCIP_VAR* var, /**< problem variable */
422 SCIP_VARDATA* vardata /**< user variable data */
423 );
424
425/** sets method to free user data for the original variable */
426SCIP_EXPORT
428 SCIP_VAR* var, /**< problem variable */
429 SCIP_DECL_VARDELORIG ((*vardelorig)) /**< frees user data of original variable */
430 );
431
432/** sets method to transform user data of the variable */
433SCIP_EXPORT
435 SCIP_VAR* var, /**< problem variable */
436 SCIP_DECL_VARTRANS ((*vartrans)) /**< creates transformed user data by transforming original user data */
437 );
438
439/** sets method to free transformed user data for the variable */
440SCIP_EXPORT
442 SCIP_VAR* var, /**< problem variable */
443 SCIP_DECL_VARDELTRANS ((*vardeltrans)) /**< frees user data of transformed variable */
444 );
445
446/** sets method to copy this variable into sub-SCIPs */
447SCIP_EXPORT
449 SCIP_VAR* var, /**< problem variable */
450 SCIP_DECL_VARCOPY ((*varcopy)) /**< copy method of the variable */
451 );
452
453/** gets status of variable */
454SCIP_EXPORT
456 SCIP_VAR* var /**< problem variable */
457 );
458
459/** returns the status of the exact variable data */
460SCIP_EXPORT
462 SCIP_VAR* var /**< scip variable */
463 );
464
465/** returns whether the variable has exact variable data */
466SCIP_EXPORT
468 SCIP_VAR* var /**< scip variable */
469 );
470
471/** returns whether the variable belongs to the original problem */
472SCIP_EXPORT
474 SCIP_VAR* var /**< problem variable */
475 );
476
477/** returns whether the variable belongs to the transformed problem */
478SCIP_EXPORT
480 SCIP_VAR* var /**< problem variable */
481 );
482
483/** returns whether the variable was created by negation of a different variable */
484SCIP_EXPORT
486 SCIP_VAR* var /**< problem variable */
487 );
488
489/** gets type of variable */
490SCIP_EXPORT
492 SCIP_VAR* var /**< problem variable */
493 );
494
495/** gets the implied integral type of the variable */
496SCIP_EXPORT
498 SCIP_VAR* var /**< problem variable */
499 );
500
501/** returns TRUE if the variable is of binary type; this is the case if:
502 * (1) variable type is binary
503 * (2) variable type is integer or implicit integer and
504 * (i) the global lower bound is greater than or equal to zero
505 * (ii) the global upper bound is less than or equal to one
506 */
507SCIP_EXPORT
509 SCIP_VAR* var /**< problem variable */
510 );
511
512/** returns whether variable is of integral type (binary, integer, or implied integral of any type) */
513SCIP_EXPORT
515 SCIP_VAR* var /**< problem variable */
516 );
517
518/** returns whether variable is implied integral (weakly or strongly) */
519SCIP_EXPORT
521 SCIP_VAR* var /**< problem variable */
522 );
523
524/** returns TRUE if the variable is integral, but not implied integral. */
525SCIP_EXPORT
527 SCIP_VAR* var /**< problem variable */
528 );
529
530/** returns whether variable's column should be present in the initial root LP */
531SCIP_EXPORT
533 SCIP_VAR* var /**< problem variable */
534 );
535
536/** returns whether variable's column is removable from the LP (due to aging or cleanup) */
537SCIP_EXPORT
539 SCIP_VAR* var /**< problem variable */
540 );
541
542/** returns whether the variable was deleted from the problem */
543SCIP_EXPORT
545 SCIP_VAR* var /**< problem variable */
546 );
547
548/** marks the variable to be deletable, i.e., it may be deleted completely from the problem;
549 * method can only be called before the variable is added to the problem by SCIPaddVar() or SCIPaddPricedVar()
550 */
551SCIP_EXPORT
553 SCIP_VAR* var /**< problem variable */
554 );
555
556/** marks the variable to be not deletable from the problem */
557SCIP_EXPORT
559 SCIP_VAR* var
560 );
561
562/** returns whether variable is allowed to be deleted completely from the problem */
563SCIP_EXPORT
565 SCIP_VAR* var
566 );
567
568/** marks variable to be deleted from global structures (cliques etc.) when cleaning up
569 *
570 * @note: this is not equivalent to marking the variable itself for deletion, this is done by using SCIPvarMarkDeletable()
571 */
572SCIP_EXPORT
574 SCIP_VAR* var /**< problem variable */
575 );
576
577/** returns whether variable is an active (neither fixed nor aggregated) variable */
578SCIP_EXPORT
580 SCIP_VAR* var /**< problem variable */
581 );
582
583/** gets unique index of variable */
584SCIP_EXPORT
586 SCIP_VAR* var /**< problem variable */
587 );
588
589/** gets position of variable in problem, or -1 if variable is not active */
590SCIP_EXPORT
592 SCIP_VAR* var /**< problem variable */
593 );
594
595/** returns position of variable in certificate */
596SCIP_EXPORT
598 SCIP_VAR* var /**< variable to get index for */
599 );
600
601/** sets index of variable in certificate */
602SCIP_EXPORT
604 SCIP_VAR* var, /**< variable to set index for */
605 int certidx /**< the index */
606 );
607
608/** sets index of variable in certificate */
609SCIP_EXPORT
611 SCIP_VAR* var, /**< variable to set index for */
612 SCIP_Longint certidx /**< the index */
613 );
614
615/** sets index of variable in certificate */
616SCIP_EXPORT
618 SCIP_VAR* var, /**< variable to set index for */
619 SCIP_Longint certidx /**< the index */
620 );
621
622/** returns index of variable bound in vipr certificate */
623SCIP_EXPORT
625 SCIP_VAR* var /**< variable to get index for */
626 );
627
628/** returns index of variable bound in vipr certificate */
629SCIP_EXPORT
631 SCIP_VAR* var /**< variable to get index for */
632 );
633
634/** returns index of variable bound in vipr certificate */
635SCIP_EXPORT
637 SCIP_VAR* var /**< variable to get index for */
638 );
639
640/** returns index of variable bound in vipr certificate */
641SCIP_EXPORT
643 SCIP_VAR* var /**< variable to get index for */
644 );
645
646/** gets transformed variable of ORIGINAL variable */
647SCIP_EXPORT
649 SCIP_VAR* var /**< problem variable */
650 );
651
652/** gets column of COLUMN variable */
653SCIP_EXPORT
655 SCIP_VAR* var /**< problem variable */
656 );
657
658/** gets column of COLUMN variable */
659SCIP_EXPORT
661 SCIP_VAR* var /**< problem variable */
662 );
663
664/** returns whether the variable is a COLUMN variable that is member of the current LP */
665SCIP_EXPORT
667 SCIP_VAR* var /**< problem variable */
668 );
669
670/** gets lower bound on absolute coefficient of a loose variable in (multi)aggregations of other variables */
671SCIP_EXPORT
673 SCIP_VAR* var /**< problem variable */
674 );
675
676/** gets upper bound on absolute coefficient of a loose variable in (multi)aggregations of other variables */
677SCIP_EXPORT
679 SCIP_VAR* var /**< problem variable */
680 );
681
682/** gets aggregation variable y of an aggregated variable x = a*y + c */
683SCIP_EXPORT
685 SCIP_VAR* var /**< problem variable */
686 );
687
688/** gets aggregation scalar a of an aggregated variable x = a*y + c */
689SCIP_EXPORT
691 SCIP_VAR* var /**< problem variable */
692 );
693
694/** gets aggregation scalar a of an aggregated variable x = a*y + c */
695SCIP_EXPORT
697 SCIP_VAR* var /**< problem variable */
698 );
699
700/** gets aggregation constant c of an aggregated variable x = a*y + c */
701SCIP_EXPORT
703 SCIP_VAR* var /**< problem variable */
704 );
705
706/** gets aggregation constant c of an aggregated variable x = a*y + c */
707SCIP_EXPORT
709 SCIP_VAR* var /**< problem variable */
710 );
711
712/** gets number n of aggregation variables of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
713SCIP_EXPORT
715 SCIP_VAR* var /**< problem variable */
716 );
717
718/** gets vector of aggregation variables y of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
719SCIP_EXPORT
721 SCIP_VAR* var /**< problem variable */
722 );
723
724/** gets vector of aggregation scalars a of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
725SCIP_EXPORT
727 SCIP_VAR* var /**< problem variable */
728 );
729
730/** gets vector of exact aggregation scalars a of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
731SCIP_EXPORT
733 SCIP_VAR* var /**< problem variable */
734 );
735
736/** gets aggregation constant c of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
737SCIP_EXPORT
739 SCIP_VAR* var /**< problem variable */
740 );
741
742/** gets exact aggregation constant c of a multi aggregated variable x = a0*y0 + ... + a(n-1)*y(n-1) + c */
743SCIP_EXPORT
745 SCIP_VAR* var /**< problem variable */
746 );
747
748/** gets the negation of the given variable; may return NULL, if no negation is existing yet */
749SCIP_EXPORT
751 SCIP_VAR* var /**< negated problem variable */
752 );
753
754/** gets the negation variable x of a negated variable x' = offset - x */
755SCIP_EXPORT
757 SCIP_VAR* var /**< negated problem variable */
758 );
759
760/** gets the negation offset of a negated variable x' = offset - x */
761SCIP_EXPORT
763 SCIP_VAR* var /**< negated problem variable */
764 );
765
766/** gets objective function value of variable */
767SCIP_EXPORT
769 SCIP_VAR* var /**< problem variable */
770 );
771
772/** gets objective function value of variable */
773SCIP_EXPORT
775 SCIP_VAR* var /**< problem variable */
776 );
777
778/** gets exact objective function value of variable */
779SCIP_EXPORT
781 SCIP_VAR* var /**< problem variable */
782 );
783
784/** gets the unchanged objective function value of variable (ignoring temproray changes performed in probing mode) */
785SCIP_EXPORT
787 SCIP_VAR* var /**< problem variable */
788 );
789
790/** gets original lower bound of original problem variable (i.e. the bound set in problem creation) */
791SCIP_EXPORT
793 SCIP_VAR* var /**< original problem variable */
794 );
795
796/** gets original lower bound of original problem variable (i.e. the bound set in problem creation) */
797SCIP_EXPORT
799 SCIP_VAR* var /**< original problem variable */
800 );
801
802/** gets original upper bound of original problem variable (i.e. the bound set in problem creation) */
803SCIP_EXPORT
805 SCIP_VAR* var /**< original problem variable */
806 );
807
808/** gets original upper bound of original problem variable (i.e. the bound set in problem creation) */
809SCIP_EXPORT
811 SCIP_VAR* var /**< original problem variable */
812 );
813
814/** gets the original hole list of an original variable */
815SCIP_EXPORT
817 SCIP_VAR* var /**< problem variable */
818 );
819
820/** gets global lower bound of variable */
821SCIP_EXPORT
823 SCIP_VAR* var /**< problem variable */
824 );
825
826/** gets global lower bound of variable */
827SCIP_EXPORT
829 SCIP_VAR* var /**< problem variable */
830 );
831
832/** gets global upper bound of variable */
833SCIP_EXPORT
835 SCIP_VAR* var /**< problem variable */
836 );
837
838/** gets global upper bound of variable */
839SCIP_EXPORT
841 SCIP_VAR* var /**< problem variable */
842 );
843
844/** gets the global hole list of an active variable */
845SCIP_EXPORT
847 SCIP_VAR* var /**< problem variable */
848 );
849
850/** gets best global bound of variable with respect to the objective function */
851SCIP_EXPORT
853 SCIP_VAR* var /**< problem variable */
854 );
855
856/** gets best global bound of variable with respect to the objective function */
857SCIP_EXPORT
859 SCIP_VAR* var /**< problem variable */
860 );
861
862/** gets worst global bound of variable with respect to the objective function */
863SCIP_EXPORT
865 SCIP_VAR* var /**< problem variable */
866 );
867
868/** gets worst global bound of variable with respect to the objective function */
869SCIP_EXPORT
871 SCIP_VAR* var /**< problem variable */
872 );
873
874/** gets current lower bound of variable */
875SCIP_EXPORT
877 SCIP_VAR* var /**< problem variable */
878 );
879
880/** gets current lower bound of variable */
881SCIP_EXPORT
883 SCIP_VAR* var /**< problem variable */
884 );
885
886/** gets current upper bound of variable */
887SCIP_EXPORT
889 SCIP_VAR* var /**< problem variable */
890 );
891
892/** gets current upper bound of variable */
893SCIP_EXPORT
895 SCIP_VAR* var /**< problem variable */
896 );
897
898/** gets the current hole list of an active variable */
899SCIP_EXPORT
901 SCIP_VAR* var /**< problem variable */
902 );
903
904/** gets best local bound of variable with respect to the objective function */
905SCIP_EXPORT
907 SCIP_VAR* var /**< problem variable */
908 );
909
910/** gets best local bound of variable with respect to the objective function */
911SCIP_EXPORT
913 SCIP_VAR* var /**< problem variable */
914 );
915
916/** gets worst local bound of variable with respect to the objective function */
917SCIP_EXPORT
919 SCIP_VAR* var /**< problem variable */
920 );
921
922/** gets worst local bound of variable with respect to the objective function */
923SCIP_EXPORT
925 SCIP_VAR* var /**< problem variable */
926 );
927
928/** gets type (lower or upper) of best bound of variable with respect to the objective function */
929SCIP_EXPORT
931 SCIP_VAR* var /**< problem variable */
932 );
933
934/** gets type (lower or upper) of best bound of variable with respect to the objective function */
935SCIP_EXPORT
937 SCIP_VAR* var /**< problem variable */
938 );
939
940/** gets type (lower or upper) of worst bound of variable with respect to the objective function */
941SCIP_EXPORT
943 SCIP_VAR* var /**< problem variable */
944 );
945
946/** gets type (lower or upper) of worst bound of variable with respect to the objective function */
947SCIP_EXPORT
949 SCIP_VAR* var /**< problem variable */
950 );
951
952/** gets lazy lower bound of variable */
953SCIP_EXPORT
955 SCIP_VAR* var /**< problem variable */
956 );
957
958/** gets lazy upper bound of variable */
959SCIP_EXPORT
961 SCIP_VAR* var /**< problem variable */
962 );
963
964/** gets the branch factor of the variable; this value can be used in the branching methods to scale the score
965 * values of the variables; higher factor leads to a higher probability that this variable is chosen for branching
966 */
967SCIP_EXPORT
969 SCIP_VAR* var /**< problem variable */
970 );
971
972/** gets the branch priority of the variable; variables with higher priority should always be preferred to variables
973 * with lower priority
974 */
975SCIP_EXPORT
977 SCIP_VAR* var /**< problem variable */
978 );
979
980/** gets the preferred branch direction of the variable (downwards, upwards, or auto) */
981SCIP_EXPORT
983 SCIP_VAR* var /**< problem variable */
984 );
985
986/** gets number of variable lower bounds x >= b_i*z_i + d_i of given variable x */
987SCIP_EXPORT
989 SCIP_VAR* var /**< problem variable */
990 );
991
992/** gets array with bounding variables z_i in variable lower bounds x >= b_i*z_i + d_i of given variable x;
993 * the variable bounds are sorted by increasing variable index of the bounding variable z_i (see SCIPvarGetIndex())
994 */
995SCIP_EXPORT
997 SCIP_VAR* var /**< problem variable */
998 );
999
1000/** gets array with bounding coefficients b_i in variable lower bounds x >= b_i*z_i + d_i of given variable x */
1001SCIP_EXPORT
1003 SCIP_VAR* var /**< problem variable */
1004 );
1005
1006/** gets array with bounding constants d_i in variable lower bounds x >= b_i*z_i + d_i of given variable x */
1007SCIP_EXPORT
1009 SCIP_VAR* var /**< problem variable */
1010 );
1011
1012/** gets number of variable upper bounds x <= b_i*z_i + d_i of given variable x */
1013SCIP_EXPORT
1014int SCIPvarGetNVubs(
1015 SCIP_VAR* var /**< problem variable */
1016 );
1017
1018/** gets array with bounding variables z_i in variable upper bounds x <= b_i*z_i + d_i of given variable x;
1019 * the variable bounds are sorted by increasing variable index of the bounding variable z_i (see SCIPvarGetIndex())
1020 */
1021SCIP_EXPORT
1023 SCIP_VAR* var /**< problem variable */
1024 );
1025
1026/** gets array with bounding coefficients b_i in variable upper bounds x <= b_i*z_i + d_i of given variable x */
1027SCIP_EXPORT
1029 SCIP_VAR* var /**< problem variable */
1030 );
1031
1032/** gets array with bounding constants d_i in variable upper bounds x <= b_i*z_i + d_i of given variable x */
1033SCIP_EXPORT
1035 SCIP_VAR* var /**< problem variable */
1036 );
1037
1038/** gets number of implications y <= b or y >= b for x == 0 or x == 1 of given active problem variable x,
1039 * there are no implications for nonbinary variable x
1040 */
1041SCIP_EXPORT
1043 SCIP_VAR* var, /**< active problem variable */
1044 SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
1045 );
1046
1047/** gets array with implication variables y of implications y <= b or y >= b for x == 0 or x == 1 of given active
1048 * problem variable x, there are no implications for nonbinary variable x;
1049 * the implications are sorted such that implications with binary implied variables precede the ones with non-binary
1050 * implied variables, and as a second criteria, the implied variables are sorted by increasing variable index
1051 * (see SCIPvarGetIndex())
1052 */
1053SCIP_EXPORT
1055 SCIP_VAR* var, /**< active problem variable */
1056 SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
1057 );
1058
1059/** gets array with implication types of implications y <= b or y >= b for x == 0 or x == 1 of given active problem
1060 * variable x (SCIP_BOUNDTYPE_UPPER if y <= b, SCIP_BOUNDTYPE_LOWER if y >= b),
1061 * there are no implications for nonbinary variable x
1062 */
1063SCIP_EXPORT
1065 SCIP_VAR* var, /**< active problem variable */
1066 SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
1067 );
1068
1069/** gets array with implication bounds b of implications y <= b or y >= b for x == 0 or x == 1 of given active problem
1070 * variable x, there are no implications for nonbinary variable x
1071 */
1072SCIP_EXPORT
1074 SCIP_VAR* var, /**< active problem variable */
1075 SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
1076 );
1077
1078/** Gets array with unique ids of implications y <= b or y >= b for x == 0 or x == 1 of given active problem variable x,
1079 * there are no implications for nonbinary variable x.
1080 * If an implication is a shortcut, i.e., it was added as part of the transitive closure of another implication,
1081 * its id is negative, otherwise it is nonnegative.
1082 */
1083SCIP_EXPORT
1085 SCIP_VAR* var, /**< active problem variable */
1086 SCIP_Bool varfixing /**< FALSE for implications for x == 0, TRUE for x == 1 */
1087 );
1088
1089/** gets number of cliques, the active variable is contained in */
1090SCIP_EXPORT
1092 SCIP_VAR* var, /**< active problem variable */
1093 SCIP_Bool varfixing /**< FALSE for cliques containing x == 0, TRUE for x == 1 */
1094 );
1095
1096/** gets array of cliques, the active variable is contained in */
1097SCIP_EXPORT
1099 SCIP_VAR* var, /**< active problem variable */
1100 SCIP_Bool varfixing /**< FALSE for cliques containing x == 0, TRUE for x == 1 */
1101 );
1102
1103/** gets primal LP solution value of variable */
1104SCIP_EXPORT
1106 SCIP_VAR* var /**< problem variable */
1107 );
1108
1109/** gets primal LP solution value of variable */
1110SCIP_EXPORT
1112 SCIP_VAR* var, /**< problem variable */
1113 SCIP_RATIONAL* res /**< store the resulting value */
1114 );
1115
1116/** gets primal NLP solution value of variable */
1117SCIP_EXPORT
1119 SCIP_VAR* var /**< problem variable */
1120 );
1121
1122/** return lower bound change info at requested position */
1123SCIP_EXPORT
1125 SCIP_VAR* var, /**< problem variable */
1126 int pos /**< requested position */
1127 );
1128
1129/** gets the number of lower bound change info array */
1130SCIP_EXPORT
1132 SCIP_VAR* var /**< problem variable */
1133 );
1134
1135/** return upper bound change info at requested position */
1136SCIP_EXPORT
1138 SCIP_VAR* var, /**< problem variable */
1139 int pos /**< requested position */
1140 );
1141
1142/** gets the number upper bound change info array */
1143SCIP_EXPORT
1145 SCIP_VAR* var /**< problem variable */
1146 );
1147
1148/** returns the value based history for the variable */
1149SCIP_EXPORT
1151 SCIP_VAR* var /**< problem variable */
1152 );
1153
1154/** returns whether a variable has been introduced to define a relaxation
1155 *
1156 * These variables are only valid for the current SCIP solve round,
1157 * they are not contained in any (checked) constraints, but may be used
1158 * in cutting planes, for example.
1159 * Relaxation-only variables are not copied by SCIPcopyVars and cuts
1160 * that contain these variables are not added as linear constraints when
1161 * restarting or transferring information from a copied SCIP to a SCIP.
1162 * Also conflicts with relaxation-only variables are not generated at
1163 * the moment.
1164 * Relaxation-only variables do not appear in the objective.
1165 */
1166SCIP_EXPORT
1168 SCIP_VAR* var /**< problem variable */
1169 );
1170
1171/** marks that this variable has only been introduced to define a relaxation
1172 *
1173 * The variable must not have a coefficient in the objective and must be deletable.
1174 * If it is not marked deletable, it will be marked as deletable, which is only possible
1175 * before the variable is added to a problem.
1176 *
1177 * @see SCIPvarIsRelaxationOnly
1178 * @see SCIPvarMarkDeletable
1179 */
1180SCIP_EXPORT
1182 SCIP_VAR* var /**< problem variable */
1183 );
1184
1185#ifdef NDEBUG
1186
1187/* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
1188 * speed up the algorithms.
1189 */
1190
1191#define SCIPvarGetName(var) (var)->name
1192#define SCIPvarGetNUses(var) (var)->nuses
1193#define SCIPvarGetData(var) (var)->vardata
1194#define SCIPvarSetData(var,vdata) (var)->vardata = (vdata)
1195#define SCIPvarSetDelorigData(var,func) (var)->vardelorig = (func)
1196#define SCIPvarSetTransData(var,func) (var)->vartrans = (func)
1197#define SCIPvarSetDeltransData(var,func) (var)->vardeltrans = (func)
1198#define SCIPvarGetStatus(var) (SCIP_VARSTATUS)((var)->varstatus)
1199#define SCIPvarIsOriginal(var) ((var)->varstatus == SCIP_VARSTATUS_ORIGINAL \
1200 || ((var)->varstatus == SCIP_VARSTATUS_NEGATED && (var)->negatedvar->varstatus == SCIP_VARSTATUS_ORIGINAL))
1201#define SCIPvarIsTransformed(var) ((var)->varstatus != SCIP_VARSTATUS_ORIGINAL \
1202 && ((var)->varstatus != SCIP_VARSTATUS_NEGATED || (var)->negatedvar->varstatus != SCIP_VARSTATUS_ORIGINAL))
1203#define SCIPvarIsNegated(var) ((var)->varstatus == SCIP_VARSTATUS_NEGATED)
1204#define SCIPvarGetType(var) ((SCIP_VARTYPE)((var)->vartype))
1205#define SCIPvarIsBinary(var) ((var)->vartype == SCIP_VARTYPE_BINARY || \
1206 (((var)->vartype != SCIP_VARTYPE_CONTINUOUS || (var)->varimpltype != SCIP_IMPLINTTYPE_NONE) \
1207 && (var)->glbdom.lb >= 0.0 && (var)->glbdom.ub <= 1.0))
1208#define SCIPvarIsIntegral(var) ((var)->vartype != SCIP_VARTYPE_CONTINUOUS || (var)->varimpltype != SCIP_IMPLINTTYPE_NONE)
1209#define SCIPvarIsImpliedIntegral(var) ((var)->varimpltype != SCIP_IMPLINTTYPE_NONE)
1210#define SCIPvarIsNonimpliedIntegral(var) ((var)->vartype != SCIP_VARTYPE_CONTINUOUS && (var)->varimpltype == SCIP_IMPLINTTYPE_NONE)
1211#define SCIPvarIsInitial(var) (var)->initial
1212#define SCIPvarIsRemovable(var) (var)->removable
1213#define SCIPvarIsDeleted(var) (var)->deleted
1214#define SCIPvarMarkDeletable(var) (var)->deletable = TRUE
1215#define SCIPvarMarkNotDeletable(var) (var)->deletable = FALSE
1216#define SCIPvarIsDeletable(var) (var)->deletable
1217#define SCIPvarIsActive(var) ((var)->probindex >= 0)
1218#define SCIPvarGetIndex(var) (var)->index
1219#define SCIPvarGetProbindex(var) (var)->probindex
1220#define SCIPvarGetTransVar(var) (var)->data.original.transvar
1221#define SCIPvarGetCol(var) (var)->data.col
1222#define SCIPvarIsInLP(var) ((var)->varstatus == SCIP_VARSTATUS_COLUMN && SCIPcolIsInLP((var)->data.col))
1223#define SCIPvarGetMinAggrCoef(var) (var)->data.loose.minaggrcoef
1224#define SCIPvarGetMaxAggrCoef(var) (var)->data.loose.maxaggrcoef
1225/* use different name for var - otherwise we have clash with the var at the end */
1226#define SCIPvarGetAggrVar(war) (war)->data.aggregate.var
1227#define SCIPvarGetAggrScalar(var) (var)->data.aggregate.scalar
1228#define SCIPvarGetAggrConstant(var) (var)->data.aggregate.constant
1229#define SCIPvarGetMultaggrNVars(var) (var)->data.multaggr.nvars
1230#define SCIPvarGetMultaggrVars(var) (var)->data.multaggr.vars
1231#define SCIPvarGetMultaggrScalars(var) (var)->data.multaggr.scalars
1232#define SCIPvarGetMultaggrConstant(var) (var)->data.multaggr.constant
1233#define SCIPvarGetNegatedVar(var) (var)->negatedvar
1234#define SCIPvarGetNegationVar(var) (var)->negatedvar
1235#define SCIPvarGetNegationConstant(var) (var)->data.negate.constant
1236#define SCIPvarGetObj(var) (var)->obj
1237#define SCIPvarGetLbOriginal(var) ((var)->varstatus == SCIP_VARSTATUS_ORIGINAL \
1238 ? (var)->data.original.origdom.lb \
1239 : (var)->data.negate.constant - (var)->negatedvar->data.original.origdom.ub)
1240#define SCIPvarGetUbOriginal(var) ((var)->varstatus == SCIP_VARSTATUS_ORIGINAL \
1241 ? (var)->data.original.origdom.ub \
1242 : (var)->data.negate.constant - (var)->negatedvar->data.original.origdom.lb)
1243#define SCIPvarGetHolelistOriginal(var) ((var)->varstatus == SCIP_VARSTATUS_ORIGINAL \
1244 ? (var)->data.original.origdom.holelist \
1245 : NULL)
1246#define SCIPvarGetLbGlobal(var) (var)->glbdom.lb
1247#define SCIPvarGetUbGlobal(var) (var)->glbdom.ub
1248#define SCIPvarGetHolelistGlobal(var) (var)->glbdom.holelist
1249#define SCIPvarGetBestBoundGlobal(var) ((var)->obj >= 0.0 ? (var)->glbdom.lb : (var)->glbdom.ub)
1250#define SCIPvarGetWorstBoundGlobal(var) ((var)->obj >= 0.0 ? (var)->glbdom.ub : (var)->glbdom.lb)
1251#define SCIPvarGetLbLocal(var) (var)->locdom.lb
1252#define SCIPvarGetUbLocal(var) (var)->locdom.ub
1253#define SCIPvarGetHolelistLocal(var) (var)->locdom.holelist
1254#define SCIPvarGetBestBoundLocal(var) ((var)->obj >= 0.0 ? (var)->locdom.lb : (var)->locdom.ub)
1255#define SCIPvarGetWorstBoundLocal(var) ((var)->obj >= 0.0 ? (var)->locdom.ub : (var)->locdom.lb)
1256#define SCIPvarGetBestBoundType(var) ((var)->obj >= 0.0 ? SCIP_BOUNDTYPE_LOWER : SCIP_BOUNDTYPE_UPPER)
1257#define SCIPvarGetWorstBoundType(var) ((var)->obj >= 0.0 ? SCIP_BOUNDTYPE_UPPER : SCIP_BOUNDTYPE_LOWER)
1258#define SCIPvarGetLbLazy(var) (var)->lazylb
1259#define SCIPvarGetUbLazy(var) (var)->lazyub
1260#define SCIPvarGetBranchFactor(var) (var)->branchfactor
1261#define SCIPvarGetBranchPriority(var) (var)->branchpriority
1262#define SCIPvarGetBranchDirection(var) (var)->branchdirection
1263#define SCIPvarGetNVlbs(var) (SCIPvboundsGetNVbds((var)->vlbs))
1264#define SCIPvarGetVlbVars(var) (SCIPvboundsGetVars((var)->vlbs))
1265#define SCIPvarGetVlbCoefs(var) (SCIPvboundsGetCoefs((var)->vlbs))
1266#define SCIPvarGetVlbConstants(var) (SCIPvboundsGetConstants((var)->vlbs))
1267#define SCIPvarGetNVubs(var) (SCIPvboundsGetNVbds((var)->vubs))
1268#define SCIPvarGetVubVars(var) (SCIPvboundsGetVars((var)->vubs))
1269#define SCIPvarGetVubCoefs(var) (SCIPvboundsGetCoefs((var)->vubs))
1270#define SCIPvarGetVubConstants(var) (SCIPvboundsGetConstants((var)->vubs))
1271#define SCIPvarGetNImpls(var, fix) (SCIPimplicsGetNImpls((var)->implics, fix))
1272#define SCIPvarGetImplVars(var, fix) (SCIPimplicsGetVars((var)->implics, fix))
1273#define SCIPvarGetImplTypes(var, fix) (SCIPimplicsGetTypes((var)->implics, fix))
1274#define SCIPvarGetImplBounds(var, fix) (SCIPimplicsGetBounds((var)->implics, fix))
1275#define SCIPvarGetImplIds(var, fix) (SCIPimplicsGetIds((var)->implics, fix))
1276#define SCIPvarGetNCliques(var, fix) (SCIPcliquelistGetNCliques((var)->cliquelist, fix))
1277#define SCIPvarGetCliques(var, fix) (SCIPcliquelistGetCliques((var)->cliquelist, fix))
1278#define SCIPvarGetLPSol(var) ((var)->varstatus == SCIP_VARSTATUS_COLUMN ? SCIPcolGetPrimsol((var)->data.col) : SCIPvarGetLPSol_rec(var))
1279#define SCIPvarGetNLPSol(var) (((var)->varstatus == SCIP_VARSTATUS_COLUMN || ((var)->varstatus == SCIP_VARSTATUS_LOOSE)) ? (var)->nlpsol : SCIPvarGetNLPSol_rec(var))
1280#define SCIPvarGetBdchgInfoLb(var, pos) (&((var)->lbchginfos[pos]))
1281#define SCIPvarGetNBdchgInfosLb(var) ((var)->nlbchginfos)
1282#define SCIPvarGetBdchgInfoUb(var, pos) (&((var)->ubchginfos[pos]))
1283#define SCIPvarGetNBdchgInfosUb(var) ((var)->nubchginfos)
1284#define SCIPvarGetValuehistory(var) (var)->valuehistory
1285#define SCIPvarGetCliqueComponentIdx(var) ((var)->clqcomponentidx)
1286#define SCIPvarIsRelaxationOnly(var)((var)->relaxationonly)
1287#define SCIPvarMarkRelaxationOnly(var)((var)->relaxationonly = TRUE)
1288
1289#endif
1290
1291/** gets primal LP solution value of variable */
1292SCIP_EXPORT
1294 SCIP_VAR* var /**< problem variable */
1295 );
1296
1297/** gets primal LP solution value of variable */
1298SCIP_EXPORT
1300 SCIP_VAR* var, /**< problem variable */
1301 SCIP_RATIONAL* res /**< store the resulting value */
1302 );
1303
1304/** gets primal NLP solution value of variable */
1305SCIP_EXPORT
1307 SCIP_VAR* var /**< problem variable */
1308 );
1309
1310/** gets pseudo solution value of variable at current node */
1311SCIP_EXPORT
1313 SCIP_VAR* var /**< problem variable */
1314 );
1315
1316/** gets pseudo solution value of variable */
1317SCIP_EXPORT
1319 SCIP_VAR* var /**< problem variable */
1320 );
1321
1322/** gets current LP or pseudo solution value of variable */
1323SCIP_EXPORT
1325 SCIP_VAR* var, /**< problem variable */
1326 SCIP_Bool getlpval /**< should the LP solution value be returned? */
1327 );
1328
1329/** gets current LP or pseudo solution value of variable */
1330SCIP_EXPORT
1332 SCIP_VAR* var, /**< problem variable */
1333 SCIP_RATIONAL* res, /**< the resulting value */
1334 SCIP_Bool getlpval /**< should the LP solution value be returned? */
1335 );
1336
1337/** returns the solution of the variable in the last root node's relaxation, if the root relaxation is not yet
1338 * completely solved, zero is returned
1339 */
1340SCIP_EXPORT
1342 SCIP_VAR* var /**< problem variable */
1343 );
1344
1345/** returns the best solution (w.r.t. root reduced cost propagation) of the variable in the root node's relaxation, if
1346 * the root relaxation is not yet completely solved, zero is returned
1347 */
1348SCIP_EXPORT
1350 SCIP_VAR* var /**< problem variable */
1351 );
1352
1353/** returns the best reduced costs (w.r.t. root reduced cost propagation) of the variable in the root node's relaxation,
1354 * if the root relaxation is not yet completely solved, or the variable was no column of the root LP, SCIP_INVALID is
1355 * returned
1356 */
1357SCIP_EXPORT
1359 SCIP_VAR* var /**< problem variable */
1360 );
1361
1362/** returns the best objective value (w.r.t. root reduced cost propagation) of the root LP which belongs the root
1363 * reduced cost which is accessible via SCIPvarGetRootRedcost() or the variable was no column of the root LP,
1364 * SCIP_INVALID is returned
1365 */
1366SCIP_EXPORT
1368 SCIP_VAR* var /**< problem variable */
1369 );
1370
1371/** set the given solution as the best root solution w.r.t. root reduced cost propagation in the variables */
1372SCIP_EXPORT
1374 SCIP_VAR* var, /**< problem variable */
1375 SCIP_Real rootsol, /**< root solution value */
1376 SCIP_Real rootredcost, /**< root reduced cost */
1377 SCIP_Real rootlpobjval /**< objective value of the root LP */
1378 );
1379
1380/** returns a weighted average solution value of the variable in all feasible primal solutions found so far */
1381SCIP_EXPORT
1383 SCIP_VAR* var /**< problem variable */
1384 );
1385
1386/** returns the bound change information for the last lower bound change on given active problem variable before or
1387 * after the bound change with the given index was applied;
1388 * returns NULL, if no change to the lower bound was applied up to this point of time
1389 */
1390SCIP_EXPORT
1392 SCIP_VAR* var, /**< active problem variable */
1393 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1394 SCIP_Bool after /**< should the bound change with given index be included? */
1395 );
1396
1397/** returns the bound change information for the last upper bound change on given active problem variable before or
1398 * after the bound change with the given index was applied;
1399 * returns NULL, if no change to the upper bound was applied up to this point of time
1400 */
1401SCIP_EXPORT
1403 SCIP_VAR* var, /**< active problem variable */
1404 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1405 SCIP_Bool after /**< should the bound change with given index be included? */
1406 );
1407
1408/** returns the bound change information for the last lower or upper bound change on given active problem variable
1409 * before or after the bound change with the given index was applied;
1410 * returns NULL, if no change to the lower/upper bound was applied up to this point of time
1411 */
1412SCIP_EXPORT
1414 SCIP_VAR* var, /**< active problem variable */
1415 SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
1416 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1417 SCIP_Bool after /**< should the bound change with given index be included? */
1418 );
1419
1420/** returns the last bound change index, at which the bounds of the given variable were tightened */
1421SCIP_EXPORT
1423 SCIP_VAR* var /**< problem variable */
1424 );
1425
1426/** returns the last depth level, at which the bounds of the given variable were tightened;
1427 * returns -2, if the variable's bounds are still the global bounds
1428 * returns -1, if the variable was fixed in presolving
1429 */
1430SCIP_EXPORT
1432 SCIP_VAR* var /**< problem variable */
1433 );
1434
1435/** returns whether the first binary variable was fixed earlier than the second one;
1436 * returns FALSE, if the first variable is not fixed, and returns TRUE, if the first variable is fixed, but the
1437 * second one is not fixed
1438 */
1439SCIP_EXPORT
1441 SCIP_VAR* var1, /**< first binary variable */
1442 SCIP_VAR* var2 /**< second binary variable */
1443 );
1444
1445/** for a given array of variables, this function counts the numbers of variables for each variable and implied type combination */
1446SCIP_EXPORT
1448 SCIP_VAR** vars, /**< array of variables to count the types for */
1449 int nvars, /**< number of variables in the array */
1450 int* nbinvars, /**< pointer to store number of binary variables or NULL if not needed */
1451 int* nintvars, /**< pointer to store number of integer variables or NULL if not needed */
1452 int* nbinimplvars, /**< pointer to store number of binary implicit integral vars or NULL if not needed */
1453 int* nintimplvars, /**< pointer to store number of integer implicit integral vars or NULL if not needed */
1454 int* ncontimplvars, /**< pointer to store number of continuous implicit integral vars or NULL if not needed */
1455 int* ncontvars /**< pointer to store number of continuous variables or NULL if not needed */
1456 );
1457
1458/**
1459 * @name Public SCIP_BDCHGIDX Methods
1460 *
1461 * @{
1462 */
1463
1464/** returns whether first bound change index belongs to an earlier applied bound change than second one;
1465 * if a bound change index is NULL, the bound change index represents the current time, i.e. the time after the
1466 * last bound change was applied to the current node
1467 */
1468SCIP_EXPORT
1470 SCIP_BDCHGIDX* bdchgidx1, /**< first bound change index, or NULL */
1471 SCIP_BDCHGIDX* bdchgidx2 /**< second bound change index, or NULL */
1472 );
1473
1474/** returns whether first bound change index belongs to an earlier applied bound change than second one */
1475SCIP_EXPORT
1477 SCIP_BDCHGIDX* bdchgidx1, /**< first bound change index */
1478 SCIP_BDCHGIDX* bdchgidx2 /**< second bound change index */
1479 );
1480
1481/**@} */
1482
1483/**
1484 * @name Public SCIP_BDCHGINFO Methods
1485 *
1486 * @{
1487 */
1488
1489/** returns old bound that was overwritten for given bound change information */
1490SCIP_EXPORT
1492 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1493 );
1494
1495/** returns new bound installed for given bound change information */
1496SCIP_EXPORT
1498 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1499 );
1500
1501/** returns variable that belongs to the given bound change information */
1502SCIP_EXPORT
1504 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1505 );
1506
1507/** returns whether the bound change information belongs to a branching decision or a deduction */
1508SCIP_EXPORT
1510 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1511 );
1512
1513/** returns whether the bound change information belongs to a lower or upper bound change */
1514SCIP_EXPORT
1516 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1517 );
1518
1519/** returns depth level of given bound change information */
1520SCIP_EXPORT
1522 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1523 );
1524
1525/** returns bound change position in its depth level of given bound change information */
1526SCIP_EXPORT
1528 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1529 );
1530
1531/** returns bound change index of given bound change information */
1532SCIP_EXPORT
1534 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1535 );
1536
1537/** returns inference variable of given bound change information */
1538SCIP_EXPORT
1540 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1541 );
1542
1543/** returns inference constraint of given bound change information */
1544SCIP_EXPORT
1546 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1547 );
1548
1549/** returns inference propagator of given bound change information, or NULL if no propagator was responsible */
1550SCIP_EXPORT
1552 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1553 );
1554
1555/** returns inference user information of given bound change information */
1556SCIP_EXPORT
1558 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1559 );
1560
1561/** returns inference bound of inference variable of given bound change information */
1562SCIP_EXPORT
1564 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1565 );
1566
1567/** returns whether the bound change information belongs to a redundant bound change */
1568SCIP_EXPORT
1570 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1571 );
1572
1573/** returns whether the bound change has an inference reason (constraint or propagator), that can be resolved */
1574SCIP_EXPORT
1576 SCIP_BDCHGINFO* bdchginfo /**< bound change information */
1577 );
1578
1579/** for two bound change informations belonging to the same variable and bound, returns whether the first bound change
1580 * has a tighter new bound as the second bound change
1581 */
1582SCIP_EXPORT
1584 SCIP_BDCHGINFO* bdchginfo1, /**< first bound change information */
1585 SCIP_BDCHGINFO* bdchginfo2 /**< second bound change information */
1586 );
1587
1588/**@} */
1589
1590/**
1591 * @name Public SCIP_BOUNDCHG Methods
1592 *
1593 * @{
1594 */
1595
1596/** returns the new value of the bound in the bound change data */
1597SCIP_EXPORT
1599 SCIP_BOUNDCHG* boundchg /**< bound change data */
1600 );
1601
1602/** returns the lp solution value in the branching data of the bound change data */
1603SCIP_EXPORT
1605 SCIP_BOUNDCHG* boundchg /**< bound change data */
1606 );
1607
1608/** returns the variable of the bound change in the bound change data */
1609SCIP_EXPORT
1611 SCIP_BOUNDCHG* boundchg /**< bound change data */
1612 );
1613
1614/** returns the bound change type of the bound change in the bound change data */
1615SCIP_EXPORT
1617 SCIP_BOUNDCHG* boundchg /**< bound change data */
1618 );
1619
1620/** returns the bound type of the bound change in the bound change data */
1621SCIP_EXPORT
1623 SCIP_BOUNDCHG* boundchg /**< bound change data */
1624 );
1625
1626/** returns whether the bound change is redundant due to a more global bound that is at least as strong */
1627SCIP_EXPORT
1629 SCIP_BOUNDCHG* boundchg /**< bound change data */
1630 );
1631
1632/** @} */
1633
1634/**
1635 * @name Public SCIP_DOMCHG Methods
1636 *
1637 * @{
1638 */
1639
1640/** returns the number of bound changes in the domain change data */
1641SCIP_EXPORT
1643 SCIP_DOMCHG* domchg /**< domain change data */
1644 );
1645
1646/** returns a particular bound change in the domain change data */
1647SCIP_EXPORT
1649 SCIP_DOMCHG* domchg, /**< domain change data */
1650 int pos /**< position of the bound change in the domain change data */
1651 );
1652
1653/**@} */
1654
1655/**
1656 * @name Public SCIP_HOLELIST Methods
1657 *
1658 * @{
1659 */
1660
1661/** returns left bound of open interval in hole */
1662SCIP_EXPORT
1664 SCIP_HOLELIST* holelist /**< hole list pointer to hole of interest */
1665 );
1666
1667/** returns right bound of open interval in hole */
1668SCIP_EXPORT
1670 SCIP_HOLELIST* holelist /**< hole list pointer to hole of interest */
1671 );
1672
1673/** returns next hole in list or NULL */
1674SCIP_EXPORT
1676 SCIP_HOLELIST* holelist /**< hole list pointer to hole of interest */
1677 );
1678
1679/**@} */
1680
1681#ifdef NDEBUG
1682
1683/* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
1684 * speed up the algorithms.
1685 */
1686
1687#define SCIPbdchgidxIsEarlierNonNull(idx1,idx2) \
1688 ((idx1)->depth < (idx2)->depth || ((idx1)->depth == (idx2)->depth && (idx1)->pos < (idx2)->pos))
1689#define SCIPbdchgidxIsEarlier(idx1,idx2) \
1690 ((idx1) != NULL && ((idx2) == NULL || SCIPbdchgidxIsEarlierNonNull(idx1, idx2)))
1691#define SCIPbdchginfoGetOldbound(bdchginfo) (bdchginfo)->oldbound
1692#define SCIPbdchginfoGetNewbound(bdchginfo) (bdchginfo)->newbound
1693#define SCIPbdchginfoGetVar(bdchginfo) (bdchginfo)->var
1694#define SCIPbdchginfoGetChgtype(bdchginfo) (SCIP_BOUNDCHGTYPE)((bdchginfo)->boundchgtype)
1695#define SCIPbdchginfoGetBoundtype(bdchginfo) (SCIP_BOUNDTYPE)((bdchginfo)->boundtype)
1696#define SCIPbdchginfoGetDepth(bdchginfo) (bdchginfo)->bdchgidx.depth
1697#define SCIPbdchginfoGetPos(bdchginfo) (bdchginfo)->bdchgidx.pos
1698#define SCIPbdchginfoGetIdx(bdchginfo) (&(bdchginfo)->bdchgidx)
1699#define SCIPbdchginfoGetInferVar(bdchginfo) (bdchginfo)->inferencedata.var
1700#define SCIPbdchginfoGetInferCons(bdchginfo) (bdchginfo)->inferencedata.reason.cons
1701#define SCIPbdchginfoGetInferProp(bdchginfo) (bdchginfo)->inferencedata.reason.prop
1702#define SCIPbdchginfoGetInferInfo(bdchginfo) (bdchginfo)->inferencedata.info
1703#define SCIPbdchginfoGetInferBoundtype(bdchginfo) (SCIP_BOUNDTYPE)((bdchginfo)->inferboundtype)
1704#define SCIPbdchginfoIsRedundant(bdchginfo) (bdchginfo)->redundant
1705#define SCIPbdchginfoHasInferenceReason(bdchginfo) \
1706 (((bdchginfo)->boundchgtype == SCIP_BOUNDCHGTYPE_CONSINFER) \
1707 || ((bdchginfo)->boundchgtype == SCIP_BOUNDCHGTYPE_PROPINFER && (bdchginfo)->inferencedata.reason.prop != NULL))
1708#define SCIPbdchginfoIsTighter(bdchginfo1,bdchginfo2) ((bdchginfo1)->boundtype == SCIP_BOUNDTYPE_LOWER \
1709 ? (bdchginfo1)->newbound > bdchginfo2->newbound : (bdchginfo1)->newbound < bdchginfo2->newbound)
1710#define SCIPboundchgGetNewbound(boundchg) ((boundchg)->newbound)
1711#define SCIPboundchgGetLPSolVal(boundchg) ((boundchg)->data.branchingdata.lpsolval)
1712#define SCIPboundchgGetVar(boundchg) ((boundchg)->var)
1713#define SCIPboundchgGetBoundchgtype(boundchg) ((SCIP_BOUNDCHGTYPE)((boundchg)->boundchgtype))
1714#define SCIPboundchgGetBoundtype(boundchg) ((SCIP_BOUNDTYPE)((boundchg)->boundtype))
1715#define SCIPboundchgIsRedundant(boundchg) ((boundchg)->redundant)
1716#define SCIPdomchgGetNBoundchgs(domchg) ((domchg) != NULL ? (domchg)->domchgbound.nboundchgs : 0)
1717#define SCIPdomchgGetBoundchg(domchg, pos) (&(domchg)->domchgbound.boundchgs[pos])
1718#define SCIPholelistGetLeft(holelist) ((holelist)->hole.left)
1719#define SCIPholelistGetRight(holelist) ((holelist)->hole.right)
1720#define SCIPholelistGetNext(holelist) ((holelist)->next)
1721
1722#endif
1723
1724/**@} */
1725
1726#ifdef __cplusplus
1727}
1728#endif
1729
1730#endif
static long bound
common defines and data types used in all packages of SCIP
#define SCIP_Longint
Definition: def.h:141
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:156
SCIP_Bool SCIPvarIsInitial(SCIP_VAR *var)
Definition: var.c:23514
SCIP_Real SCIPvarGetLPSol_rec(SCIP_VAR *var)
Definition: var.c:18705
int SCIPvarCompareActiveAndNegated(SCIP_VAR *var1, SCIP_VAR *var2)
Definition: var.c:17236
void SCIPvarSetDelorigData(SCIP_VAR *var, SCIP_DECL_VARDELORIG((*vardelorig)))
Definition: var.c:23308
SCIP_Longint SCIPvarGetUbCertificateIndexLocal(SCIP_VAR *var)
Definition: var.c:25188
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
Definition: var.c:18320
void SCIPvarSetLbCertificateIndexGlobal(SCIP_VAR *var, SCIP_Longint certidx)
Definition: var.c:25162
SCIP_HOLELIST * SCIPvarGetHolelistLocal(SCIP_VAR *var)
Definition: var.c:24302
int SCIPvarGetNVlbs(SCIP_VAR *var)
Definition: var.c:24482
SCIP_RETCODE SCIPvarGetProbvarBound(SCIP_VAR **var, SCIP_Real *bound, SCIP_BOUNDTYPE *boundtype)
Definition: var.c:17801
SCIP_Bool SCIPvarIsDeleted(SCIP_VAR *var)
Definition: var.c:23534
SCIP_Real SCIPvarGetNegationConstant(SCIP_VAR *var)
Definition: var.c:23889
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
Definition: var.c:23683
SCIP_Bool SCIPbdchginfoIsRedundant(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:25057
SCIP_Real SCIPvarGetAvgBranchdepthCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:21884
SCIP_Bool SCIPvarMayRoundUp(SCIP_VAR *var)
Definition: var.c:4484
SCIP_Real SCIPvarGetMultaggrConstant(SCIP_VAR *var)
Definition: var.c:23843
SCIP_BOUNDTYPE SCIPvarGetBestBoundType(SCIP_VAR *var)
Definition: var.c:24372
void SCIPvarsGetProbvar(SCIP_VAR **vars, int nvars)
Definition: var.c:17530
SCIP_BOUNDTYPE SCIPvarGetWorstBoundTypeExact(SCIP_VAR *var)
Definition: var.c:24413
SCIP_Real SCIPvarGetSol(SCIP_VAR *var, SCIP_Bool getlpval)
Definition: var.c:19007
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
Definition: var.c:23868
SCIP_Real * SCIPvarGetVlbCoefs(SCIP_VAR *var)
Definition: var.c:24504
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
Definition: var.c:23642
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
Definition: var.c:23478
SCIP_Longint SCIPvarGetUbCertificateIndexGlobal(SCIP_VAR *var)
Definition: var.c:25212
SCIP_BOUNDTYPE SCIPboundchgGetBoundtype(SCIP_BOUNDCHG *boundchg)
Definition: var.c:23194
SCIP_Real SCIPholelistGetRight(SCIP_HOLELIST *holelist)
Definition: var.c:23244
void SCIPvarSetTransData(SCIP_VAR *var, SCIP_DECL_VARTRANS((*vartrans)))
Definition: var.c:23320
SCIP_Real SCIPvarGetAvgBranchdepth(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:21839
SCIP_Real SCIPvarGetBestBoundGlobal(SCIP_VAR *var)
Definition: var.c:24174
SCIP_Bool SCIPbdchgidxIsEarlier(SCIP_BDCHGIDX *bdchgidx1, SCIP_BDCHGIDX *bdchgidx2)
Definition: var.c:24889
SCIP_RATIONAL * SCIPvarGetBestBoundGlobalExact(SCIP_VAR *var)
Definition: var.c:24187
SCIP_Bool SCIPvarWasFixedEarlier(SCIP_VAR *var1, SCIP_VAR *var2)
Definition: var.c:22889
SCIP_BDCHGIDX * SCIPbdchginfoGetIdx(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24979
SCIP_VAR * SCIPboundchgGetVar(SCIP_BOUNDCHG *boundchg)
Definition: var.c:23174
void SCIPvarSetCertificateIndex(SCIP_VAR *var, int certidx)
Definition: var.c:25109
SCIP_RATIONAL * SCIPvarGetAggrScalarExact(SCIP_VAR *var)
Definition: var.c:23760
SCIP_Bool SCIPvarHasImplic(SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype)
Definition: var.c:16441
SCIP_BOUNDCHG * SCIPdomchgGetBoundchg(SCIP_DOMCHG *domchg, int pos)
Definition: var.c:23222
int SCIPvarGetNImpls(SCIP_VAR *var, SCIP_Bool varfixing)
Definition: var.c:24568
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
Definition: var.c:23386
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
Definition: var.c:4386
SCIP_BOUNDCHGTYPE SCIPboundchgGetBoundchgtype(SCIP_BOUNDCHG *boundchg)
Definition: var.c:23184
SCIP_Real SCIPvarGetInferenceSum(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:22031
SCIP_Real SCIPvarGetAggrConstant(SCIP_VAR *var)
Definition: var.c:23771
SCIP_Bool SCIPvarIsImpliedIntegral(SCIP_VAR *var)
Definition: var.c:23498
SCIP_RETCODE SCIPvarGetAggregatedObj(SCIP_VAR *var, SCIP_Real *aggrobj)
Definition: var.c:23944
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:24268
int SCIPvarGetNLocksDown(SCIP_VAR *var)
Definition: var.c:4449
SCIP_Real SCIPvarGetBestRootSol(SCIP_VAR *var)
Definition: var.c:19480
void SCIPvarSetDeltransData(SCIP_VAR *var, SCIP_DECL_VARDELTRANS((*vardeltrans)))
Definition: var.c:23332
SCIP_HOLELIST * SCIPholelistGetNext(SCIP_HOLELIST *holelist)
Definition: var.c:23254
SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
Definition: var.c:24020
SCIP_BDCHGINFO * SCIPvarGetLbchgInfo(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: var.c:22629
SCIP_RATIONAL * SCIPvarGetAggrConstantExact(SCIP_VAR *var)
Definition: var.c:23783
SCIP_DECL_HASHGETKEY(SCIPvarGetHashkey)
Definition: var.c:17317
SCIP_RATIONAL * SCIPvarGetPseudoSolExact(SCIP_VAR *var)
Definition: var.c:24769
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
Definition: var.c:23430
void SCIPvarMarkDeletable(SCIP_VAR *var)
Definition: var.c:23546
void SCIPvarGetImplicVarBounds(SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_Real *lb, SCIP_Real *ub)
Definition: var.c:16476
SCIP_PROP * SCIPbdchginfoGetInferProp(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:25013
int SCIPvarGetCertificateIndex(SCIP_VAR *var)
Definition: var.c:25098
SCIP_Bool SCIPvarIsNonimpliedIntegral(SCIP_VAR *var)
Definition: var.c:23506
SCIP_Real SCIPboundchgGetNewbound(SCIP_BOUNDCHG *boundchg)
Definition: var.c:23154
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR *var)
Definition: var.c:4473
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
Definition: var.c:23900
SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)
Definition: var.c:23748
SCIP_DECL_SORTPTRCOMP(SCIPvarCompActiveAndNegated)
Definition: var.c:17266
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
Definition: var.c:17550
void SCIPvarMarkRelaxationOnly(SCIP_VAR *var)
Definition: var.c:23618
SCIP_RETCODE SCIPvarGetOrigvarSumExact(SCIP_VAR **var, SCIP_RATIONAL *scalar, SCIP_RATIONAL *constant)
Definition: var.c:18409
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
Definition: var.c:23453
SCIP_BOUNDTYPE SCIPvarGetBestBoundTypeExact(SCIP_VAR *var)
Definition: var.c:24385
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
Definition: var.c:24142
SCIP_RETCODE SCIPvarSetInitial(SCIP_VAR *var, SCIP_Bool initial)
Definition: var.c:23354
SCIP_VAR ** SCIPvarGetImplVars(SCIP_VAR *var, SCIP_Bool varfixing)
Definition: var.c:24585
void SCIPvarSetBestRootSol(SCIP_VAR *var, SCIP_Real rootsol, SCIP_Real rootredcost, SCIP_Real rootlpobjval)
Definition: var.c:19612
SCIP_VARSTATUS SCIPvarGetStatusExact(SCIP_VAR *var)
Definition: var.c:23396
SCIP_RATIONAL * SCIPvarGetWorstBoundLocalExact(SCIP_VAR *var)
Definition: var.c:24355
int SCIPbdchginfoGetDepth(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24959
int SCIPbdchginfoGetInferInfo(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:25024
int SCIPvarGetIndex(SCIP_VAR *var)
Definition: var.c:23652
SCIP_INTERVAL SCIPvarGetObjInterval(SCIP_VAR *var)
Definition: var.c:23921
SCIP_CONS * SCIPbdchginfoGetInferCons(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:25001
SCIP_Real SCIPvarGetNLPSol_rec(SCIP_VAR *var)
Definition: var.c:18859
SCIP_BDCHGIDX * SCIPvarGetLastBdchgIndex(SCIP_VAR *var)
Definition: var.c:22764
SCIP_COLEXACT * SCIPvarGetColExact(SCIP_VAR *var)
Definition: var.c:23694
void SCIPvarGetLPSolExact_rec(SCIP_VAR *var, SCIP_RATIONAL *res)
Definition: var.c:18784
int SCIPbdchginfoGetPos(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24969
SCIP_Real SCIPvarGetWorstBoundLocal(SCIP_VAR *var)
Definition: var.c:24342
int SCIPvarGetNUses(SCIP_VAR *var)
Definition: var.c:23277
SCIP_RATIONAL * SCIPvarGetLbOriginalExact(SCIP_VAR *var)
Definition: var.c:24040
SCIP_RATIONAL * SCIPvarGetUbOriginalExact(SCIP_VAR *var)
Definition: var.c:24083
int SCIPdomchgGetNBoundchgs(SCIP_DOMCHG *domchg)
Definition: var.c:23214
SCIP_Longint SCIPvarGetLbCertificateIndexGlobal(SCIP_VAR *var)
Definition: var.c:25200
int SCIPvarGetProbindex(SCIP_VAR *var)
Definition: var.c:23662
const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:23267
SCIP_Bool SCIPvarIsExact(SCIP_VAR *var)
Definition: var.c:23407
SCIP_RETCODE SCIPvarGetProbvarBoundExact(SCIP_VAR **var, SCIP_RATIONAL *bound, SCIP_BOUNDTYPE *boundtype)
Definition: var.c:17894
SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)
Definition: var.c:24063
SCIP_Real SCIPvarGetWorstBoundGlobal(SCIP_VAR *var)
Definition: var.c:24204
SCIP_VAR * SCIPbdchginfoGetVar(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24929
SCIP_Bool SCIPvarHasBinaryImplic(SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_Bool implvarfixing)
Definition: var.c:16461
void SCIPvarMarkDeleteGlobalStructures(SCIP_VAR *var)
Definition: var.c:23570
SCIP_Real * SCIPvarGetVlbConstants(SCIP_VAR *var)
Definition: var.c:24514
SCIP_Real SCIPvarGetRootSol(SCIP_VAR *var)
Definition: var.c:19115
SCIP_RATIONAL * SCIPvarGetMultaggrConstantExact(SCIP_VAR *var)
Definition: var.c:23855
int * SCIPvarGetImplIds(SCIP_VAR *var, SCIP_Bool varfixing)
Definition: var.c:24630
SCIP_Real SCIPvarGetBestBoundLocal(SCIP_VAR *var)
Definition: var.c:24312
int SCIPvarGetNVubs(SCIP_VAR *var)
Definition: var.c:24524
SCIP_RATIONAL * SCIPvarGetUbLocalExact(SCIP_VAR *var)
Definition: var.c:24278
SCIP_Real SCIPvarGetBranchFactor(SCIP_VAR *var)
Definition: var.c:24450
void SCIPvarSetUbCertificateIndexGlobal(SCIP_VAR *var, SCIP_Longint certidx)
Definition: var.c:25122
SCIP_Real SCIPvarGetAvgSol(SCIP_VAR *var)
Definition: var.c:19827
SCIP_Bool SCIPvarIsDeletable(SCIP_VAR *var)
Definition: var.c:23632
SCIP_Real SCIPbdchginfoGetOldbound(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24909
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
Definition: var.c:23490
SCIP_Bool SCIPvarIsTransformedOrigvar(SCIP_VAR *var)
Definition: var.c:18497
SCIP_Real SCIPvarGetUbLazy(SCIP_VAR *var)
Definition: var.c:24438
SCIP_Real SCIPvarGetPseudoSol(SCIP_VAR *var)
Definition: var.c:24756
SCIP_BRANCHDIR SCIPvarGetBranchDirection(SCIP_VAR *var)
Definition: var.c:24472
SCIP_BOUNDTYPE SCIPbdchginfoGetInferBoundtype(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:25036
void SCIPvarSetData(SCIP_VAR *var, SCIP_VARDATA *vardata)
Definition: var.c:23297
SCIP_Real * SCIPvarGetImplBounds(SCIP_VAR *var, SCIP_Bool varfixing)
Definition: var.c:24614
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
Definition: var.c:24664
SCIP_BDCHGINFO * SCIPvarGetBdchgInfo(SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: var.c:22741
void SCIPvarGetSolExact(SCIP_VAR *var, SCIP_RATIONAL *res, SCIP_Bool getlpval)
Definition: var.c:19019
SCIP_VARDATA * SCIPvarGetData(SCIP_VAR *var)
Definition: var.c:23287
SCIP_VAR ** SCIPvarGetMultaggrVars(SCIP_VAR *var)
Definition: var.c:23806
SCIP_Bool SCIPbdchginfoIsTighter(SCIP_BDCHGINFO *bdchginfo1, SCIP_BDCHGINFO *bdchginfo2)
Definition: var.c:25082
int SCIPvarGetMultaggrNVars(SCIP_VAR *var)
Definition: var.c:23794
SCIP_RETCODE SCIPvarSetRemovable(SCIP_VAR *var, SCIP_Bool removable)
Definition: var.c:23370
SCIP_Longint SCIPvarGetLbCertificateIndexLocal(SCIP_VAR *var)
Definition: var.c:25176
SCIP_HOLELIST * SCIPvarGetHolelistOriginal(SCIP_VAR *var)
Definition: var.c:24106
SCIP_Bool SCIPvarIsRemovable(SCIP_VAR *var)
Definition: var.c:23524
int SCIPvarGetNCliques(SCIP_VAR *var, SCIP_Bool varfixing)
Definition: var.c:24642
SCIP_BOUNDCHGTYPE SCIPbdchginfoGetChgtype(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24939
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:24234
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
Definition: var.c:23443
SCIP_DECL_HASHKEYEQ(SCIPvarIsHashkeyEq)
Definition: var.c:17323
SCIP_VAR * SCIPbdchginfoGetInferVar(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24989
SCIP_RATIONAL * SCIPvarGetBestBoundLocalExact(SCIP_VAR *var)
Definition: var.c:24325
SCIP_Bool SCIPbdchginfoHasInferenceReason(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:25068
SCIP_RATIONAL * SCIPvarGetLbGlobalExact(SCIP_VAR *var)
Definition: var.c:24130
SCIP_Bool SCIPboundchgIsRedundant(SCIP_BOUNDCHG *boundchg)
Definition: var.c:23204
SCIP_Longint SCIPvarGetNBranchings(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:21751
SCIP_Bool SCIPvarIsRelaxationOnly(SCIP_VAR *var)
Definition: var.c:23600
SCIP_VAR * SCIPvarGetNegationVar(SCIP_VAR *var)
Definition: var.c:23878
SCIP_RETCODE SCIPvarGetProbvarHole(SCIP_VAR **var, SCIP_Real *left, SCIP_Real *right)
Definition: var.c:17990
SCIP_VAR ** SCIPvarGetVlbVars(SCIP_VAR *var)
Definition: var.c:24494
SCIP_BDCHGINFO * SCIPvarGetUbchgInfo(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: var.c:22685
SCIP_Real SCIPholelistGetLeft(SCIP_HOLELIST *holelist)
Definition: var.c:23234
SCIP_RATIONAL ** SCIPvarGetMultaggrScalarsExact(SCIP_VAR *var)
Definition: var.c:23830
SCIP_Real SCIPvarGetMaxAggrCoef(SCIP_VAR *var)
Definition: var.c:23726
int SCIPvarGetBranchPriority(SCIP_VAR *var)
Definition: var.c:24462
SCIP_Bool SCIPvarIsOriginal(SCIP_VAR *var)
Definition: var.c:23417
SCIP_CLIQUE ** SCIPvarGetCliques(SCIP_VAR *var, SCIP_Bool varfixing)
Definition: var.c:24653
SCIP_Real SCIPvarGetMinAggrCoef(SCIP_VAR *var)
Definition: var.c:23716
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
Definition: var.c:24120
void SCIPvarMarkNotDeletable(SCIP_VAR *var)
Definition: var.c:23557
SCIP_Real SCIPvarGetBestRootRedcost(SCIP_VAR *var)
Definition: var.c:19547
SCIP_BDCHGINFO * SCIPvarGetBdchgInfoLb(SCIP_VAR *var, int pos)
Definition: var.c:24704
SCIP_RATIONAL * SCIPvarGetLbLocalExact(SCIP_VAR *var)
Definition: var.c:24244
SCIP_DECL_HASHKEYVAL(SCIPvarGetHashkeyVal)
Definition: var.c:17331
SCIP_IMPLINTTYPE SCIPvarGetImplType(SCIP_VAR *var)
Definition: var.c:23463
int SCIPvarCompare(SCIP_VAR *var1, SCIP_VAR *var2)
Definition: var.c:17274
void SCIPvarsCountTypes(SCIP_VAR **vars, int nvars, int *nbinvars, int *nintvars, int *nbinimplvars, int *nintimplvars, int *ncontimplvars, int *ncontvars)
Definition: var.c:22942
SCIP_Real SCIPvarGetCutoffSumCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:22274
SCIP_Real SCIPvarGetBestRootLPObjval(SCIP_VAR *var)
Definition: var.c:19581
SCIP_RETCODE SCIPvarGetProbvarBinary(SCIP_VAR **var, SCIP_Bool *negated)
Definition: var.c:17642
SCIP_Longint SCIPvarGetNBranchingsCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:21796
SCIP_Real * SCIPvarGetVubConstants(SCIP_VAR *var)
Definition: var.c:24556
int SCIPvarGetNLocksUp(SCIP_VAR *var)
Definition: var.c:4462
SCIP_VAR * SCIPvarGetTransVar(SCIP_VAR *var)
Definition: var.c:23672
SCIP_Real SCIPvarGetNLPSol(SCIP_VAR *var)
Definition: var.c:24691
SCIP_VAR ** SCIPvarGetVubVars(SCIP_VAR *var)
Definition: var.c:24536
int SCIPvarGetNBdchgInfosUb(SCIP_VAR *var)
Definition: var.c:24736
SCIP_BOUNDTYPE SCIPbdchginfoGetBoundtype(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24949
SCIP_VALUEHISTORY * SCIPvarGetValuehistory(SCIP_VAR *var)
Definition: var.c:24746
SCIP_BOUNDTYPE SCIPvarGetWorstBoundType(SCIP_VAR *var)
Definition: var.c:24400
SCIP_Real SCIPvarGetInferenceSumCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:22076
SCIP_Bool SCIPvarsHaveCommonClique(SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
Definition: var.c:16807
SCIP_Bool SCIPbdchgidxIsEarlierNonNull(SCIP_BDCHGIDX *bdchgidx1, SCIP_BDCHGIDX *bdchgidx2)
Definition: var.c:24869
SCIP_Real * SCIPvarGetVubCoefs(SCIP_VAR *var)
Definition: var.c:24546
SCIP_HOLELIST * SCIPvarGetHolelistGlobal(SCIP_VAR *var)
Definition: var.c:24164
void SCIPvarGetLPSolExact(SCIP_VAR *var, SCIP_RATIONAL *res)
Definition: var.c:24677
SCIP_Real SCIPbdchginfoGetNewbound(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:24919
SCIP_RATIONAL * SCIPvarGetWorstBoundGlobalExact(SCIP_VAR *var)
Definition: var.c:24217
SCIP_Real SCIPboundchgGetLPSolVal(SCIP_BOUNDCHG *boundchg)
Definition: var.c:23164
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
Definition: var.c:4328
SCIP_RATIONAL * SCIPvarGetObjExact(SCIP_VAR *var)
Definition: var.c:23910
SCIP_BDCHGINFO * SCIPvarGetBdchgInfoUb(SCIP_VAR *var, int pos)
Definition: var.c:24724
int SCIPvarGetNBdchgInfosLb(SCIP_VAR *var)
Definition: var.c:24716
SCIP_BOUNDTYPE * SCIPvarGetImplTypes(SCIP_VAR *var, SCIP_Bool varfixing)
Definition: var.c:24600
int SCIPvarGetLastBdchgDepth(SCIP_VAR *var)
Definition: var.c:22801
void SCIPvarSetCopyData(SCIP_VAR *var, SCIP_DECL_VARCOPY((*varcopy)))
Definition: var.c:23343
SCIP_RETCODE SCIPvarsGetProbvarBinary(SCIP_VAR ***vars, SCIP_Bool **negatedarr, int nvars)
Definition: var.c:17610
SCIP_RATIONAL * SCIPvarGetUbGlobalExact(SCIP_VAR *var)
Definition: var.c:24152
SCIP_Real SCIPvarGetUnchangedObj(SCIP_VAR *var)
Definition: var.c:23932
SCIP_Real * SCIPvarGetMultaggrScalars(SCIP_VAR *var)
Definition: var.c:23818
SCIP_Real SCIPvarGetCutoffSum(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:22231
SCIP_Real SCIPvarGetLbLazy(SCIP_VAR *var)
Definition: var.c:24428
SCIP_Bool SCIPvarIsInLP(SCIP_VAR *var)
Definition: var.c:23706
SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
Definition: var.c:23736
internal methods for branching and inference history
methods for implications, variable bounds, and cliques
interval arithmetics for provable bounds
public methods for LP management
datastructures for problem variables
type definitions for constraints and constraint handlers
type definitions for branching and inference history
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:48
type definitions for implications, variable bounds, and cliques
type definitions for LP management
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:60
type definitions for exact LP management
type definitions for miscellaneous datastructures
type definitions for propagators
result codes for SCIP callback methods
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for SCIP's main datastructure
type definitions for problem variables
struct SCIP_VarData SCIP_VARDATA
Definition: type_var.h:167
enum SCIP_BoundchgType SCIP_BOUNDCHGTYPE
Definition: type_var.h:135
enum SCIP_ImplintType SCIP_IMPLINTTYPE
Definition: type_var.h:117
#define SCIP_DECL_VARDELORIG(x)
Definition: type_var.h:180
#define SCIP_DECL_VARTRANS(x)
Definition: type_var.h:200
#define SCIP_DECL_VARCOPY(x)
Definition: type_var.h:243
#define SCIP_DECL_VARDELTRANS(x)
Definition: type_var.h:213
enum SCIP_LockType SCIP_LOCKTYPE
Definition: type_var.h:144
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:73
enum SCIP_Varstatus SCIP_VARSTATUS
Definition: type_var.h:59