Scippy

SCIP

Solving Constraint Integer Programs

tree.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-2019 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 visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file tree.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for branch and bound tree
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_TREE_H__
26 #define __SCIP_TREE_H__
27 
28 
29 #include "blockmemshell/memory.h"
30 #include "scip/def.h"
31 #include "scip/nodesel.h"
32 #include "scip/type_set.h"
33 #include "scip/type_stat.h"
34 #include "scip/type_cons.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_prop.h"
44 #include "scip/type_implics.h"
45 #include "scip/type_history.h"
47 #include "scip/pub_tree.h"
48 
49 #ifndef NDEBUG
50 #include "scip/struct_tree.h"
51 #endif
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 
58 /*
59  * Node methods
60  */
61 
62 /** creates a child node of the focus node */
64  SCIP_NODE** node, /**< pointer to node data structure */
65  BMS_BLKMEM* blkmem, /**< block memory */
66  SCIP_SET* set, /**< global SCIP settings */
67  SCIP_STAT* stat, /**< problem statistics */
68  SCIP_TREE* tree, /**< branch and bound tree */
69  SCIP_Real nodeselprio, /**< node selection priority of new node */
70  SCIP_Real estimate /**< estimate for (transformed) objective value of best feasible solution in subtree */
71  );
72 
73 /** frees node */
75  SCIP_NODE** node, /**< node data */
76  BMS_BLKMEM* blkmem, /**< block memory buffer */
77  SCIP_SET* set, /**< global SCIP settings */
78  SCIP_STAT* stat, /**< problem statistics */
79  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
80  SCIP_TREE* tree, /**< branch and bound tree */
81  SCIP_LP* lp /**< current LP data */
82  );
83 
84 /** increases the reference counter of the LP state in the fork or subroot node */
86  SCIP_NODE* node, /**< fork/subroot node */
87  int nuses /**< number to add to the usage counter */
88  );
89 
90 /** decreases the reference counter of the LP state in the fork or subroot node */
92  SCIP_NODE* node, /**< fork/subroot node */
93  BMS_BLKMEM* blkmem, /**< block memory buffers */
94  SCIP_LP* lp /**< current LP data */
95  );
96 
97 /** installs a child, a sibling, or a leaf node as the new focus node */
99  SCIP_NODE** node, /**< pointer to node to focus (or NULL to remove focus); the node
100  * is freed, if it was cut off due to a cut off subtree */
101  BMS_BLKMEM* blkmem, /**< block memory */
102  SCIP_SET* set, /**< global SCIP settings */
103  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
104  SCIP_STAT* stat, /**< problem statistics */
105  SCIP_PROB* transprob, /**< transformed problem */
106  SCIP_PROB* origprob, /**< original problem */
107  SCIP_PRIMAL* primal, /**< primal data */
108  SCIP_TREE* tree, /**< branch and bound tree */
109  SCIP_REOPT* reopt, /**< reoptimization data structure */
110  SCIP_LP* lp, /**< current LP data */
111  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
112  SCIP_CONFLICT* conflict, /**< conflict analysis data */
113  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
114  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
115  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
116  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
117  SCIP_Bool* cutoff, /**< pointer to store whether the given node can be cut off */
118  SCIP_Bool postponed, /**< was the current focus node postponed? */
119  SCIP_Bool exitsolve /**< are we in exitsolve stage, so we only need to loose the children */
120  );
121 
122 /** cuts off node and whole sub tree from branch and bound tree */
124  SCIP_NODE* node, /**< node that should be cut off */
125  SCIP_SET* set, /**< global SCIP settings */
126  SCIP_STAT* stat, /**< problem statistics */
127  SCIP_TREE* tree, /**< branch and bound tree */
128  SCIP_PROB* transprob, /**< transformed problem after presolve */
129  SCIP_PROB* origprob, /**< original problem */
130  SCIP_REOPT* reopt, /**< reoptimization data structure */
131  SCIP_LP* lp, /**< current LP */
132  BMS_BLKMEM* blkmem /**< block memory */
133  );
134 
135 /** marks node, that propagation should be applied again the next time, a node of its subtree is focused */
137  SCIP_NODE* node, /**< node that should be propagated again */
138  SCIP_SET* set, /**< global SCIP settings */
139  SCIP_STAT* stat, /**< problem statistics */
140  SCIP_TREE* tree /**< branch and bound tree */
141  );
142 
143 /** marks node, that it is completely propagated in the current repropagation subtree level */
145  SCIP_NODE* node, /**< node that should be propagated again */
146  SCIP_TREE* tree /**< branch and bound tree */
147  );
148 
149 /** adds constraint locally to the node and captures it; activates constraint, if node is active;
150  * if a local constraint is added to the root node, it is automatically upgraded into a global constraint
151  */
153  SCIP_NODE* node, /**< node to add constraint to */
154  BMS_BLKMEM* blkmem, /**< block memory */
155  SCIP_SET* set, /**< global SCIP settings */
156  SCIP_STAT* stat, /**< problem statistics */
157  SCIP_TREE* tree, /**< branch and bound tree */
158  SCIP_CONS* cons /**< constraint to add */
159  );
160 
161 /** locally deletes constraint at the given node by disabling its separation, enforcing, and propagation capabilities
162  * at the node; captures constraint; disables constraint, if node is active
163  */
165  SCIP_NODE* node, /**< node to add constraint to */
166  BMS_BLKMEM* blkmem, /**< block memory */
167  SCIP_SET* set, /**< global SCIP settings */
168  SCIP_STAT* stat, /**< problem statistics */
169  SCIP_TREE* tree, /**< branch and bound tree */
170  SCIP_CONS* cons /**< constraint to locally delete */
171  );
172 
173 /** return all bound changes based on constraint propagation; stop saving the bound changes if we reach a branching
174  * decision based on a dual information
175  */
177  SCIP_NODE* node, /**< node */
178  SCIP_VAR** vars, /**< array of variables on which constraint propagation triggers a bound change */
179  SCIP_Real* varbounds, /**< array of bounds set by constraint propagation */
180  SCIP_BOUNDTYPE* varboundtypes, /**< array of boundtypes set by constraint propagation */
181  int* nconspropvars, /**< number of variables on which constraint propagation triggers a bound change
182  * if this is larger than the array size, arrays should be reallocated and method
183  * should be called again */
184  int conspropvarssize /**< available slots in arrays */
185  );
186 
187 /** gets all bound changes applied after the first bound change based on dual information.
188  *
189  * @note: currently, we can only detect bound changes based in dual information if they arise from strong branching.
190  */
192  SCIP_NODE* node, /**< node */
193  SCIP_VAR** vars, /**< array of variables on which the branching has been performed in the parent node */
194  SCIP_Real* varbounds, /**< array of bounds which the branching in the parent node set */
195  SCIP_BOUNDTYPE* varboundtypes, /**< array of boundtypes which the branching in the parent node set */
196  int start, /**< first free slot in the arrays */
197  int* nbranchvars, /**< number of variables on which branching has been performed in the parent node
198  * if this is larger than the array size, arrays should be reallocated and method
199  * should be called again */
200  int branchvarssize /**< available slots in arrays */
201  );
202 
203 /** adds bound change with inference information to focus node, child of focus node, or probing node;
204  * if possible, adjusts bound to integral value;
205  * at most one of infercons and inferprop may be non-NULL
206  */
208  SCIP_NODE* node, /**< node to add bound change to */
209  BMS_BLKMEM* blkmem, /**< block memory */
210  SCIP_SET* set, /**< global SCIP settings */
211  SCIP_STAT* stat, /**< problem statistics */
212  SCIP_PROB* transprob, /**< transformed problem after presolve */
213  SCIP_PROB* origprob, /**< original problem */
214  SCIP_TREE* tree, /**< branch and bound tree */
215  SCIP_REOPT* reopt, /**< reoptimization data structure */
216  SCIP_LP* lp, /**< current LP data */
217  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
218  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
219  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
220  SCIP_VAR* var, /**< variable to change the bounds for */
221  SCIP_Real newbound, /**< new value for bound */
222  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
223  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
224  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
225  int inferinfo, /**< user information for inference to help resolving the conflict */
226  SCIP_Bool probingchange /**< is the bound change a temporary setting due to probing? */
227  );
228 
229 /** adds bound change to focus node, or child of focus node, or probing node;
230  * if possible, adjusts bound to integral value
231  */
233  SCIP_NODE* node, /**< node to add bound change to */
234  BMS_BLKMEM* blkmem, /**< block memory */
235  SCIP_SET* set, /**< global SCIP settings */
236  SCIP_STAT* stat, /**< problem statistics */
237  SCIP_PROB* transprob, /**< transformed problem after presolve */
238  SCIP_PROB* origprob, /**< original problem */
239  SCIP_TREE* tree, /**< branch and bound tree */
240  SCIP_REOPT* reopt, /**< reoptimization data structure */
241  SCIP_LP* lp, /**< current LP data */
242  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
243  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
244  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
245  SCIP_VAR* var, /**< variable to change the bounds for */
246  SCIP_Real newbound, /**< new value for bound */
247  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
248  SCIP_Bool probingchange /**< is the bound change a temporary setting due to probing? */
249  );
250 
251 /** adds hole with inference information to focus node, child of focus node, or probing node;
252  * if possible, adjusts bound to integral value;
253  * at most one of infercons and inferprop may be non-NULL
254  */
256  SCIP_NODE* node, /**< node to add bound change to */
257  BMS_BLKMEM* blkmem, /**< block memory */
258  SCIP_SET* set, /**< global SCIP settings */
259  SCIP_STAT* stat, /**< problem statistics */
260  SCIP_TREE* tree, /**< branch and bound tree */
261  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
262  SCIP_VAR* var, /**< variable to change the bounds for */
263  SCIP_Real left, /**< left bound of open interval defining the hole (left,right) */
264  SCIP_Real right, /**< right bound of open interval defining the hole (left,right) */
265  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
266  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
267  int inferinfo, /**< user information for inference to help resolving the conflict */
268  SCIP_Bool probingchange, /**< is the bound change a temporary setting due to probing? */
269  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
270  );
271 
272 /** adds hole change to focus node, or child of focus node */
274  SCIP_NODE* node, /**< node to add bound change to */
275  BMS_BLKMEM* blkmem, /**< block memory */
276  SCIP_SET* set, /**< global SCIP settings */
277  SCIP_STAT* stat, /**< problem statistics */
278  SCIP_TREE* tree, /**< branch and bound tree */
279  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
280  SCIP_VAR* var, /**< variable to change the bounds for */
281  SCIP_Real left, /**< left bound of open interval defining the hole (left,right) */
282  SCIP_Real right, /**< right bound of open interval defining the hole (left,right) */
283  SCIP_Bool probingchange, /**< is the bound change a temporary setting due to probing? */
284  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
285  );
286 
287 /** if given value is larger than the node's lower bound, sets the node's lower bound to the new value */
289  SCIP_NODE* node, /**< node to update lower bound for */
290  SCIP_STAT* stat, /**< problem statistics */
291  SCIP_SET* set, /**< global SCIP settings */
292  SCIP_TREE* tree, /**< branch and bound tree */
293  SCIP_PROB* transprob, /**< transformed problem data */
294  SCIP_PROB* origprob, /**< original problem */
295  SCIP_Real newbound /**< new lower bound for the node (if it's larger than the old one) */
296  );
297 
298 /** updates lower bound of node using lower bound of LP */
300  SCIP_NODE* node, /**< node to set lower bound for */
301  SCIP_SET* set, /**< global SCIP settings */
302  SCIP_STAT* stat, /**< problem statistics */
303  SCIP_TREE* tree, /**< branch and bound tree */
304  SCIP_PROB* transprob, /**< transformed problem after presolve */
305  SCIP_PROB* origprob, /**< original problem */
306  SCIP_LP* lp /**< LP data */
307  );
308 
309 /** change the node selection priority of the given child */
311  SCIP_TREE* tree, /**< branch and bound tree */
312  SCIP_NODE* child, /**< child to update the node selection priority */
313  SCIP_Real priority /**< node selection priority value */
314  );
315 
316 
317 /** sets the node's estimated bound to the new value */
319  SCIP_NODE* node, /**< node to update lower bound for */
320  SCIP_SET* set, /**< global SCIP settings */
321  SCIP_Real newestimate /**< new estimated bound for the node */
322  );
323 
324 /** propagates implications of binary fixings at the given node triggered by the implication graph and the clique table */
326  SCIP_NODE* node, /**< node to propagate implications on */
327  BMS_BLKMEM* blkmem, /**< block memory */
328  SCIP_SET* set, /**< global SCIP settings */
329  SCIP_STAT* stat, /**< problem statistics */
330  SCIP_PROB* transprob, /**< transformed problem after presolve */
331  SCIP_PROB* origprob, /**< original problem */
332  SCIP_TREE* tree, /**< branch and bound tree */
333  SCIP_REOPT* reopt, /**< reoptimization data structure */
334  SCIP_LP* lp, /**< current LP data */
335  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
336  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
337  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
338  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
339  );
340 
341 /** returns all bound changes based on dual information.
342  *
343  * currently, this methods works only for bound changes made by strong branching on binary variables. we need this
344  * method to ensure optimality within reoptimization.
345  *
346  * since the bound changes made by strong branching are stored as SCIP_BOUNDCHGTYPE_CONSINFER or SCIP_BOUNDCHGTYPE_PROPINFER
347  * with no constraint or propagator, resp., we are are interested in bound changes with these attributes.
348  *
349  * all bound changes of type SCIP_BOUNDCHGTYPE_BRANCHING are stored in the beginning of the bound change array, afterwards,
350  * we can find the other two types. thus, we start the search at the end of the list and stop when reaching the first
351  * bound change of type SCIP_BOUNDCHGTYPE_BRANCHING.
352  */
354  SCIP_NODE* node, /**< node data */
355  SCIP_VAR** vars, /**< array of variables on which the bound change is based on dual information */
356  SCIP_Real* bounds, /**< array of bounds which are based on dual information */
357  SCIP_BOUNDTYPE* boundtypes, /**< array of boundtypes which are based on dual information */
358  int* nvars, /**< number of variables on which the bound change is based on dual information
359  * if this is larger than the array size, arrays should be reallocated and method
360  * should be called again */
361  int varssize /**< available slots in arrays */
362  );
363 
364 /** returns the number of bound changes based on dual information.
365  *
366  * currently, this methods works only for bound changes made by strong branching on binary variables. we need this
367  * method to ensure optimality within reoptimization.
368  *
369  * since the bound changes made by strong branching are stored as SCIP_BOUNDCHGTYPE_CONSINFER or SCIP_BOUNDCHGTYPE_PROPINFER
370  * with no constraint or propagator, resp., we are are interested in bound changes with these attributes.
371  *
372  * all bound changes of type SCIP_BOUNDCHGTYPE_BRANCHING are stored in the beginning of the bound change array, afterwards,
373  * we can find the other two types. thus, we start the search at the end of the list and stop when reaching the first
374  * bound change of type SCIP_BOUNDCHGTYPE_BRANCHING.
375  */
377  SCIP_NODE* node
378  );
379 
380 /*
381  * Tree methods
382  */
383 
384 /** creates an initialized tree data structure */
386  SCIP_TREE** tree, /**< pointer to tree data structure */
387  BMS_BLKMEM* blkmem, /**< block memory buffers */
388  SCIP_SET* set, /**< global SCIP settings */
389  SCIP_NODESEL* nodesel /**< node selector to use for sorting leaves in the priority queue */
390  );
391 
392 /** frees tree data structure */
394  SCIP_TREE** tree, /**< pointer to tree data structure */
395  BMS_BLKMEM* blkmem, /**< block memory buffers */
396  SCIP_SET* set, /**< global SCIP settings */
397  SCIP_STAT* stat, /**< problem statistics */
398  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
399  SCIP_LP* lp /**< current LP data */
400  );
401 
402 /** clears and resets tree data structure and deletes all nodes */
404  SCIP_TREE* tree, /**< tree data structure */
405  BMS_BLKMEM* blkmem, /**< block memory buffers */
406  SCIP_SET* set, /**< global SCIP settings */
407  SCIP_STAT* stat, /**< problem statistics */
408  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
409  SCIP_LP* lp /**< current LP data */
410  );
411 
412 /** creates the root node of the tree and puts it into the leaves queue */
414  SCIP_TREE* tree, /**< tree data structure */
415  SCIP_REOPT* reopt, /**< reoptimization data structure */
416  BMS_BLKMEM* blkmem, /**< block memory buffers */
417  SCIP_SET* set, /**< global SCIP settings */
418  SCIP_STAT* stat, /**< problem statistics */
419  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
420  SCIP_LP* lp /**< current LP data */
421  );
422 
423 /** creates a temporary presolving root node of the tree and installs it as focus node */
425  SCIP_TREE* tree, /**< tree data structure */
426  SCIP_REOPT* reopt, /**< reoptimization data structure */
427  BMS_BLKMEM* blkmem, /**< block memory buffers */
428  SCIP_SET* set, /**< global SCIP settings */
429  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
430  SCIP_STAT* stat, /**< problem statistics */
431  SCIP_PROB* transprob, /**< transformed problem */
432  SCIP_PROB* origprob, /**< original problem */
433  SCIP_PRIMAL* primal, /**< primal data */
434  SCIP_LP* lp, /**< current LP data */
435  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
436  SCIP_CONFLICT* conflict, /**< conflict analysis data */
437  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
438  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
439  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
440  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
441  );
442 
443 /** frees the temporary presolving root and resets tree data structure */
445  SCIP_TREE* tree, /**< tree data structure */
446  SCIP_REOPT* reopt, /**< reoptimization data structure */
447  BMS_BLKMEM* blkmem, /**< block memory buffers */
448  SCIP_SET* set, /**< global SCIP settings */
449  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
450  SCIP_STAT* stat, /**< problem statistics */
451  SCIP_PROB* transprob, /**< transformed problem */
452  SCIP_PROB* origprob, /**< original problem */
453  SCIP_PRIMAL* primal, /**< primal data */
454  SCIP_LP* lp, /**< current LP data */
455  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
456  SCIP_CONFLICT* conflict, /**< conflict analysis data */
457  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
458  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
459  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
460  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
461  );
462 
463 /** returns the node selector associated with the given node priority queue */
465  SCIP_TREE* tree /**< branch and bound tree */
466  );
467 
468 /** sets the node selector used for sorting the nodes in the priority queue, and resorts the queue if necessary */
470  SCIP_TREE* tree, /**< branch and bound tree */
471  SCIP_SET* set, /**< global SCIP settings */
472  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
473  SCIP_STAT* stat, /**< problem statistics */
474  SCIP_NODESEL* nodesel /**< node selector to use for sorting the nodes in the queue */
475  );
476 
477 /** cuts off nodes with lower bound not better than given upper bound */
479  SCIP_TREE* tree, /**< branch and bound tree */
480  SCIP_REOPT* reopt, /**< reoptimization data structure */
481  BMS_BLKMEM* blkmem, /**< block memory */
482  SCIP_SET* set, /**< global SCIP settings */
483  SCIP_STAT* stat, /**< dynamic problem statistics */
484  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
485  SCIP_LP* lp, /**< current LP data */
486  SCIP_Real cutoffbound /**< cutoff bound: all nodes with lowerbound >= cutoffbound are cut off */
487  );
488 
489 /** constructs the LP relaxation of the focus node */
491  SCIP_TREE* tree, /**< branch and bound tree */
492  BMS_BLKMEM* blkmem, /**< block memory */
493  SCIP_SET* set, /**< global SCIP settings */
494  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
495  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
496  SCIP_LP* lp, /**< current LP data */
497  SCIP_Bool* initroot /**< pointer to store whether the root LP relaxation has to be initialized */
498  );
499 
500 /** loads LP state for fork/subroot of the focus node */
502  SCIP_TREE* tree, /**< branch and bound tree */
503  BMS_BLKMEM* blkmem, /**< block memory buffers */
504  SCIP_SET* set, /**< global SCIP settings */
505  SCIP_STAT* stat, /**< dynamic problem statistics */
506  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
507  SCIP_LP* lp /**< current LP data */
508  );
509 
510 /** calculates the node selection priority for moving the given variable's LP value to the given target value;
511  * this node selection priority can be given to the SCIPcreateChild() call
512  */
514  SCIP_TREE* tree, /**< branch and bound tree */
515  SCIP_SET* set, /**< global SCIP settings */
516  SCIP_STAT* stat, /**< dynamic problem statistics */
517  SCIP_VAR* var, /**< variable, of which the branching factor should be applied, or NULL */
518  SCIP_BRANCHDIR branchdir, /**< type of branching that was performed: upwards, downwards, or fixed
519  * fixed should only be used, when both bounds changed
520  */
521  SCIP_Real targetvalue /**< new value of the variable in the child node */
522  );
523 
524 /** calculates an estimate for the objective of the best feasible solution contained in the subtree after applying the given
525  * branching; this estimate can be given to the SCIPcreateChild() call
526  */
528  SCIP_TREE* tree, /**< branch and bound tree */
529  SCIP_SET* set, /**< global SCIP settings */
530  SCIP_STAT* stat, /**< dynamic problem statistics */
531  SCIP_VAR* var, /**< variable, of which the branching factor should be applied, or NULL */
532  SCIP_Real targetvalue /**< new value of the variable in the child node */
533  );
534 
535 /** branches on a variable x
536  * if x is a continuous variable, then two child nodes will be created
537  * (x <= x', x >= x')
538  * but if the bounds of x are such that their relative difference is smaller than epsilon,
539  * the variable is fixed to val (if not SCIP_INVALID) or a well chosen alternative in the current node,
540  * i.e., no children are created
541  * if x is not a continuous variable, then:
542  * if solution value x' is fractional, two child nodes will be created
543  * (x <= floor(x'), x >= ceil(x')),
544  * if solution value is integral, the x' is equal to lower or upper bound of the branching
545  * variable and the bounds of x are finite, then two child nodes will be created
546  * (x <= x", x >= x"+1 with x" = floor((lb + ub)/2)),
547  * otherwise (up to) three child nodes will be created
548  * (x <= x'-1, x == x', x >= x'+1)
549  * if solution value is equal to one of the bounds and the other bound is infinite, only two child nodes
550  * will be created (the third one would be infeasible anyway)
551  */
553  SCIP_TREE* tree, /**< branch and bound tree */
554  SCIP_REOPT* reopt, /**< reoptimization data structure */
555  BMS_BLKMEM* blkmem, /**< block memory */
556  SCIP_SET* set, /**< global SCIP settings */
557  SCIP_STAT* stat, /**< problem statistics data */
558  SCIP_PROB* transprob, /**< transformed problem after presolve */
559  SCIP_PROB* origprob, /**< original problem */
560  SCIP_LP* lp, /**< current LP data */
561  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
562  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
563  SCIP_VAR* var, /**< variable to branch on */
564  SCIP_Real val, /**< value to branch on or SCIP_INVALID for branching on current LP/pseudo solution. A branching value is required for branching on continuous variables */
565  SCIP_NODE** downchild, /**< pointer to return the left child with variable rounded down, or NULL */
566  SCIP_NODE** eqchild, /**< pointer to return the middle child with variable fixed, or NULL */
567  SCIP_NODE** upchild /**< pointer to return the right child with variable rounded up, or NULL */
568  );
569 
570 /** branches a variable x using the given domain hole; two child nodes will be created (x <= left, x >= right) */
572  SCIP_TREE* tree, /**< branch and bound tree */
573  SCIP_REOPT* reopt, /**< reoptimization data structure */
574  BMS_BLKMEM* blkmem, /**< block memory */
575  SCIP_SET* set, /**< global SCIP settings */
576  SCIP_STAT* stat, /**< problem statistics data */
577  SCIP_PROB* transprob, /**< transformed problem after presolve */
578  SCIP_PROB* origprob, /**< original problem */
579  SCIP_LP* lp, /**< current LP data */
580  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
581  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
582  SCIP_VAR* var, /**< variable to branch on */
583  SCIP_Real left, /**< left side of the domain hole */
584  SCIP_Real right, /**< right side of the domain hole */
585  SCIP_NODE** downchild, /**< pointer to return the left child with variable rounded down, or NULL */
586  SCIP_NODE** upchild /**< pointer to return the right child with variable rounded up, or NULL */
587  );
588 
589 /** n-ary branching on a variable x
590  * Branches on variable x such that up to n/2 children are created on each side of the usual branching value.
591  * The branching value is selected as in SCIPtreeBranchVar().
592  * If n is 2 or the variables local domain is too small for a branching into n pieces, SCIPtreeBranchVar() is called.
593  * The parameters minwidth and widthfactor determine the domain width of the branching variable in the child nodes.
594  * If n is odd, one child with domain width 'width' and having the branching value in the middle is created.
595  * Otherwise, two children with domain width 'width' and being left and right of the branching value are created.
596  * Next further nodes to the left and right are created, where width is multiplied by widthfactor with increasing distance from the first nodes.
597  * The initial width is calculated such that n/2 nodes are created to the left and to the right of the branching value.
598  * If this value is below minwidth, the initial width is set to minwidth, which may result in creating less than n nodes.
599  *
600  * Giving a large value for widthfactor results in creating children with small domain when close to the branching value
601  * and large domain when closer to the current variable bounds. That is, setting widthfactor to a very large value and n to 3
602  * results in a ternary branching where the branching variable is mostly fixed in the middle child.
603  * Setting widthfactor to 1.0 results in children where the branching variable always has the same domain width
604  * (except for one child if the branching value is not in the middle).
605  */
607  SCIP_TREE* tree, /**< branch and bound tree */
608  SCIP_REOPT* reopt, /**< reoptimization data structure */
609  BMS_BLKMEM* blkmem, /**< block memory */
610  SCIP_SET* set, /**< global SCIP settings */
611  SCIP_STAT* stat, /**< problem statistics data */
612  SCIP_PROB* transprob, /**< transformed problem after presolve */
613  SCIP_PROB* origprob, /**< original problem */
614  SCIP_LP* lp, /**< current LP data */
615  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
616  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
617  SCIP_VAR* var, /**< variable to branch on */
618  SCIP_Real val, /**< value to branch on or SCIP_INVALID for branching on current LP/pseudo solution.
619  * A branching value is required for branching on continuous variables */
620  int n, /**< attempted number of children to be created, must be >= 2 */
621  SCIP_Real minwidth, /**< minimal domain width in children */
622  SCIP_Real widthfactor, /**< multiplier for children domain width with increasing distance from val, must be >= 1.0 */
623  int* nchildren /**< buffer to store number of created children, or NULL */
624  );
625 
626 /** adds a diving bound change to the tree together with the information if this is a bound change
627  * for the preferred direction or not
628  */
630  SCIP_TREE* tree, /**< branch and bound tree */
631  BMS_BLKMEM* blkmem, /**< block memory buffers */
632  SCIP_VAR* var, /**< variable to apply the bound change to */
633  SCIP_BRANCHDIR dir, /**< direction of the bound change */
634  SCIP_Real value, /**< value to adjust this variable bound to */
635  SCIP_Bool preferred /**< is this a bound change for the preferred child? */
636  );
637 
638 /** get the dive bound change data for the preferred or the alternative direction */
640  SCIP_TREE* tree, /**< branch and bound tree */
641  SCIP_VAR*** variables, /**< pointer to store variables for the specified direction */
642  SCIP_BRANCHDIR** directions, /**< pointer to store the branching directions */
643  SCIP_Real** values, /**< pointer to store bound change values */
644  int* ndivebdchgs, /**< pointer to store the number of dive bound changes */
645  SCIP_Bool preferred /**< should the dive bound changes for the preferred child be output? */
646  );
647 
648 /** clear the tree dive bound change data structure */
650  SCIP_TREE* tree /**< branch and bound tree */
651  );
652 
653 /** switches to probing mode and creates a probing root */
655  SCIP_TREE* tree, /**< branch and bound tree */
656  BMS_BLKMEM* blkmem, /**< block memory */
657  SCIP_SET* set, /**< global SCIP settings */
658  SCIP_LP* lp, /**< current LP data */
659  SCIP_RELAXATION* relaxation, /**< global relaxation data */
660  SCIP_PROB* transprob, /**< transformed problem after presolve */
661  SCIP_Bool strongbranching /**< is the probing mode used for strongbranching? */
662  );
663 
664 /** creates a new probing child node in the probing path */
666  SCIP_TREE* tree, /**< branch and bound tree */
667  BMS_BLKMEM* blkmem, /**< block memory */
668  SCIP_SET* set, /**< global SCIP settings */
669  SCIP_LP* lp /**< current LP data */
670  );
671 
672 /** sets the LP state for the current probing node
673  *
674  * @note state and norms are stored at the node and later released by SCIP; therefore, the pointers are set
675  * to NULL by the method
676  *
677  * @note the pointers to state and norms must not be NULL; however, they may point to a NULL pointer if the
678  * respective information should not be set
679  */
681  SCIP_TREE* tree, /**< branch and bound tree */
682  BMS_BLKMEM* blkmem, /**< block memory */
683  SCIP_LP* lp, /**< current LP data */
684  SCIP_LPISTATE** lpistate, /**< pointer to LP state information (like basis information) */
685  SCIP_LPINORMS** lpinorms, /**< pointer to LP pricing norms information */
686  SCIP_Bool primalfeas, /**< primal feasibility when LP state information was stored */
687  SCIP_Bool dualfeas /**< dual feasibility when LP state information was stored */
688  );
689 
690 /** loads the LP state for the current probing node */
692  SCIP_TREE* tree, /**< branch and bound tree */
693  BMS_BLKMEM* blkmem, /**< block memory buffers */
694  SCIP_SET* set, /**< global SCIP settings */
695  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
696  SCIP_LP* lp /**< current LP data */
697  );
698 
699 /** marks the probing node to have a solved LP relaxation */
701  SCIP_TREE* tree, /**< branch and bound tree */
702  BMS_BLKMEM* blkmem, /**< block memory */
703  SCIP_LP* lp /**< current LP data */
704  );
705 
706 /** undoes all changes to the problem applied in probing up to the given probing depth;
707  * the changes of the probing node of the given probing depth are the last ones that remain active;
708  * changes that were applied before calling SCIPtreeCreateProbingNode() cannot be undone
709  */
711  SCIP_TREE* tree, /**< branch and bound tree */
712  SCIP_REOPT* reopt, /**< reoptimization data structure */
713  BMS_BLKMEM* blkmem, /**< block memory buffers */
714  SCIP_SET* set, /**< global SCIP settings */
715  SCIP_STAT* stat, /**< problem statistics */
716  SCIP_PROB* transprob, /**< transformed problem */
717  SCIP_PROB* origprob, /**< original problem */
718  SCIP_LP* lp, /**< current LP data */
719  SCIP_PRIMAL* primal, /**< primal data structure */
720  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
721  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
722  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
723  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
724  int probingdepth /**< probing depth of the node in the probing path that should be reactivated */
725  );
726 
727 /** switches back from probing to normal operation mode, frees all nodes on the probing path, restores bounds of all
728  * variables and restores active constraints arrays of focus node
729  */
731  SCIP_TREE* tree, /**< branch and bound tree */
732  SCIP_REOPT* reopt, /**< reoptimization data structure */
733  BMS_BLKMEM* blkmem, /**< block memory buffers */
734  SCIP_SET* set, /**< global SCIP settings */
735  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
736  SCIP_STAT* stat, /**< problem statistics */
737  SCIP_PROB* transprob, /**< transformed problem after presolve */
738  SCIP_PROB* origprob, /**< original problem */
739  SCIP_LP* lp, /**< current LP data */
740  SCIP_RELAXATION* relaxation, /**< global relaxation data */
741  SCIP_PRIMAL* primal, /**< primal LP data */
742  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
743  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
744  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
745  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
746  );
747 
748 /** stores relaxation solution before diving or probing */
750  SCIP_TREE* tree, /**< branch and bound tree */
751  SCIP_SET* set, /**< global SCIP settings */
752  SCIP_RELAXATION* relaxation, /**< global relaxation data */
753  SCIP_PROB* transprob /**< transformed problem after presolve */
754  );
755 
756 /** restores relaxation solution after diving or probing */
758  SCIP_TREE* tree, /**< branch and bound tree */
759  SCIP_SET* set, /**< global SCIP settings */
760  SCIP_RELAXATION* relaxation, /**< global relaxation data */
761  SCIP_PROB* transprob /**< transformed problem after presolve */
762  );
763 
764 
765 /** gets number of children of the focus node */
767  SCIP_TREE* tree /**< branch and bound tree */
768  );
769 
770 /** gets number of siblings of the focus node */
772  SCIP_TREE* tree /**< branch and bound tree */
773  );
774 
775 /** gets number of leaves in the tree (excluding children and siblings of focus nodes) */
777  SCIP_TREE* tree /**< branch and bound tree */
778  );
779 
780 /** gets number of open nodes in the tree (children + siblings + leaves) */
782  SCIP_TREE* tree /**< branch and bound tree */
783  );
784 
785 /** returns whether the active path goes completely down to the focus node */
787  SCIP_TREE* tree /**< branch and bound tree */
788  );
789 
790 /** returns whether the current node is a temporary probing node */
792  SCIP_TREE* tree /**< branch and bound tree */
793  );
794 
795 /** returns the temporary probing root node, or NULL if the we are not in probing mode */
797  SCIP_TREE* tree /**< branch and bound tree */
798  );
799 
800 /** returns the current probing depth, i.e. the number of probing sub nodes existing in the probing path */
802  SCIP_TREE* tree /**< branch and bound tree */
803  );
804 
805 /** gets focus node of the tree */
807  SCIP_TREE* tree /**< branch and bound tree */
808  );
809 
810 /** gets depth of focus node in the tree, or -1 if no focus node exists */
812  SCIP_TREE* tree /**< branch and bound tree */
813  );
814 
815 /** returns, whether the LP was or is to be solved in the focus node */
817  SCIP_TREE* tree /**< branch and bound tree */
818  );
819 
820 /** sets mark to solve or to ignore the LP while processing the focus node */
822  SCIP_TREE* tree, /**< branch and bound tree */
823  SCIP_Bool solvelp /**< should the LP be solved in focus node? */
824  );
825 
826 /** returns whether the LP of the focus node is already constructed */
828  SCIP_TREE* tree /**< branch and bound tree */
829  );
830 
831 /** returns whether the focus node is already solved and only propagated again */
833  SCIP_TREE* tree /**< branch and bound tree */
834  );
835 
836 /** gets current node of the tree, i.e. the last node in the active path, or NULL if no current node exists */
838  SCIP_TREE* tree /**< branch and bound tree */
839  );
840 
841 /** gets depth of current node in the tree, i.e. the length of the active path minus 1, or -1 if no current node exists */
843  SCIP_TREE* tree /**< branch and bound tree */
844  );
845 
846 /** returns, whether the LP was or is to be solved in the current node */
848  SCIP_TREE* tree /**< branch and bound tree */
849  );
850 
851 /** returns the depth of the effective root node (i.e. the first depth level of a node with at least two children) */
853  SCIP_TREE* tree /**< branch and bound tree */
854  );
855 
856 /** gets the root node of the tree */
858  SCIP_TREE* tree /**< branch and bound tree */
859  );
860 
861 /** returns whether we are in probing and the objective value of at least one column was changed */
863  SCIP_TREE* tree /**< branch and bound tree */
864  );
865 
866 /** marks the current probing node to have a changed objective function */
868  SCIP_TREE* tree /**< branch and bound tree */
869  );
870 
871 #ifdef NDEBUG
872 
873 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
874  * speed up the algorithms.
875  */
876 
877 #define SCIPtreeGetNLeaves(tree) SCIPnodepqLen((tree)->leaves)
878 #define SCIPtreeGetNChildren(tree) ((tree)->nchildren)
879 #define SCIPtreeGetNSiblings(tree) ((tree)->nsiblings)
880 #define SCIPtreeGetNNodes(tree) \
881  (SCIPtreeGetNChildren(tree) + SCIPtreeGetNSiblings(tree) + SCIPtreeGetNLeaves(tree))
882 #define SCIPtreeIsPathComplete(tree) ((tree)->focusnode == NULL || (tree)->focusnode->depth < (tree)->pathlen)
883 #define SCIPtreeProbing(tree) ((tree)->probingroot != NULL)
884 #define SCIPtreeGetProbingRoot(tree) (tree)->probingroot
885 #define SCIPtreeGetProbingDepth(tree) (SCIPtreeGetCurrentDepth(tree) - SCIPnodeGetDepth((tree)->probingroot))
886 #define SCIPtreeGetFocusNode(tree) (tree)->focusnode
887 #define SCIPtreeGetFocusDepth(tree) ((tree)->focusnode != NULL ? (tree)->focusnode->depth : -1)
888 #define SCIPtreeHasFocusNodeLP(tree) (tree)->focusnodehaslp
889 #define SCIPtreeSetFocusNodeLP(tree,solvelp) ((tree)->focusnodehaslp = solvelp)
890 #define SCIPtreeIsFocusNodeLPConstructed(tree) (tree)->focuslpconstructed
891 #define SCIPtreeInRepropagation(tree) ((tree)->focusnode != NULL \
892  && SCIPnodeGetType((tree)->focusnode) == SCIP_NODETYPE_REFOCUSNODE)
893 #define SCIPtreeGetCurrentNode(tree) ((tree)->pathlen > 0 ? (tree)->path[(tree)->pathlen-1] : NULL)
894 #define SCIPtreeGetCurrentDepth(tree) ((tree)->pathlen-1)
895 #define SCIPtreeHasCurrentNodeLP(tree) (SCIPtreeProbing(tree) ? (tree)->probingnodehaslp : SCIPtreeHasFocusNodeLP(tree))
896 #define SCIPtreeGetEffectiveRootDepth(tree) ((tree)->effectiverootdepth)
897 #define SCIPtreeGetRootNode(tree) ((tree)->root)
898 #define SCIPtreeProbingObjChanged(tree) ((tree)->probingobjchanged)
899 #define SCIPtreeMarkProbingObjChanged(tree) ((tree)->probingobjchanged = TRUE)
900 
901 #endif
902 
903 
904 /** gets the best child of the focus node w.r.t. the node selection priority assigned by the branching rule */
906  SCIP_TREE* tree /**< branch and bound tree */
907  );
908 
909 /** gets the best sibling of the focus node w.r.t. the node selection priority assigned by the branching rule */
911  SCIP_TREE* tree /**< branch and bound tree */
912  );
913 
914 /** gets the best child of the focus node w.r.t. the node selection strategy */
916  SCIP_TREE* tree, /**< branch and bound tree */
917  SCIP_SET* set /**< global SCIP settings */
918  );
919 
920 /** gets the best sibling of the focus node w.r.t. the node selection strategy */
922  SCIP_TREE* tree, /**< branch and bound tree */
923  SCIP_SET* set /**< global SCIP settings */
924  );
925 
926 /** gets the best leaf from the node queue w.r.t. the node selection strategy */
928  SCIP_TREE* tree /**< branch and bound tree */
929  );
930 
931 /** gets the best node from the tree (child, sibling, or leaf) w.r.t. the node selection strategy */
933  SCIP_TREE* tree, /**< branch and bound tree */
934  SCIP_SET* set /**< global SCIP settings */
935  );
936 
937 /** gets the minimal lower bound of all nodes in the tree */
939  SCIP_TREE* tree, /**< branch and bound tree */
940  SCIP_SET* set /**< global SCIP settings */
941  );
942 
943 /** gets the node with minimal lower bound of all nodes in the tree (child, sibling, or leaf) */
945  SCIP_TREE* tree, /**< branch and bound tree */
946  SCIP_SET* set /**< global SCIP settings */
947  );
948 
949 /** gets the average lower bound of all nodes in the tree */
951  SCIP_TREE* tree, /**< branch and bound tree */
952  SCIP_Real cutoffbound /**< global cutoff bound */
953  );
954 
955 #ifdef __cplusplus
956 }
957 #endif
958 
959 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_RETCODE SCIPnodeFree(SCIP_NODE **node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_TREE *tree, SCIP_LP *lp)
Definition: tree.c:1027
SCIP_RETCODE SCIPtreeCreateProbingNode(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: tree.c:6412
SCIP_RETCODE SCIPtreeSetNodesel(SCIP_TREE *tree, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_NODESEL *nodesel)
Definition: tree.c:5027
SCIP_RETCODE SCIPtreeAddDiveBoundChange(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Bool preferred)
Definition: tree.c:6193
SCIP_RETCODE SCIPtreeCreatePresolvingRoot(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:4933
void SCIPnodeGetDualBoundchgs(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *bounds, SCIP_BOUNDTYPE *boundtypes, int *nvars, int varssize)
Definition: tree.c:7549
int SCIPtreeGetProbingDepth(SCIP_TREE *tree)
Definition: tree.c:8335
SCIP_RETCODE SCIPnodeDelCons(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_CONS *cons)
Definition: tree.c:1608
public methods for branch and bound tree
SCIP_NODE * SCIPtreeGetLowerboundNode(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7198
SCIP_RETCODE SCIPnodeCreateChild(SCIP_NODE **node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_Real nodeselprio, SCIP_Real estimate)
Definition: tree.c:980
SCIP_RETCODE SCIPtreeSetProbingLPState(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_LP *lp, SCIP_LPISTATE **lpistate, SCIP_LPINORMS **lpinorms, SCIP_Bool primalfeas, SCIP_Bool dualfeas)
Definition: tree.c:6437
type definitions for implications, variable bounds, and cliques
SCIP_RETCODE SCIPtreeBranchVar(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Real val, SCIP_NODE **downchild, SCIP_NODE **eqchild, SCIP_NODE **upchild)
Definition: tree.c:5349
SCIP_Bool SCIPtreeHasFocusNodeLP(SCIP_TREE *tree)
Definition: tree.c:8249
SCIP_NODE * SCIPtreeGetBestChild(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7062
void SCIPtreeSetFocusNodeLP(SCIP_TREE *tree, SCIP_Bool solvelp)
Definition: tree.c:8259
type definitions for conflict store
SCIP_RETCODE SCIPtreeBacktrackProbing(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp, SCIP_PRIMAL *primal, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, int probingdepth)
Definition: tree.c:6746
SCIP_RETCODE SCIPnodeAddBoundinfer(SCIP_NODE *node, 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_VAR *var, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype, SCIP_CONS *infercons, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool probingchange)
Definition: tree.c:1769
SCIP_NODE * SCIPtreeGetFocusNode(SCIP_TREE *tree)
Definition: tree.c:8215
SCIP_NODE * SCIPtreeGetBestNode(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7126
struct SCIP_LPiNorms SCIP_LPINORMS
Definition: type_lpi.h:98
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPtreeCreate(SCIP_TREE **tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_NODESEL *nodesel)
Definition: tree.c:4701
type definitions for global SCIP settings
SCIP_NODE * SCIPtreeGetProbingRoot(SCIP_TREE *tree)
Definition: tree.c:8202
SCIP_RETCODE SCIPtreeLoadLPState(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:3475
int SCIPtreeGetFocusDepth(SCIP_TREE *tree)
Definition: tree.c:8232
type definitions for collecting reoptimization information
int SCIPtreeGetCurrentDepth(SCIP_TREE *tree)
Definition: tree.c:8307
type definitions for branching rules
type definitions for problem statistics
int SCIPtreeGetNChildren(SCIP_TREE *tree)
Definition: tree.c:8132
SCIP_Bool SCIPtreeIsPathComplete(SCIP_TREE *tree)
Definition: tree.c:8172
SCIP_Bool SCIPtreeIsFocusNodeLPConstructed(SCIP_TREE *tree)
Definition: tree.c:8270
SCIP_RETCODE SCIPnodeCutoff(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_REOPT *reopt, SCIP_LP *lp, BMS_BLKMEM *blkmem)
Definition: tree.c:1146
type definitions for LP management
SCIP_Bool SCIPtreeProbing(SCIP_TREE *tree)
Definition: tree.c:8189
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
SCIP_RETCODE SCIPnodeFocus(SCIP_NODE **node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, 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_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *cutoff, SCIP_Bool postponed, SCIP_Bool exitsolve)
Definition: tree.c:4241
void SCIPnodeMarkPropagated(SCIP_NODE *node, SCIP_TREE *tree)
Definition: tree.c:1232
SCIP_Real SCIPtreeCalcNodeselPriority(SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
Definition: tree.c:5140
SCIP_NODE * SCIPtreeGetBestSibling(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7089
SCIP_RETCODE SCIPtreeLoadLP(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_Bool *initroot)
Definition: tree.c:3347
SCIP_NODE * SCIPtreeGetBestLeaf(SCIP_TREE *tree)
Definition: tree.c:7116
SCIP_Bool SCIPtreeInRepropagation(SCIP_TREE *tree)
Definition: tree.c:8280
void SCIPnodeUpdateLowerbound(SCIP_NODE *node, SCIP_STAT *stat, SCIP_SET *set, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Real newbound)
Definition: tree.c:2299
struct SCIP_LPiState SCIP_LPISTATE
Definition: type_lpi.h:97
data structures for branch and bound tree
internal methods for node selectors and node priority queues
type definitions for problem variables
int SCIPnodeGetNDualBndchgs(SCIP_NODE *node)
Definition: tree.c:7504
type definitions for managing events
void SCIPnodePropagateAgain(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree)
Definition: tree.c:1206
SCIP_RETCODE SCIPnodeAddHolechg(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Real left, SCIP_Real right, SCIP_Bool probingchange, SCIP_Bool *added)
Definition: tree.c:2171
SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
Definition: tree.c:8324
#define SCIP_Bool
Definition: def.h:70
int SCIPtreeGetEffectiveRootDepth(SCIP_TREE *tree)
Definition: tree.c:8346
SCIP_Real SCIPtreeGetAvgLowerbound(SCIP_TREE *tree, SCIP_Real cutoffbound)
Definition: tree.c:7250
void SCIPtreeClearDiveBoundChanges(SCIP_TREE *tree)
Definition: tree.c:6248
SCIP_RETCODE SCIPtreeFree(SCIP_TREE **tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:4780
void SCIPtreeGetDiveBoundChangeData(SCIP_TREE *tree, SCIP_VAR ***variables, SCIP_BRANCHDIR **directions, SCIP_Real **values, int *ndivebdchgs, SCIP_Bool preferred)
Definition: tree.c:6225
void SCIPnodeSetEstimate(SCIP_NODE *node, SCIP_SET *set, SCIP_Real newestimate)
Definition: tree.c:2395
void SCIPnodeGetBdChgsAfterDual(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *varbounds, SCIP_BOUNDTYPE *varboundtypes, int start, int *nbranchvars, int branchvarssize)
Definition: tree.c:7867
type definitions for branch and bound tree
SCIP_RETCODE SCIPtreeBranchVarNary(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Real val, int n, SCIP_Real minwidth, SCIP_Real widthfactor, int *nchildren)
Definition: tree.c:5822
SCIP_RETCODE SCIPnodeReleaseLPIState(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_LP *lp)
Definition: tree.c:263
SCIP_RETCODE SCIPtreeStartProbing(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob, SCIP_Bool strongbranching)
Definition: tree.c:6347
SCIP_RETCODE SCIPtreeCreateRoot(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:4888
SCIP_RETCODE SCIPnodeCaptureLPIState(SCIP_NODE *node, int nuses)
Definition: tree.c:235
SCIP_NODE * SCIPtreeGetCurrentNode(SCIP_TREE *tree)
Definition: tree.c:8290
type definitions for storing and manipulating the main problem
SCIP_NODESEL * SCIPtreeGetNodesel(SCIP_TREE *tree)
Definition: tree.c:5017
int SCIPtreeGetNSiblings(SCIP_TREE *tree)
Definition: tree.c:8142
SCIP_Bool SCIPtreeProbingObjChanged(SCIP_TREE *tree)
Definition: tree.c:8368
type definitions for propagators
SCIP_RETCODE SCIPtreeStoreRelaxSol(SCIP_TREE *tree, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob)
Definition: tree.c:6941
SCIP_RETCODE SCIPtreeFreePresolvingRoot(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:4974
SCIP_RETCODE SCIPnodeAddBoundchg(SCIP_NODE *node, 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_VAR *var, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype, SCIP_Bool probingchange)
Definition: tree.c:2021
SCIP_RETCODE SCIPtreeMarkProbingNodeHasLP(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_LP *lp)
Definition: tree.c:6572
#define SCIP_Real
Definition: def.h:164
type definitions for branching and inference history
SCIP_RETCODE SCIPnodeAddCons(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_CONS *cons)
Definition: tree.c:1565
SCIP_NODE * SCIPtreeGetRootNode(SCIP_TREE *tree)
Definition: tree.c:8357
SCIP_RETCODE SCIPnodeAddHoleinfer(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Real left, SCIP_Real right, SCIP_CONS *infercons, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool probingchange, SCIP_Bool *added)
Definition: tree.c:2050
SCIP_NODE * SCIPtreeGetPrioChild(SCIP_TREE *tree)
Definition: tree.c:7010
int SCIPtreeGetNLeaves(SCIP_TREE *tree)
Definition: tree.c:8152
SCIP_RETCODE SCIPnodeUpdateLowerboundLP(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp)
Definition: tree.c:2343
void SCIPtreeMarkProbingObjChanged(SCIP_TREE *tree)
Definition: tree.c:8379
SCIP_RETCODE SCIPnodePropagateImplics(SCIP_NODE *node, 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 *cutoff)
Definition: tree.c:2409
type definitions for collecting primal CIP solutions and primal informations
SCIP_RETCODE SCIPtreeLoadProbingLPState(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:6491
int SCIPtreeGetNNodes(SCIP_TREE *tree)
Definition: tree.c:8162
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:427
void SCIPchildChgNodeselPrio(SCIP_TREE *tree, SCIP_NODE *child, SCIP_Real priority)
Definition: tree.c:2377
SCIP_RETCODE SCIPtreeRestoreRelaxSol(SCIP_TREE *tree, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob)
Definition: tree.c:6978
SCIP_RETCODE SCIPtreeEndProbing(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp, SCIP_RELAXATION *relaxation, SCIP_PRIMAL *primal, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:6780
SCIP_NODE * SCIPtreeGetPrioSibling(SCIP_TREE *tree)
Definition: tree.c:7036
SCIP_Real SCIPtreeGetLowerbound(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7160
SCIP_RETCODE SCIPtreeCutoff(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real cutoffbound)
Definition: tree.c:5055
SCIP_RETCODE SCIPtreeClear(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:4828
type definitions for constraints and constraint handlers
void SCIPnodeGetConsProps(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *varbounds, SCIP_BOUNDTYPE *varboundtypes, int *nconspropvars, int conspropvarssize)
Definition: tree.c:7779
SCIP_Real SCIPtreeCalcChildEstimate(SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real targetvalue)
Definition: tree.c:5290
SCIP_RETCODE SCIPtreeBranchVarHole(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Real left, SCIP_Real right, SCIP_NODE **downchild, SCIP_NODE **upchild)
Definition: tree.c:5680
memory allocation routines