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-2015 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 tree.h
17  * @brief internal methods for branch and bound tree
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_TREE_H__
25 #define __SCIP_TREE_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/type_set.h"
31 #include "scip/type_stat.h"
32 #include "scip/type_event.h"
33 #include "scip/type_lp.h"
34 #include "scip/type_var.h"
35 #include "scip/type_prob.h"
36 #include "scip/type_primal.h"
37 #include "scip/type_tree.h"
38 #include "scip/type_reopt.h"
39 #include "scip/type_branch.h"
40 #include "scip/type_prop.h"
41 #include "scip/type_implics.h"
42 #include "scip/pub_tree.h"
43 
44 #ifndef NDEBUG
45 #include "scip/struct_tree.h"
46 #endif
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 
53 /*
54  * Node methods
55  */
56 
57 /** creates a child node of the focus node */
58 extern
60  SCIP_NODE** node, /**< pointer to node data structure */
61  BMS_BLKMEM* blkmem, /**< block memory */
62  SCIP_SET* set, /**< global SCIP settings */
63  SCIP_STAT* stat, /**< problem statistics */
64  SCIP_TREE* tree, /**< branch and bound tree */
65  SCIP_Real nodeselprio, /**< node selection priority of new node */
66  SCIP_Real estimate /**< estimate for (transformed) objective value of best feasible solution in subtree */
67  );
68 
69 /** frees node */
70 extern
72  SCIP_NODE** node, /**< node data */
73  BMS_BLKMEM* blkmem, /**< block memory buffer */
74  SCIP_SET* set, /**< global SCIP settings */
75  SCIP_STAT* stat, /**< problem statistics */
76  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
77  SCIP_TREE* tree, /**< branch and bound tree */
78  SCIP_LP* lp /**< current LP data */
79  );
80 
81 /** increases the reference counter of the LP state in the fork or subroot node */
82 extern
84  SCIP_NODE* node, /**< fork/subroot node */
85  int nuses /**< number to add to the usage counter */
86  );
87 
88 /** decreases the reference counter of the LP state in the fork or subroot node */
89 extern
91  SCIP_NODE* node, /**< fork/subroot node */
92  BMS_BLKMEM* blkmem, /**< block memory buffers */
93  SCIP_LP* lp /**< current LP data */
94  );
95 
96 /** installs a child, a sibling, or a leaf node as the new focus node */
97 extern
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_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
114  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
115  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
116  SCIP_Bool* cutoff, /**< pointer to store whether the given node can be cut off */
117  SCIP_Bool exitsolve /**< are we in exitsolve stage, so we only need to loose the children */
118  );
119 
120 /** cuts off node and whole sub tree from branch and bound tree */
121 extern
123  SCIP_NODE* node, /**< node that should be cut off */
124  SCIP_SET* set, /**< global SCIP settings */
125  SCIP_STAT* stat, /**< problem statistics */
126  SCIP_TREE* tree, /**< branch and bound tree */
127  SCIP_REOPT* reopt, /**< reoptimization data structure */
128  SCIP_LP* lp, /**< current LP */
129  BMS_BLKMEM* blkmem /**< block memory */
130  );
131 
132 /** marks node, that propagation should be applied again the next time, a node of its subtree is focused */
133 extern
135  SCIP_NODE* node, /**< node that should be propagated again */
136  SCIP_SET* set, /**< global SCIP settings */
137  SCIP_STAT* stat, /**< problem statistics */
138  SCIP_TREE* tree /**< branch and bound tree */
139  );
140 
141 /** marks node, that it is completely propagated in the current repropagation subtree level */
142 extern
144  SCIP_NODE* node, /**< node that should be propagated again */
145  SCIP_TREE* tree /**< branch and bound tree */
146  );
147 
148 /** adds constraint locally to the node and captures it; activates constraint, if node is active;
149  * if a local constraint is added to the root node, it is automatically upgraded into a global constraint
150  */
151 extern
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  */
164 extern
166  SCIP_NODE* node, /**< node to add constraint to */
167  BMS_BLKMEM* blkmem, /**< block memory */
168  SCIP_SET* set, /**< global SCIP settings */
169  SCIP_STAT* stat, /**< problem statistics */
170  SCIP_TREE* tree, /**< branch and bound tree */
171  SCIP_CONS* cons /**< constraint to locally delete */
172  );
173 
174 /** returns all constraints added to a given node */
175 extern
177  SCIP_NODE* node, /**< node */
178  SCIP_CONS** addedconss, /**< array to store the constraints */
179  int* naddedconss, /**< number of added constraints */
180  int addedconsssize /**< size of the constraint array */
181  );
182 
183 /** return all bound changes based on constraint propagation; stop saving the bound changes if we reach a branching
184  * decision based on a dual information
185  */
186 extern
188  SCIP_NODE* node, /**< node */
189  SCIP_VAR** vars, /**< array of variables on which constraint propagation triggers a bound change */
190  SCIP_Real* varbounds, /**< array of bounds set by constraint propagation */
191  SCIP_BOUNDTYPE* varboundtypes, /**< array of boundtypes set by constraint propagation */
192  int* nconspropvars, /**< number of variables on which constraint propagation triggers a bound change
193  * if this is larger than the array size, arrays should be reallocated and method
194  * should be called again */
195  int conspropvarssize /**< available slots in arrays */
196  );
197 
198 /** gets all bound changes applied after the first bound change based on dual information.
199  *
200  * @note: currently, we can only detect bound changes based in dual information if they arise from strong branching.
201  */
202 extern
204  SCIP_NODE* node, /**< node */
205  SCIP_VAR** vars, /**< array of variables on which the branching has been performed in the parent node */
206  SCIP_Real* varbounds, /**< array of bounds which the branching in the parent node set */
207  SCIP_BOUNDTYPE* varboundtypes, /**< array of boundtypes which the branching in the parent node set */
208  int start, /**< first free slot in the arrays */
209  int* nbranchvars, /**< number of variables on which branching has been performed in the parent node
210  * if this is larger than the array size, arrays should be reallocated and method
211  * should be called again */
212  int branchvarssize /**< available slots in arrays */
213  );
214 
215 /** returns the number of added constraints to the given node */
216 extern
218  SCIP_NODE* node
219  );
220 
221 /** adds bound change with inference information to focus node, child of focus node, or probing node;
222  * if possible, adjusts bound to integral value;
223  * at most one of infercons and inferprop may be non-NULL
224  */
225 extern
227  SCIP_NODE* node, /**< node to add bound change to */
228  BMS_BLKMEM* blkmem, /**< block memory */
229  SCIP_SET* set, /**< global SCIP settings */
230  SCIP_STAT* stat, /**< problem statistics */
231  SCIP_PROB* transprob, /**< transformed problem after presolve */
232  SCIP_PROB* origprob, /**< original problem */
233  SCIP_TREE* tree, /**< branch and bound tree */
234  SCIP_REOPT* reopt, /**< reoptimization data structure */
235  SCIP_LP* lp, /**< current LP data */
236  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
237  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
238  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
239  SCIP_VAR* var, /**< variable to change the bounds for */
240  SCIP_Real newbound, /**< new value for bound */
241  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
242  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
243  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
244  int inferinfo, /**< user information for inference to help resolving the conflict */
245  SCIP_Bool probingchange /**< is the bound change a temporary setting due to probing? */
246  );
247 
248 /** adds bound change to focus node, or child of focus node, or probing node;
249  * if possible, adjusts bound to integral value
250  */
251 extern
253  SCIP_NODE* node, /**< node to add bound change to */
254  BMS_BLKMEM* blkmem, /**< block memory */
255  SCIP_SET* set, /**< global SCIP settings */
256  SCIP_STAT* stat, /**< problem statistics */
257  SCIP_PROB* transprob, /**< transformed problem after presolve */
258  SCIP_PROB* origprob, /**< original problem */
259  SCIP_TREE* tree, /**< branch and bound tree */
260  SCIP_REOPT* reopt, /**< reoptimization data structure */
261  SCIP_LP* lp, /**< current LP data */
262  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
263  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
264  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
265  SCIP_VAR* var, /**< variable to change the bounds for */
266  SCIP_Real newbound, /**< new value for bound */
267  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
268  SCIP_Bool probingchange /**< is the bound change a temporary setting due to probing? */
269  );
270 
271 /** adds hole with inference information to focus node, child of focus node, or probing node;
272  * if possible, adjusts bound to integral value;
273  * at most one of infercons and inferprop may be non-NULL
274  */
276  SCIP_NODE* node, /**< node to add bound change to */
277  BMS_BLKMEM* blkmem, /**< block memory */
278  SCIP_SET* set, /**< global SCIP settings */
279  SCIP_STAT* stat, /**< problem statistics */
280  SCIP_TREE* tree, /**< branch and bound tree */
281  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
282  SCIP_VAR* var, /**< variable to change the bounds for */
283  SCIP_Real left, /**< left bound of open interval defining the hole (left,right) */
284  SCIP_Real right, /**< right bound of open interval defining the hole (left,right) */
285  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
286  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
287  int inferinfo, /**< user information for inference to help resolving the conflict */
288  SCIP_Bool probingchange, /**< is the bound change a temporary setting due to probing? */
289  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
290  );
291 
292 /** adds hole change to focus node, or child of focus node */
293 extern
295  SCIP_NODE* node, /**< node to add bound change to */
296  BMS_BLKMEM* blkmem, /**< block memory */
297  SCIP_SET* set, /**< global SCIP settings */
298  SCIP_STAT* stat, /**< problem statistics */
299  SCIP_TREE* tree, /**< branch and bound tree */
300  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
301  SCIP_VAR* var, /**< variable to change the bounds for */
302  SCIP_Real left, /**< left bound of open interval defining the hole (left,right) */
303  SCIP_Real right, /**< right bound of open interval defining the hole (left,right) */
304  SCIP_Bool probingchange, /**< is the bound change a temporary setting due to probing? */
305  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
306  );
307 
308 /** if given value is larger than the node's lower bound, sets the node's lower bound to the new value */
309 extern
311  SCIP_NODE* node, /**< node to update lower bound for */
312  SCIP_STAT* stat, /**< problem statistics */
313  SCIP_SET* set, /**< global SCIP settings */
314  SCIP_TREE* tree, /**< branch and bound tree */
315  SCIP_PROB* transprob, /**< transformed problem data */
316  SCIP_PROB* origprob, /**< original problem */
317  SCIP_Real newbound /**< new lower bound for the node (if it's larger than the old one) */
318  );
319 
320 /** updates lower bound of node using lower bound of LP */
321 extern
323  SCIP_NODE* node, /**< node to set lower bound for */
324  SCIP_SET* set, /**< global SCIP settings */
325  SCIP_STAT* stat, /**< problem statistics */
326  SCIP_TREE* tree, /**< branch and bound tree */
327  SCIP_PROB* transprob, /**< transformed problem after presolve */
328  SCIP_PROB* origprob, /**< original problem */
329  SCIP_LP* lp /**< LP data */
330  );
331 
332 /** change the node selection priority of the given child */
333 extern
335  SCIP_TREE* tree, /**< branch and bound tree */
336  SCIP_NODE* child, /**< child to update the node selection priority */
337  SCIP_Real priority /**< node selection priority value */
338  );
339 
340 
341 /** sets the node's estimated bound to the new value */
342 extern
344  SCIP_NODE* node, /**< node to update lower bound for */
345  SCIP_SET* set, /**< global SCIP settings */
346  SCIP_Real newestimate /**< new estimated bound for the node */
347  );
348 
349 /** propagates implications of binary fixings at the given node triggered by the implication graph and the clique table */
350 extern
352  SCIP_NODE* node, /**< node to propagate implications on */
353  BMS_BLKMEM* blkmem, /**< block memory */
354  SCIP_SET* set, /**< global SCIP settings */
355  SCIP_STAT* stat, /**< problem statistics */
356  SCIP_PROB* transprob, /**< transformed problem after presolve */
357  SCIP_PROB* origprob, /**< original problem */
358  SCIP_TREE* tree, /**< branch and bound tree */
359  SCIP_REOPT* reopt, /**< reoptimization data structure */
360  SCIP_LP* lp, /**< current LP data */
361  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
362  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
363  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
364  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
365  );
366 
367 /** returns all bound changes based on dual information.
368  *
369  * currently, this methods works only for bound changes made by strong branching on binary variables. we need this
370  * method to ensure optimality within reoptimization.
371  *
372  * since the bound changes made by strong branching are stored as SCIP_BOUNDCHGTYPE_CONSINFER or SCIP_BOUNDCHGTYPE_PROPINFER
373  * with no constraint or propagator, resp., we are are interested in bound changes with these attributes.
374  *
375  * all bound changes of type SCIP_BOUNDCHGTYPE_BRANCHING are stored in the beginning of the bound change array, afterwards,
376  * we can find the other two types. thus, we start the search at the end of the list and stop when reaching the first
377  * bound change of type SCIP_BOUNDCHGTYPE_BRANCHING.
378  */
379 extern
381  SCIP_NODE* node, /**< node data */
382  SCIP_VAR** vars, /**< array of variables on which the bound change is based on dual information */
383  SCIP_Real* bounds, /**< array of bounds which are based on dual information */
384  int* nvars, /**< number of variables on which the bound change is based on dual information
385  * if this is larger than the array size, arrays should be reallocated and method
386  * should be called again */
387  int varssize /**< available slots in arrays */
388  );
389 
390 /** returns the number of bound changes based on dual information.
391  *
392  * currently, this methods works only for bound changes made by strong branching on binary variables. we need this
393  * method to ensure optimality within reoptimization.
394  *
395  * since the bound changes made by strong branching are stored as SCIP_BOUNDCHGTYPE_CONSINFER or SCIP_BOUNDCHGTYPE_PROPINFER
396  * with no constraint or propagator, resp., we are are interested in bound changes with these attributes.
397  *
398  * all bound changes of type SCIP_BOUNDCHGTYPE_BRANCHING are stored in the beginning of the bound change array, afterwards,
399  * we can find the other two types. thus, we start the search at the end of the list and stop when reaching the first
400  * bound change of type SCIP_BOUNDCHGTYPE_BRANCHING.
401  */
402 extern
404  SCIP_NODE* node
405  );
406 
407 /*
408  * Tree methods
409  */
410 
411 /** creates an initialized tree data structure */
412 extern
414  SCIP_TREE** tree, /**< pointer to tree data structure */
415  BMS_BLKMEM* blkmem, /**< block memory buffers */
416  SCIP_SET* set, /**< global SCIP settings */
417  SCIP_NODESEL* nodesel /**< node selector to use for sorting leaves in the priority queue */
418  );
419 
420 /** frees tree data structure */
421 extern
423  SCIP_TREE** tree, /**< pointer to tree data structure */
424  BMS_BLKMEM* blkmem, /**< block memory buffers */
425  SCIP_SET* set, /**< global SCIP settings */
426  SCIP_STAT* stat, /**< problem statistics */
427  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
428  SCIP_LP* lp /**< current LP data */
429  );
430 
431 /** clears and resets tree data structure and deletes all nodes */
432 extern
434  SCIP_TREE* tree, /**< tree data structure */
435  BMS_BLKMEM* blkmem, /**< block memory buffers */
436  SCIP_SET* set, /**< global SCIP settings */
437  SCIP_STAT* stat, /**< problem statistics */
438  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
439  SCIP_LP* lp /**< current LP data */
440  );
441 
442 /** creates the root node of the tree and puts it into the leaves queue */
443 extern
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_STAT* stat, /**< problem statistics */
450  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
451  SCIP_LP* lp /**< current LP data */
452  );
453 
454 /** creates a temporary presolving root node of the tree and installs it as focus node */
455 extern
457  SCIP_TREE* tree, /**< tree data structure */
458  SCIP_REOPT* reopt, /**< reoptimization data structure */
459  BMS_BLKMEM* blkmem, /**< block memory buffers */
460  SCIP_SET* set, /**< global SCIP settings */
461  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
462  SCIP_STAT* stat, /**< problem statistics */
463  SCIP_PROB* transprob, /**< transformed problem */
464  SCIP_PROB* origprob, /**< original problem */
465  SCIP_PRIMAL* primal, /**< primal data */
466  SCIP_LP* lp, /**< current LP data */
467  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
468  SCIP_CONFLICT* conflict, /**< conflict analysis data */
469  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
470  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
471  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
472  );
473 
474 /** frees the temporary presolving root and resets tree data structure */
475 extern
477  SCIP_TREE* tree, /**< tree data structure */
478  SCIP_REOPT* reopt, /**< reoptimization data structure */
479  BMS_BLKMEM* blkmem, /**< block memory buffers */
480  SCIP_SET* set, /**< global SCIP settings */
481  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
482  SCIP_STAT* stat, /**< problem statistics */
483  SCIP_PROB* transprob, /**< transformed problem */
484  SCIP_PROB* origprob, /**< original problem */
485  SCIP_PRIMAL* primal, /**< primal data */
486  SCIP_LP* lp, /**< current LP data */
487  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
488  SCIP_CONFLICT* conflict, /**< conflict analysis data */
489  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
490  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
491  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
492  );
493 
494 /** returns the node selector associated with the given node priority queue */
495 extern
497  SCIP_TREE* tree /**< branch and bound tree */
498  );
499 
500 /** sets the node selector used for sorting the nodes in the priority queue, and resorts the queue if necessary */
501 extern
503  SCIP_TREE* tree, /**< branch and bound tree */
504  SCIP_SET* set, /**< global SCIP settings */
505  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
506  SCIP_STAT* stat, /**< problem statistics */
507  SCIP_NODESEL* nodesel /**< node selector to use for sorting the nodes in the queue */
508  );
509 
510 /** cuts off nodes with lower bound not better than given upper bound */
511 extern
513  SCIP_TREE* tree, /**< branch and bound tree */
514  SCIP_REOPT* reopt, /**< reoptimization data structure */
515  BMS_BLKMEM* blkmem, /**< block memory */
516  SCIP_SET* set, /**< global SCIP settings */
517  SCIP_STAT* stat, /**< dynamic problem statistics */
518  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
519  SCIP_LP* lp, /**< current LP data */
520  SCIP_Real cutoffbound /**< cutoff bound: all nodes with lowerbound >= cutoffbound are cut off */
521  );
522 
523 /** constructs the LP relaxation of the focus node */
524 extern
526  SCIP_TREE* tree, /**< branch and bound tree */
527  BMS_BLKMEM* blkmem, /**< block memory */
528  SCIP_SET* set, /**< global SCIP settings */
529  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
530  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
531  SCIP_LP* lp, /**< current LP data */
532  SCIP_Bool* initroot /**< pointer to store whether the root LP relaxation has to be initialized */
533  );
534 
535 /** loads LP state for fork/subroot of the focus node */
536 extern
538  SCIP_TREE* tree, /**< branch and bound tree */
539  BMS_BLKMEM* blkmem, /**< block memory buffers */
540  SCIP_SET* set, /**< global SCIP settings */
541  SCIP_STAT* stat, /**< dynamic problem statistics */
542  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
543  SCIP_LP* lp /**< current LP data */
544  );
545 
546 /** calculates the node selection priority for moving the given variable's LP value to the given target value;
547  * this node selection priority can be given to the SCIPcreateChild() call
548  */
549 extern
551  SCIP_TREE* tree, /**< branch and bound tree */
552  SCIP_SET* set, /**< global SCIP settings */
553  SCIP_STAT* stat, /**< dynamic problem statistics */
554  SCIP_VAR* var, /**< variable, of which the branching factor should be applied, or NULL */
555  SCIP_BRANCHDIR branchdir, /**< type of branching that was performed: upwards, downwards, or fixed
556  * fixed should only be used, when both bounds changed
557  */
558  SCIP_Real targetvalue /**< new value of the variable in the child node */
559  );
560 
561 /** calculates an estimate for the objective of the best feasible solution contained in the subtree after applying the given
562  * branching; this estimate can be given to the SCIPcreateChild() call
563  */
564 extern
566  SCIP_TREE* tree, /**< branch and bound tree */
567  SCIP_SET* set, /**< global SCIP settings */
568  SCIP_STAT* stat, /**< dynamic problem statistics */
569  SCIP_VAR* var, /**< variable, of which the branching factor should be applied, or NULL */
570  SCIP_Real targetvalue /**< new value of the variable in the child node */
571  );
572 
573 /** branches on a variable x
574  * if x is a continuous variable, then two child nodes will be created
575  * (x <= x', x >= x')
576  * but if the bounds of x are such that their relative difference is smaller than epsilon,
577  * the variable is fixed to val (if not SCIP_INVALID) or a well chosen alternative in the current node,
578  * i.e., no children are created
579  * if x is not a continuous variable, then:
580  * if solution value x' is fractional, two child nodes will be created
581  * (x <= floor(x'), x >= ceil(x')),
582  * if solution value is integral, the x' is equal to lower or upper bound of the branching
583  * variable and the bounds of x are finite, then two child nodes will be created
584  * (x <= x", x >= x"+1 with x" = floor((lb + ub)/2)),
585  * otherwise (up to) three child nodes will be created
586  * (x <= x'-1, x == x', x >= x'+1)
587  * if solution value is equal to one of the bounds and the other bound is infinite, only two child nodes
588  * will be created (the third one would be infeasible anyway)
589  */
590 extern
592  SCIP_TREE* tree, /**< branch and bound tree */
593  SCIP_REOPT* reopt, /**< reoptimization data structure */
594  BMS_BLKMEM* blkmem, /**< block memory */
595  SCIP_SET* set, /**< global SCIP settings */
596  SCIP_STAT* stat, /**< problem statistics data */
597  SCIP_PROB* transprob, /**< transformed problem after presolve */
598  SCIP_PROB* origprob, /**< original problem */
599  SCIP_LP* lp, /**< current LP data */
600  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
601  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
602  SCIP_VAR* var, /**< variable to branch on */
603  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 */
604  SCIP_NODE** downchild, /**< pointer to return the left child with variable rounded down, or NULL */
605  SCIP_NODE** eqchild, /**< pointer to return the middle child with variable fixed, or NULL */
606  SCIP_NODE** upchild /**< pointer to return the right child with variable rounded up, or NULL */
607  );
608 
609 /** branches a variable x using the given domain hole; two child nodes will be created (x <= left, x >= right) */
610 extern
612  SCIP_TREE* tree, /**< branch and bound tree */
613  SCIP_REOPT* reopt, /**< reoptimization data structure */
614  BMS_BLKMEM* blkmem, /**< block memory */
615  SCIP_SET* set, /**< global SCIP settings */
616  SCIP_STAT* stat, /**< problem statistics data */
617  SCIP_PROB* transprob, /**< transformed problem after presolve */
618  SCIP_PROB* origprob, /**< original problem */
619  SCIP_LP* lp, /**< current LP data */
620  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
621  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
622  SCIP_VAR* var, /**< variable to branch on */
623  SCIP_Real left, /**< left side of the domain hole */
624  SCIP_Real right, /**< right side of the domain hole */
625  SCIP_NODE** downchild, /**< pointer to return the left child with variable rounded down, or NULL */
626  SCIP_NODE** upchild /**< pointer to return the right child with variable rounded up, or NULL */
627  );
628 
629 /** n-ary branching on a variable x
630  * Branches on variable x such that up to n/2 children are created on each side of the usual branching value.
631  * The branching value is selected as in SCIPtreeBranchVar().
632  * If n is 2 or the variables local domain is too small for a branching into n pieces, SCIPtreeBranchVar() is called.
633  * The parameters minwidth and widthfactor determine the domain width of the branching variable in the child nodes.
634  * If n is odd, one child with domain width 'width' and having the branching value in the middle is created.
635  * Otherwise, two children with domain width 'width' and being left and right of the branching value are created.
636  * Next further nodes to the left and right are created, where width is multiplied by widthfactor with increasing distance from the first nodes.
637  * The initial width is calculated such that n/2 nodes are created to the left and to the right of the branching value.
638  * If this value is below minwidth, the initial width is set to minwidth, which may result in creating less than n nodes.
639  *
640  * Giving a large value for widthfactor results in creating children with small domain when close to the branching value
641  * and large domain when closer to the current variable bounds. That is, setting widthfactor to a very large value and n to 3
642  * results in a ternary branching where the branching variable is mostly fixed in the middle child.
643  * Setting widthfactor to 1.0 results in children where the branching variable always has the same domain width
644  * (except for one child if the branching value is not in the middle).
645  */
646 extern
648  SCIP_TREE* tree, /**< branch and bound tree */
649  SCIP_REOPT* reopt, /**< reoptimization data structure */
650  BMS_BLKMEM* blkmem, /**< block memory */
651  SCIP_SET* set, /**< global SCIP settings */
652  SCIP_STAT* stat, /**< problem statistics data */
653  SCIP_PROB* transprob, /**< transformed problem after presolve */
654  SCIP_PROB* origprob, /**< original problem */
655  SCIP_LP* lp, /**< current LP data */
656  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
657  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
658  SCIP_VAR* var, /**< variable to branch on */
659  SCIP_Real val, /**< value to branch on or SCIP_INVALID for branching on current LP/pseudo solution.
660  * A branching value is required for branching on continuous variables */
661  int n, /**< attempted number of children to be created, must be >= 2 */
662  SCIP_Real minwidth, /**< minimal domain width in children */
663  SCIP_Real widthfactor, /**< multiplier for children domain width with increasing distance from val, must be >= 1.0 */
664  int* nchildren /**< buffer to store number of created children, or NULL */
665  );
666 
667 /** adds a diving bound change to the tree together with the information if this is a bound change
668  * for the preferred direction or not
669  */
670 extern
672  SCIP_TREE* tree, /**< branch and bound tree */
673  BMS_BLKMEM* blkmem, /**< block memory buffers */
674  SCIP_VAR* var, /**< variable to apply the bound change to */
675  SCIP_BRANCHDIR dir, /**< direction of the bound change */
676  SCIP_Real value, /**< value to adjust this variable bound to */
677  SCIP_Bool preferred /**< is this a bound change for the preferred child? */
678  );
679 
680 /** get the dive bound change data for the preferred or the alternative direction */
681 extern
683  SCIP_TREE* tree, /**< branch and bound tree */
684  SCIP_VAR*** variables, /**< pointer to store variables for the specified direction */
685  SCIP_BRANCHDIR** directions, /**< pointer to store the branching directions */
686  SCIP_Real** values, /**< pointer to store bound change values */
687  int* ndivebdchgs, /**< pointer to store the number of dive bound changes */
688  SCIP_Bool preferred /**< should the dive bound changes for the preferred child be output? */
689  );
690 
691 /** clear the tree dive bound change data structure */
692 extern
694  SCIP_TREE* tree /**< branch and bound tree */
695  );
696 
697 /** switches to probing mode and creates a probing root */
698 extern
700  SCIP_TREE* tree, /**< branch and bound tree */
701  BMS_BLKMEM* blkmem, /**< block memory */
702  SCIP_SET* set, /**< global SCIP settings */
703  SCIP_LP* lp, /**< current LP data */
704  SCIP_Bool strongbranching /**< is the probing mode used for strongbranching? */
705  );
706 
707 /** creates a new probing child node in the probing path */
708 extern
710  SCIP_TREE* tree, /**< branch and bound tree */
711  BMS_BLKMEM* blkmem, /**< block memory */
712  SCIP_SET* set, /**< global SCIP settings */
713  SCIP_LP* lp /**< current LP data */
714  );
715 
716 /** loads the LP state for the current probing node */
717 extern
719  SCIP_TREE* tree, /**< branch and bound tree */
720  BMS_BLKMEM* blkmem, /**< block memory buffers */
721  SCIP_SET* set, /**< global SCIP settings */
722  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
723  SCIP_LP* lp /**< current LP data */
724  );
725 
726 /** marks the probing node to have a solved LP relaxation */
727 extern
729  SCIP_TREE* tree, /**< branch and bound tree */
730  BMS_BLKMEM* blkmem, /**< block memory */
731  SCIP_LP* lp /**< current LP data */
732  );
733 
734 /** undoes all changes to the problem applied in probing up to the given probing depth;
735  * the changes of the probing node of the given probing depth are the last ones that remain active;
736  * changes that were applied before calling SCIPtreeCreateProbingNode() cannot be undone
737  */
738 extern
740  SCIP_TREE* tree, /**< branch and bound tree */
741  SCIP_REOPT* reopt, /**< reoptimization data structure */
742  BMS_BLKMEM* blkmem, /**< block memory buffers */
743  SCIP_SET* set, /**< global SCIP settings */
744  SCIP_STAT* stat, /**< problem statistics */
745  SCIP_PROB* transprob, /**< transformed problem */
746  SCIP_PROB* origprob, /**< original problem */
747  SCIP_LP* lp, /**< current LP data */
748  SCIP_PRIMAL* primal, /**< primal data structure */
749  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
750  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
751  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
752  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
753  int probingdepth /**< probing depth of the node in the probing path that should be reactivated */
754  );
755 
756 /** switches back from probing to normal operation mode, frees all nodes on the probing path, restores bounds of all
757  * variables and restores active constraints arrays of focus node
758  */
759 extern
761  SCIP_TREE* tree, /**< branch and bound tree */
762  SCIP_REOPT* reopt, /**< reoptimization data structure */
763  BMS_BLKMEM* blkmem, /**< block memory buffers */
764  SCIP_SET* set, /**< global SCIP settings */
765  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
766  SCIP_STAT* stat, /**< problem statistics */
767  SCIP_PROB* transprob, /**< transformed problem after presolve */
768  SCIP_PROB* origprob, /**< original problem */
769  SCIP_LP* lp, /**< current LP data */
770  SCIP_PRIMAL* primal, /**< primal LP data */
771  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
772  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
773  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
774  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
775  );
776 
777 
778 /** gets number of children of the focus node */
779 extern
781  SCIP_TREE* tree /**< branch and bound tree */
782  );
783 
784 /** gets number of siblings of the focus node */
785 extern
787  SCIP_TREE* tree /**< branch and bound tree */
788  );
789 
790 /** gets number of leaves in the tree (excluding children and siblings of focus nodes) */
791 extern
793  SCIP_TREE* tree /**< branch and bound tree */
794  );
795 
796 /** gets number of open nodes in the tree (children + siblings + leaves) */
797 extern
799  SCIP_TREE* tree /**< branch and bound tree */
800  );
801 
802 /** returns whether the active path goes completely down to the focus node */
803 extern
805  SCIP_TREE* tree /**< branch and bound tree */
806  );
807 
808 /** returns whether the current node is a temporary probing node */
809 extern
811  SCIP_TREE* tree /**< branch and bound tree */
812  );
813 
814 /** returns the temporary probing root node, or NULL if the we are not in probing mode */
815 extern
817  SCIP_TREE* tree /**< branch and bound tree */
818  );
819 
820 /** returns the current probing depth, i.e. the number of probing sub nodes existing in the probing path */
821 extern
823  SCIP_TREE* tree /**< branch and bound tree */
824  );
825 
826 /** gets focus node of the tree */
827 extern
829  SCIP_TREE* tree /**< branch and bound tree */
830  );
831 
832 /** gets depth of focus node in the tree, or -1 if no focus node exists */
833 extern
835  SCIP_TREE* tree /**< branch and bound tree */
836  );
837 
838 /** returns, whether the LP was or is to be solved in the focus node */
839 extern
841  SCIP_TREE* tree /**< branch and bound tree */
842  );
843 
844 /** sets mark to solve or to ignore the LP while processing the focus node */
845 extern
847  SCIP_TREE* tree, /**< branch and bound tree */
848  SCIP_Bool solvelp /**< should the LP be solved in focus node? */
849  );
850 
851 /** returns whether the LP of the focus node is already constructed */
852 extern
854  SCIP_TREE* tree /**< branch and bound tree */
855  );
856 
857 /** returns whether the focus node is already solved and only propagated again */
858 extern
860  SCIP_TREE* tree /**< branch and bound tree */
861  );
862 
863 /** gets current node of the tree, i.e. the last node in the active path, or NULL if no current node exists */
864 extern
866  SCIP_TREE* tree /**< branch and bound tree */
867  );
868 
869 /** 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 */
870 extern
872  SCIP_TREE* tree /**< branch and bound tree */
873  );
874 
875 /** returns, whether the LP was or is to be solved in the current node */
876 extern
878  SCIP_TREE* tree /**< branch and bound tree */
879  );
880 
881 /** returns the depth of the effective root node (i.e. the first depth level of a node with at least two children) */
882 extern
884  SCIP_TREE* tree /**< branch and bound tree */
885  );
886 
887 /** gets the root node of the tree */
888 extern
890  SCIP_TREE* tree /**< branch and bound tree */
891  );
892 
893 /** returns whether we are in probing and the objective value of at least one column was changed */
894 extern
896  SCIP_TREE* tree /**< branch and bound tree */
897  );
898 
899 /** marks the current probing node to have a changed objective function */
900 extern
902  SCIP_TREE* tree /**< branch and bound tree */
903  );
904 
905 #ifdef NDEBUG
906 
907 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
908  * speed up the algorithms.
909  */
910 
911 #define SCIPtreeGetNLeaves(tree) SCIPnodepqLen((tree)->leaves)
912 #define SCIPtreeGetNChildren(tree) ((tree)->nchildren)
913 #define SCIPtreeGetNSiblings(tree) ((tree)->nsiblings)
914 #define SCIPtreeGetNNodes(tree) \
915  (SCIPtreeGetNChildren(tree) + SCIPtreeGetNSiblings(tree) + SCIPtreeGetNLeaves(tree))
916 #define SCIPtreeIsPathComplete(tree) ((tree)->focusnode == NULL || (tree)->focusnode->depth < (tree)->pathlen)
917 #define SCIPtreeProbing(tree) ((tree)->probingroot != NULL)
918 #define SCIPtreeGetProbingRoot(tree) (tree)->probingroot
919 #define SCIPtreeGetProbingDepth(tree) (SCIPtreeGetCurrentDepth(tree) - SCIPnodeGetDepth((tree)->probingroot))
920 #define SCIPtreeGetFocusNode(tree) (tree)->focusnode
921 #define SCIPtreeGetFocusDepth(tree) ((tree)->focusnode != NULL ? (tree)->focusnode->depth : -1)
922 #define SCIPtreeHasFocusNodeLP(tree) (tree)->focusnodehaslp
923 #define SCIPtreeSetFocusNodeLP(tree,solvelp) ((tree)->focusnodehaslp = solvelp)
924 #define SCIPtreeIsFocusNodeLPConstructed(tree) (tree)->focuslpconstructed
925 #define SCIPtreeInRepropagation(tree) ((tree)->focusnode != NULL \
926  && SCIPnodeGetType((tree)->focusnode) == SCIP_NODETYPE_REFOCUSNODE)
927 #define SCIPtreeGetCurrentNode(tree) ((tree)->pathlen > 0 ? (tree)->path[(tree)->pathlen-1] : NULL)
928 #define SCIPtreeGetCurrentDepth(tree) ((tree)->pathlen-1)
929 #define SCIPtreeHasCurrentNodeLP(tree) (SCIPtreeProbing(tree) ? (tree)->probingnodehaslp : SCIPtreeHasFocusNodeLP(tree))
930 #define SCIPtreeGetEffectiveRootDepth(tree) ((tree)->effectiverootdepth)
931 #define SCIPtreeGetRootNode(tree) ((tree)->root)
932 #define SCIPtreeProbingObjChanged(tree) ((tree)->probingobjchanged)
933 #define SCIPtreeMarkProbingObjChanged(tree) ((tree)->probingobjchanged = TRUE)
934 
935 #endif
936 
937 
938 /** gets the best child of the focus node w.r.t. the node selection priority assigned by the branching rule */
939 extern
941  SCIP_TREE* tree /**< branch and bound tree */
942  );
943 
944 /** gets the best sibling of the focus node w.r.t. the node selection priority assigned by the branching rule */
945 extern
947  SCIP_TREE* tree /**< branch and bound tree */
948  );
949 
950 /** gets the best child of the focus node w.r.t. the node selection strategy */
951 extern
953  SCIP_TREE* tree, /**< branch and bound tree */
954  SCIP_SET* set /**< global SCIP settings */
955  );
956 
957 /** gets the best sibling of the focus node w.r.t. the node selection strategy */
958 extern
960  SCIP_TREE* tree, /**< branch and bound tree */
961  SCIP_SET* set /**< global SCIP settings */
962  );
963 
964 /** gets the best leaf from the node queue w.r.t. the node selection strategy */
965 extern
967  SCIP_TREE* tree /**< branch and bound tree */
968  );
969 
970 /** gets the best node from the tree (child, sibling, or leaf) w.r.t. the node selection strategy */
971 extern
973  SCIP_TREE* tree, /**< branch and bound tree */
974  SCIP_SET* set /**< global SCIP settings */
975  );
976 
977 /** gets the minimal lower bound of all nodes in the tree */
978 extern
980  SCIP_TREE* tree, /**< branch and bound tree */
981  SCIP_SET* set /**< global SCIP settings */
982  );
983 
984 /** gets the node with minimal lower bound of all nodes in the tree (child, sibling, or leaf) */
985 extern
987  SCIP_TREE* tree, /**< branch and bound tree */
988  SCIP_SET* set /**< global SCIP settings */
989  );
990 
991 /** gets the average lower bound of all nodes in the tree */
992 extern
994  SCIP_TREE* tree, /**< branch and bound tree */
995  SCIP_Real cutoffbound /**< global cutoff bound */
996  );
997 
998 #ifdef __cplusplus
999 }
1000 #endif
1001 
1002 #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:1003
SCIP_RETCODE SCIPtreeCreateProbingNode(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: tree.c:6233
SCIP_RETCODE SCIPtreeSetNodesel(SCIP_TREE *tree, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_NODESEL *nodesel)
Definition: tree.c:4864
SCIP_RETCODE SCIPtreeAddDiveBoundChange(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Bool preferred)
Definition: tree.c:6024
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_PRIMAL *primal, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:6528
int SCIPtreeGetProbingDepth(SCIP_TREE *tree)
Definition: tree.c:7985
SCIP_RETCODE SCIPnodeDelCons(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_CONS *cons)
Definition: tree.c:1565
public methods for branch and bound tree
SCIP_NODE * SCIPtreeGetLowerboundNode(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6868
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:954
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:5186
SCIP_Bool SCIPtreeHasFocusNodeLP(SCIP_TREE *tree)
Definition: tree.c:7899
SCIP_NODE * SCIPtreeGetBestChild(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6732
void SCIPtreeSetFocusNodeLP(SCIP_TREE *tree, SCIP_Bool solvelp)
Definition: tree.c:7909
void SCIPnodeGetAddedConss(SCIP_NODE *node, SCIP_CONS **addedconss, int *naddedconss, int addedconsssize)
Definition: tree.c:1595
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:6494
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:1726
SCIP_NODE * SCIPtreeGetFocusNode(SCIP_TREE *tree)
Definition: tree.c:7865
SCIP_NODE * SCIPtreeGetBestNode(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6796
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:4544
type definitions for global SCIP settings
SCIP_NODE * SCIPtreeGetProbingRoot(SCIP_TREE *tree)
Definition: tree.c:7852
SCIP_RETCODE SCIPtreeLoadLPState(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:3396
int SCIPtreeGetFocusDepth(SCIP_TREE *tree)
Definition: tree.c:7882
SCIP_RETCODE SCIPnodeCutoff(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, BMS_BLKMEM *blkmem)
Definition: tree.c:1123
type definitions for collecting reoptimization information
int SCIPtreeGetCurrentDepth(SCIP_TREE *tree)
Definition: tree.c:7957
type definitions for branching rules
type definitions for problem statistics
int SCIPtreeGetNChildren(SCIP_TREE *tree)
Definition: tree.c:7782
SCIP_Bool SCIPtreeIsPathComplete(SCIP_TREE *tree)
Definition: tree.c:7822
SCIP_Bool SCIPtreeIsFocusNodeLPConstructed(SCIP_TREE *tree)
Definition: tree.c:7920
type definitions for LP management
SCIP_Bool SCIPtreeProbing(SCIP_TREE *tree)
Definition: tree.c:7839
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
void SCIPnodeMarkPropagated(SCIP_NODE *node, SCIP_TREE *tree)
Definition: tree.c:1191
SCIP_Real SCIPtreeCalcNodeselPriority(SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
Definition: tree.c:4977
SCIP_NODE * SCIPtreeGetBestSibling(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6759
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_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *cutoff, SCIP_Bool exitsolve)
Definition: tree.c:4129
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:3268
SCIP_NODE * SCIPtreeGetBestLeaf(SCIP_TREE *tree)
Definition: tree.c:6786
SCIP_Bool SCIPtreeInRepropagation(SCIP_TREE *tree)
Definition: tree.c:7930
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:2259
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_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:4772
void SCIPnodeGetDualBoundchgs(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *bounds, int *nvars, int varssize)
Definition: tree.c:7214
datastructures for branch and bound tree
type definitions for problem variables
int SCIPnodeGetNDualBndchgs(SCIP_NODE *node)
Definition: tree.c:7173
type definitions for managing events
void SCIPnodePropagateAgain(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree)
Definition: tree.c:1165
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:2131
SCIP_RETCODE SCIPtreeStartProbing(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp, SCIP_Bool strongbranching)
Definition: tree.c:6178
SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
Definition: tree.c:7974
#define SCIP_Bool
Definition: def.h:50
int SCIPtreeGetEffectiveRootDepth(SCIP_TREE *tree)
Definition: tree.c:7996
SCIP_Real SCIPtreeGetAvgLowerbound(SCIP_TREE *tree, SCIP_Real cutoffbound)
Definition: tree.c:6920
void SCIPtreeClearDiveBoundChanges(SCIP_TREE *tree)
Definition: tree.c:6079
SCIP_RETCODE SCIPtreeFree(SCIP_TREE **tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:4620
void SCIPtreeGetDiveBoundChangeData(SCIP_TREE *tree, SCIP_VAR ***variables, SCIP_BRANCHDIR **directions, SCIP_Real **values, int *ndivebdchgs, SCIP_Bool preferred)
Definition: tree.c:6056
void SCIPnodeSetEstimate(SCIP_NODE *node, SCIP_SET *set, SCIP_Real newestimate)
Definition: tree.c:2351
void SCIPnodeGetBdChgsAfterDual(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *varbounds, SCIP_BOUNDTYPE *varboundtypes, int start, int *nbranchvars, int branchvarssize)
Definition: tree.c:7527
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:5659
SCIP_RETCODE SCIPnodeReleaseLPIState(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_LP *lp)
Definition: tree.c:262
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:4727
SCIP_RETCODE SCIPnodeCaptureLPIState(SCIP_NODE *node, int nuses)
Definition: tree.c:234
SCIP_NODE * SCIPtreeGetCurrentNode(SCIP_TREE *tree)
Definition: tree.c:7940
type definitions for storing and manipulating the main problem
SCIP_NODESEL * SCIPtreeGetNodesel(SCIP_TREE *tree)
Definition: tree.c:4854
int SCIPtreeGetNSiblings(SCIP_TREE *tree)
Definition: tree.c:7792
SCIP_Bool SCIPtreeProbingObjChanged(SCIP_TREE *tree)
Definition: tree.c:8018
type definitions for propagators
int SCIPnodeGetNAddedConss(SCIP_NODE *node)
Definition: tree.c:1625
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:1979
SCIP_RETCODE SCIPtreeMarkProbingNodeHasLP(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_LP *lp)
Definition: tree.c:6325
#define SCIP_Real
Definition: def.h:124
SCIP_RETCODE SCIPnodeAddCons(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_CONS *cons)
Definition: tree.c:1526
SCIP_NODE * SCIPtreeGetRootNode(SCIP_TREE *tree)
Definition: tree.c:8007
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:2008
SCIP_NODE * SCIPtreeGetPrioChild(SCIP_TREE *tree)
Definition: tree.c:6680
int SCIPtreeGetNLeaves(SCIP_TREE *tree)
Definition: tree.c:7802
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:2299
void SCIPtreeMarkProbingObjChanged(SCIP_TREE *tree)
Definition: tree.c:8029
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:2365
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:6252
int SCIPtreeGetNNodes(SCIP_TREE *tree)
Definition: tree.c:7812
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
void SCIPchildChgNodeselPrio(SCIP_TREE *tree, SCIP_NODE *child, SCIP_Real priority)
Definition: tree.c:2333
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_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:4812
SCIP_NODE * SCIPtreeGetPrioSibling(SCIP_TREE *tree)
Definition: tree.c:6706
SCIP_Real SCIPtreeGetLowerbound(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6830
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:4892
SCIP_RETCODE SCIPtreeClear(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:4667
void SCIPnodeGetConsProps(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *varbounds, SCIP_BOUNDTYPE *varboundtypes, int *nconspropvars, int conspropvarssize)
Definition: tree.c:7439
SCIP_Real SCIPtreeCalcChildEstimate(SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real targetvalue)
Definition: tree.c:5127
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:5517
memory allocation routines