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-2025 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file tree.h
26 * @ingroup INTERNALAPI
27 * @brief internal methods for branch and bound tree
28 * @author Tobias Achterberg
29 * @author Timo Berthold
30 */
31
32/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33
34#ifndef __SCIP_TREE_H__
35#define __SCIP_TREE_H__
36
37
39#include "scip/def.h"
40#include "scip/nodesel.h"
41#include "scip/type_set.h"
42#include "scip/type_stat.h"
43#include "scip/type_cons.h"
44#include "scip/type_event.h"
45#include "scip/type_lp.h"
46#include "scip/type_var.h"
47#include "scip/type_prob.h"
48#include "scip/type_primal.h"
49#include "scip/type_tree.h"
50#include "scip/type_reopt.h"
51#include "scip/type_branch.h"
52#include "scip/type_prop.h"
53#include "scip/type_implics.h"
54#include "scip/type_history.h"
56#include "scip/pub_tree.h"
57
58#ifndef NDEBUG
59#include "scip/struct_tree.h"
60#endif
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66
67/*
68 * Node methods
69 */
70
71/** creates a child node of the focus node */
73 SCIP_NODE** node, /**< pointer to node data structure */
74 BMS_BLKMEM* blkmem, /**< block memory */
75 SCIP_SET* set, /**< global SCIP settings */
76 SCIP_STAT* stat, /**< problem statistics */
77 SCIP_TREE* tree, /**< branch and bound tree */
78 SCIP_Real nodeselprio, /**< node selection priority of new node */
79 SCIP_Real estimate /**< estimate for (transformed) objective value of best feasible solution in subtree */
80 );
81
82/** frees node and inactive path iteratively */
84 SCIP_NODE** node, /**< node data */
85 BMS_BLKMEM* blkmem, /**< block memory buffer */
86 SCIP_SET* set, /**< global SCIP settings */
87 SCIP_STAT* stat, /**< problem statistics */
88 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
89 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
90 SCIP_TREE* tree, /**< branch and bound tree */
91 SCIP_LP* lp /**< current LP data */
92 );
93
94/** increases the reference counter of the LP state in the fork or subroot node */
96 SCIP_NODE* node, /**< fork/subroot node */
97 int nuses /**< number to add to the usage counter */
98 );
99
100/** decreases the reference counter of the LP state in the fork or subroot node */
102 SCIP_NODE* node, /**< fork/subroot node */
103 BMS_BLKMEM* blkmem, /**< block memory buffers */
104 SCIP_LP* lp /**< current LP data */
105 );
106
107/** installs a child, a sibling, or a leaf node as the new focus node */
109 SCIP_NODE** node, /**< pointer to node to focus (or NULL to remove focus); the node
110 * is freed, if it was cut off due to a cut off subtree */
111 BMS_BLKMEM* blkmem, /**< block memory */
112 SCIP_SET* set, /**< global SCIP settings */
113 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
114 SCIP_STAT* stat, /**< problem statistics */
115 SCIP_PROB* transprob, /**< transformed problem */
116 SCIP_PROB* origprob, /**< original problem */
117 SCIP_PRIMAL* primal, /**< primal data */
118 SCIP_TREE* tree, /**< branch and bound tree */
119 SCIP_REOPT* reopt, /**< reoptimization data structure */
120 SCIP_LP* lp, /**< current LP data */
121 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
122 SCIP_CONFLICT* conflict, /**< conflict analysis data */
123 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
124 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
125 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
126 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
127 SCIP_Bool* cutoff, /**< pointer to store whether the given node can be cut off */
128 SCIP_Bool postponed, /**< was the current focus node postponed? */
129 SCIP_Bool exitsolve /**< are we in exitsolve stage, so we only need to loose the children */
130 );
131
132/** cuts off node and whole sub tree from branch and bound tree */
134 SCIP_NODE* node, /**< node that should be cut off */
135 SCIP_SET* set, /**< global SCIP settings */
136 SCIP_STAT* stat, /**< problem statistics */
137 SCIP_TREE* tree, /**< branch and bound tree */
138 SCIP_PROB* transprob, /**< transformed problem after presolve */
139 SCIP_PROB* origprob, /**< original problem */
140 SCIP_REOPT* reopt, /**< reoptimization data structure */
141 SCIP_LP* lp, /**< current LP */
142 BMS_BLKMEM* blkmem /**< block memory */
143 );
144
145/** marks node, that propagation should be applied again the next time, a node of its subtree is focused */
147 SCIP_NODE* node, /**< node that should be propagated again */
148 SCIP_SET* set, /**< global SCIP settings */
149 SCIP_STAT* stat, /**< problem statistics */
150 SCIP_TREE* tree /**< branch and bound tree */
151 );
152
153/** marks node, that it is completely propagated in the current repropagation subtree level */
155 SCIP_NODE* node, /**< node that should be propagated again */
156 SCIP_TREE* tree /**< branch and bound tree */
157 );
158
159/** adds constraint locally to the node and captures it; activates constraint, if node is active;
160 * if a local constraint is added to the root node, it is automatically upgraded into a global constraint
161 */
163 SCIP_NODE* node, /**< node to add constraint to */
164 BMS_BLKMEM* blkmem, /**< block memory */
165 SCIP_SET* set, /**< global SCIP settings */
166 SCIP_STAT* stat, /**< problem statistics */
167 SCIP_TREE* tree, /**< branch and bound tree */
168 SCIP_CONS* cons /**< constraint to add */
169 );
170
171/** locally deletes constraint at the given node by disabling its separation, enforcing, and propagation capabilities
172 * at the node; captures constraint; disables constraint, if node is active
173 */
175 SCIP_NODE* node, /**< node to add constraint to */
176 BMS_BLKMEM* blkmem, /**< block memory */
177 SCIP_SET* set, /**< global SCIP settings */
178 SCIP_STAT* stat, /**< problem statistics */
179 SCIP_TREE* tree, /**< branch and bound tree */
180 SCIP_CONS* cons /**< constraint to locally delete */
181 );
182
183/** return all bound changes on non-continuous variables based on constraint and propagator propagation
184 *
185 * Stop saving the bound changes when a propagation based on a dual information is reached.
186 */
188 SCIP_NODE* node, /**< node */
189 SCIP_VAR** vars, /**< array of variables on which propagation triggers a bound change */
190 SCIP_Real* varbounds, /**< array of bounds set by propagation */
191 SCIP_BOUNDTYPE* varboundtypes, /**< array of boundtypes set by propagation */
192 int* npropvars, /**< number of variables on which 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 propvarssize /**< available slots in arrays */
196 );
197
198/** return bound changes on non-continuous variables based on constraint and propagator propagation
199 *
200 * Start saving the bound changes when a propagation based on a dual information is reached.
201 *
202 * @note Currently, we can only detect bound changes based in dual information if they arise from strong branching.
203 */
205 SCIP_NODE* node, /**< node */
206 SCIP_VAR** vars, /**< array where to store variables with bound changes */
207 SCIP_Real* varbounds, /**< array where to store changed bounds */
208 SCIP_BOUNDTYPE* varboundtypes, /**< array where to store type of changed bound*/
209 int* nvars, /**< buffer to store number of bound changes;
210 * if this is larger than varssize, arrays should be reallocated and method
211 * should be called again */
212 int varssize /**< available slots in provided arrays */
213 );
214
215/** adds bound change with inference information to focus node, child of focus node, or probing node;
216 * if possible, adjusts bound to integral value;
217 * at most one of infercons and inferprop may be non-NULL
218 */
220 SCIP_NODE* node, /**< node to add bound change to */
221 BMS_BLKMEM* blkmem, /**< block memory */
222 SCIP_SET* set, /**< global SCIP settings */
223 SCIP_STAT* stat, /**< problem statistics */
224 SCIP_PROB* transprob, /**< transformed problem after presolve */
225 SCIP_PROB* origprob, /**< original problem */
226 SCIP_TREE* tree, /**< branch and bound tree */
227 SCIP_REOPT* reopt, /**< reoptimization data structure */
228 SCIP_LP* lp, /**< current LP data */
229 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
230 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
231 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
232 SCIP_VAR* var, /**< variable to change the bounds for */
233 SCIP_Real newbound, /**< new value for bound */
234 SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
235 SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
236 SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
237 int inferinfo, /**< user information for inference to help resolving the conflict */
238 SCIP_Bool probingchange /**< is the bound change a temporary setting due to probing? */
239 );
240
241/** adds bound change to focus node, or child of focus node, or probing node;
242 * if possible, adjusts bound to integral value
243 */
245 SCIP_NODE* node, /**< node to add bound change to */
246 BMS_BLKMEM* blkmem, /**< block memory */
247 SCIP_SET* set, /**< global SCIP settings */
248 SCIP_STAT* stat, /**< problem statistics */
249 SCIP_PROB* transprob, /**< transformed problem after presolve */
250 SCIP_PROB* origprob, /**< original problem */
251 SCIP_TREE* tree, /**< branch and bound tree */
252 SCIP_REOPT* reopt, /**< reoptimization data structure */
253 SCIP_LP* lp, /**< current LP data */
254 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
255 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
256 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
257 SCIP_VAR* var, /**< variable to change the bounds for */
258 SCIP_Real newbound, /**< new value for bound */
259 SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
260 SCIP_Bool probingchange /**< is the bound change a temporary setting due to probing? */
261 );
262
263/** adds hole with inference information to focus node, child of focus node, or probing node;
264 * if possible, adjusts bound to integral value;
265 * at most one of infercons and inferprop may be non-NULL
266 */
268 SCIP_NODE* node, /**< node to add bound change to */
269 BMS_BLKMEM* blkmem, /**< block memory */
270 SCIP_SET* set, /**< global SCIP settings */
271 SCIP_STAT* stat, /**< problem statistics */
272 SCIP_TREE* tree, /**< branch and bound tree */
273 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
274 SCIP_VAR* var, /**< variable to change the bounds for */
275 SCIP_Real left, /**< left bound of open interval defining the hole (left,right) */
276 SCIP_Real right, /**< right bound of open interval defining the hole (left,right) */
277 SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
278 SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
279 int inferinfo, /**< user information for inference to help resolving the conflict */
280 SCIP_Bool probingchange, /**< is the bound change a temporary setting due to probing? */
281 SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
282 );
283
284/** adds hole change to focus node, or child of focus node */
286 SCIP_NODE* node, /**< node to add bound change to */
287 BMS_BLKMEM* blkmem, /**< block memory */
288 SCIP_SET* set, /**< global SCIP settings */
289 SCIP_STAT* stat, /**< problem statistics */
290 SCIP_TREE* tree, /**< branch and bound tree */
291 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
292 SCIP_VAR* var, /**< variable to change the bounds for */
293 SCIP_Real left, /**< left bound of open interval defining the hole (left,right) */
294 SCIP_Real right, /**< right bound of open interval defining the hole (left,right) */
295 SCIP_Bool probingchange, /**< is the bound change a temporary setting due to probing? */
296 SCIP_Bool* added /**< pointer to store whether the hole was added, or NULL */
297 );
298
299/** if given value is larger than the node's lower bound, sets the node's lower bound to the new value */
301 SCIP_NODE* node, /**< node to update lower bound for */
302 SCIP_STAT* stat, /**< problem statistics */
303 SCIP_SET* set, /**< global SCIP settings */
304 SCIP_TREE* tree, /**< branch and bound tree */
305 SCIP_PROB* transprob, /**< transformed problem data */
306 SCIP_PROB* origprob, /**< original problem */
307 SCIP_Real newbound /**< new lower bound for the node (if it's larger than the old one) */
308 );
309
310/** updates lower bound of node using lower bound of LP */
312 SCIP_NODE* node, /**< node to set lower bound for */
313 SCIP_SET* set, /**< global SCIP settings */
314 SCIP_STAT* stat, /**< problem statistics */
315 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
316 SCIP_TREE* tree, /**< branch and bound tree */
317 SCIP_PROB* transprob, /**< transformed problem after presolve */
318 SCIP_PROB* origprob, /**< original problem */
319 SCIP_LP* lp /**< LP data */
320 );
321
322/** change the node selection priority of the given child */
324 SCIP_TREE* tree, /**< branch and bound tree */
325 SCIP_NODE* child, /**< child to update the node selection priority */
326 SCIP_Real priority /**< node selection priority value */
327 );
328
329
330/** sets the node's estimated bound to the new value */
332 SCIP_NODE* node, /**< node to update lower bound for */
333 SCIP_SET* set, /**< global SCIP settings */
334 SCIP_Real newestimate /**< new estimated bound for the node */
335 );
336
337/** propagates implications of binary fixings at the given node triggered by the implication graph and the clique table */
339 SCIP_NODE* node, /**< node to propagate implications on */
340 BMS_BLKMEM* blkmem, /**< block memory */
341 SCIP_SET* set, /**< global SCIP settings */
342 SCIP_STAT* stat, /**< problem statistics */
343 SCIP_PROB* transprob, /**< transformed problem after presolve */
344 SCIP_PROB* origprob, /**< original problem */
345 SCIP_TREE* tree, /**< branch and bound tree */
346 SCIP_REOPT* reopt, /**< reoptimization data structure */
347 SCIP_LP* lp, /**< current LP data */
348 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
349 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
350 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
351 SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
352 );
353
354/** returns all bound changes based on dual information.
355 *
356 * currently, this methods works only for bound changes made by strong branching on binary variables. we need this
357 * method to ensure optimality within reoptimization.
358 *
359 * since the bound changes made by strong branching are stored as SCIP_BOUNDCHGTYPE_CONSINFER or SCIP_BOUNDCHGTYPE_PROPINFER
360 * with no constraint or propagator, resp., we are are interested in bound changes with these attributes.
361 *
362 * all bound changes of type SCIP_BOUNDCHGTYPE_BRANCHING are stored in the beginning of the bound change array, afterwards,
363 * we can find the other two types. thus, we start the search at the end of the list and stop when reaching the first
364 * bound change of type SCIP_BOUNDCHGTYPE_BRANCHING.
365 */
367 SCIP_NODE* node, /**< node data */
368 SCIP_VAR** vars, /**< array of variables on which the bound change is based on dual information */
369 SCIP_Real* bounds, /**< array of bounds which are based on dual information */
370 SCIP_BOUNDTYPE* boundtypes, /**< array of boundtypes which are based on dual information */
371 int* nvars, /**< number of variables on which the bound change is based on dual information
372 * if this is larger than the array size, arrays should be reallocated and method
373 * should be called again */
374 int varssize /**< available slots in arrays */
375 );
376
377/** returns the number of bound changes based on dual information.
378 *
379 * currently, this methods works only for bound changes made by strong branching on binary variables. we need this
380 * method to ensure optimality within reoptimization.
381 *
382 * since the bound changes made by strong branching are stored as SCIP_BOUNDCHGTYPE_CONSINFER or SCIP_BOUNDCHGTYPE_PROPINFER
383 * with no constraint or propagator, resp., we are are interested in bound changes with these attributes.
384 *
385 * all bound changes of type SCIP_BOUNDCHGTYPE_BRANCHING are stored in the beginning of the bound change array, afterwards,
386 * we can find the other two types. thus, we start the search at the end of the list and stop when reaching the first
387 * bound change of type SCIP_BOUNDCHGTYPE_BRANCHING.
388 */
390 SCIP_NODE* node
391 );
392
393/*
394 * Tree methods
395 */
396
397/** creates an initialized tree data structure */
399 SCIP_TREE** tree, /**< pointer to tree data structure */
400 BMS_BLKMEM* blkmem, /**< block memory buffers */
401 SCIP_SET* set, /**< global SCIP settings */
402 SCIP_NODESEL* nodesel /**< node selector to use for sorting leaves in the priority queue */
403 );
404
405/** frees tree data structure */
407 SCIP_TREE** tree, /**< pointer to tree data structure */
408 BMS_BLKMEM* blkmem, /**< block memory buffers */
409 SCIP_SET* set, /**< global SCIP settings */
410 SCIP_STAT* stat, /**< problem statistics */
411 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
412 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
413 SCIP_LP* lp /**< current LP data */
414 );
415
416/** clears and resets tree data structure and deletes all nodes */
418 SCIP_TREE* tree, /**< tree data structure */
419 BMS_BLKMEM* blkmem, /**< block memory buffers */
420 SCIP_SET* set, /**< global SCIP settings */
421 SCIP_STAT* stat, /**< problem statistics */
422 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
423 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
424 SCIP_LP* lp /**< current LP data */
425 );
426
427/** creates the root node of the tree and puts it into the leaves queue */
429 SCIP_TREE* tree, /**< tree data structure */
430 SCIP_REOPT* reopt, /**< reoptimization data structure */
431 BMS_BLKMEM* blkmem, /**< block memory buffers */
432 SCIP_SET* set, /**< global SCIP settings */
433 SCIP_STAT* stat, /**< problem statistics */
434 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
435 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
436 SCIP_LP* lp /**< current LP data */
437 );
438
439/** creates a temporary presolving root node of the tree and installs it as focus node */
441 SCIP_TREE* tree, /**< tree data structure */
442 SCIP_REOPT* reopt, /**< reoptimization data structure */
443 BMS_BLKMEM* blkmem, /**< block memory buffers */
444 SCIP_SET* set, /**< global SCIP settings */
445 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
446 SCIP_STAT* stat, /**< problem statistics */
447 SCIP_PROB* transprob, /**< transformed problem */
448 SCIP_PROB* origprob, /**< original problem */
449 SCIP_PRIMAL* primal, /**< primal data */
450 SCIP_LP* lp, /**< current LP data */
451 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
452 SCIP_CONFLICT* conflict, /**< conflict analysis data */
453 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
454 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
455 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
456 SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
457 );
458
459/** frees the temporary presolving root and resets tree data structure */
461 SCIP_TREE* tree, /**< tree data structure */
462 SCIP_REOPT* reopt, /**< reoptimization data structure */
463 BMS_BLKMEM* blkmem, /**< block memory buffers */
464 SCIP_SET* set, /**< global SCIP settings */
465 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
466 SCIP_STAT* stat, /**< problem statistics */
467 SCIP_PROB* transprob, /**< transformed problem */
468 SCIP_PROB* origprob, /**< original problem */
469 SCIP_PRIMAL* primal, /**< primal data */
470 SCIP_LP* lp, /**< current LP data */
471 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
472 SCIP_CONFLICT* conflict, /**< conflict analysis data */
473 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
474 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
475 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
476 SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
477 );
478
479/** returns the node selector associated with the given node priority queue */
481 SCIP_TREE* tree /**< branch and bound tree */
482 );
483
484/** sets the node selector used for sorting the nodes in the priority queue, and resorts the queue if necessary */
486 SCIP_TREE* tree, /**< branch and bound tree */
487 SCIP_SET* set, /**< global SCIP settings */
488 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
489 SCIP_STAT* stat, /**< problem statistics */
490 SCIP_NODESEL* nodesel /**< node selector to use for sorting the nodes in the queue */
491 );
492
493/** cuts off nodes with lower bound not better than given upper bound */
495 SCIP_TREE* tree, /**< branch and bound tree */
496 SCIP_REOPT* reopt, /**< reoptimization data structure */
497 BMS_BLKMEM* blkmem, /**< block memory */
498 SCIP_SET* set, /**< global SCIP settings */
499 SCIP_STAT* stat, /**< dynamic problem statistics */
500 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
501 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
502 SCIP_LP* lp, /**< current LP data */
503 SCIP_Real cutoffbound /**< cutoff bound: all nodes with lowerbound >= cutoffbound are cut off */
504 );
505
506/** constructs the LP relaxation of the focus node */
508 SCIP_TREE* tree, /**< branch and bound tree */
509 BMS_BLKMEM* blkmem, /**< block memory */
510 SCIP_SET* set, /**< global SCIP settings */
511 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
512 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
513 SCIP_LP* lp, /**< current LP data */
514 SCIP_Bool* initroot /**< pointer to store whether the root LP relaxation has to be initialized */
515 );
516
517/** loads LP state for fork/subroot of the focus node */
519 SCIP_TREE* tree, /**< branch and bound tree */
520 BMS_BLKMEM* blkmem, /**< block memory buffers */
521 SCIP_SET* set, /**< global SCIP settings */
522 SCIP_PROB* prob, /**< problem data */
523 SCIP_STAT* stat, /**< dynamic problem statistics */
524 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
525 SCIP_LP* lp /**< current LP data */
526 );
527
528/** calculates the node selection priority for moving the given variable's LP value to the given target value;
529 * this node selection priority can be given to the SCIPcreateChild() call
530 */
532 SCIP_TREE* tree, /**< branch and bound tree */
533 SCIP_SET* set, /**< global SCIP settings */
534 SCIP_STAT* stat, /**< dynamic problem statistics */
535 SCIP_VAR* var, /**< variable, of which the branching factor should be applied, or NULL */
536 SCIP_BRANCHDIR branchdir, /**< type of branching that was performed: upwards, downwards, or fixed
537 * fixed should only be used, when both bounds changed
538 */
539 SCIP_Real targetvalue /**< new value of the variable in the child node */
540 );
541
542/** calculates an estimate for the objective of the best feasible solution contained in the subtree after applying the given
543 * branching; this estimate can be given to the SCIPcreateChild() call
544 */
546 SCIP_TREE* tree, /**< branch and bound tree */
547 SCIP_SET* set, /**< global SCIP settings */
548 SCIP_STAT* stat, /**< dynamic problem statistics */
549 SCIP_VAR* var, /**< variable, of which the branching factor should be applied, or NULL */
550 SCIP_Real targetvalue /**< new value of the variable in the child node */
551 );
552
553/** branches on a variable x
554 * if x is a continuous variable, then two child nodes will be created
555 * (x <= x', x >= x')
556 * but if the bounds of x are such that their relative difference is smaller than epsilon,
557 * the variable is fixed to val (if not SCIP_INVALID) or a well chosen alternative in the current node,
558 * i.e., no children are created
559 * if x is not a continuous variable, then:
560 * if solution value x' is fractional, two child nodes will be created
561 * (x <= floor(x'), x >= ceil(x')),
562 * if solution value is integral, the x' is equal to lower or upper bound of the branching
563 * variable and the bounds of x are finite, then two child nodes will be created
564 * (x <= x", x >= x"+1 with x" = floor((lb + ub)/2)),
565 * otherwise (up to) three child nodes will be created
566 * (x <= x'-1, x == x', x >= x'+1)
567 * if solution value is equal to one of the bounds and the other bound is infinite, only two child nodes
568 * will be created (the third one would be infeasible anyway)
569 */
571 SCIP_TREE* tree, /**< branch and bound tree */
572 SCIP_REOPT* reopt, /**< reoptimization data structure */
573 BMS_BLKMEM* blkmem, /**< block memory */
574 SCIP_SET* set, /**< global SCIP settings */
575 SCIP_STAT* stat, /**< problem statistics data */
576 SCIP_PROB* transprob, /**< transformed problem after presolve */
577 SCIP_PROB* origprob, /**< original problem */
578 SCIP_LP* lp, /**< current LP data */
579 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
580 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
581 SCIP_VAR* var, /**< variable to branch on */
582 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 */
583 SCIP_NODE** downchild, /**< pointer to return the left child with variable rounded down, or NULL */
584 SCIP_NODE** eqchild, /**< pointer to return the middle child with variable fixed, or NULL */
585 SCIP_NODE** upchild /**< pointer to return the right child with variable rounded up, or NULL */
586 );
587
588/** branches a variable x using the given domain hole; two child nodes will be created (x <= left, x >= right) */
590 SCIP_TREE* tree, /**< branch and bound tree */
591 SCIP_REOPT* reopt, /**< reoptimization data structure */
592 BMS_BLKMEM* blkmem, /**< block memory */
593 SCIP_SET* set, /**< global SCIP settings */
594 SCIP_STAT* stat, /**< problem statistics data */
595 SCIP_PROB* transprob, /**< transformed problem after presolve */
596 SCIP_PROB* origprob, /**< original problem */
597 SCIP_LP* lp, /**< current LP data */
598 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
599 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
600 SCIP_VAR* var, /**< variable to branch on */
601 SCIP_Real left, /**< left side of the domain hole */
602 SCIP_Real right, /**< right side of the domain hole */
603 SCIP_NODE** downchild, /**< pointer to return the left child with variable rounded down, or NULL */
604 SCIP_NODE** upchild /**< pointer to return the right child with variable rounded up, or NULL */
605 );
606
607/** n-ary branching on a variable x
608 * Branches on variable x such that up to n/2 children are created on each side of the usual branching value.
609 * The branching value is selected as in SCIPtreeBranchVar().
610 * If n is 2 or the variables local domain is too small for a branching into n pieces, SCIPtreeBranchVar() is called.
611 * The parameters minwidth and widthfactor determine the domain width of the branching variable in the child nodes.
612 * If n is odd, one child with domain width 'width' and having the branching value in the middle is created.
613 * Otherwise, two children with domain width 'width' and being left and right of the branching value are created.
614 * Next further nodes to the left and right are created, where width is multiplied by widthfactor with increasing distance from the first nodes.
615 * The initial width is calculated such that n/2 nodes are created to the left and to the right of the branching value.
616 * If this value is below minwidth, the initial width is set to minwidth, which may result in creating less than n nodes.
617 *
618 * Giving a large value for widthfactor results in creating children with small domain when close to the branching value
619 * and large domain when closer to the current variable bounds. That is, setting widthfactor to a very large value and n to 3
620 * results in a ternary branching where the branching variable is mostly fixed in the middle child.
621 * Setting widthfactor to 1.0 results in children where the branching variable always has the same domain width
622 * (except for one child if the branching value is not in the middle).
623 */
625 SCIP_TREE* tree, /**< branch and bound tree */
626 SCIP_REOPT* reopt, /**< reoptimization data structure */
627 BMS_BLKMEM* blkmem, /**< block memory */
628 SCIP_SET* set, /**< global SCIP settings */
629 SCIP_STAT* stat, /**< problem statistics data */
630 SCIP_PROB* transprob, /**< transformed problem after presolve */
631 SCIP_PROB* origprob, /**< original problem */
632 SCIP_LP* lp, /**< current LP data */
633 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
634 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
635 SCIP_VAR* var, /**< variable to branch on */
636 SCIP_Real val, /**< value to branch on or SCIP_INVALID for branching on current LP/pseudo solution.
637 * A branching value is required for branching on continuous variables */
638 int n, /**< attempted number of children to be created, must be >= 2 */
639 SCIP_Real minwidth, /**< minimal domain width in children */
640 SCIP_Real widthfactor, /**< multiplier for children domain width with increasing distance from val, must be >= 1.0 */
641 int* nchildren /**< buffer to store number of created children, or NULL */
642 );
643
644/** adds a diving bound change to the tree together with the information if this is a bound change
645 * for the preferred direction or not
646 */
648 SCIP_TREE* tree, /**< branch and bound tree */
649 BMS_BLKMEM* blkmem, /**< block memory buffers */
650 SCIP_VAR* var, /**< variable to apply the bound change to */
651 SCIP_BRANCHDIR dir, /**< direction of the bound change */
652 SCIP_Real value, /**< value to adjust this variable bound to */
653 SCIP_Bool preferred /**< is this a bound change for the preferred child? */
654 );
655
656/** get the dive bound change data for the preferred or the alternative direction */
658 SCIP_TREE* tree, /**< branch and bound tree */
659 SCIP_VAR*** variables, /**< pointer to store variables for the specified direction */
660 SCIP_BRANCHDIR** directions, /**< pointer to store the branching directions */
661 SCIP_Real** values, /**< pointer to store bound change values */
662 int* ndivebdchgs, /**< pointer to store the number of dive bound changes */
663 SCIP_Bool preferred /**< should the dive bound changes for the preferred child be output? */
664 );
665
666/** clear the tree dive bound change data structure */
668 SCIP_TREE* tree /**< branch and bound tree */
669 );
670
671/** switches to probing mode and creates a probing root */
673 SCIP_TREE* tree, /**< branch and bound tree */
674 BMS_BLKMEM* blkmem, /**< block memory */
675 SCIP_SET* set, /**< global SCIP settings */
676 SCIP_LP* lp, /**< current LP data */
677 SCIP_RELAXATION* relaxation, /**< global relaxation data */
678 SCIP_PROB* transprob, /**< transformed problem after presolve */
679 SCIP_Bool strongbranching /**< is the probing mode used for strongbranching? */
680 );
681
682/** creates a new probing child node in the probing path */
684 SCIP_TREE* tree, /**< branch and bound tree */
685 BMS_BLKMEM* blkmem, /**< block memory */
686 SCIP_SET* set, /**< global SCIP settings */
687 SCIP_LP* lp /**< current LP data */
688 );
689
690/** sets the LP state for the current probing node
691 *
692 * @note state and norms are stored at the node and later released by SCIP; therefore, the pointers are set
693 * to NULL by the method
694 *
695 * @note the pointers to state and norms must not be NULL; however, they may point to a NULL pointer if the
696 * respective information should not be set
697 */
699 SCIP_TREE* tree, /**< branch and bound tree */
700 BMS_BLKMEM* blkmem, /**< block memory */
701 SCIP_LP* lp, /**< current LP data */
702 SCIP_LPISTATE** lpistate, /**< pointer to LP state information (like basis information) */
703 SCIP_LPINORMS** lpinorms, /**< pointer to LP pricing norms information */
704 SCIP_Bool primalfeas, /**< primal feasibility when LP state information was stored */
705 SCIP_Bool dualfeas /**< dual feasibility when LP state information was stored */
706 );
707
708/** loads the LP state for the current probing node */
710 SCIP_TREE* tree, /**< branch and bound tree */
711 BMS_BLKMEM* blkmem, /**< block memory buffers */
712 SCIP_SET* set, /**< global SCIP settings */
713 SCIP_PROB* prob, /**< problem data */
714 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
715 SCIP_LP* lp /**< current LP data */
716 );
717
718/** marks the probing node to have a solved LP relaxation */
720 SCIP_TREE* tree, /**< branch and bound tree */
721 BMS_BLKMEM* blkmem, /**< block memory */
722 SCIP_LP* lp /**< current LP data */
723 );
724
725/** undoes all changes to the problem applied in probing up to the given probing depth;
726 * the changes of the probing node of the given probing depth are the last ones that remain active;
727 * changes that were applied before calling SCIPtreeCreateProbingNode() cannot be undone
728 */
730 SCIP_TREE* tree, /**< branch and bound tree */
731 SCIP_REOPT* reopt, /**< reoptimization data structure */
732 BMS_BLKMEM* blkmem, /**< block memory buffers */
733 SCIP_SET* set, /**< global SCIP settings */
734 SCIP_STAT* stat, /**< problem statistics */
735 SCIP_PROB* transprob, /**< transformed problem */
736 SCIP_PROB* origprob, /**< original problem */
737 SCIP_LP* lp, /**< current LP data */
738 SCIP_PRIMAL* primal, /**< primal data structure */
739 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
740 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
741 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
742 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
743 int probingdepth /**< probing depth of the node in the probing path that should be reactivated */
744 );
745
746/** switches back from probing to normal operation mode, frees all nodes on the probing path, restores bounds of all
747 * variables and restores active constraints arrays of focus node
748 */
750 SCIP_TREE* tree, /**< branch and bound tree */
751 SCIP_REOPT* reopt, /**< reoptimization data structure */
752 BMS_BLKMEM* blkmem, /**< block memory buffers */
753 SCIP_SET* set, /**< global SCIP settings */
754 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
755 SCIP_STAT* stat, /**< problem statistics */
756 SCIP_PROB* transprob, /**< transformed problem after presolve */
757 SCIP_PROB* origprob, /**< original problem */
758 SCIP_LP* lp, /**< current LP data */
759 SCIP_RELAXATION* relaxation, /**< global relaxation data */
760 SCIP_PRIMAL* primal, /**< primal LP data */
761 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
762 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
763 SCIP_EVENTFILTER* eventfilter, /**< global event filter */
764 SCIP_CLIQUETABLE* cliquetable /**< clique table data structure */
765 );
766
767/** stores relaxation solution before diving or probing */
769 SCIP_TREE* tree, /**< branch and bound tree */
770 SCIP_SET* set, /**< global SCIP settings */
771 SCIP_RELAXATION* relaxation, /**< global relaxation data */
772 SCIP_PROB* transprob /**< transformed problem after presolve */
773 );
774
775/** restores relaxation solution after diving or probing */
777 SCIP_TREE* tree, /**< branch and bound tree */
778 SCIP_SET* set, /**< global SCIP settings */
779 SCIP_RELAXATION* relaxation, /**< global relaxation data */
780 SCIP_PROB* transprob /**< transformed problem after presolve */
781 );
782
783
784/** gets number of children of the focus node */
786 SCIP_TREE* tree /**< branch and bound tree */
787 );
788
789/** gets number of siblings of the focus node */
791 SCIP_TREE* tree /**< branch and bound tree */
792 );
793
794/** gets number of leaves in the tree (excluding children and siblings of focus nodes) */
796 SCIP_TREE* tree /**< branch and bound tree */
797 );
798
799/** gets number of open nodes in the tree (children + siblings + leaves) */
801 SCIP_TREE* tree /**< branch and bound tree */
802 );
803
804/** returns whether the active path goes completely down to the focus node */
806 SCIP_TREE* tree /**< branch and bound tree */
807 );
808
809/** returns whether the current node is a temporary probing node */
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 */
816 SCIP_TREE* tree /**< branch and bound tree */
817 );
818
819/** returns the current probing depth, i.e. the number of probing sub nodes existing in the probing path */
821 SCIP_TREE* tree /**< branch and bound tree */
822 );
823
824/** gets focus node of the tree */
826 SCIP_TREE* tree /**< branch and bound tree */
827 );
828
829/** gets depth of focus node in the tree, or -1 if no focus node exists */
831 SCIP_TREE* tree /**< branch and bound tree */
832 );
833
834/** returns, whether the LP was or is to be solved in the focus node */
836 SCIP_TREE* tree /**< branch and bound tree */
837 );
838
839/** sets mark to solve or to ignore the LP while processing the focus node */
841 SCIP_TREE* tree, /**< branch and bound tree */
842 SCIP_Bool solvelp /**< should the LP be solved in focus node? */
843 );
844
845/** returns whether the LP of the focus node is already constructed */
847 SCIP_TREE* tree /**< branch and bound tree */
848 );
849
850/** returns whether the focus node is already solved and only propagated again */
852 SCIP_TREE* tree /**< branch and bound tree */
853 );
854
855/** gets current node of the tree, i.e. the last node in the active path, or NULL if no current node exists */
857 SCIP_TREE* tree /**< branch and bound tree */
858 );
859
860/** 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 */
862 SCIP_TREE* tree /**< branch and bound tree */
863 );
864
865/** returns, whether the LP was or is to be solved in the current node */
867 SCIP_TREE* tree /**< branch and bound tree */
868 );
869
870/** returns the depth of the effective root node (i.e. the first depth level of a node with at least two children) */
872 SCIP_TREE* tree /**< branch and bound tree */
873 );
874
875/** gets the root node of the tree */
877 SCIP_TREE* tree /**< branch and bound tree */
878 );
879
880/** returns whether we are in probing and the objective value of at least one column was changed */
882 SCIP_TREE* tree /**< branch and bound tree */
883 );
884
885/** marks the current probing node to have a changed objective function */
887 SCIP_TREE* tree /**< branch and bound tree */
888 );
889
890#ifdef NDEBUG
891
892/* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
893 * speed up the algorithms.
894 */
895
896#define SCIPtreeGetNLeaves(tree) SCIPnodepqLen((tree)->leaves)
897#define SCIPtreeGetNChildren(tree) ((tree)->nchildren)
898#define SCIPtreeGetNSiblings(tree) ((tree)->nsiblings)
899#define SCIPtreeGetNNodes(tree) \
900 (SCIPtreeGetNChildren(tree) + SCIPtreeGetNSiblings(tree) + SCIPtreeGetNLeaves(tree))
901#define SCIPtreeIsPathComplete(tree) ((tree)->focusnode == NULL || (tree)->focusnode->depth < (tree)->pathlen)
902#define SCIPtreeProbing(tree) ((tree)->probingroot != NULL)
903#define SCIPtreeGetProbingRoot(tree) (tree)->probingroot
904#define SCIPtreeGetProbingDepth(tree) (SCIPtreeGetCurrentDepth(tree) - SCIPnodeGetDepth((tree)->probingroot))
905#define SCIPtreeGetFocusNode(tree) (tree)->focusnode
906#define SCIPtreeGetFocusDepth(tree) ((tree)->focusnode != NULL ? (int)(tree)->focusnode->depth : -1)
907#define SCIPtreeHasFocusNodeLP(tree) (tree)->focusnodehaslp
908#define SCIPtreeSetFocusNodeLP(tree,solvelp) ((tree)->focusnodehaslp = solvelp)
909#define SCIPtreeIsFocusNodeLPConstructed(tree) (tree)->focuslpconstructed
910#define SCIPtreeInRepropagation(tree) ((tree)->focusnode != NULL \
911 && SCIPnodeGetType((tree)->focusnode) == SCIP_NODETYPE_REFOCUSNODE)
912#define SCIPtreeGetCurrentNode(tree) ((tree)->pathlen > 0 ? (tree)->path[(tree)->pathlen-1] : NULL)
913#define SCIPtreeGetCurrentDepth(tree) ((tree)->pathlen-1)
914#define SCIPtreeHasCurrentNodeLP(tree) (SCIPtreeProbing(tree) ? (tree)->probingnodehaslp : SCIPtreeHasFocusNodeLP(tree))
915#define SCIPtreeGetEffectiveRootDepth(tree) ((tree)->effectiverootdepth)
916#define SCIPtreeGetRootNode(tree) ((tree)->root)
917#define SCIPtreeProbingObjChanged(tree) ((tree)->probingobjchanged)
918#define SCIPtreeMarkProbingObjChanged(tree) ((tree)->probingobjchanged = TRUE)
919
920#endif
921
922
923/** gets the best child of the focus node w.r.t. the node selection priority assigned by the branching rule */
925 SCIP_TREE* tree /**< branch and bound tree */
926 );
927
928/** gets the best sibling of the focus node w.r.t. the node selection priority assigned by the branching rule */
930 SCIP_TREE* tree /**< branch and bound tree */
931 );
932
933/** gets the best child of the focus node w.r.t. the node selection strategy */
935 SCIP_TREE* tree, /**< branch and bound tree */
936 SCIP_SET* set /**< global SCIP settings */
937 );
938
939/** gets the best sibling of the focus node w.r.t. the node selection strategy */
941 SCIP_TREE* tree, /**< branch and bound tree */
942 SCIP_SET* set /**< global SCIP settings */
943 );
944
945/** gets the best leaf from the node queue w.r.t. the node selection strategy */
947 SCIP_TREE* tree /**< branch and bound tree */
948 );
949
950/** gets the best node from the tree (child, sibling, or leaf) w.r.t. the node selection strategy */
952 SCIP_TREE* tree, /**< branch and bound tree */
953 SCIP_SET* set /**< global SCIP settings */
954 );
955
956/** gets the minimal lower bound of all nodes in the tree */
958 SCIP_TREE* tree, /**< branch and bound tree */
959 SCIP_SET* set /**< global SCIP settings */
960 );
961
962/** gets the node with minimal lower bound of all nodes in the tree (child, sibling, or leaf) */
964 SCIP_TREE* tree, /**< branch and bound tree */
965 SCIP_SET* set /**< global SCIP settings */
966 );
967
968/** gets the average lower bound of all nodes in the tree */
970 SCIP_TREE* tree, /**< branch and bound tree */
971 SCIP_Real cutoffbound /**< global cutoff bound */
972 );
973
974/** query if focus node was already branched on */
976 SCIP_TREE* tree, /**< branch and bound tree */
977 SCIP_NODE* node /**< tree node, or NULL to check focus node */
978 );
979
980#ifdef __cplusplus
981}
982#endif
983
984#endif
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:172
memory allocation routines
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:437
internal methods for node selectors and node priority queues
public methods for branch and bound tree
data structures for branch and bound tree
Definition: heur_padm.c:135
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:2399
SCIP_Bool SCIPtreeIsFocusNodeLPConstructed(SCIP_TREE *tree)
Definition: tree.c:8486
SCIP_NODE * SCIPtreeGetProbingRoot(SCIP_TREE *tree)
Definition: tree.c:8418
SCIP_RETCODE SCIPnodeReleaseLPIState(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_LP *lp)
Definition: tree.c:276
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:2147
void SCIPnodeGetDualBoundchgs(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *bounds, SCIP_BOUNDTYPE *boundtypes, int *nvars, int varssize)
Definition: tree.c:7748
SCIP_NODE * SCIPtreeGetBestSibling(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7273
SCIP_RETCODE SCIPnodeCutoff(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_REOPT *reopt, SCIP_LP *lp, BMS_BLKMEM *blkmem)
Definition: tree.c:1236
SCIP_NODE * SCIPtreeGetFocusNode(SCIP_TREE *tree)
Definition: tree.c:8431
SCIP_Bool SCIPtreeProbing(SCIP_TREE *tree)
Definition: tree.c:8405
int SCIPtreeGetFocusDepth(SCIP_TREE *tree)
Definition: tree.c:8448
SCIP_Real SCIPtreeGetAvgLowerbound(SCIP_TREE *tree, SCIP_Real cutoffbound)
Definition: tree.c:7434
SCIP_Bool SCIPtreeIsPathComplete(SCIP_TREE *tree)
Definition: tree.c:8388
SCIP_Bool SCIPtreeProbingObjChanged(SCIP_TREE *tree)
Definition: tree.c:8584
int SCIPtreeGetProbingDepth(SCIP_TREE *tree)
Definition: tree.c:8551
SCIP_RETCODE SCIPtreeSetNodesel(SCIP_TREE *tree, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_NODESEL *nodesel)
Definition: tree.c:5216
SCIP_RETCODE SCIPnodeDelCons(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_CONS *cons)
Definition: tree.c:1672
void SCIPnodeSetEstimate(SCIP_NODE *node, SCIP_SET *set, SCIP_Real newestimate)
Definition: tree.c:2517
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:5848
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:5990
void SCIPnodePropagateAgain(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree)
Definition: tree.c:1303
SCIP_RETCODE SCIPnodeCaptureLPIState(SCIP_NODE *node, int nuses)
Definition: tree.c:248
void SCIPnodeGetPropsAfterDual(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *varbounds, SCIP_BOUNDTYPE *varboundtypes, int *nvars, int varssize)
Definition: tree.c:8061
SCIP_RETCODE SCIPtreeStartProbing(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob, SCIP_Bool strongbranching)
Definition: tree.c:6522
SCIP_RETCODE SCIPtreeFree(SCIP_TREE **tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:4966
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:5517
int SCIPtreeGetNChildren(SCIP_TREE *tree)
Definition: tree.c:8348
SCIP_RETCODE SCIPtreeSetProbingLPState(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_LP *lp, SCIP_LPISTATE **lpistate, SCIP_LPINORMS **lpinorms, SCIP_Bool primalfeas, SCIP_Bool dualfeas)
Definition: tree.c:6612
SCIP_RETCODE SCIPnodeFree(SCIP_NODE **node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_TREE *tree, SCIP_LP *lp)
Definition: tree.c:1098
SCIP_NODE * SCIPtreeGetCurrentNode(SCIP_TREE *tree)
Definition: tree.c:8506
void SCIPnodeMarkPropagated(SCIP_NODE *node, SCIP_TREE *tree)
Definition: tree.c:1329
int SCIPtreeGetNLeaves(SCIP_TREE *tree)
Definition: tree.c:8368
SCIP_NODE * SCIPtreeGetRootNode(SCIP_TREE *tree)
Definition: tree.c:8573
SCIP_RETCODE SCIPtreeStoreRelaxSol(SCIP_TREE *tree, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob)
Definition: tree.c:7117
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:1036
void SCIPtreeMarkProbingObjChanged(SCIP_TREE *tree)
Definition: tree.c:8595
SCIP_RETCODE SCIPtreeAddDiveBoundChange(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Bool preferred)
Definition: tree.c:6361
SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
Definition: tree.c:8540
SCIP_Real SCIPtreeGetLowerbound(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7344
SCIP_RETCODE SCIPnodeUpdateLowerboundLP(SCIP_NODE *node, SCIP_SET *set, SCIP_STAT *stat, SCIP_MESSAGEHDLR *messagehdlr, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp)
Definition: tree.c:2448
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:1833
SCIP_RETCODE SCIPtreeRestoreRelaxSol(SCIP_TREE *tree, SCIP_SET *set, SCIP_RELAXATION *relaxation, SCIP_PROB *transprob)
Definition: tree.c:7161
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:2260
SCIP_RETCODE SCIPtreeCreatePresolvingRoot(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:5122
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:2533
SCIP_NODE * SCIPtreeGetBestChild(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7246
SCIP_RETCODE SCIPtreeLoadProbingLPState(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PROB *prob, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:6666
int SCIPtreeGetEffectiveRootDepth(SCIP_TREE *tree)
Definition: tree.c:8562
SCIP_NODE * SCIPtreeGetPrioSibling(SCIP_TREE *tree)
Definition: tree.c:7220
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:2118
void SCIPtreeSetFocusNodeLP(SCIP_TREE *tree, SCIP_Bool solvelp)
Definition: tree.c:8475
int SCIPnodeGetNDualBndchgs(SCIP_NODE *node)
Definition: tree.c:7703
SCIP_RETCODE SCIPnodeAddCons(SCIP_NODE *node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_CONS *cons)
Definition: tree.c:1629
int SCIPtreeGetNNodes(SCIP_TREE *tree)
Definition: tree.c:8378
SCIP_Real SCIPtreeCalcNodeselPriority(SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_BRANCHDIR branchdir, SCIP_Real targetvalue)
Definition: tree.c:5308
SCIP_RETCODE SCIPtreeClear(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:5015
int SCIPtreeGetNSiblings(SCIP_TREE *tree)
Definition: tree.c:8358
SCIP_NODE * SCIPtreeGetBestNode(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7310
SCIP_NODE * SCIPtreeGetBestLeaf(SCIP_TREE *tree)
Definition: tree.c:7300
SCIP_RETCODE SCIPtreeEndProbing(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_LP *lp, SCIP_RELAXATION *relaxation, SCIP_PRIMAL *primal, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:6956
SCIP_Bool SCIPtreeHasFocusNodeLP(SCIP_TREE *tree)
Definition: tree.c:8465
void SCIPtreeGetDiveBoundChangeData(SCIP_TREE *tree, SCIP_VAR ***variables, SCIP_BRANCHDIR **directions, SCIP_Real **values, int *ndivebdchgs, SCIP_Bool preferred)
Definition: tree.c:6393
SCIP_RETCODE SCIPnodeFocus(SCIP_NODE **node, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *cutoff, SCIP_Bool postponed, SCIP_Bool exitsolve)
Definition: tree.c:4434
SCIP_RETCODE SCIPtreeCreate(SCIP_TREE **tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_NODESEL *nodesel)
Definition: tree.c:4885
void SCIPchildChgNodeselPrio(SCIP_TREE *tree, SCIP_NODE *child, SCIP_Real priority)
Definition: tree.c:2499
int SCIPtreeGetCurrentDepth(SCIP_TREE *tree)
Definition: tree.c:8523
SCIP_NODE * SCIPtreeGetPrioChild(SCIP_TREE *tree)
Definition: tree.c:7194
SCIP_RETCODE SCIPtreeCreateRoot(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:5076
SCIP_Bool SCIPtreeWasNodeLastBranchParent(SCIP_TREE *tree, SCIP_NODE *node)
Definition: tree.c:1085
SCIP_RETCODE SCIPtreeCreateProbingNode(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: tree.c:6587
SCIP_RETCODE SCIPtreeMarkProbingNodeHasLP(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_LP *lp)
Definition: tree.c:6748
SCIP_RETCODE SCIPtreeCutoff(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Real cutoffbound)
Definition: tree.c:5244
SCIP_RETCODE SCIPtreeLoadLPState(SCIP_TREE *tree, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PROB *prob, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: tree.c:3669
SCIP_Bool SCIPtreeInRepropagation(SCIP_TREE *tree)
Definition: tree.c:8496
SCIP_NODESEL * SCIPtreeGetNodesel(SCIP_TREE *tree)
Definition: tree.c:5206
SCIP_Real SCIPtreeCalcChildEstimate(SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR *var, SCIP_Real targetvalue)
Definition: tree.c:5458
SCIP_NODE * SCIPtreeGetLowerboundNode(SCIP_TREE *tree, SCIP_SET *set)
Definition: tree.c:7382
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:6922
void SCIPnodeGetPropsBeforeDual(SCIP_NODE *node, SCIP_VAR **vars, SCIP_Real *varbounds, SCIP_BOUNDTYPE *varboundtypes, int *npropvars, int propvarssize)
Definition: tree.c:7979
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:3541
void SCIPtreeClearDiveBoundChanges(SCIP_TREE *tree)
Definition: tree.c:6416
SCIP_RETCODE SCIPtreeFreePresolvingRoot(SCIP_TREE *tree, SCIP_REOPT *reopt, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable)
Definition: tree.c:5163
type definitions for branching rules
type definitions for conflict store
type definitions for constraints and constraint handlers
type definitions for managing events
type definitions for branching and inference history
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:48
type definitions for implications, variable bounds, and cliques
type definitions for LP management
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:59
type definitions for collecting primal CIP solutions and primal informations
type definitions for storing and manipulating the main problem
type definitions for propagators
type definitions for collecting reoptimization information
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for global SCIP settings
type definitions for problem statistics
type definitions for branch and bound tree
type definitions for problem variables