Scippy

SCIP

Solving Constraint Integer Programs

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-2017 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file var.h
17  * @ingroup INTERNALAPI
18  * @brief internal 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_VAR_H__
25 #define __SCIP_VAR_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/type_retcode.h"
31 #include "scip/type_set.h"
32 #include "scip/type_stat.h"
33 #include "scip/type_misc.h"
34 #include "scip/type_history.h"
35 #include "scip/type_event.h"
36 #include "scip/type_lp.h"
37 #include "scip/type_var.h"
38 #include "scip/type_prob.h"
39 #include "scip/type_primal.h"
40 #include "scip/type_tree.h"
41 #include "scip/type_reopt.h"
42 #include "scip/type_branch.h"
43 #include "scip/type_cons.h"
44 #include "scip/pub_var.h"
45 #include "scip/pub_misc.h"
46 
47 #ifndef NDEBUG
48 #include "scip/struct_var.h"
49 #else
50 #include "scip/event.h"
51 #endif
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 /*
58  * domain change methods
59  */
60 
61 /** applies single bound change */
62 extern
64  SCIP_BOUNDCHG* boundchg, /**< bound change to apply */
65  BMS_BLKMEM* blkmem, /**< block memory */
66  SCIP_SET* set, /**< global SCIP settings */
67  SCIP_STAT* stat, /**< problem statistics */
68  SCIP_LP* lp, /**< current LP data */
69  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
70  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
71  int depth, /**< depth in the tree, where the bound change takes place */
72  int pos, /**< position of the bound change in its bound change array */
73  SCIP_Bool* cutoff /**< pointer to store whether an infeasible bound change was detected */
74  );
75 
76 /** undoes single bound change */
77 extern
79  SCIP_BOUNDCHG* boundchg, /**< bound change to remove */
80  BMS_BLKMEM* blkmem, /**< block memory */
81  SCIP_SET* set, /**< global SCIP settings */
82  SCIP_STAT* stat, /**< problem statistics */
83  SCIP_LP* lp, /**< current LP data */
84  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
85  SCIP_EVENTQUEUE* eventqueue /**< event queue */
86  );
87 
88 /** applies domain change to the global problem */
89 extern
91  SCIP_DOMCHG* domchg, /**< domain change to apply */
92  BMS_BLKMEM* blkmem, /**< block memory */
93  SCIP_SET* set, /**< global SCIP settings */
94  SCIP_STAT* stat, /**< problem statistics */
95  SCIP_LP* lp, /**< current LP data */
96  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
97  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
98  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
99  SCIP_Bool* cutoff /**< pointer to store whether an infeasible domain change was detected */
100  );
101 
102 /** frees domain change data */
103 extern
105  SCIP_DOMCHG** domchg, /**< pointer to domain change */
106  BMS_BLKMEM* blkmem, /**< block memory */
107  SCIP_SET* set, /**< global SCIP settings */
108  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
109  SCIP_LP* lp /**< current LP data */
110  );
111 
112 /** converts a dynamic domain change data into a static one, using less memory than for a dynamic one */
113 extern
115  SCIP_DOMCHG** domchg, /**< pointer to domain change data */
116  BMS_BLKMEM* blkmem, /**< block memory */
117  SCIP_SET* set, /**< global SCIP settings */
118  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
119  SCIP_LP* lp /**< current LP data */
120  );
121 
122 /** applies domain change */
123 extern
125  SCIP_DOMCHG* domchg, /**< domain change to apply */
126  BMS_BLKMEM* blkmem, /**< block memory */
127  SCIP_SET* set, /**< global SCIP settings */
128  SCIP_STAT* stat, /**< problem statistics */
129  SCIP_LP* lp, /**< current LP data */
130  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
131  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
132  int depth, /**< depth in the tree, where the domain change takes place */
133  SCIP_Bool* cutoff /**< pointer to store whether an infeasible domain change was detected */
134  );
135 
136 /** undoes domain change */
137 extern
139  SCIP_DOMCHG* domchg, /**< domain change to remove */
140  BMS_BLKMEM* blkmem, /**< block memory */
141  SCIP_SET* set, /**< global SCIP settings */
142  SCIP_STAT* stat, /**< problem statistics */
143  SCIP_LP* lp, /**< current LP data */
144  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
145  SCIP_EVENTQUEUE* eventqueue /**< event queue */
146  );
147 
148 /** adds bound change to domain changes */
149 extern
151  SCIP_DOMCHG** domchg, /**< pointer to domain change data structure */
152  BMS_BLKMEM* blkmem, /**< block memory */
153  SCIP_SET* set, /**< global SCIP settings */
154  SCIP_VAR* var, /**< variable to change the bounds for */
155  SCIP_Real newbound, /**< new value for bound */
156  SCIP_BOUNDTYPE boundtype, /**< type of bound for var: lower or upper bound */
157  SCIP_BOUNDCHGTYPE boundchgtype, /**< type of bound change: branching decision or inference */
158  SCIP_Real lpsolval, /**< solval of variable in last LP on path to node, or SCIP_INVALID if unknown */
159  SCIP_VAR* infervar, /**< variable that was changed (parent of var, or var itself) */
160  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
161  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
162  int inferinfo, /**< user information for inference to help resolving the conflict */
163  SCIP_BOUNDTYPE inferboundtype /**< type of bound for inference var: lower or upper bound */
164  );
165 
166 /** adds hole change to domain changes */
167 extern
169  SCIP_DOMCHG** domchg, /**< pointer to domain change data structure */
170  BMS_BLKMEM* blkmem, /**< block memory */
171  SCIP_SET* set, /**< global SCIP settings */
172  SCIP_HOLELIST** ptr, /**< changed list pointer */
173  SCIP_HOLELIST* newlist, /**< new value of list pointer */
174  SCIP_HOLELIST* oldlist /**< old value of list pointer */
175  );
176 
177 /** creates an artificial bound change information object with depth = INT_MAX and pos = -1 */
178 extern
180  SCIP_BDCHGINFO** bdchginfo, /**< pointer to store bound change information */
181  BMS_BLKMEM* blkmem, /**< block memory */
182  SCIP_VAR* var, /**< active variable that changed the bounds */
183  SCIP_BOUNDTYPE boundtype, /**< type of bound for var: lower or upper bound */
184  SCIP_Real oldbound, /**< old value for bound */
185  SCIP_Real newbound /**< new value for bound */
186  );
187 
188 /** frees a bound change information object */
189 extern
190 void SCIPbdchginfoFree(
191  SCIP_BDCHGINFO** bdchginfo, /**< pointer to store bound change information */
192  BMS_BLKMEM* blkmem /**< block memory */
193  );
194 
195 /** returns the relaxed bound change type */
196 extern
198  SCIP_BDCHGINFO* bdchginfo /**< bound change to add to the conflict set */
199  );
200 
201 /*
202  * methods for variables
203  */
204 
205 /** creates and captures an original problem variable; an integer variable with bounds
206  * zero and one is automatically converted into a binary variable
207  */
208 extern
210  SCIP_VAR** var, /**< pointer to variable data */
211  BMS_BLKMEM* blkmem, /**< block memory */
212  SCIP_SET* set, /**< global SCIP settings */
213  SCIP_STAT* stat, /**< problem statistics */
214  const char* name, /**< name of variable */
215  SCIP_Real lb, /**< lower bound of variable */
216  SCIP_Real ub, /**< upper bound of variable */
217  SCIP_Real obj, /**< objective function value */
218  SCIP_VARTYPE vartype, /**< type of variable */
219  SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
220  SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
221  SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable, or NULL */
222  SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data, or NULL */
223  SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable, or NULL */
224  SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
225  SCIP_VARDATA* vardata /**< user data for this specific variable */
226  );
227 
228 /** creates and captures a loose variable belonging to the transformed problem; an integer variable with bounds
229  * zero and one is automatically converted into a binary variable
230  */
231 extern
233  SCIP_VAR** var, /**< pointer to variable data */
234  BMS_BLKMEM* blkmem, /**< block memory */
235  SCIP_SET* set, /**< global SCIP settings */
236  SCIP_STAT* stat, /**< problem statistics */
237  const char* name, /**< name of variable */
238  SCIP_Real lb, /**< lower bound of variable */
239  SCIP_Real ub, /**< upper bound of variable */
240  SCIP_Real obj, /**< objective function value */
241  SCIP_VARTYPE vartype, /**< type of variable */
242  SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
243  SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
244  SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable, or NULL */
245  SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data, or NULL */
246  SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable, or NULL */
247  SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
248  SCIP_VARDATA* vardata /**< user data for this specific variable */
249  );
250 
251 /** copies and captures a variable from source to target SCIP; an integer variable with bounds zero and one is
252  * automatically converted into a binary variable; in case the variable data cannot be copied the variable is not
253  * copied at all
254  */
255 extern
257  SCIP_VAR** var, /**< pointer to store the target variable */
258  BMS_BLKMEM* blkmem, /**< block memory */
259  SCIP_SET* set, /**< global SCIP settings */
260  SCIP_STAT* stat, /**< problem statistics */
261  SCIP* sourcescip, /**< source SCIP data structure */
262  SCIP_VAR* sourcevar, /**< source variable */
263  SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of source variables corresponding
264  * target variables */
265  SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
266  * target constraints */
267  SCIP_Bool global /**< should global or local bounds be used? */
268  );
269 
270 /** parses variable information (in cip format) out of a string; if the parsing process was successful an original
271  * variable is created and captured; if variable is of integral type, fractional bounds are automatically rounded; an
272  * integer variable with bounds zero and one is automatically converted into a binary variable
273  */
274 extern
276  SCIP_VAR** var, /**< pointer to variable data */
277  BMS_BLKMEM* blkmem, /**< block memory */
278  SCIP_SET* set, /**< global SCIP settings */
279  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
280  SCIP_STAT* stat, /**< problem statistics */
281  const char* str, /**< string to parse */
282  SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
283  SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
284  SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
285  SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable */
286  SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data */
287  SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable */
288  SCIP_VARDATA* vardata, /**< user data for this specific variable */
289  char** endptr, /**< pointer to store the final string position if successfully */
290  SCIP_Bool* success /**< pointer store if the paring process was successful */
291  );
292 
293 /** parses variable information (in cip format) out of a string; if the parsing process was successful a loose variable
294  * belonging to the transformed problem is created and captured; if variable is of integral type, fractional bounds are
295  * automatically rounded; an integer variable with bounds zero and one is automatically converted into a binary
296  * variable
297  */
298 extern
300  SCIP_VAR** var, /**< pointer to variable data */
301  BMS_BLKMEM* blkmem, /**< block memory */
302  SCIP_SET* set, /**< global SCIP settings */
303  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
304  SCIP_STAT* stat, /**< problem statistics */
305  const char* str, /**< string to parse */
306  SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
307  SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
308  SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
309  SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable */
310  SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data */
311  SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable */
312  SCIP_VARDATA* vardata, /**< user data for this specific variable */
313  char** endptr, /**< pointer to store the final string position if successfully */
314  SCIP_Bool* success /**< pointer store if the paring process was successful */
315  );
316 
317 /** increases usage counter of variable */
318 extern
319 void SCIPvarCapture(
320  SCIP_VAR* var /**< variable */
321  );
322 
323 /** decreases usage counter of variable, and frees memory if necessary */
324 extern
326  SCIP_VAR** var, /**< pointer to variable */
327  BMS_BLKMEM* blkmem, /**< block memory */
328  SCIP_SET* set, /**< global SCIP settings */
329  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
330  SCIP_LP* lp /**< current LP data (may be NULL, if it's not a column variable) */
331  );
332 
333 /** change variable name */
334 extern
335 /** change variable name */
337  SCIP_VAR* var, /**< problem variable */
338  BMS_BLKMEM* blkmem, /**< block memory */
339  const char* name /**< name of variable */
340  );
341 
342 /** initializes variable data structure for solving */
343 extern
344 void SCIPvarInitSolve(
345  SCIP_VAR* var /**< problem variable */
346  );
347 
348 /** gets and captures transformed variable of a given variable; if the variable is not yet transformed,
349  * a new transformed variable for this variable is created
350  */
351 extern
353  SCIP_VAR* origvar, /**< original problem variable */
354  BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
355  SCIP_SET* set, /**< global SCIP settings */
356  SCIP_STAT* stat, /**< problem statistics */
357  SCIP_OBJSENSE objsense, /**< objective sense of original problem; transformed is always MINIMIZE */
358  SCIP_VAR** transvar /**< pointer to store the transformed variable */
359  );
360 
361 /** gets corresponding transformed variable of an original or negated original variable */
362 extern
364  SCIP_VAR* origvar, /**< original problem variable */
365  BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
366  SCIP_SET* set, /**< global SCIP settings */
367  SCIP_STAT* stat, /**< problem statistics */
368  SCIP_VAR** transvar /**< pointer to store the transformed variable, or NULL if not existing yet */
369  );
370 
371 /** converts transformed variable into column variable and creates LP column */
372 extern
374  SCIP_VAR* var, /**< problem variable */
375  BMS_BLKMEM* blkmem, /**< block memory */
376  SCIP_SET* set, /**< global SCIP settings */
377  SCIP_STAT* stat, /**< problem statistics */
378  SCIP_PROB* prob, /**< problem data */
379  SCIP_LP* lp /**< current LP data */
380  );
381 
382 /** converts column transformed variable back into loose variable, frees LP column */
383 extern
385  SCIP_VAR* var, /**< problem variable */
386  BMS_BLKMEM* blkmem, /**< block memory */
387  SCIP_SET* set, /**< global SCIP settings */
388  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
389  SCIP_PROB* prob, /**< problem data */
390  SCIP_LP* lp /**< current LP data */
391  );
392 
393 /** converts variable into fixed variable */
394 extern
396  SCIP_VAR* var, /**< problem variable */
397  BMS_BLKMEM* blkmem, /**< block memory */
398  SCIP_SET* set, /**< global SCIP settings */
399  SCIP_STAT* stat, /**< problem statistics */
400  SCIP_PROB* transprob, /**< tranformed problem data */
401  SCIP_PROB* origprob, /**< original problem data */
402  SCIP_PRIMAL* primal, /**< primal data */
403  SCIP_TREE* tree, /**< branch and bound tree */
404  SCIP_REOPT* reopt, /**< reoptimization data structure */
405  SCIP_LP* lp, /**< current LP data */
406  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
407  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
408  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
409  SCIP_Real fixedval, /**< value to fix variable at */
410  SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
411  SCIP_Bool* fixed /**< pointer to store whether the fixing was performed (variable was unfixed) */
412  );
413 
414 /** transforms given variables, scalars and constant to the corresponding active variables, scalars and constant
415  *
416  * If the number of needed active variables is greater than the available slots in the variable array, nothing happens except
417  * that the required size is stored in the corresponding variable; hence, if afterwards the required size is greater than the
418  * available slots (varssize), nothing happens; otherwise, the active variable representation is stored in the arrays.
419  *
420  * The reason for this approach is that we cannot reallocate memory, since we do not know how the
421  * memory has been allocated (e.g., by a C++ 'new' or SCIP functions).
422  */
423 extern
425  SCIP_SET* set, /**< global SCIP settings */
426  SCIP_VAR** vars, /**< variable array to get active variables */
427  SCIP_Real* scalars, /**< scalars a_1, ..., a_n in linear sum a_1*x_1 + ... + a_n*x_n + c */
428  int* nvars, /**< pointer to number of variables and values in vars and vals array */
429  int varssize, /**< available slots in vars and scalars array */
430  SCIP_Real* constant, /**< pointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c */
431  int* requiredsize, /**< pointer to store the required array size for the active variables */
432  SCIP_Bool mergemultiples /**< should multiple occurrences of a var be replaced by a single coeff? */
433  );
434 
435 /** transforms given variable, scalar and constant to the corresponding active, fixed, or
436  * multi-aggregated variable, scalar and constant; if the variable resolves to a fixed variable,
437  * "scalar" will be 0.0 and the value of the sum will be stored in "constant"; a multi-aggregation
438  * with only one active variable (this can happen due to fixings after the multi-aggregation),
439  * is treated like an aggregation; if the multi-aggregation constant is infinite, "scalar" will be 0.0
440  */
441 extern
443  SCIP_VAR** var, /**< pointer to problem variable x in sum a*x + c */
444  SCIP_SET* set, /**< global SCIP settings */
445  SCIP_Real* scalar, /**< pointer to scalar a in sum a*x + c */
446  SCIP_Real* constant /**< pointer to constant c in sum a*x + c */
447  );
448 
449 
450 /** flattens aggregation graph of multi-aggregated variable in order to avoid exponential recursion later-on */
451 extern
453  SCIP_VAR* var, /**< problem variable */
454  BMS_BLKMEM* blkmem, /**< block memory */
455  SCIP_SET* set /**< global SCIP settings */
456  );
457 
458 /** return for given variables all their active counterparts; all active variables will be pairwise different */
459 extern
461  SCIP_SET* set, /**< global SCIP settings */
462  SCIP_VAR** vars, /**< variable array with given variables and as output all active
463  * variables, if enough slots exist
464  */
465  int* nvars, /**< number of given variables, and as output number of active variables,
466  * if enough slots exist
467  */
468  int varssize, /**< available slots in vars array */
469  int* requiredsize /**< pointer to store the required array size for the active variables */
470  );
471 
472 /** performs second step of SCIPaggregateVars():
473  * the variable to be aggregated is chosen among active problem variables x' and y', preferring a less strict variable
474  * type as aggregation variable (i.e. continuous variables are preferred over implicit integers, implicit integers
475  * or integers over binaries). If none of the variables is continuous, it is tried to find an integer
476  * aggregation (i.e. integral coefficients a'' and b'', such that a''*x' + b''*y' == c''). This can lead to
477  * the detection of infeasibility (e.g. if c'' is fractional), or to a rejection of the aggregation (denoted by
478  * aggregated == FALSE), if the resulting integer coefficients are too large and thus numerically instable.
479  */
480 extern
482  SCIP_SET* set, /**< global SCIP settings */
483  BMS_BLKMEM* blkmem, /**< block memory */
484  SCIP_STAT* stat, /**< problem statistics */
485  SCIP_PROB* transprob, /**< tranformed problem data */
486  SCIP_PROB* origprob, /**< original problem data */
487  SCIP_PRIMAL* primal, /**< primal data */
488  SCIP_TREE* tree, /**< branch and bound tree */
489  SCIP_REOPT* reopt, /**< reoptimization data structure */
490  SCIP_LP* lp, /**< current LP data */
491  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
492  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
493  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
494  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
495  SCIP_VAR* varx, /**< variable x in equality a*x + b*y == c */
496  SCIP_VAR* vary, /**< variable y in equality a*x + b*y == c */
497  SCIP_Real scalarx, /**< multiplier a in equality a*x + b*y == c */
498  SCIP_Real scalary, /**< multiplier b in equality a*x + b*y == c */
499  SCIP_Real rhs, /**< right hand side c in equality a*x + b*y == c */
500  SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
501  SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
502  );
503 
504 /** converts loose variable into aggregated variable */
505 extern
507  SCIP_VAR* var, /**< loose problem variable */
508  BMS_BLKMEM* blkmem, /**< block memory */
509  SCIP_SET* set, /**< global SCIP settings */
510  SCIP_STAT* stat, /**< problem statistics */
511  SCIP_PROB* transprob, /**< tranformed problem data */
512  SCIP_PROB* origprob, /**< original problem data */
513  SCIP_PRIMAL* primal, /**< primal data */
514  SCIP_TREE* tree, /**< branch and bound tree */
515  SCIP_REOPT* reopt, /**< reoptimization data structure */
516  SCIP_LP* lp, /**< current LP data */
517  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
518  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
519  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
520  SCIP_VAR* aggvar, /**< loose variable y in aggregation x = a*y + c */
521  SCIP_Real scalar, /**< multiplier a in aggregation x = a*y + c */
522  SCIP_Real constant, /**< constant shift c in aggregation x = a*y + c */
523  SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
524  SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
525  );
526 
527 /** converts variable into multi-aggregated variable */
528 extern
530  SCIP_VAR* var, /**< problem variable */
531  BMS_BLKMEM* blkmem, /**< block memory */
532  SCIP_SET* set, /**< global SCIP settings */
533  SCIP_STAT* stat, /**< problem statistics */
534  SCIP_PROB* transprob, /**< tranformed problem data */
535  SCIP_PROB* origprob, /**< original problem data */
536  SCIP_PRIMAL* primal, /**< primal data */
537  SCIP_TREE* tree, /**< branch and bound tree */
538  SCIP_REOPT* reopt, /**< reoptimization data structure */
539  SCIP_LP* lp, /**< current LP data */
540  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
541  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
542  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
543  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
544  int naggvars, /**< number n of variables in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
545  SCIP_VAR** aggvars, /**< variables y_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
546  SCIP_Real* scalars, /**< multipliers a_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
547  SCIP_Real constant, /**< constant shift c in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
548  SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
549  SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
550  );
551 
552 /** returns whether variable is not allowed to be multi-aggregated */
553 extern
555  SCIP_VAR* var /**< problem variable */
556  );
557 
558 /** marks variable to be deleted from global structures (cliques etc.) when cleaning up
559  *
560  * @note: this is not equivalent to marking the variable itself for deletion, this is done by using SCIPvarMarkDeletable()
561  */
563  SCIP_VAR* var /**< problem variable */
564  );
565 
566 /** returns whether the variable was flagged for deletion from global structures (cliques etc.) */
568  SCIP_VAR* var /**< problem variable */
569  );
570 
571 /** gets negated variable x' = offset - x of problem variable x; the negated variable is created if not yet existing;
572  * the negation offset of binary variables is always 1, the offset of other variables is fixed to lb + ub when the
573  * negated variable is created
574  */
575 extern
577  SCIP_VAR* var, /**< problem variable to negate */
578  BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
579  SCIP_SET* set, /**< global SCIP settings */
580  SCIP_STAT* stat, /**< problem statistics */
581  SCIP_VAR** negvar /**< pointer to store the negated variable */
582  );
583 
584 /** informs variable that its position in problem's vars array changed */
585 extern
587  SCIP_VAR* var, /**< problem variable */
588  int probindex /**< new problem index of variable */
589  );
590 
591 /** gives the variable a new name
592  *
593  * @note the old pointer is overwritten, which might result in a memory leakage
594  */
595 extern
597  SCIP_VAR* var, /**< problem variable */
598  const char* name /**< new name of variable */
599  );
600 
601 /** informs variable that it will be removed from the problem; adjusts probindex and removes variable from the
602  * implication graph;
603  * If 'final' is TRUE, the thorough implication graph removal is not performed. Instead, only the
604  * variable bounds and implication data structures of the variable are freed. Since in the final removal
605  * of all variables from the transformed problem, this deletes the implication graph completely and is faster
606  * than removing the variables one by one, each time updating all lists of the other variables.
607  */
608 extern
610  SCIP_VAR* var, /**< problem variable */
611  BMS_BLKMEM* blkmem, /**< block memory buffer */
612  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
613  SCIP_SET* set, /**< global SCIP settings */
614  SCIP_Bool final /**< is this the final removal of all problem variables? */
615  );
616 
617 /** marks the variable to be deleted from the problem */
618 extern
619 void SCIPvarMarkDeleted(
620  SCIP_VAR* var /**< problem variable */
621  );
622 
623 /** marks the variable to not to be multi-aggregated */
624 extern
626  SCIP_VAR* var /**< problem variable */
627  );
628 
629 /** modifies lock numbers for rounding */
630 extern
632  SCIP_VAR* var, /**< problem variable */
633  BMS_BLKMEM* blkmem, /**< block memory */
634  SCIP_SET* set, /**< global SCIP settings */
635  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
636  int addnlocksdown, /**< increase in number of rounding down locks */
637  int addnlocksup /**< increase in number of rounding up locks */
638  );
639 
640 /** changes type of variable; cannot be called, if var belongs to a problem */
641 extern
643  SCIP_VAR* var, /**< problem variable to change */
644  SCIP_VARTYPE vartype /**< new type of variable */
645  );
646 
647 /** changes objective value of variable */
648 extern
650  SCIP_VAR* var, /**< variable to change */
651  BMS_BLKMEM* blkmem, /**< block memory */
652  SCIP_SET* set, /**< global SCIP settings */
653  SCIP_PROB* prob, /**< problem data */
654  SCIP_PRIMAL* primal, /**< primal data */
655  SCIP_LP* lp, /**< current LP data */
656  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
657  SCIP_Real newobj /**< new objective value for variable */
658  );
659 
660 /** adds value to objective value of variable */
661 extern
663  SCIP_VAR* var, /**< variable to change */
664  BMS_BLKMEM* blkmem, /**< block memory */
665  SCIP_SET* set, /**< global SCIP settings */
666  SCIP_STAT* stat, /**< problem statistics */
667  SCIP_PROB* transprob, /**< tranformed problem data */
668  SCIP_PROB* origprob, /**< original problem data */
669  SCIP_PRIMAL* primal, /**< primal data */
670  SCIP_TREE* tree, /**< branch and bound tree */
671  SCIP_REOPT* reopt, /**< reoptimization data structure */
672  SCIP_LP* lp, /**< current LP data */
673  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
674  SCIP_Real addobj /**< additional objective value for variable */
675  );
676 
677 /** changes objective value of variable in current dive */
678 extern
680  SCIP_VAR* var, /**< problem variable to change */
681  SCIP_SET* set, /**< global SCIP settings */
682  SCIP_LP* lp, /**< current LP data */
683  SCIP_Real newobj /**< new objective value for variable */
684  );
685 
686 /** adjust lower bound to integral value, if variable is integral */
687 extern
688 void SCIPvarAdjustLb(
689  SCIP_VAR* var, /**< problem variable */
690  SCIP_SET* set, /**< global SCIP settings */
691  SCIP_Real* lb /**< pointer to lower bound to adjust */
692  );
693 
694 /** adjust upper bound to integral value, if variable is integral */
695 extern
696 void SCIPvarAdjustUb(
697  SCIP_VAR* var, /**< problem variable */
698  SCIP_SET* set, /**< global SCIP settings */
699  SCIP_Real* ub /**< pointer to upper bound to adjust */
700  );
701 
702 /** adjust lower or upper bound to integral value, if variable is integral */
703 extern
704 void SCIPvarAdjustBd(
705  SCIP_VAR* var, /**< problem variable */
706  SCIP_SET* set, /**< global SCIP settings */
707  SCIP_BOUNDTYPE boundtype, /**< type of bound to adjust */
708  SCIP_Real* bd /**< pointer to bound to adjust */
709  );
710 
711 /** changes lower bound of original variable in original problem */
712 extern
714  SCIP_VAR* var, /**< problem variable to change */
715  SCIP_SET* set, /**< global SCIP settings */
716  SCIP_Real newbound /**< new bound for variable */
717  );
718 
719 /** changes upper bound of original variable in original problem */
720 extern
722  SCIP_VAR* var, /**< problem variable to change */
723  SCIP_SET* set, /**< global SCIP settings */
724  SCIP_Real newbound /**< new bound for variable */
725  );
726 
727 /** changes global lower bound of variable; if possible, adjusts bound to integral value;
728  * updates local lower bound if the global bound is tighter
729  */
730 extern
732  SCIP_VAR* var, /**< problem variable to change */
733  BMS_BLKMEM* blkmem, /**< block memory */
734  SCIP_SET* set, /**< global SCIP settings */
735  SCIP_STAT* stat, /**< problem statistics */
736  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
737  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
738  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
739  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
740  SCIP_Real newbound /**< new bound for variable */
741  );
742 
743 /** changes global upper bound of variable; if possible, adjusts bound to integral value;
744  * updates local upper bound if the global bound is tighter
745  */
746 extern
748  SCIP_VAR* var, /**< problem variable to change */
749  BMS_BLKMEM* blkmem, /**< block memory */
750  SCIP_SET* set, /**< global SCIP settings */
751  SCIP_STAT* stat, /**< problem statistics */
752  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
753  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
754  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
755  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
756  SCIP_Real newbound /**< new bound for variable */
757  );
758 
759 /** changes global bound of variable; if possible, adjusts bound to integral value;
760  * updates local bound if the global bound is tighter
761  */
762 extern
764  SCIP_VAR* var, /**< problem variable to change */
765  BMS_BLKMEM* blkmem, /**< block memory */
766  SCIP_SET* set, /**< global SCIP settings */
767  SCIP_STAT* stat, /**< problem statistics */
768  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
769  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
770  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
771  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
772  SCIP_Real newbound, /**< new bound for variable */
773  SCIP_BOUNDTYPE boundtype /**< type of bound: lower or upper bound */
774  );
775 
776 /** changes current local lower bound of variable; if possible, adjusts bound to integral value; stores inference
777  * information in variable
778  */
779 extern
781  SCIP_VAR* var, /**< problem variable to change */
782  BMS_BLKMEM* blkmem, /**< block memory */
783  SCIP_SET* set, /**< global SCIP settings */
784  SCIP_STAT* stat, /**< problem statistics */
785  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
786  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
787  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
788  SCIP_Real newbound /**< new bound for variable */
789  );
790 
791 /** changes current local upper bound of variable; if possible, adjusts bound to integral value; stores inference
792  * information in variable
793  */
794 extern
796  SCIP_VAR* var, /**< problem variable to change */
797  BMS_BLKMEM* blkmem, /**< block memory */
798  SCIP_SET* set, /**< global SCIP settings */
799  SCIP_STAT* stat, /**< problem statistics */
800  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
801  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
802  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
803  SCIP_Real newbound /**< new bound for variable */
804  );
805 
806 /** changes current local bound of variable; if possible, adjusts bound to integral value; stores inference
807  * information in variable
808  */
809 extern
811  SCIP_VAR* var, /**< problem variable to change */
812  BMS_BLKMEM* blkmem, /**< block memory */
813  SCIP_SET* set, /**< global SCIP settings */
814  SCIP_STAT* stat, /**< problem statistics */
815  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
816  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
817  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
818  SCIP_Real newbound, /**< new bound for variable */
819  SCIP_BOUNDTYPE boundtype /**< type of bound: lower or upper bound */
820  );
821 
822 /** changes lazy lower bound of the variable, this is only possible if the variable is not in the LP yet */
823 extern
825  SCIP_VAR* var, /**< problem variable */
826  SCIP_SET* set, /**< global SCIP settings */
827  SCIP_Real lazylb /**< the lazy lower bound to be set */
828  );
829 
830 /** changes lazy upper bound of the variable, this is only possible if the variable is not in the LP yet */
832  SCIP_VAR* var, /**< problem variable */
833  SCIP_SET* set, /**< global SCIP settings */
834  SCIP_Real lazylb /**< the lazy lower bound to be set */
835  );
836 
837 /** changes lower bound of variable in current dive; if possible, adjusts bound to integral value */
838 extern
840  SCIP_VAR* var, /**< problem variable to change */
841  SCIP_SET* set, /**< global SCIP settings */
842  SCIP_LP* lp, /**< current LP data */
843  SCIP_Real newbound /**< new bound for variable */
844  );
845 
846 /** changes upper bound of variable in current dive; if possible, adjusts bound to integral value */
847 extern
849  SCIP_VAR* var, /**< problem variable to change */
850  SCIP_SET* set, /**< global SCIP settings */
851  SCIP_LP* lp, /**< current LP data */
852  SCIP_Real newbound /**< new bound for variable */
853  );
854 
855 /** for a multi-aggregated variable, gives the local lower bound computed by adding the local bounds from all aggregation variables
856  * this lower bound may be tighter than the one given by SCIPvarGetLbLocal, since the latter is not updated if bounds of aggregation variables are changing
857  * calling this function for a non-multi-aggregated variable is not allowed
858  */
859 extern
861  SCIP_VAR* var, /**< problem variable */
862  SCIP_SET* set /**< global SCIP settings */
863  );
864 
865 /** for a multi-aggregated variable, gives the local upper bound computed by adding the local bounds from all aggregation variables
866  * this upper bound may be tighter than the one given by SCIPvarGetUbLocal, since the latter is not updated if bounds of aggregation variables are changing
867  * calling this function for a non-multi-aggregated variable is not allowed
868  */
869 extern
871  SCIP_VAR* var, /**< problem variable */
872  SCIP_SET* set /**< global SCIP settings */
873  );
874 
875 /** for a multi-aggregated variable, gives the global lower bound computed by adding the global bounds from all aggregation variables
876  * this global bound may be tighter than the one given by SCIPvarGetLbGlobal, since the latter is not updated if bounds of aggregation variables are changing
877  * calling this function for a non-multi-aggregated variable is not allowed
878  */
879 extern
881  SCIP_VAR* var, /**< problem variable */
882  SCIP_SET* set /**< global SCIP settings */
883  );
884 
885 /** for a multi-aggregated variable, gives the global upper bound computed by adding the global bounds from all aggregation variables
886  * this upper bound may be tighter than the one given by SCIPvarGetUbGlobal, since the latter is not updated if bounds of aggregation variables are changing
887  * calling this function for a non-multi-aggregated variable is not allowed
888  */
889 extern
891  SCIP_VAR* var, /**< problem variable */
892  SCIP_SET* set /**< global SCIP settings */
893  );
894 
895 /** adds a hole to the original domain of the variable*/
896 extern
898  SCIP_VAR* var, /**< problem variable */
899  BMS_BLKMEM* blkmem, /**< block memory */
900  SCIP_SET* set, /**< global SCIP settings */
901  SCIP_Real left, /**< left bound of open interval in new hole */
902  SCIP_Real right /**< right bound of open interval in new hole */
903  );
904 
905 /** adds a hole to the variable's global domain */
906 extern
908  SCIP_VAR* var, /**< problem variable */
909  BMS_BLKMEM* blkmem, /**< block memory */
910  SCIP_SET* set, /**< global SCIP settings */
911  SCIP_STAT* stat, /**< problem statistics */
912  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
913  SCIP_Real left, /**< left bound of open interval in new hole */
914  SCIP_Real right, /**< right bound of open interval in new hole */
915  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
916  );
917 
918 /** adds a hole to the variable's current local domain */
919 extern
921  SCIP_VAR* var, /**< problem variable */
922  BMS_BLKMEM* blkmem, /**< block memory */
923  SCIP_SET* set, /**< global SCIP settings */
924  SCIP_STAT* stat, /**< problem statistics */
925  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
926  SCIP_Real left, /**< left bound of open interval in new hole */
927  SCIP_Real right, /**< right bound of open interval in new hole */
928  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
929  );
930 
931 /** resets the global and local bounds of original variable to their original values */
932 extern
934  SCIP_VAR* var, /**< problem variable */
935  BMS_BLKMEM* blkmem, /**< block memory */
936  SCIP_SET* set, /**< global SCIP settings */
937  SCIP_STAT* stat /**< problem statistics */
938  );
939 
940 /** returns at which depth in the tree a bound change was applied to the variable that conflicts with the
941  * given bound; returns -1 if the bound does not conflict with the current local bounds of the variable
942  */
943 extern
945  SCIP_VAR* var, /**< problem variable */
946  SCIP_SET* set, /**< global SCIP settings */
947  SCIP_BOUNDTYPE boundtype, /**< bound type of the conflicting bound */
948  SCIP_Real bound /**< conflicting bound */
949  );
950 
951 /** informs variable x about a globally valid variable lower bound x >= b*z + d with integer variable z;
952  * if z is binary, the corresponding valid implication for z is also added;
953  * improves the global bounds of the variable and the vlb variable if possible
954  */
955 extern
957  SCIP_VAR* var, /**< problem variable */
958  BMS_BLKMEM* blkmem, /**< block memory */
959  SCIP_SET* set, /**< global SCIP settings */
960  SCIP_STAT* stat, /**< problem statistics */
961  SCIP_PROB* transprob, /**< transformed problem */
962  SCIP_PROB* origprob, /**< original problem */
963  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
964  SCIP_REOPT* reopt, /**< reoptimization data structure */
965  SCIP_LP* lp, /**< current LP data */
966  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
967  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
968  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
969  SCIP_VAR* vlbvar, /**< variable z in x >= b*z + d */
970  SCIP_Real vlbcoef, /**< coefficient b in x >= b*z + d */
971  SCIP_Real vlbconstant, /**< constant d in x >= b*z + d */
972  SCIP_Bool transitive, /**< should transitive closure of implication also be added? */
973  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
974  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
975  );
976 
977 /** informs variable x about a globally valid variable upper bound x <= b*z + d with integer variable z;
978  * if z is binary, the corresponding valid implication for z is also added;
979  * updates the global bounds of the variable and the vub variable correspondingly
980  */
981 extern
983  SCIP_VAR* var, /**< problem variable */
984  BMS_BLKMEM* blkmem, /**< block memory */
985  SCIP_SET* set, /**< global SCIP settings */
986  SCIP_STAT* stat, /**< problem statistics */
987  SCIP_PROB* transprob, /**< transformed problem */
988  SCIP_PROB* origprob, /**< original problem */
989  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
990  SCIP_REOPT* reopt, /**< reoptimization data structure */
991  SCIP_LP* lp, /**< current LP data */
992  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
993  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
994  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
995  SCIP_VAR* vubvar, /**< variable z in x <= b*z + d */
996  SCIP_Real vubcoef, /**< coefficient b in x <= b*z + d */
997  SCIP_Real vubconstant, /**< constant d in x <= b*z + d */
998  SCIP_Bool transitive, /**< should transitive closure of implication also be added? */
999  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
1000  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
1001  );
1002 
1003 /** informs binary variable x about a globally valid implication: x == 0 or x == 1 ==> y <= b or y >= b;
1004  * also adds the corresponding implication or variable bound to the implied variable;
1005  * if the implication is conflicting, the variable is fixed to the opposite value;
1006  * if the variable is already fixed to the given value, the implication is performed immediately;
1007  * if the implication is redundant with respect to the variables' global bounds, it is ignored
1008  */
1009 extern
1011  SCIP_VAR* var, /**< problem variable */
1012  BMS_BLKMEM* blkmem, /**< block memory */
1013  SCIP_SET* set, /**< global SCIP settings */
1014  SCIP_STAT* stat, /**< problem statistics */
1015  SCIP_PROB* transprob, /**< transformed problem */
1016  SCIP_PROB* origprob, /**< original problem */
1017  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
1018  SCIP_REOPT* reopt, /**< reoptimization data structure */
1019  SCIP_LP* lp, /**< current LP data */
1020  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1021  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
1022  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
1023  SCIP_Bool varfixing, /**< FALSE if y should be added in implications for x == 0, TRUE for x == 1 */
1024  SCIP_VAR* implvar, /**< variable y in implication y <= b or y >= b */
1025  SCIP_BOUNDTYPE impltype, /**< type of implication y <= b (SCIP_BOUNDTYPE_UPPER) or y >= b (SCIP_BOUNDTYPE_LOWER) */
1026  SCIP_Real implbound, /**< bound b in implication y <= b or y >= b */
1027  SCIP_Bool transitive, /**< should transitive closure of implication also be added? */
1028  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
1029  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
1030  );
1031 
1032 /** fixes the bounds of a binary variable to the given value, counting bound changes and detecting infeasibility */
1033 extern
1035  SCIP_VAR* var, /**< problem variable */
1036  BMS_BLKMEM* blkmem, /**< block memory */
1037  SCIP_SET* set, /**< global SCIP settings */
1038  SCIP_STAT* stat, /**< problem statistics */
1039  SCIP_PROB* transprob, /**< transformed problem */
1040  SCIP_PROB* origprob, /**< original problem */
1041  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
1042  SCIP_REOPT* reopt, /**< reoptimization data structure */
1043  SCIP_LP* lp, /**< current LP data */
1044  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
1045  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
1046  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1047  SCIP_Bool value, /**< value to fix variable to */
1048  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
1049  int* nbdchgs /**< pointer to count the number of performed bound changes, or NULL */
1050  );
1051 
1052 /** adds the variable to the given clique and updates the list of cliques the binary variable is member of;
1053  * if the variable now appears twice in the clique with the same value, it is fixed to the opposite value;
1054  * if the variable now appears twice in the clique with opposite values, all other variables are fixed to
1055  * the opposite of the value they take in the clique
1056  */
1057 extern
1059  SCIP_VAR* var, /**< problem variable */
1060  BMS_BLKMEM* blkmem, /**< block memory */
1061  SCIP_SET* set, /**< global SCIP settings */
1062  SCIP_STAT* stat, /**< problem statistics */
1063  SCIP_PROB* transprob, /**< transformed problem */
1064  SCIP_PROB* origprob, /**< original problem */
1065  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
1066  SCIP_REOPT* reopt, /**< reoptimization data structure */
1067  SCIP_LP* lp, /**< current LP data */
1068  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
1069  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
1070  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1071  SCIP_Bool value, /**< value of the variable in the clique */
1072  SCIP_CLIQUE* clique, /**< clique the variable should be added to */
1073  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
1074  int* nbdchgs /**< pointer to count the number of performed bound changes, or NULL */
1075  );
1076 
1077 /** adds a filled clique to the cliquelists of all corresponding variables */
1078 extern
1080  SCIP_VAR** vars, /**< problem variables */
1081  SCIP_Bool* values, /**< values of the variables in the clique */
1082  int nvars, /**< number of problem variables */
1083  BMS_BLKMEM* blkmem, /**< block memory */
1084  SCIP_SET* set, /**< global SCIP settings */
1085  SCIP_CLIQUE* clique /**< clique that contains all given variables and values */
1086  );
1087 
1088 /** deletes the variable from the given clique and updates the list of cliques the binary variable is member of */
1089 extern
1091  SCIP_VAR* var, /**< problem variable */
1092  BMS_BLKMEM* blkmem, /**< block memory */
1093  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1094  SCIP_Bool value, /**< value of the variable in the clique */
1095  SCIP_CLIQUE* clique /**< clique the variable should be removed from */
1096  );
1097 
1098 /** adds a clique to the list of cliques of the given binary variable, but does not change the clique
1099  * itself
1100  */
1101 extern
1103  SCIP_VAR* var, /**< problem variable */
1104  BMS_BLKMEM* blkmem, /**< block memory */
1105  SCIP_SET* set, /**< global SCIP settings */
1106  SCIP_Bool value, /**< value of the variable in the clique */
1107  SCIP_CLIQUE* clique /**< clique that should be removed from the variable's clique list */
1108  );
1109 
1110 /** deletes a clique from the list of cliques the binary variable is member of, but does not change the clique
1111  * itself
1112  */
1113 extern
1115  SCIP_VAR* var, /**< problem variable */
1116  BMS_BLKMEM* blkmem, /**< block memory */
1117  SCIP_Bool value, /**< value of the variable in the clique */
1118  SCIP_CLIQUE* clique /**< clique that should be removed from the variable's clique list */
1119  );
1120 
1121 /** sets the branch factor of the variable; this value can be used in the branching methods to scale the score
1122  * values of the variables; higher factor leads to a higher probability that this variable is chosen for branching
1123  */
1124 extern
1126  SCIP_VAR* var, /**< problem variable */
1127  SCIP_SET* set, /**< global SCIP settings */
1128  SCIP_Real branchfactor /**< factor to weigh variable's branching score with */
1129  );
1130 
1131 /** sets the branch priority of the variable; variables with higher branch priority are always preferred to variables
1132  * with lower priority in selection of branching variable
1133  */
1134 extern
1136  SCIP_VAR* var, /**< problem variable */
1137  int branchpriority /**< branching priority of the variable */
1138  );
1139 
1140 /** sets the branch direction of the variable; variables with higher branch direction are always preferred to variables
1141  * with lower direction in selection of branching variable
1142  */
1143 extern
1145  SCIP_VAR* var, /**< problem variable */
1146  SCIP_BRANCHDIR branchdirection /**< preferred branch direction of the variable (downwards, upwards, auto) */
1147  );
1148 
1149 /** gets objective value of variable in current SCIP_LP; the value can be different from the bound stored in the variable's own
1150  * data due to diving, that operate only on the LP without updating the variables
1151  */
1152 extern
1154  SCIP_VAR* var /**< problem variable */
1155  );
1156 
1157 /** gets lower bound of variable in current SCIP_LP; the bound can be different from the bound stored in the variable's own
1158  * data due to diving or conflict analysis, that operate only on the LP without updating the variables
1159  */
1160 extern
1162  SCIP_VAR* var, /**< problem variable */
1163  SCIP_SET* set /**< global SCIP settings */
1164  );
1165 
1166 /** gets upper bound of variable in current SCIP_LP; the bound can be different from the bound stored in the variable's own
1167  * data due to diving or conflict analysis, that operate only on the LP without updating the variables
1168  */
1169 extern
1171  SCIP_VAR* var, /**< problem variable */
1172  SCIP_SET* set /**< global SCIP settings */
1173  );
1174 
1175 /** returns solution value and index of variable lower bound that is closest to the variable's value in the given primal solution
1176  * or current LP solution if no primal solution is given; returns an index of -1 if no variable lower bound is available
1177  */
1178 extern
1180  SCIP_VAR* var, /**< active problem variable */
1181  SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
1182  SCIP_SET* set, /**< global SCIP settings */
1183  SCIP_STAT* stat, /**< problem statistics */
1184  SCIP_Real* closestvlb, /**< pointer to store the value of the closest variable lower bound */
1185  int* closestvlbidx /**< pointer to store the index of the closest variable lower bound */
1186  );
1187 
1188 /** returns solution value and index of variable upper bound that is closest to the variable's value in the given primal solution;
1189  * or current LP solution if no primal solution is given; returns an index of -1 if no variable upper bound is available
1190  */
1191 extern
1193  SCIP_VAR* var, /**< active problem variable */
1194  SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
1195  SCIP_SET* set, /**< global SCIP settings */
1196  SCIP_STAT* stat, /**< problem statistics */
1197  SCIP_Real* closestvub, /**< pointer to store the value of the closest variable upper bound */
1198  int* closestvubidx /**< pointer to store the index of the closest variable upper bound */
1199  );
1200 
1201 /** remembers the current solution as root solution in the problem variables */
1202 extern
1203 void SCIPvarStoreRootSol(
1204  SCIP_VAR* var, /**< problem variable */
1205  SCIP_Bool roothaslp /**< is the root solution from LP? */
1206  );
1207 
1208 /** updates the current solution as best root solution in the problem variables if it is better */
1209 extern
1211  SCIP_VAR* var, /**< problem variable */
1212  SCIP_SET* set, /**< global SCIP settings */
1213  SCIP_Real rootsol, /**< root solution value */
1214  SCIP_Real rootredcost, /**< root reduced cost */
1215  SCIP_Real rootlpobjval /**< objective value of the root LP */
1216  );
1217 
1218 /** returns the solution value of the problem variables in the relaxation solution */
1219 extern
1221  SCIP_VAR* var, /**< problem variable */
1222  SCIP_SET* set /**< global SCIP settings */
1223  );
1224 
1225 /** returns the solution value of the transformed problem variable in the relaxation solution */
1226 extern
1228  SCIP_VAR* var /**< problem variable */
1229  );
1230 
1231 /** returns for the given binary variable the reduced cost which are given by the variable itself and its implication if
1232  * the binary variable is fixed to the given value
1233  */
1234 extern
1236  SCIP_VAR* var, /**< problem variable */
1237  SCIP_SET* set, /**< global SCIP settings */
1238  SCIP_Bool varfixing, /**< FALSE if for x == 0, TRUE for x == 1 */
1239  SCIP_STAT* stat, /**< problem statistics */
1240  SCIP_PROB* prob, /**< transformed problem, or NULL */
1241  SCIP_LP* lp /**< current LP data */
1242  );
1243 
1244 
1245 /** stores the solution value as relaxation solution in the problem variable */
1246 extern
1248  SCIP_VAR* var, /**< problem variable */
1249  SCIP_SET* set, /**< global SCIP settings */
1250  SCIP_RELAXATION* relaxation, /**< global relaxation data */
1251  SCIP_Real solval, /**< solution value in the current relaxation solution */
1252  SCIP_Bool updateobj /**< should the objective value be updated? */
1253  );
1254 
1255 /** stores the solution value as NLP solution in the problem variable */
1256 extern
1258  SCIP_VAR* var, /**< problem variable */
1259  SCIP_SET* set, /**< global SCIP settings */
1260  SCIP_Real solval /**< solution value in the current NLP solution */
1261  );
1262 
1263 /** resolves variable to columns and adds them with the coefficient to the row */
1264 extern
1266  SCIP_VAR* var, /**< problem variable */
1267  BMS_BLKMEM* blkmem, /**< block memory */
1268  SCIP_SET* set, /**< global SCIP settings */
1269  SCIP_STAT* stat, /**< problem statistics */
1270  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
1271  SCIP_PROB* prob, /**< problem data */
1272  SCIP_LP* lp, /**< current LP data */
1273  SCIP_ROW* row, /**< LP row */
1274  SCIP_Real val /**< value of coefficient */
1275  );
1276 
1277 
1278 /** merge two variable histories together; a typical use case is that \p othervar is an image of the target variable
1279  * in a SCIP copy. Method should be applied with care, especially because no internal checks are performed whether
1280  * the history merge is reasonable
1281  *
1282  * @note Do not use this method if the two variables originate from two SCIP's with different objective functions, since
1283  * this corrupts the variable pseudo costs
1284  * @note Apply with care; no internal checks are performed if the two variables should be merged
1285  */
1286 extern
1288  SCIP_VAR* targetvar, /**< the variable that should contain both histories afterwards */
1289  SCIP_VAR* othervar, /**< the variable whose history is to be merged with that of the target variable */
1290  SCIP_STAT* stat /**< problem statistics */
1291  );
1292 
1293 /** sets the history of a variable; this method is typacally used within reoptimization to keep and update the variable
1294  * history over several iteraions
1295  */
1296 extern
1297 void SCIPvarSetHistory(
1298  SCIP_VAR* var, /**< variable */
1299  SCIP_HISTORY* history, /**< the history which is to set */
1300  SCIP_STAT* stat /**< problem statistics */
1301  );
1302 
1303 /** updates the pseudo costs of the given variable and the global pseudo costs after a change of
1304  * "solvaldelta" in the variable's solution value and resulting change of "objdelta" in the in the LP's objective value
1305  */
1306 extern
1308  SCIP_VAR* var, /**< problem variable */
1309  SCIP_SET* set, /**< global SCIP settings */
1310  SCIP_STAT* stat, /**< problem statistics */
1311  SCIP_Real solvaldelta, /**< difference of variable's new LP value - old LP value */
1312  SCIP_Real objdelta, /**< difference of new LP's objective value - old LP's objective value */
1313  SCIP_Real weight /**< weight in (0,1] of this update in pseudo cost sum */
1314  );
1315 
1316 /** gets the variable's pseudo cost value for the given step size "solvaldelta" in the variable's LP solution value */
1317 extern
1319  SCIP_VAR* var, /**< problem variable */
1320  SCIP_STAT* stat, /**< problem statistics */
1321  SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
1322  );
1323 
1324 /** gets the variable's pseudo cost value for the given step size "solvaldelta" in the variable's LP solution value,
1325  * only using the pseudo cost information of the current run
1326  */
1327 extern
1329  SCIP_VAR* var, /**< problem variable */
1330  SCIP_STAT* stat, /**< problem statistics */
1331  SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
1332  );
1333 
1334 /** gets the variable's (possible fractional) number of pseudo cost updates for the given direction */
1335 extern
1337  SCIP_VAR* var, /**< problem variable */
1338  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1339  );
1340 
1341 /** gets the variable's (possible fractional) number of pseudo cost updates for the given direction,
1342  * only using the pseudo cost information of the current run
1343  */
1344 extern
1346  SCIP_VAR* var, /**< problem variable */
1347  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1348  );
1349 
1350 
1351 /** compares both possible directions for rounding the given solution value and returns the minimum pseudo-costs of the variable */
1353  SCIP_VAR* var, /**< problem variable */
1354  SCIP_STAT* stat, /**< problem statistics */
1355  SCIP_SET* set, /**< global SCIP settings */
1356  SCIP_Real solval /**< solution value, e.g., LP solution value */
1357  );
1358 
1359 /** gets the an estimate of the variable's pseudo cost variance in direction \p dir */
1360 extern
1362  SCIP_VAR* var, /**< problem variable */
1363  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1364  SCIP_Bool onlycurrentrun /**< return pseudo cost variance only for current branch and bound run */
1365  );
1366 
1367 /** calculates a confidence bound for this variable under the assumption of normally distributed pseudo costs
1368  *
1369  * The confidence bound \f$ \theta \geq 0\f$ denotes the interval borders \f$ [X - \theta, \ X + \theta]\f$, which contains
1370  * the true pseudo costs of the variable, i.e., the expected value of the normal distribution, with a probability
1371  * of 95 %.
1372  *
1373  * @return value of confidence bound for this variable
1374  */
1375 extern
1377  SCIP_VAR* var, /**< variable in question */
1378  SCIP_SET* set, /**< global SCIP settings */
1379  SCIP_BRANCHDIR dir, /**< the branching direction for the confidence bound */
1380  SCIP_Bool onlycurrentrun, /**< should only the current run be taken into account */
1381  SCIP_CONFIDENCELEVEL clevel /**< confidence level for the interval */
1382  );
1383 
1384 /** check if the current pseudo cost relative error in a direction violates the given threshold. The Relative
1385  * Error is calculated at a specific confidence level
1386  */
1387 extern
1389  SCIP_VAR* var, /**< variable in question */
1390  SCIP_SET* set, /**< global SCIP settings */
1391  SCIP_STAT* stat, /**< problem statistics */
1392  SCIP_Real threshold, /**< threshold for relative errors to be considered reliable (enough) */
1393  SCIP_CONFIDENCELEVEL clevel /**< a given confidence level */
1394  );
1395 
1396 /** check if variable pseudo-costs have a significant difference in location. The significance depends on
1397  * the choice of \p clevel and on the kind of tested hypothesis. The one-sided hypothesis, which
1398  * should be rejected, is that fracy * mu_y >= fracx * mu_x, where mu_y and mu_x denote the
1399  * unknown location means of the underlying pseudo-cost distributions of x and y.
1400  *
1401  * This method is applied best if variable x has a better pseudo-cost score than y. The method hypothesizes that y were actually
1402  * better than x (despite the current information), meaning that y can be expected to yield branching
1403  * decisions as least as good as x in the long run. If the method returns TRUE, the current history information is
1404  * sufficient to safely rely on the alternative hypothesis that x yields indeed a better branching score (on average)
1405  * than y.
1406  *
1407  * @note The order of x and y matters for the one-sided hypothesis
1408  *
1409  * @note set \p onesided to FALSE if you are not sure which variable is better. The hypothesis tested then reads
1410  * fracy * mu_y == fracx * mu_x vs the alternative hypothesis fracy * mu_y != fracx * mu_x.
1411  *
1412  * @return TRUE if the hypothesis can be safely rejected at the given confidence level
1413  */
1414 extern
1416  SCIP_SET* set, /**< global SCIP settings */
1417  SCIP_STAT* stat, /**< problem statistics */
1418  SCIP_VAR* varx, /**< variable x */
1419  SCIP_Real fracx, /**< the fractionality of variable x */
1420  SCIP_VAR* vary, /**< variable y */
1421  SCIP_Real fracy, /**< the fractionality of variable y */
1422  SCIP_BRANCHDIR dir, /**< branching direction */
1423  SCIP_CONFIDENCELEVEL clevel, /**< confidence level for rejecting hypothesis */
1424  SCIP_Bool onesided /**< should a one-sided hypothesis y >= x be tested? */
1425  );
1426 
1427 /** tests at a given confidence level whether the variable pseudo-costs only have a small probability to
1428  * exceed a \p threshold. This is useful to determine if past observations provide enough evidence
1429  * to skip an expensive strong-branching step if there is already a candidate that has been proven to yield an improvement
1430  * of at least \p threshold.
1431  *
1432  * @note use \p clevel to adjust the level of confidence. For SCIP_CONFIDENCELEVEL_MIN, the method returns TRUE if
1433  * the estimated probability to exceed \p threshold is less than 25 %.
1434  *
1435  * @see SCIP_Confidencelevel for a list of available levels. The used probability limits refer to the one-sided levels
1436  * of confidence.
1437  *
1438  * @return TRUE if the variable pseudo-cost probabilistic model is likely to be smaller than \p threshold
1439  * at the given confidence level \p clevel.
1440  */
1441 extern
1443  SCIP_SET* set, /**< global SCIP settings */
1444  SCIP_STAT* stat, /**< problem statistics */
1445  SCIP_VAR* var, /**< variable x */
1446  SCIP_Real frac, /**< the fractionality of variable x */
1447  SCIP_Real threshold, /**< the threshold to test against */
1448  SCIP_BRANCHDIR dir, /**< branching direction */
1449  SCIP_CONFIDENCELEVEL clevel /**< confidence level for rejecting hypothesis */
1450  );
1451 
1452 /** increases the VSIDS of the variable by the given weight */
1453 extern
1455  SCIP_VAR* var, /**< problem variable */
1456  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1457  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1458  SCIP_STAT* stat, /**< problem statistics */
1459  SCIP_BRANCHDIR dir, /**< branching direction */
1460  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1461  SCIP_Real weight /**< weight of this update in conflict score */
1462  );
1463 
1464 /** scales the VSIDS of the variable by the given scalar */
1465 extern
1467  SCIP_VAR* var, /**< problem variable */
1468  SCIP_Real scalar /**< scalar to multiply the conflict scores with */
1469  );
1470 
1471 /** increases the number of active conflicts by one and the overall length of the variable by the given length */
1473  SCIP_VAR* var, /**< problem variable */
1474  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1475  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1476  SCIP_STAT* stat, /**< problem statistics */
1477  SCIP_BRANCHDIR dir, /**< branching direction */
1478  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1479  SCIP_Real length /**< length of the conflict */
1480  );
1481 
1482 /** gets the number of active conflicts containing this variable in given direction */
1484  SCIP_VAR* var, /**< problem variable */
1485  SCIP_STAT* stat, /**< problem statistics */
1486  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1487  );
1488 
1489 /** gets the number of active conflicts containing this variable in given direction
1490  * in the current run
1491  */
1493  SCIP_VAR* var, /**< problem variable */
1494  SCIP_STAT* stat, /**< problem statistics */
1495  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1496  );
1497 
1498 /** gets the average conflict length in given direction due to branching on the variable */
1500  SCIP_VAR* var, /**< problem variable */
1501  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1502  );
1503 
1504 /** gets the average conflict length in given direction due to branching on the variable
1505  * in the current run
1506  */
1508  SCIP_VAR* var, /**< problem variable */
1509  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1510  );
1511 
1512 /** increases the number of branchings counter of the variable */
1513 extern
1515  SCIP_VAR* var, /**< problem variable */
1516  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1517  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1518  SCIP_STAT* stat, /**< problem statistics */
1519  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1520  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1521  int depth /**< depth at which the bound change took place */
1522  );
1523 
1524 /** increases the inference score of the variable by the given weight */
1525 extern
1527  SCIP_VAR* var, /**< problem variable */
1528  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1529  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1530  SCIP_STAT* stat, /**< problem statistics */
1531  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1532  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1533  SCIP_Real weight /**< weight of this update in inference score */
1534  );
1535 
1536 /** increases the cutoff score of the variable by the given weight */
1537 extern
1539  SCIP_VAR* var, /**< problem variable */
1540  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1541  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1542  SCIP_STAT* stat, /**< problem statistics */
1543  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1544  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1545  SCIP_Real weight /**< weight of this update in cutoff score */
1546  );
1547 
1548 /** returns the variable's VSIDS score */
1549 extern
1551  SCIP_VAR* var, /**< problem variable */
1552  SCIP_STAT* stat, /**< problem statistics */
1553  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1554  );
1555 
1556 /** returns the variable's VSIDS score only using conflicts of the current run */
1557 extern
1559  SCIP_VAR* var, /**< problem variable */
1560  SCIP_STAT* stat, /**< problem statistics */
1561  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1562  );
1563 
1564 /** returns the average number of inferences found after branching on the variable in given direction */
1565 extern
1567  SCIP_VAR* var, /**< problem variable */
1568  SCIP_STAT* stat, /**< problem statistics */
1569  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1570  );
1571 
1572 /** returns the average number of inferences found after branching on the variable in given direction
1573  * in the current run
1574  */
1575 extern
1577  SCIP_VAR* var, /**< problem variable */
1578  SCIP_STAT* stat, /**< problem statistics */
1579  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1580  );
1581 
1582 /** returns the average number of cutoffs found after branching on the variable in given direction */
1583 extern
1585  SCIP_VAR* var, /**< problem variable */
1586  SCIP_STAT* stat, /**< problem statistics */
1587  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1588  );
1589 
1590 /** returns the average number of cutoffs found after branching on the variable in given direction in the current run */
1591 extern
1593  SCIP_VAR* var, /**< problem variable */
1594  SCIP_STAT* stat, /**< problem statistics */
1595  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1596  );
1597 
1598 /** outputs variable information into file stream */
1599 extern
1601  SCIP_VAR* var, /**< problem variable */
1602  SCIP_SET* set, /**< global SCIP settings */
1603  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
1604  FILE* file /**< output file (or NULL for standard output) */
1605  );
1606 
1607 /** includes event handler with given data in variable's event filter */
1608 extern
1610  SCIP_VAR* var, /**< problem variable */
1611  BMS_BLKMEM* blkmem, /**< block memory */
1612  SCIP_SET* set, /**< global SCIP settings */
1613  SCIP_EVENTTYPE eventtype, /**< event type to catch */
1614  SCIP_EVENTHDLR* eventhdlr, /**< event handler to call for the event processing */
1615  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler for the event processing */
1616  int* filterpos /**< pointer to store position of event filter entry, or NULL */
1617  );
1618 
1619 /** deletes event handler with given data from variable's event filter */
1620 extern
1622  SCIP_VAR* var, /**< problem variable */
1623  BMS_BLKMEM* blkmem, /**< block memory */
1624  SCIP_SET* set, /**< global SCIP settings */
1625  SCIP_EVENTTYPE eventtype, /**< event type mask of dropped event */
1626  SCIP_EVENTHDLR* eventhdlr, /**< event handler to call for the event processing */
1627  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler for the event processing */
1628  int filterpos /**< position of event filter entry returned by SCIPvarCatchEvent(), or -1 */
1629  );
1630 
1631 /** returns the variable's VSIDS score */
1632 extern
1634  SCIP_VAR* var, /**< problem variable */
1635  SCIP_STAT* stat, /**< problem statistics */
1636  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1637  );
1638 
1639 /** returns the position of the bound change index */
1640 extern
1641 int SCIPbdchgidxGetPos(
1642  SCIP_BDCHGIDX* bdchgidx /**< bound change index */
1643  );
1644 
1645 /** removes (redundant) cliques, implications and variable bounds of variable from all other variables' implications and variable
1646  * bounds arrays, and optionally removes them also from the variable itself
1647  */
1648 extern
1650  SCIP_VAR* var, /**< problem variable */
1651  BMS_BLKMEM* blkmem, /**< block memory */
1652  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1653  SCIP_SET* set, /**< global SCIP settings */
1654  SCIP_Bool irrelevantvar, /**< has the variable become irrelevant? */
1655  SCIP_Bool onlyredundant, /**< should only the redundant implications and variable bounds be removed? */
1656  SCIP_Bool removefromvar /**< should the implications and variable bounds be removed from the var itself? */
1657  );
1658 
1659 /** sets the index of the connected component of the clique graph that the variable belongs to, or -1 if not computed */
1660 extern
1662  SCIP_VAR* var, /**< problem variable */
1663  int idx /**< clique component index of this variable */
1664  );
1665 
1666 #ifdef NDEBUG
1667 
1668 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
1669  * speed up the algorithms.
1670  */
1671 
1672 #define SCIPvarCatchEvent(var, blkmem, set, eventtype, eventhdlr, eventdata, filterpos) \
1673  SCIPeventfilterAdd(var->eventfilter, blkmem, set, eventtype, eventhdlr, eventdata, filterpos)
1674 #define SCIPvarDropEvent(var, blkmem, set, eventtype, eventhdlr, eventdata, filterpos) \
1675  SCIPeventfilterDel(var->eventfilter, blkmem, set, eventtype, eventhdlr, eventdata, filterpos)
1676 #define SCIPvarGetVSIDS(var, stat, dir) ((var)->varstatus == SCIP_VARSTATUS_LOOSE || (var)->varstatus == SCIP_VARSTATUS_COLUMN ? \
1677  SCIPhistoryGetVSIDS(var->history, dir)/stat->vsidsweight : SCIPvarGetVSIDS_rec(var, stat, dir))
1678 #define SCIPbdchgidxGetPos(bdchgidx) ((bdchgidx)->pos)
1679 
1680 #endif
1681 
1682 /*
1683  * Hash functions
1684  */
1685 
1686 /** gets the key (i.e. the name) of the given variable */
1687 extern
1688 SCIP_DECL_HASHGETKEY(SCIPhashGetKeyVar);
1689 
1690 #ifdef __cplusplus
1691 }
1692 #endif
1693 
1694 #endif
SCIP_Real SCIPvarGetRelaxSolTransVar(SCIP_VAR *var)
Definition: var.c:13297
SCIP_RETCODE SCIPvarColumn(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_LP *lp)
Definition: var.c:3402
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_RETCODE SCIPvarChgBdLocal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype)
Definition: var.c:7752
SCIP_RETCODE SCIPvarChgBdGlobal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype)
Definition: var.c:7053
internal methods for managing events
int SCIPbdchgidxGetPos(SCIP_BDCHGIDX *bdchgidx)
Definition: var.c:17718
SCIP_RETCODE SCIPvarAddVlb(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_CLIQUETABLE *cliquetable, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *vlbvar, SCIP_Real vlbcoef, SCIP_Real vlbconstant, SCIP_Bool transitive, SCIP_Bool *infeasible, int *nbdchgs)
Definition: var.c:9530
SCIP_Real SCIPvarGetPseudocostCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_Real solvaldelta)
Definition: var.c:13826
SCIP_RETCODE SCIPdomchgApply(SCIP_DOMCHG *domchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, int depth, SCIP_Bool *cutoff)
Definition: var.c:1222
SCIP_RETCODE SCIPvarChgLbLocal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Real newbound)
Definition: var.c:7501
void SCIPvarCapture(SCIP_VAR *var)
Definition: var.c:2753
type definitions for miscellaneous datastructures
SCIP_RETCODE SCIPvarsGetActiveVars(SCIP_SET *set, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize)
Definition: var.c:11313
SCIP_RETCODE SCIPvarPrint(SCIP_VAR *var, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: var.c:2886
SCIP_Real SCIPvarGetAvgCutoffs(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15559
#define SCIP_DECL_VARTRANS(x)
Definition: type_var.h:129
void SCIPvarSetHistory(SCIP_VAR *var, SCIP_HISTORY *history, SCIP_STAT *stat)
Definition: var.c:4217
SCIP_RETCODE SCIPvarCreateOriginal(SCIP_VAR **var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
Definition: var.c:1993
SCIP_RETCODE SCIPdomchgMakeStatic(SCIP_DOMCHG **domchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: var.c:1084
void SCIPvarInitSolve(SCIP_VAR *var)
Definition: var.c:2810
SCIP_RETCODE SCIPvarTryAggregateVars(SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_CLIQUETABLE *cliquetable, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
Definition: var.c:4937
SCIP_RETCODE SCIPvarChgBranchDirection(SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
Definition: var.c:11126
SCIP_Real SCIPvarGetVSIDSCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15228
SCIP_DECL_HASHGETKEY(SCIPhashGetKeyVar)
Definition: var.c:16312
SCIP_RETCODE SCIPvarChgObj(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_Real newobj)
Definition: var.c:5801
void SCIPbdchginfoFree(SCIP_BDCHGINFO **bdchginfo, BMS_BLKMEM *blkmem)
Definition: var.c:15690
static long bound
SCIP_RETCODE SCIPvarRelease(SCIP_VAR **var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: var.c:2765
SCIP_Longint SCIPvarGetNActiveConflictsCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:14617
SCIP_Real SCIPvarGetRelaxSol(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:13225
SCIP_RETCODE SCIPvarIncVSIDS(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Real weight)
Definition: var.c:14353
SCIP_RETCODE SCIPvarResetBounds(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: var.c:8760
SCIP_RETCODE SCIPvarAddHoleLocal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_Real left, SCIP_Real right, SCIP_Bool *added)
Definition: var.c:8651
SCIP_RETCODE SCIPboundchgApply(SCIP_BOUNDCHG *boundchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, int depth, int pos, SCIP_Bool *cutoff)
Definition: var.c:550
void SCIPvarMarkDeleteGlobalStructures(SCIP_VAR *var)
Definition: var.c:16809
SCIP_Bool SCIPvarIsMarkedDeleteGlobalStructures(SCIP_VAR *var)
Definition: var.c:16819
struct SCIP_VarData SCIP_VARDATA
Definition: type_var.h:98
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPvarCopy(SCIP_VAR **var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP *sourcescip, SCIP_VAR *sourcevar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global)
Definition: var.c:2078
type definitions for global SCIP settings
#define SCIP_DECL_VARCOPY(x)
Definition: type_var.h:172
SCIP_Real SCIPvarGetMultaggrUbGlobal(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:8161
public methods for problem variables
SCIP_Bool SCIPvarPscostThresholdProbabilityTest(SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real frac, SCIP_Real threshold, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel)
Definition: var.c:14229
SCIP_RETCODE SCIPvarChgType(SCIP_VAR *var, SCIP_VARTYPE vartype)
Definition: var.c:5750
SCIP_Real SCIPvarGetImplRedcost(SCIP_VAR *var, SCIP_SET *set, SCIP_Bool varfixing, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_LP *lp)
Definition: var.c:12771
SCIP_Bool SCIPvarSignificantPscostDifference(SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *varx, SCIP_Real fracx, SCIP_VAR *vary, SCIP_Real fracy, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel, SCIP_Bool onesided)
Definition: var.c:14162
type definitions for return codes for SCIP methods
SCIP_Real SCIPvarGetMultaggrLbGlobal(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:8095
SCIP_RETCODE SCIPvarCreateTransformed(SCIP_VAR **var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
Definition: var.c:2036
SCIP_RETCODE SCIPvarChgUbOriginal(SCIP_VAR *var, SCIP_SET *set, SCIP_Real newbound)
Definition: var.c:6161
SCIP_RETCODE SCIPvarGetTransformed(SCIP_VAR *origvar, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR **transvar)
Definition: var.c:3371
type definitions for collecting reoptimization information
SCIP_RETCODE SCIPvarDelCliqueFromList(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_Bool value, SCIP_CLIQUE *clique)
Definition: var.c:10725
void SCIPvarAdjustUb(SCIP_VAR *var, SCIP_SET *set, SCIP_Real *ub)
Definition: var.c:6069
type definitions for branching rules
type definitions for problem statistics
SCIP_RETCODE SCIPvarAddVub(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_CLIQUETABLE *cliquetable, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *vubvar, SCIP_Real vubcoef, SCIP_Real vubconstant, SCIP_Bool transitive, SCIP_Bool *infeasible, int *nbdchgs)
Definition: var.c:9902
SCIP_RETCODE SCIPvarSetNLPSol(SCIP_VAR *var, SCIP_SET *set, SCIP_Real solval)
Definition: var.c:13308
SCIP_RETCODE SCIPvarRemove(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_CLIQUETABLE *cliquetable, SCIP_SET *set, SCIP_Bool final)
Definition: var.c:5668
SCIP_RETCODE SCIPvarAddObj(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTQUEUE *eventqueue, SCIP_Real addobj)
Definition: var.c:5876
#define SCIP_DECL_VARDELTRANS(x)
Definition: type_var.h:142
type definitions for LP management
SCIP_RETCODE SCIPvarIncInferenceSum(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Real weight)
Definition: var.c:14833
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
SCIP_Real SCIPbdchginfoGetRelaxedBound(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:17907
void SCIPvarMarkDeleted(SCIP_VAR *var)
Definition: var.c:5704
SCIP_RETCODE SCIPdomchgAddBoundchg(SCIP_DOMCHG **domchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_VAR *var, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype, SCIP_BOUNDCHGTYPE boundchgtype, SCIP_Real lpsolval, SCIP_VAR *infervar, SCIP_CONS *infercons, SCIP_PROP *inferprop, int inferinfo, SCIP_BOUNDTYPE inferboundtype)
Definition: var.c:1345
SCIP_Bool SCIPvarDoNotMultaggr(SCIP_VAR *var)
Definition: var.c:5492
SCIP_Real SCIPvarGetAvgInferences(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15361
SCIP_Real SCIPvarCalcPscostConfidenceBound(SCIP_VAR *var, SCIP_SET *set, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun, SCIP_CONFIDENCELEVEL clevel)
Definition: var.c:14047
enum SCIP_Confidencelevel SCIP_CONFIDENCELEVEL
Definition: type_misc.h:44
SCIP_Bool SCIPvarIsPscostRelerrorReliable(SCIP_VAR *var, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real threshold, SCIP_CONFIDENCELEVEL clevel)
Definition: var.c:14085
SCIP_RETCODE SCIPvarIncNActiveConflicts(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Real length)
Definition: var.c:14489
SCIP_Real SCIPvarGetPseudocostVariance(SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun)
Definition: var.c:13993
void SCIPvarGetClosestVlb(SCIP_VAR *var, SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *closestvlb, int *closestvlbidx)
Definition: var.c:13424
SCIP_RETCODE SCIPvarChgUbLazy(SCIP_VAR *var, SCIP_SET *set, SCIP_Real lazylb)
Definition: var.c:7027
SCIP_Real SCIPvarGetPseudocostCountCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:13918
SCIP_RETCODE SCIPvarAggregate(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_CLIQUETABLE *cliquetable, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *aggvar, SCIP_Real scalar, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
Definition: var.c:4422
SCIP_RETCODE SCIPvarAddCliqueToList(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Bool value, SCIP_CLIQUE *clique)
Definition: var.c:10703
SCIP_RETCODE SCIPvarParseOriginal(SCIP_VAR **var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, const char *str, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARCOPY((*varcopy)), SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_VARDATA *vardata, char **endptr, SCIP_Bool *success)
Definition: var.c:2404
SCIP_RETCODE SCIPvarGetProbvarSum(SCIP_VAR **var, SCIP_SET *set, SCIP_Real *scalar, SCIP_Real *constant)
Definition: var.c:11953
SCIP_RETCODE SCIPvarCatchEvent(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
Definition: var.c:17666
void SCIPvarSetNamePointer(SCIP_VAR *var, const char *name)
Definition: var.c:5650
SCIP_RETCODE SCIPvarUpdatePseudocost(SCIP_VAR *var, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
Definition: var.c:13679
struct SCIP_EventData SCIP_EVENTDATA
Definition: type_event.h:155
SCIP_Real SCIPvarGetLbLP(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:12238
SCIP_RETCODE SCIPvarMultiaggregate(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_CLIQUETABLE *cliquetable, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, int naggvars, SCIP_VAR **aggvars, SCIP_Real *scalars, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
Definition: var.c:5100
void SCIPvarSetCliqueComponentIdx(SCIP_VAR *var, int idx)
Definition: var.c:17655
SCIP_RETCODE SCIPvarDropEvent(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
Definition: var.c:17693
SCIP_RETCODE SCIPbdchginfoCreate(SCIP_BDCHGINFO **bdchginfo, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_Real oldbound, SCIP_Real newbound)
Definition: var.c:15660
SCIP_Real SCIPvarGetVSIDS_rec(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15179
SCIP_RETCODE SCIPvarChgLbDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newbound)
Definition: var.c:7778
SCIP_RETCODE SCIPvarChgBranchPriority(SCIP_VAR *var, int branchpriority)
Definition: var.c:10996
SCIP_Real SCIPvarGetAvgConflictlength(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:14662
type definitions for problem variables
SCIP_Real SCIPvarGetAvgInferencesCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15418
SCIP_Real SCIPvarGetObjLP(SCIP_VAR *var)
Definition: var.c:12192
type definitions for managing events
SCIP_RETCODE SCIPvarChgLbGlobal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Real newbound)
Definition: var.c:6720
SCIP_Real SCIPvarGetMultaggrUbLocal(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:8029
SCIP_Real SCIPvarGetPseudocost(SCIP_VAR *var, SCIP_STAT *stat, SCIP_Real solvaldelta)
Definition: var.c:13777
SCIP_RETCODE SCIPdomchgAddHolechg(SCIP_DOMCHG **domchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_HOLELIST **ptr, SCIP_HOLELIST *newlist, SCIP_HOLELIST *oldlist)
Definition: var.c:1442
void SCIPvarAdjustLb(SCIP_VAR *var, SCIP_SET *set, SCIP_Real *lb)
Definition: var.c:6052
public data structures and miscellaneous methods
#define SCIP_Bool
Definition: def.h:61
SCIP_RETCODE SCIPvarAddLocks(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, int addnlocksdown, int addnlocksup)
Definition: var.c:3047
SCIP_Real SCIPvarGetAvgConflictlengthCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:14706
SCIP_RETCODE SCIPdomchgUndo(SCIP_DOMCHG *domchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue)
Definition: var.c:1271
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
void SCIPvarGetClosestVub(SCIP_VAR *var, SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *closestvub, int *closestvubidx)
Definition: var.c:13499
SCIP_RETCODE SCIPvarFlattenAggregationGraph(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: var.c:4143
SCIP_RETCODE SCIPvarChgObjDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newobj)
Definition: var.c:5989
SCIP_Longint SCIPvarGetNActiveConflicts(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:14570
SCIP_RETCODE SCIPvarsAddClique(SCIP_VAR **vars, SCIP_Bool *values, int nvars, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CLIQUE *clique)
Definition: var.c:10665
SCIP_Real SCIPvarGetAvgCutoffsCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15606
type definitions for branch and bound tree
SCIP_RETCODE SCIPvarNegate(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR **negvar)
Definition: var.c:5527
SCIP_RETCODE SCIPvarChgName(SCIP_VAR *var, BMS_BLKMEM *blkmem, const char *name)
Definition: var.c:2792
type definitions for storing and manipulating the main problem
SCIP_Real SCIPvarGetMultaggrLbLocal(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:7963
SCIP_RETCODE SCIPvarRemoveCliquesImplicsVbs(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_CLIQUETABLE *cliquetable, SCIP_SET *set, SCIP_Bool irrelevantvar, SCIP_Bool onlyredundant, SCIP_Bool removefromvar)
Definition: var.c:1532
SCIP_RETCODE SCIPvarAddHoleOriginal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Real left, SCIP_Real right)
Definition: var.c:8222
SCIP_RETCODE SCIPvarParseTransformed(SCIP_VAR **var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, const char *str, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARCOPY((*varcopy)), SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_VARDATA *vardata, char **endptr, SCIP_Bool *success)
Definition: var.c:2468
void SCIPvarMergeHistories(SCIP_VAR *targetvar, SCIP_VAR *othervar, SCIP_STAT *stat)
Definition: var.c:4201
SCIP_RETCODE SCIPvarAddClique(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool value, SCIP_CLIQUE *clique, SCIP_Bool *infeasible, int *nbdchgs)
Definition: var.c:10580
#define SCIP_DECL_VARDELORIG(x)
Definition: type_var.h:109
void SCIPvarStoreRootSol(SCIP_VAR *var, SCIP_Bool roothaslp)
Definition: var.c:12573
SCIP_RETCODE SCIPvarIncNBranchings(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BRANCHDIR dir, SCIP_Real value, int depth)
Definition: var.c:14749
SCIP_RETCODE SCIPvarMarkDoNotMultaggr(SCIP_VAR *var)
Definition: var.c:5715
SCIP_Real SCIPvarGetPseudocostCount(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:13873
static const SCIP_Real scalars[]
Definition: lp.c:5563
SCIP_RETCODE SCIPvarChgUbLocal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Real newbound)
Definition: var.c:7627
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_visual.h:44
SCIP_RETCODE SCIPvarFix(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
Definition: var.c:3572
SCIP_Real SCIPvarGetUbLP(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:12308
datastructures for problem variables
#define SCIP_Real
Definition: def.h:135
SCIP_RETCODE SCIPvarChgLbLazy(SCIP_VAR *var, SCIP_SET *set, SCIP_Real lazylb)
Definition: var.c:7004
type definitions for branching and inference history
SCIP_RETCODE SCIPdomchgFree(SCIP_DOMCHG **domchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: var.c:983
SCIP_RETCODE SCIPvarChgLbOriginal(SCIP_VAR *var, SCIP_SET *set, SCIP_Real newbound)
Definition: var.c:6102
SCIP_RETCODE SCIPvarTransform(SCIP_VAR *origvar, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_OBJSENSE objsense, SCIP_VAR **transvar)
Definition: var.c:3290
SCIP_RETCODE SCIPvarAddHoleGlobal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_Real left, SCIP_Real right, SCIP_Bool *added)
Definition: var.c:8403
#define SCIP_Longint
Definition: def.h:120
SCIP_RETCODE SCIPvarLoose(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *prob, SCIP_LP *lp)
Definition: var.c:3436
SCIP_RETCODE SCIPvarScaleVSIDS(SCIP_VAR *var, SCIP_Real scalar)
Definition: var.c:14439
SCIP_RETCODE SCIPvarAddImplic(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_CLIQUETABLE *cliquetable, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool transitive, SCIP_Bool *infeasible, int *nbdchgs)
Definition: var.c:10257
void SCIPvarUpdateBestRootSol(SCIP_VAR *var, SCIP_SET *set, SCIP_Real rootsol, SCIP_Real rootredcost, SCIP_Real rootlpobjval)
Definition: var.c:12584
void SCIPvarSetProbindex(SCIP_VAR *var, int probindex)
Definition: var.c:5635
int SCIPvarGetConflictingBdchgDepth(SCIP_VAR *var, SCIP_SET *set, SCIP_BOUNDTYPE boundtype, SCIP_Real bound)
Definition: var.c:16180
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:60
SCIP_RETCODE SCIPvarIncCutoffSum(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Real weight)
Definition: var.c:14917
SCIP_Real SCIPvarGetMinPseudocostScore(SCIP_VAR *var, SCIP_STAT *stat, SCIP_SET *set, SCIP_Real solval)
Definition: var.c:13961
SCIP_RETCODE SCIPvarDelClique(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool value, SCIP_CLIQUE *clique)
Definition: var.c:10742
type definitions for collecting primal CIP solutions and primal informations
SCIP_RETCODE SCIPvarSetRelaxSol(SCIP_VAR *var, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_Real solval, SCIP_Bool updateobj)
Definition: var.c:13164
SCIP_RETCODE SCIPvarAddToRow(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_PROB *prob, SCIP_LP *lp, SCIP_ROW *row, SCIP_Real val)
Definition: var.c:13571
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPvarGetActiveRepresentatives(SCIP_SET *set, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
Definition: var.c:3741
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
SCIP_RETCODE SCIPboundchgUndo(SCIP_BOUNDCHG *boundchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue)
Definition: var.c:747
enum SCIP_BoundchgType SCIP_BOUNDCHGTYPE
Definition: type_var.h:78
void SCIPvarAdjustBd(SCIP_VAR *var, SCIP_SET *set, SCIP_BOUNDTYPE boundtype, SCIP_Real *bd)
Definition: var.c:6086
SCIP_RETCODE SCIPdomchgApplyGlobal(SCIP_DOMCHG *domchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *cutoff)
Definition: var.c:1306
SCIP_RETCODE SCIPvarChgUbGlobal(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Real newbound)
Definition: var.c:6863
SCIP_Real SCIPvarGetVSIDS(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:17631
type definitions for constraints and constraint handlers
SCIP_RETCODE SCIPvarFixBinary(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool value, SCIP_Bool *infeasible, int *nbdchgs)
Definition: var.c:10489
SCIP_RETCODE SCIPvarChgBranchFactor(SCIP_VAR *var, SCIP_SET *set, SCIP_Real branchfactor)
Definition: var.c:10870
uint64_t SCIP_EVENTTYPE
Definition: type_event.h:134
SCIP_RETCODE SCIPvarChgUbDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newbound)
Definition: var.c:7868
memory allocation routines