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-2016 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 #define MAXDEPTH 65535 /**< maximal depth level for nodes; must correspond to node data structure */
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 
55 /*
56  * Node methods
57  */
58 
59 /** creates a child node of the focus node */
60 extern
62  SCIP_NODE** node, /**< pointer to node data structure */
63  BMS_BLKMEM* blkmem, /**< block memory */
64  SCIP_SET* set, /**< global SCIP settings */
65  SCIP_STAT* stat, /**< problem statistics */
66  SCIP_TREE* tree, /**< branch and bound tree */
67  SCIP_Real nodeselprio, /**< node selection priority of new node */
68  SCIP_Real estimate /**< estimate for (transformed) objective value of best feasible solution in subtree */
69  );
70 
71 /** frees node */
72 extern
74  SCIP_NODE** node, /**< node data */
75  BMS_BLKMEM* blkmem, /**< block memory buffer */
76  SCIP_SET* set, /**< global SCIP settings */
77  SCIP_STAT* stat, /**< problem statistics */
78  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
79  SCIP_TREE* tree, /**< branch and bound tree */
80  SCIP_LP* lp /**< current LP data */
81  );
82 
83 /** increases the reference counter of the LP state in the fork or subroot node */
84 extern
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 */
91 extern
93  SCIP_NODE* node, /**< fork/subroot node */
94  BMS_BLKMEM* blkmem, /**< block memory buffers */
95  SCIP_LP* lp /**< current LP data */
96  );
97 
98 /** installs a child, a sibling, or a leaf node as the new focus node */
99 extern
101  SCIP_NODE** node, /**< pointer to node to focus (or NULL to remove focus); the node
102  * is freed, if it was cut off due to a cut off subtree */
103  BMS_BLKMEM* blkmem, /**< block memory */
104  SCIP_SET* set, /**< global SCIP settings */
105  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
106  SCIP_STAT* stat, /**< problem statistics */
107  SCIP_PROB* transprob, /**< transformed problem */
108  SCIP_PROB* origprob, /**< original problem */
109  SCIP_PRIMAL* primal, /**< primal data */
110  SCIP_TREE* tree, /**< branch and bound tree */
111  SCIP_REOPT* reopt, /**< reoptimization data structure */
112  SCIP_LP* lp, /**< current LP data */
113  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
114  SCIP_CONFLICT* conflict, /**< conflict analysis data */
115  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
116  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
117  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
118  SCIP_Bool* cutoff, /**< pointer to store whether the given node can be cut off */
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 */
123 extern
125  SCIP_NODE* node, /**< node that should be cut off */
126  SCIP_SET* set, /**< global SCIP settings */
127  SCIP_STAT* stat, /**< problem statistics */
128  SCIP_TREE* tree, /**< branch and bound tree */
129  SCIP_REOPT* reopt, /**< reoptimization data structure */
130  SCIP_LP* lp, /**< current LP */
131  BMS_BLKMEM* blkmem /**< block memory */
132  );
133 
134 /** marks node, that propagation should be applied again the next time, a node of its subtree is focused */
135 extern
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 */
144 extern
146  SCIP_NODE* node, /**< node that should be propagated again */
147  SCIP_TREE* tree /**< branch and bound tree */
148  );
149 
150 /** adds constraint locally to the node and captures it; activates constraint, if node is active;
151  * if a local constraint is added to the root node, it is automatically upgraded into a global constraint
152  */
153 extern
155  SCIP_NODE* node, /**< node to add constraint to */
156  BMS_BLKMEM* blkmem, /**< block memory */
157  SCIP_SET* set, /**< global SCIP settings */
158  SCIP_STAT* stat, /**< problem statistics */
159  SCIP_TREE* tree, /**< branch and bound tree */
160  SCIP_CONS* cons /**< constraint to add */
161  );
162 
163 /** locally deletes constraint at the given node by disabling its separation, enforcing, and propagation capabilities
164  * at the node; captures constraint; disables constraint, if node is active
165  */
166 extern
168  SCIP_NODE* node, /**< node to add constraint to */
169  BMS_BLKMEM* blkmem, /**< block memory */
170  SCIP_SET* set, /**< global SCIP settings */
171  SCIP_STAT* stat, /**< problem statistics */
172  SCIP_TREE* tree, /**< branch and bound tree */
173  SCIP_CONS* cons /**< constraint to locally delete */
174  );
175 
176 /** returns all constraints added to a given node */
177 extern
179  SCIP_NODE* node, /**< node */
180  SCIP_CONS** addedconss, /**< array to store the constraints */
181  int* naddedconss, /**< number of added constraints */
182  int addedconsssize /**< size of the constraint array */
183  );
184 
185 /** return all bound changes based on constraint propagation; stop saving the bound changes if we reach a branching
186  * decision based on a dual information
187  */
188 extern
190  SCIP_NODE* node, /**< node */
191  SCIP_VAR** vars, /**< array of variables on which constraint propagation triggers a bound change */
192  SCIP_Real* varbounds, /**< array of bounds set by constraint propagation */
193  SCIP_BOUNDTYPE* varboundtypes, /**< array of boundtypes set by constraint propagation */
194  int* nconspropvars, /**< number of variables on which constraint propagation triggers a bound change
195  * if this is larger than the array size, arrays should be reallocated and method
196  * should be called again */
197  int conspropvarssize /**< available slots in arrays */
198  );
199 
200 /** gets all bound changes applied after the first bound change based on dual information.
201  *
202  * @note: currently, we can only detect bound changes based in dual information if they arise from strong branching.
203  */
204 extern
206  SCIP_NODE* node, /**< node */
207  SCIP_VAR** vars, /**< array of variables on which the branching has been performed in the parent node */
208  SCIP_Real* varbounds, /**< array of bounds which the branching in the parent node set */
209  SCIP_BOUNDTYPE* varboundtypes, /**< array of boundtypes which the branching in the parent node set */
210  int start, /**< first free slot in the arrays */
211  int* nbranchvars, /**< number of variables on which branching has been performed in the parent node
212  * if this is larger than the array size, arrays should be reallocated and method
213  * should be called again */
214  int branchvarssize /**< available slots in arrays */
215  );
216 
217 /** returns the number of added constraints to the given node */
218 extern
220  SCIP_NODE* node
221  );
222 
223 /** adds bound change with inference information to focus node, child of focus node, or probing node;
224  * if possible, adjusts bound to integral value;
225  * at most one of infercons and inferprop may be non-NULL
226  */
227 extern
229  SCIP_NODE* node, /**< node to add bound change to */
230  BMS_BLKMEM* blkmem, /**< block memory */
231  SCIP_SET* set, /**< global SCIP settings */
232  SCIP_STAT* stat, /**< problem statistics */
233  SCIP_PROB* transprob, /**< transformed problem after presolve */
234  SCIP_PROB* origprob, /**< original problem */
235  SCIP_TREE* tree, /**< branch and bound tree */
236  SCIP_REOPT* reopt, /**< reoptimization data structure */
237  SCIP_LP* lp, /**< current LP data */
238  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
239  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
240  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
241  SCIP_VAR* var, /**< variable to change the bounds for */
242  SCIP_Real newbound, /**< new value for bound */
243  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
244  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
245  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
246  int inferinfo, /**< user information for inference to help resolving the conflict */
247  SCIP_Bool probingchange /**< is the bound change a temporary setting due to probing? */
248  );
249 
250 /** adds bound change to focus node, or child of focus node, or probing node;
251  * if possible, adjusts bound to integral value
252  */
253 extern
255  SCIP_NODE* node, /**< node to add bound change to */
256  BMS_BLKMEM* blkmem, /**< block memory */
257  SCIP_SET* set, /**< global SCIP settings */
258  SCIP_STAT* stat, /**< problem statistics */
259  SCIP_PROB* transprob, /**< transformed problem after presolve */
260  SCIP_PROB* origprob, /**< original problem */
261  SCIP_TREE* tree, /**< branch and bound tree */
262  SCIP_REOPT* reopt, /**< reoptimization data structure */
263  SCIP_LP* lp, /**< current LP data */
264  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
265  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
266  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
267  SCIP_VAR* var, /**< variable to change the bounds for */
268  SCIP_Real newbound, /**< new value for bound */
269  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
270  SCIP_Bool probingchange /**< is the bound change a temporary setting due to probing? */
271  );
272 
273 /** adds hole with inference information to focus node, child of focus node, or probing node;
274  * if possible, adjusts bound to integral value;
275  * at most one of infercons and inferprop may be non-NULL
276  */
278  SCIP_NODE* node, /**< node to add bound change to */
279  BMS_BLKMEM* blkmem, /**< block memory */
280  SCIP_SET* set, /**< global SCIP settings */
281  SCIP_STAT* stat, /**< problem statistics */
282  SCIP_TREE* tree, /**< branch and bound tree */
283  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
284  SCIP_VAR* var, /**< variable to change the bounds for */
285  SCIP_Real left, /**< left bound of open interval defining the hole (left,right) */
286  SCIP_Real right, /**< right bound of open interval defining the hole (left,right) */
287  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
288  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
289  int inferinfo, /**< user information for inference to help resolving the conflict */
290  SCIP_Bool probingchange, /**< is the bound change a temporary setting due to probing? */
291  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
292  );
293 
294 /** adds hole change to focus node, or child of focus node */
295 extern
297  SCIP_NODE* node, /**< node to add bound change to */
298  BMS_BLKMEM* blkmem, /**< block memory */
299  SCIP_SET* set, /**< global SCIP settings */
300  SCIP_STAT* stat, /**< problem statistics */
301  SCIP_TREE* tree, /**< branch and bound tree */
302  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
303  SCIP_VAR* var, /**< variable to change the bounds for */
304  SCIP_Real left, /**< left bound of open interval defining the hole (left,right) */
305  SCIP_Real right, /**< right bound of open interval defining the hole (left,right) */
306  SCIP_Bool probingchange, /**< is the bound change a temporary setting due to probing? */
307  SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
308  );
309 
310 /** if given value is larger than the node's lower bound, sets the node's lower bound to the new value */
311 extern
313  SCIP_NODE* node, /**< node to update lower bound for */
314  SCIP_STAT* stat, /**< problem statistics */
315  SCIP_SET* set, /**< global SCIP settings */
316  SCIP_TREE* tree, /**< branch and bound tree */
317  SCIP_PROB* transprob, /**< transformed problem data */
318  SCIP_PROB* origprob, /**< original problem */
319  SCIP_Real newbound /**< new lower bound for the node (if it's larger than the old one) */
320  );
321 
322 /** updates lower bound of node using lower bound of LP */
323 extern
325  SCIP_NODE* node, /**< node to set lower bound for */
326  SCIP_SET* set, /**< global SCIP settings */
327  SCIP_STAT* stat, /**< problem statistics */
328  SCIP_TREE* tree, /**< branch and bound tree */
329  SCIP_PROB* transprob, /**< transformed problem after presolve */
330  SCIP_PROB* origprob, /**< original problem */
331  SCIP_LP* lp /**< LP data */
332  );
333 
334 /** change the node selection priority of the given child */
335 extern
337  SCIP_TREE* tree, /**< branch and bound tree */
338  SCIP_NODE* child, /**< child to update the node selection priority */
339  SCIP_Real priority /**< node selection priority value */
340  );
341 
342 
343 /** sets the node's estimated bound to the new value */
344 extern
346  SCIP_NODE* node, /**< node to update lower bound for */
347  SCIP_SET* set, /**< global SCIP settings */
348  SCIP_Real newestimate /**< new estimated bound for the node */
349  );
350 
351 /** propagates implications of binary fixings at the given node triggered by the implication graph and the clique table */
352 extern
354  SCIP_NODE* node, /**< node to propagate implications on */
355  BMS_BLKMEM* blkmem, /**< block memory */
356  SCIP_SET* set, /**< global SCIP settings */
357  SCIP_STAT* stat, /**< problem statistics */
358  SCIP_PROB* transprob, /**< transformed problem after presolve */
359  SCIP_PROB* origprob, /**< original problem */
360  SCIP_TREE* tree, /**< branch and bound tree */
361  SCIP_REOPT* reopt, /**< reoptimization data structure */
362  SCIP_LP* lp, /**< current LP data */
363  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
364  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
365  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
366  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
367  );
368 
369 /** returns all bound changes based on dual information.
370  *
371  * currently, this methods works only for bound changes made by strong branching on binary variables. we need this
372  * method to ensure optimality within reoptimization.
373  *
374  * since the bound changes made by strong branching are stored as SCIP_BOUNDCHGTYPE_CONSINFER or SCIP_BOUNDCHGTYPE_PROPINFER
375  * with no constraint or propagator, resp., we are are interested in bound changes with these attributes.
376  *
377  * all bound changes of type SCIP_BOUNDCHGTYPE_BRANCHING are stored in the beginning of the bound change array, afterwards,
378  * we can find the other two types. thus, we start the search at the end of the list and stop when reaching the first
379  * bound change of type SCIP_BOUNDCHGTYPE_BRANCHING.
380  */
381 extern
383  SCIP_NODE* node, /**< node data */
384  SCIP_VAR** vars, /**< array of variables on which the bound change is based on dual information */
385  SCIP_Real* bounds, /**< array of bounds which are based on dual information */
386  int* nvars, /**< number of variables on which the bound change is based on dual information
387  * if this is larger than the array size, arrays should be reallocated and method
388  * should be called again */
389  int varssize /**< available slots in arrays */
390  );
391 
392 /** returns the number of bound changes based on dual information.
393  *
394  * currently, this methods works only for bound changes made by strong branching on binary variables. we need this
395  * method to ensure optimality within reoptimization.
396  *
397  * since the bound changes made by strong branching are stored as SCIP_BOUNDCHGTYPE_CONSINFER or SCIP_BOUNDCHGTYPE_PROPINFER
398  * with no constraint or propagator, resp., we are are interested in bound changes with these attributes.
399  *
400  * all bound changes of type SCIP_BOUNDCHGTYPE_BRANCHING are stored in the beginning of the bound change array, afterwards,
401  * we can find the other two types. thus, we start the search at the end of the list and stop when reaching the first
402  * bound change of type SCIP_BOUNDCHGTYPE_BRANCHING.
403  */
404 extern
406  SCIP_NODE* node
407  );
408 
409 /*
410  * Tree methods
411  */
412 
413 /** creates an initialized tree data structure */
414 extern
416  SCIP_TREE** tree, /**< pointer to tree data structure */
417  BMS_BLKMEM* blkmem, /**< block memory buffers */
418  SCIP_SET* set, /**< global SCIP settings */
419  SCIP_NODESEL* nodesel /**< node selector to use for sorting leaves in the priority queue */
420  );
421 
422 /** frees tree data structure */
423 extern
425  SCIP_TREE** tree, /**< pointer to tree data structure */
426  BMS_BLKMEM* blkmem, /**< block memory buffers */
427  SCIP_SET* set, /**< global SCIP settings */
428  SCIP_STAT* stat, /**< problem statistics */
429  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
430  SCIP_LP* lp /**< current LP data */
431  );
432 
433 /** clears and resets tree data structure and deletes all nodes */
434 extern
436  SCIP_TREE* tree, /**< tree data structure */
437  BMS_BLKMEM* blkmem, /**< block memory buffers */
438  SCIP_SET* set, /**< global SCIP settings */
439  SCIP_STAT* stat, /**< problem statistics */
440  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
441  SCIP_LP* lp /**< current LP data */
442  );
443 
444 /** creates the root node of the tree and puts it into the leaves queue */
445 extern
447  SCIP_TREE* tree, /**< tree data structure */
448  SCIP_REOPT* reopt, /**< reoptimization data structure */
449  BMS_BLKMEM* blkmem, /**< block memory buffers */
450  SCIP_SET* set, /**< global SCIP settings */
451  SCIP_STAT* stat, /**< problem statistics */
452  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
453  SCIP_LP* lp /**< current LP data */
454  );
455 
456 /** creates a temporary presolving root node of the tree and installs it as focus node */
457 extern
459  SCIP_TREE* tree, /**< tree data structure */
460  SCIP_REOPT* reopt, /**< reoptimization data structure */
461  BMS_BLKMEM* blkmem, /**< block memory buffers */
462  SCIP_SET* set, /**< global SCIP settings */
463  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
464  SCIP_STAT* stat, /**< problem statistics */
465  SCIP_PROB* transprob, /**< transformed problem */
466  SCIP_PROB* origprob, /**< original problem */
467  SCIP_PRIMAL* primal, /**< primal data */
468  SCIP_LP* lp, /**< current LP data */
469  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
470  SCIP_CONFLICT* conflict, /**< conflict analysis data */
471  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
472  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
473  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
474  );
475 
476 /** frees the temporary presolving root and resets tree data structure */
477 extern
479  SCIP_TREE* tree, /**< tree data structure */
480  SCIP_REOPT* reopt, /**< reoptimization data structure */
481  BMS_BLKMEM* blkmem, /**< block memory buffers */
482  SCIP_SET* set, /**< global SCIP settings */
483  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
484  SCIP_STAT* stat, /**< problem statistics */
485  SCIP_PROB* transprob, /**< transformed problem */
486  SCIP_PROB* origprob, /**< original problem */
487  SCIP_PRIMAL* primal, /**< primal data */
488  SCIP_LP* lp, /**< current LP data */
489  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
490  SCIP_CONFLICT* conflict, /**< conflict analysis data */
491  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
492  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
493  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
494  );
495 
496 /** returns the node selector associated with the given node priority queue */
497 extern
499  SCIP_TREE* tree /**< branch and bound tree */
500  );
501 
502 /** sets the node selector used for sorting the nodes in the priority queue, and resorts the queue if necessary */
503 extern
505  SCIP_TREE* tree, /**< branch and bound tree */
506  SCIP_SET* set, /**< global SCIP settings */
507  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
508  SCIP_STAT* stat, /**< problem statistics */
509  SCIP_NODESEL* nodesel /**< node selector to use for sorting the nodes in the queue */
510  );
511 
512 /** cuts off nodes with lower bound not better than given upper bound */
513 extern
515  SCIP_TREE* tree, /**< branch and bound tree */
516  SCIP_REOPT* reopt, /**< reoptimization data structure */
517  BMS_BLKMEM* blkmem, /**< block memory */
518  SCIP_SET* set, /**< global SCIP settings */
519  SCIP_STAT* stat, /**< dynamic problem statistics */
520  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
521  SCIP_LP* lp, /**< current LP data */
522  SCIP_Real cutoffbound /**< cutoff bound: all nodes with lowerbound >= cutoffbound are cut off */
523  );
524 
525 /** constructs the LP relaxation of the focus node */
526 extern
528  SCIP_TREE* tree, /**< branch and bound tree */
529  BMS_BLKMEM* blkmem, /**< block memory */
530  SCIP_SET* set, /**< global SCIP settings */
531  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
532  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
533  SCIP_LP* lp, /**< current LP data */
534  SCIP_Bool* initroot /**< pointer to store whether the root LP relaxation has to be initialized */
535  );
536 
537 /** loads LP state for fork/subroot of the focus node */
538 extern
540  SCIP_TREE* tree, /**< branch and bound tree */
541  BMS_BLKMEM* blkmem, /**< block memory buffers */
542  SCIP_SET* set, /**< global SCIP settings */
543  SCIP_STAT* stat, /**< dynamic problem statistics */
544  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
545  SCIP_LP* lp /**< current LP data */
546  );
547 
548 /** calculates the node selection priority for moving the given variable's LP value to the given target value;
549  * this node selection priority can be given to the SCIPcreateChild() call
550  */
551 extern
553  SCIP_TREE* tree, /**< branch and bound tree */
554  SCIP_SET* set, /**< global SCIP settings */
555  SCIP_STAT* stat, /**< dynamic problem statistics */
556  SCIP_VAR* var, /**< variable, of which the branching factor should be applied, or NULL */
557  SCIP_BRANCHDIR branchdir, /**< type of branching that was performed: upwards, downwards, or fixed
558  * fixed should only be used, when both bounds changed
559  */
560  SCIP_Real targetvalue /**< new value of the variable in the child node */
561  );
562 
563 /** calculates an estimate for the objective of the best feasible solution contained in the subtree after applying the given
564  * branching; this estimate can be given to the SCIPcreateChild() call
565  */
566 extern
568  SCIP_TREE* tree, /**< branch and bound tree */
569  SCIP_SET* set, /**< global SCIP settings */
570  SCIP_STAT* stat, /**< dynamic problem statistics */
571  SCIP_VAR* var, /**< variable, of which the branching factor should be applied, or NULL */
572  SCIP_Real targetvalue /**< new value of the variable in the child node */
573  );
574 
575 /** branches on a variable x
576  * if x is a continuous variable, then two child nodes will be created
577  * (x <= x', x >= x')
578  * but if the bounds of x are such that their relative difference is smaller than epsilon,
579  * the variable is fixed to val (if not SCIP_INVALID) or a well chosen alternative in the current node,
580  * i.e., no children are created
581  * if x is not a continuous variable, then:
582  * if solution value x' is fractional, two child nodes will be created
583  * (x <= floor(x'), x >= ceil(x')),
584  * if solution value is integral, the x' is equal to lower or upper bound of the branching
585  * variable and the bounds of x are finite, then two child nodes will be created
586  * (x <= x", x >= x"+1 with x" = floor((lb + ub)/2)),
587  * otherwise (up to) three child nodes will be created
588  * (x <= x'-1, x == x', x >= x'+1)
589  * if solution value is equal to one of the bounds and the other bound is infinite, only two child nodes
590  * will be created (the third one would be infeasible anyway)
591  */
592 extern
594  SCIP_TREE* tree, /**< branch and bound tree */
595  SCIP_REOPT* reopt, /**< reoptimization data structure */
596  BMS_BLKMEM* blkmem, /**< block memory */
597  SCIP_SET* set, /**< global SCIP settings */
598  SCIP_STAT* stat, /**< problem statistics data */
599  SCIP_PROB* transprob, /**< transformed problem after presolve */
600  SCIP_PROB* origprob, /**< original problem */
601  SCIP_LP* lp, /**< current LP data */
602  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
603  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
604  SCIP_VAR* var, /**< variable to branch on */
605  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 */
606  SCIP_NODE** downchild, /**< pointer to return the left child with variable rounded down, or NULL */
607  SCIP_NODE** eqchild, /**< pointer to return the middle child with variable fixed, or NULL */
608  SCIP_NODE** upchild /**< pointer to return the right child with variable rounded up, or NULL */
609  );
610 
611 /** branches a variable x using the given domain hole; two child nodes will be created (x <= left, x >= right) */
612 extern
614  SCIP_TREE* tree, /**< branch and bound tree */
615  SCIP_REOPT* reopt, /**< reoptimization data structure */
616  BMS_BLKMEM* blkmem, /**< block memory */
617  SCIP_SET* set, /**< global SCIP settings */
618  SCIP_STAT* stat, /**< problem statistics data */
619  SCIP_PROB* transprob, /**< transformed problem after presolve */
620  SCIP_PROB* origprob, /**< original problem */
621  SCIP_LP* lp, /**< current LP data */
622  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
623  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
624  SCIP_VAR* var, /**< variable to branch on */
625  SCIP_Real left, /**< left side of the domain hole */
626  SCIP_Real right, /**< right side of the domain hole */
627  SCIP_NODE** downchild, /**< pointer to return the left child with variable rounded down, or NULL */
628  SCIP_NODE** upchild /**< pointer to return the right child with variable rounded up, or NULL */
629  );
630 
631 /** n-ary branching on a variable x
632  * Branches on variable x such that up to n/2 children are created on each side of the usual branching value.
633  * The branching value is selected as in SCIPtreeBranchVar().
634  * If n is 2 or the variables local domain is too small for a branching into n pieces, SCIPtreeBranchVar() is called.
635  * The parameters minwidth and widthfactor determine the domain width of the branching variable in the child nodes.
636  * If n is odd, one child with domain width 'width' and having the branching value in the middle is created.
637  * Otherwise, two children with domain width 'width' and being left and right of the branching value are created.
638  * Next further nodes to the left and right are created, where width is multiplied by widthfactor with increasing distance from the first nodes.
639  * The initial width is calculated such that n/2 nodes are created to the left and to the right of the branching value.
640  * If this value is below minwidth, the initial width is set to minwidth, which may result in creating less than n nodes.
641  *
642  * Giving a large value for widthfactor results in creating children with small domain when close to the branching value
643  * and large domain when closer to the current variable bounds. That is, setting widthfactor to a very large value and n to 3
644  * results in a ternary branching where the branching variable is mostly fixed in the middle child.
645  * Setting widthfactor to 1.0 results in children where the branching variable always has the same domain width
646  * (except for one child if the branching value is not in the middle).
647  */
648 extern
650  SCIP_TREE* tree, /**< branch and bound tree */
651  SCIP_REOPT* reopt, /**< reoptimization data structure */
652  BMS_BLKMEM* blkmem, /**< block memory */
653  SCIP_SET* set, /**< global SCIP settings */
654  SCIP_STAT* stat, /**< problem statistics data */
655  SCIP_PROB* transprob, /**< transformed problem after presolve */
656  SCIP_PROB* origprob, /**< original problem */
657  SCIP_LP* lp, /**< current LP data */
658  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
659  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
660  SCIP_VAR* var, /**< variable to branch on */
661  SCIP_Real val, /**< value to branch on or SCIP_INVALID for branching on current LP/pseudo solution.
662  * A branching value is required for branching on continuous variables */
663  int n, /**< attempted number of children to be created, must be >= 2 */
664  SCIP_Real minwidth, /**< minimal domain width in children */
665  SCIP_Real widthfactor, /**< multiplier for children domain width with increasing distance from val, must be >= 1.0 */
666  int* nchildren /**< buffer to store number of created children, or NULL */
667  );
668 
669 /** adds a diving bound change to the tree together with the information if this is a bound change
670  * for the preferred direction or not
671  */
672 extern
674  SCIP_TREE* tree, /**< branch and bound tree */
675  BMS_BLKMEM* blkmem, /**< block memory buffers */
676  SCIP_VAR* var, /**< variable to apply the bound change to */
677  SCIP_BRANCHDIR dir, /**< direction of the bound change */
678  SCIP_Real value, /**< value to adjust this variable bound to */
679  SCIP_Bool preferred /**< is this a bound change for the preferred child? */
680  );
681 
682 /** get the dive bound change data for the preferred or the alternative direction */
683 extern
685  SCIP_TREE* tree, /**< branch and bound tree */
686  SCIP_VAR*** variables, /**< pointer to store variables for the specified direction */
687  SCIP_BRANCHDIR** directions, /**< pointer to store the branching directions */
688  SCIP_Real** values, /**< pointer to store bound change values */
689  int* ndivebdchgs, /**< pointer to store the number of dive bound changes */
690  SCIP_Bool preferred /**< should the dive bound changes for the preferred child be output? */
691  );
692 
693 /** clear the tree dive bound change data structure */
694 extern
696  SCIP_TREE* tree /**< branch and bound tree */
697  );
698 
699 /** switches to probing mode and creates a probing root */
700 extern
702  SCIP_TREE* tree, /**< branch and bound tree */
703  BMS_BLKMEM* blkmem, /**< block memory */
704  SCIP_SET* set, /**< global SCIP settings */
705  SCIP_LP* lp, /**< current LP data */
706  SCIP_Bool strongbranching /**< is the probing mode used for strongbranching? */
707  );
708 
709 /** creates a new probing child node in the probing path */
710 extern
712  SCIP_TREE* tree, /**< branch and bound tree */
713  BMS_BLKMEM* blkmem, /**< block memory */
714  SCIP_SET* set, /**< global SCIP settings */
715  SCIP_LP* lp /**< current LP data */
716  );
717 
718 /** loads the LP state for the current probing node */
719 extern
721  SCIP_TREE* tree, /**< branch and bound tree */
722  BMS_BLKMEM* blkmem, /**< block memory buffers */
723  SCIP_SET* set, /**< global SCIP settings */
724  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
725  SCIP_LP* lp /**< current LP data */
726  );
727 
728 /** marks the probing node to have a solved LP relaxation */
729 extern
731  SCIP_TREE* tree, /**< branch and bound tree */
732  BMS_BLKMEM* blkmem, /**< block memory */
733  SCIP_LP* lp /**< current LP data */
734  );
735 
736 /** undoes all changes to the problem applied in probing up to the given probing depth;
737  * the changes of the probing node of the given probing depth are the last ones that remain active;
738  * changes that were applied before calling SCIPtreeCreateProbingNode() cannot be undone
739  */
740 extern
742  SCIP_TREE* tree, /**< branch and bound tree */
743  SCIP_REOPT* reopt, /**< reoptimization data structure */
744  BMS_BLKMEM* blkmem, /**< block memory buffers */
745  SCIP_SET* set, /**< global SCIP settings */
746  SCIP_STAT* stat, /**< problem statistics */
747  SCIP_PROB* transprob, /**< transformed problem */
748  SCIP_PROB* origprob, /**< original problem */
749  SCIP_LP* lp, /**< current LP data */
750  SCIP_PRIMAL* primal, /**< primal data structure */
751  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
752  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
753  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
754  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
755  int probingdepth /**< probing depth of the node in the probing path that should be reactivated */
756  );
757 
758 /** switches back from probing to normal operation mode, frees all nodes on the probing path, restores bounds of all
759  * variables and restores active constraints arrays of focus node
760  */
761 extern
763  SCIP_TREE* tree, /**< branch and bound tree */
764  SCIP_REOPT* reopt, /**< reoptimization data structure */
765  BMS_BLKMEM* blkmem, /**< block memory buffers */
766  SCIP_SET* set, /**< global SCIP settings */
767  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
768  SCIP_STAT* stat, /**< problem statistics */
769  SCIP_PROB* transprob, /**< transformed problem after presolve */
770  SCIP_PROB* origprob, /**< original problem */
771  SCIP_LP* lp, /**< current LP data */
772  SCIP_PRIMAL* primal, /**< primal LP data */
773  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
774  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
775  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
776  SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
777  );
778 
779 
780 /** gets number of children of the focus node */
781 extern
783  SCIP_TREE* tree /**< branch and bound tree */
784  );
785 
786 /** gets number of siblings of the focus node */
787 extern
789  SCIP_TREE* tree /**< branch and bound tree */
790  );
791 
792 /** gets number of leaves in the tree (excluding children and siblings of focus nodes) */
793 extern
795  SCIP_TREE* tree /**< branch and bound tree */
796  );
797 
798 /** gets number of open nodes in the tree (children + siblings + leaves) */
799 extern
801  SCIP_TREE* tree /**< branch and bound tree */
802  );
803 
804 /** returns whether the active path goes completely down to the focus node */
805 extern
807  SCIP_TREE* tree /**< branch and bound tree */
808  );
809 
810 /** returns whether the current node is a temporary probing node */
811 extern
813  SCIP_TREE* tree /**< branch and bound tree */
814  );
815 
816 /** returns the temporary probing root node, or NULL if the we are not in probing mode */
817 extern
819  SCIP_TREE* tree /**< branch and bound tree */
820  );
821 
822 /** returns the current probing depth, i.e. the number of probing sub nodes existing in the probing path */
823 extern
825  SCIP_TREE* tree /**< branch and bound tree */
826  );
827 
828 /** gets focus node of the tree */
829 extern
831  SCIP_TREE* tree /**< branch and bound tree */
832  );
833 
834 /** gets depth of focus node in the tree, or -1 if no focus node exists */
835 extern
837  SCIP_TREE* tree /**< branch and bound tree */
838  );
839 
840 /** returns, whether the LP was or is to be solved in the focus node */
841 extern
843  SCIP_TREE* tree /**< branch and bound tree */
844  );
845 
846 /** sets mark to solve or to ignore the LP while processing the focus node */
847 extern
849  SCIP_TREE* tree, /**< branch and bound tree */
850  SCIP_Bool solvelp /**< should the LP be solved in focus node? */
851  );
852 
853 /** returns whether the LP of the focus node is already constructed */
854 extern
856  SCIP_TREE* tree /**< branch and bound tree */
857  );
858 
859 /** returns whether the focus node is already solved and only propagated again */
860 extern
862  SCIP_TREE* tree /**< branch and bound tree */
863  );
864 
865 /** gets current node of the tree, i.e. the last node in the active path, or NULL if no current node exists */
866 extern
868  SCIP_TREE* tree /**< branch and bound tree */
869  );
870 
871 /** 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 */
872 extern
874  SCIP_TREE* tree /**< branch and bound tree */
875  );
876 
877 /** gets the maximal allowed tree depth */
878 extern
880  SCIP_TREE* tree /**< branch and bound tree */
881  );
882 
883 /** returns, whether the LP was or is to be solved in the current node */
884 extern
886  SCIP_TREE* tree /**< branch and bound tree */
887  );
888 
889 /** returns the depth of the effective root node (i.e. the first depth level of a node with at least two children) */
890 extern
892  SCIP_TREE* tree /**< branch and bound tree */
893  );
894 
895 /** gets the root node of the tree */
896 extern
898  SCIP_TREE* tree /**< branch and bound tree */
899  );
900 
901 /** returns whether we are in probing and the objective value of at least one column was changed */
902 extern
904  SCIP_TREE* tree /**< branch and bound tree */
905  );
906 
907 /** marks the current probing node to have a changed objective function */
908 extern
910  SCIP_TREE* tree /**< branch and bound tree */
911  );
912 
913 #ifdef NDEBUG
914 
915 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
916  * speed up the algorithms.
917  */
918 
919 #define SCIPtreeGetNLeaves(tree) SCIPnodepqLen((tree)->leaves)
920 #define SCIPtreeGetNChildren(tree) ((tree)->nchildren)
921 #define SCIPtreeGetNSiblings(tree) ((tree)->nsiblings)
922 #define SCIPtreeGetNNodes(tree) \
923  (SCIPtreeGetNChildren(tree) + SCIPtreeGetNSiblings(tree) + SCIPtreeGetNLeaves(tree))
924 #define SCIPtreeIsPathComplete(tree) ((tree)->focusnode == NULL || (tree)->focusnode->depth < (tree)->pathlen)
925 #define SCIPtreeGetDepthLimit(tree) (MAXDEPTH)
926 #define SCIPtreeProbing(tree) ((tree)->probingroot != NULL)
927 #define SCIPtreeGetProbingRoot(tree) (tree)->probingroot
928 #define SCIPtreeGetProbingDepth(tree) (SCIPtreeGetCurrentDepth(tree) - SCIPnodeGetDepth((tree)->probingroot))
929 #define SCIPtreeGetFocusNode(tree) (tree)->focusnode
930 #define SCIPtreeGetFocusDepth(tree) ((tree)->focusnode != NULL ? (tree)->focusnode->depth : -1)
931 #define SCIPtreeHasFocusNodeLP(tree) (tree)->focusnodehaslp
932 #define SCIPtreeSetFocusNodeLP(tree,solvelp) ((tree)->focusnodehaslp = solvelp)
933 #define SCIPtreeIsFocusNodeLPConstructed(tree) (tree)->focuslpconstructed
934 #define SCIPtreeInRepropagation(tree) ((tree)->focusnode != NULL \
935  && SCIPnodeGetType((tree)->focusnode) == SCIP_NODETYPE_REFOCUSNODE)
936 #define SCIPtreeGetCurrentNode(tree) ((tree)->pathlen > 0 ? (tree)->path[(tree)->pathlen-1] : NULL)
937 #define SCIPtreeGetCurrentDepth(tree) ((tree)->pathlen-1)
938 #define SCIPtreeHasCurrentNodeLP(tree) (SCIPtreeProbing(tree) ? (tree)->probingnodehaslp : SCIPtreeHasFocusNodeLP(tree))
939 #define SCIPtreeGetEffectiveRootDepth(tree) ((tree)->effectiverootdepth)
940 #define SCIPtreeGetRootNode(tree) ((tree)->root)
941 #define SCIPtreeProbingObjChanged(tree) ((tree)->probingobjchanged)
942 #define SCIPtreeMarkProbingObjChanged(tree) ((tree)->probingobjchanged = TRUE)
943 
944 #endif
945 
946 
947 /** gets the best child of the focus node w.r.t. the node selection priority assigned by the branching rule */
948 extern
950  SCIP_TREE* tree /**< branch and bound tree */
951  );
952 
953 /** gets the best sibling of the focus node w.r.t. the node selection priority assigned by the branching rule */
954 extern
956  SCIP_TREE* tree /**< branch and bound tree */
957  );
958 
959 /** gets the best child of the focus node w.r.t. the node selection strategy */
960 extern
962  SCIP_TREE* tree, /**< branch and bound tree */
963  SCIP_SET* set /**< global SCIP settings */
964  );
965 
966 /** gets the best sibling of the focus node w.r.t. the node selection strategy */
967 extern
969  SCIP_TREE* tree, /**< branch and bound tree */
970  SCIP_SET* set /**< global SCIP settings */
971  );
972 
973 /** gets the best leaf from the node queue w.r.t. the node selection strategy */
974 extern
976  SCIP_TREE* tree /**< branch and bound tree */
977  );
978 
979 /** gets the best node from the tree (child, sibling, or leaf) w.r.t. the node selection strategy */
980 extern
982  SCIP_TREE* tree, /**< branch and bound tree */
983  SCIP_SET* set /**< global SCIP settings */
984  );
985 
986 /** gets the minimal lower bound of all nodes in the tree */
987 extern
989  SCIP_TREE* tree, /**< branch and bound tree */
990  SCIP_SET* set /**< global SCIP settings */
991  );
992 
993 /** gets the node with minimal lower bound of all nodes in the tree (child, sibling, or leaf) */
994 extern
996  SCIP_TREE* tree, /**< branch and bound tree */
997  SCIP_SET* set /**< global SCIP settings */
998  );
999 
1000 /** gets the average lower bound of all nodes in the tree */
1001 extern
1003  SCIP_TREE* tree, /**< branch and bound tree */
1004  SCIP_Real cutoffbound /**< global cutoff bound */
1005  );
1006 
1007 #ifdef __cplusplus
1008 }
1009 #endif
1010 
1011 #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:1002
SCIP_RETCODE SCIPtreeCreateProbingNode(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: tree.c:6232
SCIP_RETCODE SCIPtreeSetNodesel(SCIP_TREE *tree, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_NODESEL *nodesel)
Definition: tree.c:4863
SCIP_RETCODE SCIPtreeAddDiveBoundChange(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Bool preferred)
Definition: tree.c:6023
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:6527
int SCIPtreeGetProbingDepth(SCIP_TREE *tree)
Definition: tree.c:7995
SCIP_RETCODE SCIPnodeDelCons(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_CONS *cons)
Definition: tree.c:1564
public methods for branch and bound tree
SCIP_NODE * SCIPtreeGetLowerboundNode(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6867
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:953
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:5185
SCIP_Bool SCIPtreeHasFocusNodeLP(SCIP_TREE *tree)
Definition: tree.c:7899
SCIP_NODE * SCIPtreeGetBestChild(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6731
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:1594
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:6493
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:1725
SCIP_NODE * SCIPtreeGetFocusNode(SCIP_TREE *tree)
Definition: tree.c:7865
SCIP_NODE * SCIPtreeGetBestNode(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6795
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:4543
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:3395
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:1122
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:1190
SCIP_Real SCIPtreeCalcNodeselPriority(SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
Definition: tree.c:4976
SCIP_NODE * SCIPtreeGetBestSibling(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6758
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:4128
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:3267
SCIP_NODE * SCIPtreeGetBestLeaf(SCIP_TREE *tree)
Definition: tree.c:6785
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:2258
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:4771
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:1164
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:2130
SCIP_RETCODE SCIPtreeStartProbing(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp, SCIP_Bool strongbranching)
Definition: tree.c:6177
int SCIPtreeGetDepthLimit(SCIP_TREE *tree)
Definition: tree.c:7974
SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
Definition: tree.c:7984
#define SCIP_Bool
Definition: def.h:53
int SCIPtreeGetEffectiveRootDepth(SCIP_TREE *tree)
Definition: tree.c:8006
SCIP_Real SCIPtreeGetAvgLowerbound(SCIP_TREE *tree, SCIP_Real cutoffbound)
Definition: tree.c:6919
void SCIPtreeClearDiveBoundChanges(SCIP_TREE *tree)
Definition: tree.c:6078
SCIP_RETCODE SCIPtreeFree(SCIP_TREE **tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:4619
void SCIPtreeGetDiveBoundChangeData(SCIP_TREE *tree, SCIP_VAR ***variables, SCIP_BRANCHDIR **directions, SCIP_Real **values, int *ndivebdchgs, SCIP_Bool preferred)
Definition: tree.c:6055
void SCIPnodeSetEstimate(SCIP_NODE *node, SCIP_SET *set, SCIP_Real newestimate)
Definition: tree.c:2350
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:5658
SCIP_RETCODE SCIPnodeReleaseLPIState(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_LP *lp)
Definition: tree.c:261
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:4726
SCIP_RETCODE SCIPnodeCaptureLPIState(SCIP_NODE *node, int nuses)
Definition: tree.c:233
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:4853
int SCIPtreeGetNSiblings(SCIP_TREE *tree)
Definition: tree.c:7792
SCIP_Bool SCIPtreeProbingObjChanged(SCIP_TREE *tree)
Definition: tree.c:8028
type definitions for propagators
int SCIPnodeGetNAddedConss(SCIP_NODE *node)
Definition: tree.c:1624
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:1978
SCIP_RETCODE SCIPtreeMarkProbingNodeHasLP(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_LP *lp)
Definition: tree.c:6324
#define SCIP_Real
Definition: def.h:127
SCIP_RETCODE SCIPnodeAddCons(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_CONS *cons)
Definition: tree.c:1525
SCIP_NODE * SCIPtreeGetRootNode(SCIP_TREE *tree)
Definition: tree.c:8017
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:2007
SCIP_NODE * SCIPtreeGetPrioChild(SCIP_TREE *tree)
Definition: tree.c:6679
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:2298
void SCIPtreeMarkProbingObjChanged(SCIP_TREE *tree)
Definition: tree.c:8039
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:2364
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:6251
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:2332
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:4811
SCIP_NODE * SCIPtreeGetPrioSibling(SCIP_TREE *tree)
Definition: tree.c:6705
SCIP_Real SCIPtreeGetLowerbound(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:6829
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:4891
SCIP_RETCODE SCIPtreeClear(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:4666
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:5126
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:5516
memory allocation routines