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-2018 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 /** returns whether the variable was flagged for deletion from global structures (cliques etc.) */
560  SCIP_VAR* var /**< problem variable */
561  );
562 
563 /** gets negated variable x' = offset - x of problem variable x; the negated variable is created if not yet existing;
564  * the negation offset of binary variables is always 1, the offset of other variables is fixed to lb + ub when the
565  * negated variable is created
566  */
567 extern
569  SCIP_VAR* var, /**< problem variable to negate */
570  BMS_BLKMEM* blkmem, /**< block memory of transformed problem */
571  SCIP_SET* set, /**< global SCIP settings */
572  SCIP_STAT* stat, /**< problem statistics */
573  SCIP_VAR** negvar /**< pointer to store the negated variable */
574  );
575 
576 /** informs variable that its position in problem's vars array changed */
577 extern
579  SCIP_VAR* var, /**< problem variable */
580  int probindex /**< new problem index of variable */
581  );
582 
583 /** gives the variable a new name
584  *
585  * @note the old pointer is overwritten, which might result in a memory leakage
586  */
587 extern
589  SCIP_VAR* var, /**< problem variable */
590  const char* name /**< new name of variable */
591  );
592 
593 /** informs variable that it will be removed from the problem; adjusts probindex and removes variable from the
594  * implication graph;
595  * If 'final' is TRUE, the thorough implication graph removal is not performed. Instead, only the
596  * variable bounds and implication data structures of the variable are freed. Since in the final removal
597  * of all variables from the transformed problem, this deletes the implication graph completely and is faster
598  * than removing the variables one by one, each time updating all lists of the other variables.
599  */
600 extern
602  SCIP_VAR* var, /**< problem variable */
603  BMS_BLKMEM* blkmem, /**< block memory buffer */
604  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
605  SCIP_SET* set, /**< global SCIP settings */
606  SCIP_Bool final /**< is this the final removal of all problem variables? */
607  );
608 
609 /** marks the variable to be deleted from the problem */
610 extern
611 void SCIPvarMarkDeleted(
612  SCIP_VAR* var /**< problem variable */
613  );
614 
615 /** marks the variable to not to be multi-aggregated */
616 extern
618  SCIP_VAR* var /**< problem variable */
619  );
620 
621 /** modifies lock numbers for rounding */
622 extern
624  SCIP_VAR* var, /**< problem variable */
625  BMS_BLKMEM* blkmem, /**< block memory */
626  SCIP_SET* set, /**< global SCIP settings */
627  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
628  int addnlocksdown, /**< increase in number of rounding down locks */
629  int addnlocksup /**< increase in number of rounding up locks */
630  );
631 
632 /** changes type of variable; cannot be called, if var belongs to a problem */
633 extern
635  SCIP_VAR* var, /**< problem variable to change */
636  SCIP_VARTYPE vartype /**< new type of variable */
637  );
638 
639 /** changes objective value of variable */
640 extern
642  SCIP_VAR* var, /**< variable to change */
643  BMS_BLKMEM* blkmem, /**< block memory */
644  SCIP_SET* set, /**< global SCIP settings */
645  SCIP_PROB* prob, /**< problem data */
646  SCIP_PRIMAL* primal, /**< primal data */
647  SCIP_LP* lp, /**< current LP data */
648  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
649  SCIP_Real newobj /**< new objective value for variable */
650  );
651 
652 /** adds value to objective value of variable */
653 extern
655  SCIP_VAR* var, /**< variable to change */
656  BMS_BLKMEM* blkmem, /**< block memory */
657  SCIP_SET* set, /**< global SCIP settings */
658  SCIP_STAT* stat, /**< problem statistics */
659  SCIP_PROB* transprob, /**< tranformed problem data */
660  SCIP_PROB* origprob, /**< original problem data */
661  SCIP_PRIMAL* primal, /**< primal data */
662  SCIP_TREE* tree, /**< branch and bound tree */
663  SCIP_REOPT* reopt, /**< reoptimization data structure */
664  SCIP_LP* lp, /**< current LP data */
665  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
666  SCIP_Real addobj /**< additional objective value for variable */
667  );
668 
669 /** changes objective value of variable in current dive */
670 extern
672  SCIP_VAR* var, /**< problem variable to change */
673  SCIP_SET* set, /**< global SCIP settings */
674  SCIP_LP* lp, /**< current LP data */
675  SCIP_Real newobj /**< new objective value for variable */
676  );
677 
678 /** adjust lower bound to integral value, if variable is integral */
679 extern
680 void SCIPvarAdjustLb(
681  SCIP_VAR* var, /**< problem variable */
682  SCIP_SET* set, /**< global SCIP settings */
683  SCIP_Real* lb /**< pointer to lower bound to adjust */
684  );
685 
686 /** adjust upper bound to integral value, if variable is integral */
687 extern
688 void SCIPvarAdjustUb(
689  SCIP_VAR* var, /**< problem variable */
690  SCIP_SET* set, /**< global SCIP settings */
691  SCIP_Real* ub /**< pointer to upper bound to adjust */
692  );
693 
694 /** adjust lower or upper bound to integral value, if variable is integral */
695 extern
696 void SCIPvarAdjustBd(
697  SCIP_VAR* var, /**< problem variable */
698  SCIP_SET* set, /**< global SCIP settings */
699  SCIP_BOUNDTYPE boundtype, /**< type of bound to adjust */
700  SCIP_Real* bd /**< pointer to bound to adjust */
701  );
702 
703 /** changes lower bound of original variable in original problem */
704 extern
706  SCIP_VAR* var, /**< problem variable to change */
707  SCIP_SET* set, /**< global SCIP settings */
708  SCIP_Real newbound /**< new bound for variable */
709  );
710 
711 /** changes upper 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 global lower bound of variable; if possible, adjusts bound to integral value;
720  * updates local lower bound if the global bound is tighter
721  */
722 extern
724  SCIP_VAR* var, /**< problem variable to change */
725  BMS_BLKMEM* blkmem, /**< block memory */
726  SCIP_SET* set, /**< global SCIP settings */
727  SCIP_STAT* stat, /**< problem statistics */
728  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
729  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
730  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
731  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
732  SCIP_Real newbound /**< new bound for variable */
733  );
734 
735 /** changes global upper bound of variable; if possible, adjusts bound to integral value;
736  * updates local upper bound if the global bound is tighter
737  */
738 extern
740  SCIP_VAR* var, /**< problem variable to change */
741  BMS_BLKMEM* blkmem, /**< block memory */
742  SCIP_SET* set, /**< global SCIP settings */
743  SCIP_STAT* stat, /**< problem statistics */
744  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
745  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
746  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
747  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
748  SCIP_Real newbound /**< new bound for variable */
749  );
750 
751 /** changes global bound of variable; if possible, adjusts bound to integral value;
752  * updates local bound if the global bound is tighter
753  */
754 extern
756  SCIP_VAR* var, /**< problem variable to change */
757  BMS_BLKMEM* blkmem, /**< block memory */
758  SCIP_SET* set, /**< global SCIP settings */
759  SCIP_STAT* stat, /**< problem statistics */
760  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
761  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
762  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
763  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
764  SCIP_Real newbound, /**< new bound for variable */
765  SCIP_BOUNDTYPE boundtype /**< type of bound: lower or upper bound */
766  );
767 
768 /** changes current local lower bound of variable; if possible, adjusts bound to integral value; stores inference
769  * information in variable
770  */
771 extern
773  SCIP_VAR* var, /**< problem variable to change */
774  BMS_BLKMEM* blkmem, /**< block memory */
775  SCIP_SET* set, /**< global SCIP settings */
776  SCIP_STAT* stat, /**< problem statistics */
777  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
778  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
779  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
780  SCIP_Real newbound /**< new bound for variable */
781  );
782 
783 /** changes current local upper bound of variable; if possible, adjusts bound to integral value; stores inference
784  * information in variable
785  */
786 extern
788  SCIP_VAR* var, /**< problem variable to change */
789  BMS_BLKMEM* blkmem, /**< block memory */
790  SCIP_SET* set, /**< global SCIP settings */
791  SCIP_STAT* stat, /**< problem statistics */
792  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
793  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
794  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
795  SCIP_Real newbound /**< new bound for variable */
796  );
797 
798 /** changes current local bound of variable; if possible, adjusts bound to integral value; stores inference
799  * information in variable
800  */
801 extern
803  SCIP_VAR* var, /**< problem variable to change */
804  BMS_BLKMEM* blkmem, /**< block memory */
805  SCIP_SET* set, /**< global SCIP settings */
806  SCIP_STAT* stat, /**< problem statistics */
807  SCIP_LP* lp, /**< current LP data, may be NULL for original variables */
808  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage, may be NULL for original variables */
809  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
810  SCIP_Real newbound, /**< new bound for variable */
811  SCIP_BOUNDTYPE boundtype /**< type of bound: lower or upper bound */
812  );
813 
814 /** changes lazy lower bound of the variable, this is only possible if the variable is not in the LP yet */
815 extern
817  SCIP_VAR* var, /**< problem variable */
818  SCIP_SET* set, /**< global SCIP settings */
819  SCIP_Real lazylb /**< the lazy lower bound to be set */
820  );
821 
822 /** changes lazy upper bound of the variable, this is only possible if the variable is not in the LP yet */
824  SCIP_VAR* var, /**< problem variable */
825  SCIP_SET* set, /**< global SCIP settings */
826  SCIP_Real lazylb /**< the lazy lower bound to be set */
827  );
828 
829 /** changes lower bound of variable in current dive; if possible, adjusts bound to integral value */
830 extern
832  SCIP_VAR* var, /**< problem variable to change */
833  SCIP_SET* set, /**< global SCIP settings */
834  SCIP_LP* lp, /**< current LP data */
835  SCIP_Real newbound /**< new bound for variable */
836  );
837 
838 /** changes upper bound of variable in current dive; if possible, adjusts bound to integral value */
839 extern
841  SCIP_VAR* var, /**< problem variable to change */
842  SCIP_SET* set, /**< global SCIP settings */
843  SCIP_LP* lp, /**< current LP data */
844  SCIP_Real newbound /**< new bound for variable */
845  );
846 
847 /** for a multi-aggregated variable, gives the local lower bound computed by adding the local bounds from all aggregation variables
848  * 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
849  * calling this function for a non-multi-aggregated variable is not allowed
850  */
851 extern
853  SCIP_VAR* var, /**< problem variable */
854  SCIP_SET* set /**< global SCIP settings */
855  );
856 
857 /** for a multi-aggregated variable, gives the local upper bound computed by adding the local bounds from all aggregation variables
858  * 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
859  * calling this function for a non-multi-aggregated variable is not allowed
860  */
861 extern
863  SCIP_VAR* var, /**< problem variable */
864  SCIP_SET* set /**< global SCIP settings */
865  );
866 
867 /** for a multi-aggregated variable, gives the global lower bound computed by adding the global bounds from all aggregation variables
868  * 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
869  * calling this function for a non-multi-aggregated variable is not allowed
870  */
871 extern
873  SCIP_VAR* var, /**< problem variable */
874  SCIP_SET* set /**< global SCIP settings */
875  );
876 
877 /** for a multi-aggregated variable, gives the global upper bound computed by adding the global bounds from all aggregation variables
878  * 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
879  * calling this function for a non-multi-aggregated variable is not allowed
880  */
881 extern
883  SCIP_VAR* var, /**< problem variable */
884  SCIP_SET* set /**< global SCIP settings */
885  );
886 
887 /** adds a hole to the original domain of the variable*/
888 extern
890  SCIP_VAR* var, /**< problem variable */
891  BMS_BLKMEM* blkmem, /**< block memory */
892  SCIP_SET* set, /**< global SCIP settings */
893  SCIP_Real left, /**< left bound of open interval in new hole */
894  SCIP_Real right /**< right bound of open interval in new hole */
895  );
896 
897 /** adds a hole to the variable's global domain */
898 extern
900  SCIP_VAR* var, /**< problem variable */
901  BMS_BLKMEM* blkmem, /**< block memory */
902  SCIP_SET* set, /**< global SCIP settings */
903  SCIP_STAT* stat, /**< problem statistics */
904  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
905  SCIP_Real left, /**< left bound of open interval in new hole */
906  SCIP_Real right, /**< right bound of open interval in new hole */
907  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
908  );
909 
910 /** adds a hole to the variable's current local domain */
911 extern
913  SCIP_VAR* var, /**< problem variable */
914  BMS_BLKMEM* blkmem, /**< block memory */
915  SCIP_SET* set, /**< global SCIP settings */
916  SCIP_STAT* stat, /**< problem statistics */
917  SCIP_EVENTQUEUE* eventqueue, /**< event queue, may be NULL for original variables */
918  SCIP_Real left, /**< left bound of open interval in new hole */
919  SCIP_Real right, /**< right bound of open interval in new hole */
920  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
921  );
922 
923 /** resets the global and local bounds of original variable to their original values */
924 extern
926  SCIP_VAR* var, /**< problem variable */
927  BMS_BLKMEM* blkmem, /**< block memory */
928  SCIP_SET* set, /**< global SCIP settings */
929  SCIP_STAT* stat /**< problem statistics */
930  );
931 
932 /** returns at which depth in the tree a bound change was applied to the variable that conflicts with the
933  * given bound; returns -1 if the bound does not conflict with the current local bounds of the variable
934  */
935 extern
937  SCIP_VAR* var, /**< problem variable */
938  SCIP_SET* set, /**< global SCIP settings */
939  SCIP_BOUNDTYPE boundtype, /**< bound type of the conflicting bound */
940  SCIP_Real bound /**< conflicting bound */
941  );
942 
943 /** informs variable x about a globally valid variable lower bound x >= b*z + d with integer variable z;
944  * if z is binary, the corresponding valid implication for z is also added;
945  * improves the global bounds of the variable and the vlb variable if possible
946  */
947 extern
949  SCIP_VAR* var, /**< problem variable */
950  BMS_BLKMEM* blkmem, /**< block memory */
951  SCIP_SET* set, /**< global SCIP settings */
952  SCIP_STAT* stat, /**< problem statistics */
953  SCIP_PROB* transprob, /**< transformed problem */
954  SCIP_PROB* origprob, /**< original problem */
955  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
956  SCIP_REOPT* reopt, /**< reoptimization data structure */
957  SCIP_LP* lp, /**< current LP data */
958  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
959  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
960  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
961  SCIP_VAR* vlbvar, /**< variable z in x >= b*z + d */
962  SCIP_Real vlbcoef, /**< coefficient b in x >= b*z + d */
963  SCIP_Real vlbconstant, /**< constant d in x >= b*z + d */
964  SCIP_Bool transitive, /**< should transitive closure of implication also be added? */
965  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
966  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
967  );
968 
969 /** informs variable x about a globally valid variable upper bound x <= b*z + d with integer variable z;
970  * if z is binary, the corresponding valid implication for z is also added;
971  * updates the global bounds of the variable and the vub variable correspondingly
972  */
973 extern
975  SCIP_VAR* var, /**< problem variable */
976  BMS_BLKMEM* blkmem, /**< block memory */
977  SCIP_SET* set, /**< global SCIP settings */
978  SCIP_STAT* stat, /**< problem statistics */
979  SCIP_PROB* transprob, /**< transformed problem */
980  SCIP_PROB* origprob, /**< original problem */
981  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
982  SCIP_REOPT* reopt, /**< reoptimization data structure */
983  SCIP_LP* lp, /**< current LP data */
984  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
985  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
986  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
987  SCIP_VAR* vubvar, /**< variable z in x <= b*z + d */
988  SCIP_Real vubcoef, /**< coefficient b in x <= b*z + d */
989  SCIP_Real vubconstant, /**< constant d in x <= b*z + d */
990  SCIP_Bool transitive, /**< should transitive closure of implication also be added? */
991  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
992  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
993  );
994 
995 /** informs binary variable x about a globally valid implication: x == 0 or x == 1 ==> y <= b or y >= b;
996  * also adds the corresponding implication or variable bound to the implied variable;
997  * if the implication is conflicting, the variable is fixed to the opposite value;
998  * if the variable is already fixed to the given value, the implication is performed immediately;
999  * if the implication is redundant with respect to the variables' global bounds, it is ignored
1000  */
1001 extern
1003  SCIP_VAR* var, /**< problem variable */
1004  BMS_BLKMEM* blkmem, /**< block memory */
1005  SCIP_SET* set, /**< global SCIP settings */
1006  SCIP_STAT* stat, /**< problem statistics */
1007  SCIP_PROB* transprob, /**< transformed problem */
1008  SCIP_PROB* origprob, /**< original problem */
1009  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
1010  SCIP_REOPT* reopt, /**< reoptimization data structure */
1011  SCIP_LP* lp, /**< current LP data */
1012  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1013  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
1014  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
1015  SCIP_Bool varfixing, /**< FALSE if y should be added in implications for x == 0, TRUE for x == 1 */
1016  SCIP_VAR* implvar, /**< variable y in implication y <= b or y >= b */
1017  SCIP_BOUNDTYPE impltype, /**< type of implication y <= b (SCIP_BOUNDTYPE_UPPER) or y >= b (SCIP_BOUNDTYPE_LOWER) */
1018  SCIP_Real implbound, /**< bound b in implication y <= b or y >= b */
1019  SCIP_Bool transitive, /**< should transitive closure of implication also be added? */
1020  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
1021  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
1022  );
1023 
1024 /** fixes the bounds of a binary variable to the given value, counting bound changes and detecting infeasibility */
1025 extern
1027  SCIP_VAR* var, /**< problem variable */
1028  BMS_BLKMEM* blkmem, /**< block memory */
1029  SCIP_SET* set, /**< global SCIP settings */
1030  SCIP_STAT* stat, /**< problem statistics */
1031  SCIP_PROB* transprob, /**< transformed problem */
1032  SCIP_PROB* origprob, /**< original problem */
1033  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
1034  SCIP_REOPT* reopt, /**< reoptimization data structure */
1035  SCIP_LP* lp, /**< current LP data */
1036  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
1037  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
1038  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1039  SCIP_Bool value, /**< value to fix variable to */
1040  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
1041  int* nbdchgs /**< pointer to count the number of performed bound changes, or NULL */
1042  );
1043 
1044 /** adds the variable to the given clique and updates the list of cliques the binary variable is member of;
1045  * if the variable now appears twice in the clique with the same value, it is fixed to the opposite value;
1046  * if the variable now appears twice in the clique with opposite values, all other variables are fixed to
1047  * the opposite of the value they take in the clique
1048  */
1049 extern
1051  SCIP_VAR* var, /**< problem variable */
1052  BMS_BLKMEM* blkmem, /**< block memory */
1053  SCIP_SET* set, /**< global SCIP settings */
1054  SCIP_STAT* stat, /**< problem statistics */
1055  SCIP_PROB* transprob, /**< transformed problem */
1056  SCIP_PROB* origprob, /**< original problem */
1057  SCIP_TREE* tree, /**< branch and bound tree if in solving stage */
1058  SCIP_REOPT* reopt, /**< reoptimization data structure */
1059  SCIP_LP* lp, /**< current LP data */
1060  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
1061  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
1062  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1063  SCIP_Bool value, /**< value of the variable in the clique */
1064  SCIP_CLIQUE* clique, /**< clique the variable should be added to */
1065  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
1066  int* nbdchgs /**< pointer to count the number of performed bound changes, or NULL */
1067  );
1068 
1069 /** adds a filled clique to the cliquelists of all corresponding variables */
1070 extern
1072  SCIP_VAR** vars, /**< problem variables */
1073  SCIP_Bool* values, /**< values of the variables in the clique */
1074  int nvars, /**< number of problem variables */
1075  BMS_BLKMEM* blkmem, /**< block memory */
1076  SCIP_SET* set, /**< global SCIP settings */
1077  SCIP_CLIQUE* clique /**< clique that contains all given variables and values */
1078  );
1079 
1080 /** deletes the variable from the given clique and updates the list of cliques the binary variable is member of */
1081 extern
1083  SCIP_VAR* var, /**< problem variable */
1084  BMS_BLKMEM* blkmem, /**< block memory */
1085  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1086  SCIP_Bool value, /**< value of the variable in the clique */
1087  SCIP_CLIQUE* clique /**< clique the variable should be removed from */
1088  );
1089 
1090 /** adds a clique to the list of cliques of the given binary variable, but does not change the clique
1091  * itself
1092  */
1093 extern
1095  SCIP_VAR* var, /**< problem variable */
1096  BMS_BLKMEM* blkmem, /**< block memory */
1097  SCIP_SET* set, /**< global SCIP settings */
1098  SCIP_Bool value, /**< value of the variable in the clique */
1099  SCIP_CLIQUE* clique /**< clique that should be removed from the variable's clique list */
1100  );
1101 
1102 /** deletes a clique from the list of cliques the binary variable is member of, but does not change the clique
1103  * itself
1104  */
1105 extern
1107  SCIP_VAR* var, /**< problem variable */
1108  BMS_BLKMEM* blkmem, /**< block memory */
1109  SCIP_Bool value, /**< value of the variable in the clique */
1110  SCIP_CLIQUE* clique /**< clique that should be removed from the variable's clique list */
1111  );
1112 
1113 /** sets the branch factor of the variable; this value can be used in the branching methods to scale the score
1114  * values of the variables; higher factor leads to a higher probability that this variable is chosen for branching
1115  */
1116 extern
1118  SCIP_VAR* var, /**< problem variable */
1119  SCIP_SET* set, /**< global SCIP settings */
1120  SCIP_Real branchfactor /**< factor to weigh variable's branching score with */
1121  );
1122 
1123 /** sets the branch priority of the variable; variables with higher branch priority are always preferred to variables
1124  * with lower priority in selection of branching variable
1125  */
1126 extern
1128  SCIP_VAR* var, /**< problem variable */
1129  int branchpriority /**< branching priority of the variable */
1130  );
1131 
1132 /** sets the branch direction of the variable; variables with higher branch direction are always preferred to variables
1133  * with lower direction in selection of branching variable
1134  */
1135 extern
1137  SCIP_VAR* var, /**< problem variable */
1138  SCIP_BRANCHDIR branchdirection /**< preferred branch direction of the variable (downwards, upwards, auto) */
1139  );
1140 
1141 /** gets objective value of variable in current SCIP_LP; the value can be different from the bound stored in the variable's own
1142  * data due to diving, that operate only on the LP without updating the variables
1143  */
1144 extern
1146  SCIP_VAR* var /**< problem variable */
1147  );
1148 
1149 /** gets lower bound of variable in current SCIP_LP; the bound can be different from the bound stored in the variable's own
1150  * data due to diving or conflict analysis, that operate only on the LP without updating the variables
1151  */
1152 extern
1154  SCIP_VAR* var, /**< problem variable */
1155  SCIP_SET* set /**< global SCIP settings */
1156  );
1157 
1158 /** gets upper bound of variable in current SCIP_LP; the bound can be different from the bound stored in the variable's own
1159  * data due to diving or conflict analysis, that operate only on the LP without updating the variables
1160  */
1161 extern
1163  SCIP_VAR* var, /**< problem variable */
1164  SCIP_SET* set /**< global SCIP settings */
1165  );
1166 
1167 /** returns solution value and index of variable lower bound that is closest to the variable's value in the given primal solution
1168  * or current LP solution if no primal solution is given; returns an index of -1 if no variable lower bound is available
1169  */
1170 extern
1172  SCIP_VAR* var, /**< active problem variable */
1173  SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
1174  SCIP_SET* set, /**< global SCIP settings */
1175  SCIP_STAT* stat, /**< problem statistics */
1176  SCIP_Real* closestvlb, /**< pointer to store the value of the closest variable lower bound */
1177  int* closestvlbidx /**< pointer to store the index of the closest variable lower bound */
1178  );
1179 
1180 /** returns solution value and index of variable upper bound that is closest to the variable's value in the given primal solution;
1181  * or current LP solution if no primal solution is given; returns an index of -1 if no variable upper bound is available
1182  */
1183 extern
1185  SCIP_VAR* var, /**< active problem variable */
1186  SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
1187  SCIP_SET* set, /**< global SCIP settings */
1188  SCIP_STAT* stat, /**< problem statistics */
1189  SCIP_Real* closestvub, /**< pointer to store the value of the closest variable upper bound */
1190  int* closestvubidx /**< pointer to store the index of the closest variable upper bound */
1191  );
1192 
1193 /** remembers the current solution as root solution in the problem variables */
1194 extern
1195 void SCIPvarStoreRootSol(
1196  SCIP_VAR* var, /**< problem variable */
1197  SCIP_Bool roothaslp /**< is the root solution from LP? */
1198  );
1199 
1200 /** updates the current solution as best root solution in the problem variables if it is better */
1201 extern
1203  SCIP_VAR* var, /**< problem variable */
1204  SCIP_SET* set, /**< global SCIP settings */
1205  SCIP_Real rootsol, /**< root solution value */
1206  SCIP_Real rootredcost, /**< root reduced cost */
1207  SCIP_Real rootlpobjval /**< objective value of the root LP */
1208  );
1209 
1210 /** returns the solution value of the problem variables in the relaxation solution */
1211 extern
1213  SCIP_VAR* var, /**< problem variable */
1214  SCIP_SET* set /**< global SCIP settings */
1215  );
1216 
1217 /** returns the solution value of the transformed problem variable in the relaxation solution */
1218 extern
1220  SCIP_VAR* var /**< problem variable */
1221  );
1222 
1223 /** returns for the given binary variable the reduced cost which are given by the variable itself and its implication if
1224  * the binary variable is fixed to the given value
1225  */
1226 extern
1228  SCIP_VAR* var, /**< problem variable */
1229  SCIP_SET* set, /**< global SCIP settings */
1230  SCIP_Bool varfixing, /**< FALSE if for x == 0, TRUE for x == 1 */
1231  SCIP_STAT* stat, /**< problem statistics */
1232  SCIP_PROB* prob, /**< transformed problem, or NULL */
1233  SCIP_LP* lp /**< current LP data */
1234  );
1235 
1236 
1237 /** stores the solution value as relaxation solution in the problem variable */
1238 extern
1240  SCIP_VAR* var, /**< problem variable */
1241  SCIP_SET* set, /**< global SCIP settings */
1242  SCIP_RELAXATION* relaxation, /**< global relaxation data */
1243  SCIP_Real solval, /**< solution value in the current relaxation solution */
1244  SCIP_Bool updateobj /**< should the objective value be updated? */
1245  );
1246 
1247 /** stores the solution value as NLP solution in the problem variable */
1248 extern
1250  SCIP_VAR* var, /**< problem variable */
1251  SCIP_SET* set, /**< global SCIP settings */
1252  SCIP_Real solval /**< solution value in the current NLP solution */
1253  );
1254 
1255 /** resolves variable to columns and adds them with the coefficient to the row */
1256 extern
1258  SCIP_VAR* var, /**< problem variable */
1259  BMS_BLKMEM* blkmem, /**< block memory */
1260  SCIP_SET* set, /**< global SCIP settings */
1261  SCIP_STAT* stat, /**< problem statistics */
1262  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
1263  SCIP_PROB* prob, /**< problem data */
1264  SCIP_LP* lp, /**< current LP data */
1265  SCIP_ROW* row, /**< LP row */
1266  SCIP_Real val /**< value of coefficient */
1267  );
1268 
1269 
1270 /** merge two variable histories together; a typical use case is that \p othervar is an image of the target variable
1271  * in a SCIP copy. Method should be applied with care, especially because no internal checks are performed whether
1272  * the history merge is reasonable
1273  *
1274  * @note Do not use this method if the two variables originate from two SCIP's with different objective functions, since
1275  * this corrupts the variable pseudo costs
1276  * @note Apply with care; no internal checks are performed if the two variables should be merged
1277  */
1278 extern
1280  SCIP_VAR* targetvar, /**< the variable that should contain both histories afterwards */
1281  SCIP_VAR* othervar, /**< the variable whose history is to be merged with that of the target variable */
1282  SCIP_STAT* stat /**< problem statistics */
1283  );
1284 
1285 /** sets the history of a variable; this method is typacally used within reoptimization to keep and update the variable
1286  * history over several iteraions
1287  */
1288 extern
1289 void SCIPvarSetHistory(
1290  SCIP_VAR* var, /**< variable */
1291  SCIP_HISTORY* history, /**< the history which is to set */
1292  SCIP_STAT* stat /**< problem statistics */
1293  );
1294 
1295 /** updates the pseudo costs of the given variable and the global pseudo costs after a change of
1296  * "solvaldelta" in the variable's solution value and resulting change of "objdelta" in the in the LP's objective value
1297  */
1298 extern
1300  SCIP_VAR* var, /**< problem variable */
1301  SCIP_SET* set, /**< global SCIP settings */
1302  SCIP_STAT* stat, /**< problem statistics */
1303  SCIP_Real solvaldelta, /**< difference of variable's new LP value - old LP value */
1304  SCIP_Real objdelta, /**< difference of new LP's objective value - old LP's objective value */
1305  SCIP_Real weight /**< weight in (0,1] of this update in pseudo cost sum */
1306  );
1307 
1308 /** gets the variable's pseudo cost value for the given step size "solvaldelta" in the variable's LP solution value */
1309 extern
1311  SCIP_VAR* var, /**< problem variable */
1312  SCIP_STAT* stat, /**< problem statistics */
1313  SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
1314  );
1315 
1316 /** gets the variable's pseudo cost value for the given step size "solvaldelta" in the variable's LP solution value,
1317  * only using the pseudo cost information of the current run
1318  */
1319 extern
1321  SCIP_VAR* var, /**< problem variable */
1322  SCIP_STAT* stat, /**< problem statistics */
1323  SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
1324  );
1325 
1326 /** gets the variable's (possible fractional) number of pseudo cost updates for the given direction */
1327 extern
1329  SCIP_VAR* var, /**< problem variable */
1330  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1331  );
1332 
1333 /** gets the variable's (possible fractional) number of pseudo cost updates for the given direction,
1334  * only using the pseudo cost information of the current run
1335  */
1336 extern
1338  SCIP_VAR* var, /**< problem variable */
1339  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1340  );
1341 
1342 
1343 /** compares both possible directions for rounding the given solution value and returns the minimum pseudo-costs of the variable */
1345  SCIP_VAR* var, /**< problem variable */
1346  SCIP_STAT* stat, /**< problem statistics */
1347  SCIP_SET* set, /**< global SCIP settings */
1348  SCIP_Real solval /**< solution value, e.g., LP solution value */
1349  );
1350 
1351 /** gets the an estimate of the variable's pseudo cost variance in direction \p dir */
1352 extern
1354  SCIP_VAR* var, /**< problem variable */
1355  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1356  SCIP_Bool onlycurrentrun /**< return pseudo cost variance only for current branch and bound run */
1357  );
1358 
1359 /** calculates a confidence bound for this variable under the assumption of normally distributed pseudo costs
1360  *
1361  * The confidence bound \f$ \theta \geq 0\f$ denotes the interval borders \f$ [X - \theta, \ X + \theta]\f$, which contains
1362  * the true pseudo costs of the variable, i.e., the expected value of the normal distribution, with a probability
1363  * of 95 %.
1364  *
1365  * @return value of confidence bound for this variable
1366  */
1367 extern
1369  SCIP_VAR* var, /**< variable in question */
1370  SCIP_SET* set, /**< global SCIP settings */
1371  SCIP_BRANCHDIR dir, /**< the branching direction for the confidence bound */
1372  SCIP_Bool onlycurrentrun, /**< should only the current run be taken into account */
1373  SCIP_CONFIDENCELEVEL clevel /**< confidence level for the interval */
1374  );
1375 
1376 /** check if the current pseudo cost relative error in a direction violates the given threshold. The Relative
1377  * Error is calculated at a specific confidence level
1378  */
1379 extern
1381  SCIP_VAR* var, /**< variable in question */
1382  SCIP_SET* set, /**< global SCIP settings */
1383  SCIP_STAT* stat, /**< problem statistics */
1384  SCIP_Real threshold, /**< threshold for relative errors to be considered reliable (enough) */
1385  SCIP_CONFIDENCELEVEL clevel /**< a given confidence level */
1386  );
1387 
1388 /** check if variable pseudo-costs have a significant difference in location. The significance depends on
1389  * the choice of \p clevel and on the kind of tested hypothesis. The one-sided hypothesis, which
1390  * should be rejected, is that fracy * mu_y >= fracx * mu_x, where mu_y and mu_x denote the
1391  * unknown location means of the underlying pseudo-cost distributions of x and y.
1392  *
1393  * This method is applied best if variable x has a better pseudo-cost score than y. The method hypothesizes that y were actually
1394  * better than x (despite the current information), meaning that y can be expected to yield branching
1395  * decisions as least as good as x in the long run. If the method returns TRUE, the current history information is
1396  * sufficient to safely rely on the alternative hypothesis that x yields indeed a better branching score (on average)
1397  * than y.
1398  *
1399  * @note The order of x and y matters for the one-sided hypothesis
1400  *
1401  * @note set \p onesided to FALSE if you are not sure which variable is better. The hypothesis tested then reads
1402  * fracy * mu_y == fracx * mu_x vs the alternative hypothesis fracy * mu_y != fracx * mu_x.
1403  *
1404  * @return TRUE if the hypothesis can be safely rejected at the given confidence level
1405  */
1406 extern
1408  SCIP_SET* set, /**< global SCIP settings */
1409  SCIP_STAT* stat, /**< problem statistics */
1410  SCIP_VAR* varx, /**< variable x */
1411  SCIP_Real fracx, /**< the fractionality of variable x */
1412  SCIP_VAR* vary, /**< variable y */
1413  SCIP_Real fracy, /**< the fractionality of variable y */
1414  SCIP_BRANCHDIR dir, /**< branching direction */
1415  SCIP_CONFIDENCELEVEL clevel, /**< confidence level for rejecting hypothesis */
1416  SCIP_Bool onesided /**< should a one-sided hypothesis y >= x be tested? */
1417  );
1418 
1419 /** tests at a given confidence level whether the variable pseudo-costs only have a small probability to
1420  * exceed a \p threshold. This is useful to determine if past observations provide enough evidence
1421  * to skip an expensive strong-branching step if there is already a candidate that has been proven to yield an improvement
1422  * of at least \p threshold.
1423  *
1424  * @note use \p clevel to adjust the level of confidence. For SCIP_CONFIDENCELEVEL_MIN, the method returns TRUE if
1425  * the estimated probability to exceed \p threshold is less than 25 %.
1426  *
1427  * @see SCIP_Confidencelevel for a list of available levels. The used probability limits refer to the one-sided levels
1428  * of confidence.
1429  *
1430  * @return TRUE if the variable pseudo-cost probabilistic model is likely to be smaller than \p threshold
1431  * at the given confidence level \p clevel.
1432  */
1433 extern
1435  SCIP_SET* set, /**< global SCIP settings */
1436  SCIP_STAT* stat, /**< problem statistics */
1437  SCIP_VAR* var, /**< variable x */
1438  SCIP_Real frac, /**< the fractionality of variable x */
1439  SCIP_Real threshold, /**< the threshold to test against */
1440  SCIP_BRANCHDIR dir, /**< branching direction */
1441  SCIP_CONFIDENCELEVEL clevel /**< confidence level for rejecting hypothesis */
1442  );
1443 
1444 /** increases the VSIDS of the variable by the given weight */
1445 extern
1447  SCIP_VAR* var, /**< problem variable */
1448  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1449  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1450  SCIP_STAT* stat, /**< problem statistics */
1451  SCIP_BRANCHDIR dir, /**< branching direction */
1452  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1453  SCIP_Real weight /**< weight of this update in conflict score */
1454  );
1455 
1456 /** scales the VSIDS of the variable by the given scalar */
1457 extern
1459  SCIP_VAR* var, /**< problem variable */
1460  SCIP_Real scalar /**< scalar to multiply the conflict scores with */
1461  );
1462 
1463 /** increases the number of active conflicts by one and the overall length of the variable by the given length */
1465  SCIP_VAR* var, /**< problem variable */
1466  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1467  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1468  SCIP_STAT* stat, /**< problem statistics */
1469  SCIP_BRANCHDIR dir, /**< branching direction */
1470  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1471  SCIP_Real length /**< length of the conflict */
1472  );
1473 
1474 /** gets the number of active conflicts containing this variable in given direction */
1476  SCIP_VAR* var, /**< problem variable */
1477  SCIP_STAT* stat, /**< problem statistics */
1478  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1479  );
1480 
1481 /** gets the number of active conflicts containing this variable in given direction
1482  * in the current run
1483  */
1485  SCIP_VAR* var, /**< problem variable */
1486  SCIP_STAT* stat, /**< problem statistics */
1487  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1488  );
1489 
1490 /** gets the average conflict length in given direction due to branching on the variable */
1492  SCIP_VAR* var, /**< problem variable */
1493  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1494  );
1495 
1496 /** gets the average conflict length in given direction due to branching on the variable
1497  * in the current run
1498  */
1500  SCIP_VAR* var, /**< problem variable */
1501  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1502  );
1503 
1504 /** increases the number of branchings counter of the variable */
1505 extern
1507  SCIP_VAR* var, /**< problem variable */
1508  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1509  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1510  SCIP_STAT* stat, /**< problem statistics */
1511  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1512  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1513  int depth /**< depth at which the bound change took place */
1514  );
1515 
1516 /** increases the inference score of the variable by the given weight */
1517 extern
1519  SCIP_VAR* var, /**< problem variable */
1520  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1521  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1522  SCIP_STAT* stat, /**< problem statistics */
1523  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1524  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1525  SCIP_Real weight /**< weight of this update in inference score */
1526  );
1527 
1528 /** increases the cutoff score of the variable by the given weight */
1529 extern
1531  SCIP_VAR* var, /**< problem variable */
1532  BMS_BLKMEM* blkmem, /**< block memory, or NULL if the domain value is SCIP_UNKNOWN */
1533  SCIP_SET* set, /**< global SCIP settings, or NULL if the domain value is SCIP_UNKNOWN */
1534  SCIP_STAT* stat, /**< problem statistics */
1535  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1536  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
1537  SCIP_Real weight /**< weight of this update in cutoff score */
1538  );
1539 
1540 /** returns the variable's VSIDS score */
1541 extern
1543  SCIP_VAR* var, /**< problem variable */
1544  SCIP_STAT* stat, /**< problem statistics */
1545  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1546  );
1547 
1548 /** returns the variable's VSIDS score only using conflicts of the current run */
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 average number of inferences found after branching on the variable in given direction */
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  * in the current run
1566  */
1567 extern
1569  SCIP_VAR* var, /**< problem variable */
1570  SCIP_STAT* stat, /**< problem statistics */
1571  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1572  );
1573 
1574 /** returns the average number of cutoffs found after branching on the variable in given direction */
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 in the current run */
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 /** outputs variable information into file stream */
1591 extern
1593  SCIP_VAR* var, /**< problem variable */
1594  SCIP_SET* set, /**< global SCIP settings */
1595  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
1596  FILE* file /**< output file (or NULL for standard output) */
1597  );
1598 
1599 /** includes event handler with given data in variable's event filter */
1600 extern
1602  SCIP_VAR* var, /**< problem variable */
1603  BMS_BLKMEM* blkmem, /**< block memory */
1604  SCIP_SET* set, /**< global SCIP settings */
1605  SCIP_EVENTTYPE eventtype, /**< event type to catch */
1606  SCIP_EVENTHDLR* eventhdlr, /**< event handler to call for the event processing */
1607  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler for the event processing */
1608  int* filterpos /**< pointer to store position of event filter entry, or NULL */
1609  );
1610 
1611 /** deletes event handler with given data from variable's event filter */
1612 extern
1614  SCIP_VAR* var, /**< problem variable */
1615  BMS_BLKMEM* blkmem, /**< block memory */
1616  SCIP_SET* set, /**< global SCIP settings */
1617  SCIP_EVENTTYPE eventtype, /**< event type mask of dropped event */
1618  SCIP_EVENTHDLR* eventhdlr, /**< event handler to call for the event processing */
1619  SCIP_EVENTDATA* eventdata, /**< event data to pass to the event handler for the event processing */
1620  int filterpos /**< position of event filter entry returned by SCIPvarCatchEvent(), or -1 */
1621  );
1622 
1623 /** returns the variable's VSIDS score */
1624 extern
1626  SCIP_VAR* var, /**< problem variable */
1627  SCIP_STAT* stat, /**< problem statistics */
1628  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1629  );
1630 
1631 /** returns the position of the bound change index */
1632 extern
1633 int SCIPbdchgidxGetPos(
1634  SCIP_BDCHGIDX* bdchgidx /**< bound change index */
1635  );
1636 
1637 /** removes (redundant) cliques, implications and variable bounds of variable from all other variables' implications and variable
1638  * bounds arrays, and optionally removes them also from the variable itself
1639  */
1640 extern
1642  SCIP_VAR* var, /**< problem variable */
1643  BMS_BLKMEM* blkmem, /**< block memory */
1644  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
1645  SCIP_SET* set, /**< global SCIP settings */
1646  SCIP_Bool irrelevantvar, /**< has the variable become irrelevant? */
1647  SCIP_Bool onlyredundant, /**< should only the redundant implications and variable bounds be removed? */
1648  SCIP_Bool removefromvar /**< should the implications and variable bounds be removed from the var itself? */
1649  );
1650 
1651 #ifdef NDEBUG
1652 
1653 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
1654  * speed up the algorithms.
1655  */
1656 
1657 #define SCIPvarCatchEvent(var, blkmem, set, eventtype, eventhdlr, eventdata, filterpos) \
1658  SCIPeventfilterAdd(var->eventfilter, blkmem, set, eventtype, eventhdlr, eventdata, filterpos)
1659 #define SCIPvarDropEvent(var, blkmem, set, eventtype, eventhdlr, eventdata, filterpos) \
1660  SCIPeventfilterDel(var->eventfilter, blkmem, set, eventtype, eventhdlr, eventdata, filterpos)
1661 #define SCIPvarGetVSIDS(var, stat, dir) ((var)->varstatus == SCIP_VARSTATUS_LOOSE || (var)->varstatus == SCIP_VARSTATUS_COLUMN ? \
1662  SCIPhistoryGetVSIDS(var->history, dir)/stat->vsidsweight : SCIPvarGetVSIDS_rec(var, stat, dir))
1663 #define SCIPbdchgidxGetPos(bdchgidx) ((bdchgidx)->pos)
1664 
1665 #endif
1666 
1667 /*
1668  * Hash functions
1669  */
1670 
1671 /** gets the key (i.e. the name) of the given variable */
1672 extern
1673 SCIP_DECL_HASHGETKEY(SCIPhashGetKeyVar);
1674 
1675 #ifdef __cplusplus
1676 }
1677 #endif
1678 
1679 #endif
SCIP_Real SCIPvarGetRelaxSolTransVar(SCIP_VAR *var)
Definition: var.c:13401
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:7856
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:7153
internal methods for managing events
int SCIPbdchgidxGetPos(SCIP_BDCHGIDX *bdchgidx)
Definition: var.c:17808
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:9634
SCIP_Real SCIPvarGetPseudocostCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_Real solvaldelta)
Definition: var.c:13930
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:7605
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:11417
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:15669
#define SCIP_DECL_VARTRANS(x)
Definition: type_var.h:129
void SCIPvarSetHistory(SCIP_VAR *var, SCIP_HISTORY *history, SCIP_STAT *stat)
Definition: var.c:4311
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:1992
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:5034
SCIP_RETCODE SCIPvarChgBranchDirection(SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
Definition: var.c:11230
SCIP_Real SCIPvarGetVSIDSCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15332
SCIP_DECL_HASHGETKEY(SCIPhashGetKeyVar)
Definition: var.c:16422
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:5901
void SCIPbdchginfoFree(SCIP_BDCHGINFO **bdchginfo, BMS_BLKMEM *blkmem)
Definition: var.c:15800
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:14721
SCIP_Real SCIPvarGetRelaxSol(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:13329
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:14457
SCIP_RETCODE SCIPvarResetBounds(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: var.c:8864
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:8755
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
SCIP_Bool SCIPvarIsMarkedDeleteGlobalStructures(SCIP_VAR *var)
Definition: var.c:16929
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:2077
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:8265
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:14333
SCIP_RETCODE SCIPvarChgType(SCIP_VAR *var, SCIP_VARTYPE vartype)
Definition: var.c:5850
SCIP_Real SCIPvarGetImplRedcost(SCIP_VAR *var, SCIP_SET *set, SCIP_Bool varfixing, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_LP *lp)
Definition: var.c:12875
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:14266
type definitions for return codes for SCIP methods
SCIP_Real SCIPvarGetMultaggrLbGlobal(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:8199
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:2035
SCIP_RETCODE SCIPvarChgUbOriginal(SCIP_VAR *var, SCIP_SET *set, SCIP_Real newbound)
Definition: var.c:6261
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:10829
void SCIPvarAdjustUb(SCIP_VAR *var, SCIP_SET *set, SCIP_Real *ub)
Definition: var.c:6169
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:10006
SCIP_RETCODE SCIPvarSetNLPSol(SCIP_VAR *var, SCIP_SET *set, SCIP_Real solval)
Definition: var.c:13412
SCIP_RETCODE SCIPvarRemove(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_CLIQUETABLE *cliquetable, SCIP_SET *set, SCIP_Bool final)
Definition: var.c:5768
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:5976
#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:14937
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
SCIP_Real SCIPbdchginfoGetRelaxedBound(SCIP_BDCHGINFO *bdchginfo)
Definition: var.c:17997
void SCIPvarMarkDeleted(SCIP_VAR *var)
Definition: var.c:5804
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:5592
SCIP_Real SCIPvarGetAvgInferences(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15471
SCIP_Real SCIPvarCalcPscostConfidenceBound(SCIP_VAR *var, SCIP_SET *set, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun, SCIP_CONFIDENCELEVEL clevel)
Definition: var.c:14151
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:14189
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:14593
SCIP_Real SCIPvarGetPseudocostVariance(SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun)
Definition: var.c:14097
void SCIPvarGetClosestVlb(SCIP_VAR *var, SCIP_SOL *sol, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real *closestvlb, int *closestvlbidx)
Definition: var.c:13528
SCIP_RETCODE SCIPvarChgUbLazy(SCIP_VAR *var, SCIP_SET *set, SCIP_Real lazylb)
Definition: var.c:7127
SCIP_Real SCIPvarGetPseudocostCountCurrentRun(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:14022
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:4516
SCIP_RETCODE SCIPvarAddCliqueToList(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Bool value, SCIP_CLIQUE *clique)
Definition: var.c:10807
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:12057
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:17756
void SCIPvarSetNamePointer(SCIP_VAR *var, const char *name)
Definition: var.c:5750
SCIP_RETCODE SCIPvarUpdatePseudocost(SCIP_VAR *var, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
Definition: var.c:13783
struct SCIP_EventData SCIP_EVENTDATA
Definition: type_event.h:155
SCIP_Real SCIPvarGetLbLP(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:12342
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:5200
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:17783
SCIP_RETCODE SCIPbdchginfoCreate(SCIP_BDCHGINFO **bdchginfo, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_Real oldbound, SCIP_Real newbound)
Definition: var.c:15770
SCIP_Real SCIPvarGetVSIDS_rec(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15283
SCIP_RETCODE SCIPvarChgLbDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newbound)
Definition: var.c:7882
SCIP_RETCODE SCIPvarChgBranchPriority(SCIP_VAR *var, int branchpriority)
Definition: var.c:11100
SCIP_Real SCIPvarGetAvgConflictlength(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:14766
type definitions for problem variables
SCIP_Real SCIPvarGetAvgInferencesCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15528
SCIP_Real SCIPvarGetObjLP(SCIP_VAR *var)
Definition: var.c:12296
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:6820
SCIP_Real SCIPvarGetMultaggrUbLocal(SCIP_VAR *var, SCIP_SET *set)
Definition: var.c:8133
SCIP_Real SCIPvarGetPseudocost(SCIP_VAR *var, SCIP_STAT *stat, SCIP_Real solvaldelta)
Definition: var.c:13881
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:6152
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:14810
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:13603
SCIP_RETCODE SCIPvarFlattenAggregationGraph(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: var.c:4237
SCIP_RETCODE SCIPvarChgObjDive(SCIP_VAR *var, SCIP_SET *set, SCIP_LP *lp, SCIP_Real newobj)
Definition: var.c:6089
SCIP_Longint SCIPvarGetNActiveConflicts(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:14674
SCIP_RETCODE SCIPvarsAddClique(SCIP_VAR **vars, SCIP_Bool *values, int nvars, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CLIQUE *clique)
Definition: var.c:10769
SCIP_Real SCIPvarGetAvgCutoffsCurrentRun(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:15716
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:5627
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:8067
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:8326
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:4295
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:10684
#define SCIP_DECL_VARDELORIG(x)
Definition: type_var.h:109
void SCIPvarStoreRootSol(SCIP_VAR *var, SCIP_Bool roothaslp)
Definition: var.c:12677
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:14853
SCIP_RETCODE SCIPvarMarkDoNotMultaggr(SCIP_VAR *var)
Definition: var.c:5815
SCIP_Real SCIPvarGetPseudocostCount(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: var.c:13977
static const SCIP_Real scalars[]
Definition: lp.c:5618
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:7731
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:12412
datastructures for problem variables
#define SCIP_Real
Definition: def.h:149
SCIP_RETCODE SCIPvarChgLbLazy(SCIP_VAR *var, SCIP_SET *set, SCIP_Real lazylb)
Definition: var.c:7104
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:6202
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:8507
#define SCIP_Longint
Definition: def.h:134
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:14543
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:10361
void SCIPvarUpdateBestRootSol(SCIP_VAR *var, SCIP_SET *set, SCIP_Real rootsol, SCIP_Real rootredcost, SCIP_Real rootlpobjval)
Definition: var.c:12688
void SCIPvarSetProbindex(SCIP_VAR *var, int probindex)
Definition: var.c:5735
int SCIPvarGetConflictingBdchgDepth(SCIP_VAR *var, SCIP_SET *set, SCIP_BOUNDTYPE boundtype, SCIP_Real bound)
Definition: var.c:16290
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:15021
SCIP_Real SCIPvarGetMinPseudocostScore(SCIP_VAR *var, SCIP_STAT *stat, SCIP_SET *set, SCIP_Real solval)
Definition: var.c:14065
SCIP_RETCODE SCIPvarDelClique(SCIP_VAR *var, BMS_BLKMEM *blkmem, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool value, SCIP_CLIQUE *clique)
Definition: var.c:10846
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:13268
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:13675
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:419
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:6186
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:6963
SCIP_Real SCIPvarGetVSIDS(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition: var.c:17741
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:10593
SCIP_RETCODE SCIPvarChgBranchFactor(SCIP_VAR *var, SCIP_SET *set, SCIP_Real branchfactor)
Definition: var.c:10974
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:7972
memory allocation routines