Scippy

SCIP

Solving Constraint Integer Programs

reopt.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-2021 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file reopt.h
17  * @ingroup INTERNALAPI
18  * @brief data structures and methods for collecting reoptimization information
19  * @author Jakob Witzig
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_REOPT_H__
25 #define __SCIP_REOPT_H__
26 
27 #include "blockmemshell/memory.h"
28 #include "scip/def.h"
29 #include "scip/pub_reopt.h"
30 #include "scip/type_branch.h"
31 #include "scip/type_cutpool.h"
32 #include "scip/type_misc.h"
33 #include "scip/type_primal.h"
34 #include "scip/type_prob.h"
35 #include "scip/type_retcode.h"
36 #include "scip/type_reopt.h"
37 #include "scip/type_sepastore.h"
38 #include "scip/type_set.h"
39 #include "scip/type_stat.h"
40 #include "scip/struct_reopt.h"
41 #include "scip/struct_var.h"
42 #include "scip/struct_history.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /** creates reopt data */
50  SCIP_REOPT** reopt, /**< pointer to reoptimization data structure */
51  SCIP_SET* set, /**< global SCIP settings */
52  BMS_BLKMEM* blkmem /**< block memory */
53  );
54 
55 /** frees reopt data */
57  SCIP_REOPT** reopt, /**< reoptimization data structure */
58  SCIP_SET* set, /**< global SCIP settings */
59  SCIP_PRIMAL* origprimal, /**< original primal */
60  BMS_BLKMEM* blkmem /**< block memory */
61  );
62 
63 /* release all variables and constraints captured during reoptimization */
65  SCIP_REOPT* reopt, /**< pointer to reoptimization data structure */
66  SCIP_SET* set, /**< global SCIP settings */
67  BMS_BLKMEM* blkmem /**< block memory */
68  );
69 
70 /** returns the number of constraints added by the reoptimization plug-in */
72  SCIP_REOPT* reopt, /**< reoptimization data */
73  SCIP_NODE* node /**< node of the search tree */
74  );
75 
76 /** add a solution to the solution tree */
78  SCIP_REOPT* reopt, /**< reoptimization data */
79  SCIP_SET* set, /**< global SCIP settings */
80  SCIP_STAT* stat, /**< dynamic problem statistics */
81  SCIP_PRIMAL* origprimal, /**< original primal */
82  BMS_BLKMEM* blkmem, /**< block memory */
83  SCIP_SOL* sol, /**< solution to add */
84  SCIP_Bool bestsol, /**< is the current solution an optimal solution? */
85  SCIP_Bool* added, /**< pointer to store the information if the soltion was added */
86  SCIP_VAR** vars, /**< variable array */
87  int nvars, /**< number of variables */
88  int run /**< number of the current run (1,2,...) */
89  );
90 
91 /** add optimal solution */
93  SCIP_REOPT* reopt, /**< reoptimization data structure */
94  SCIP_SOL* sol, /**< solution to add */
95  BMS_BLKMEM* blkmem, /**< block memory */
96  SCIP_SET* set, /**< global SCIP settings */
97  SCIP_STAT* stat, /**< dynamic problem statistics */
98  SCIP_PRIMAL* origprimal, /**< original primal */
99  SCIP_VAR** vars, /**< original problem variables */
100  int nvars /**< number of original problem variables */
101  );
102 
103 /** add a run */
105  SCIP_REOPT* reopt, /**< reoptimization data sturcture */
106  SCIP_SET* set, /**< global SCIP settings */
107  BMS_BLKMEM* blkmem, /**< block memory */
108  SCIP_VAR** origvars, /**< original problem variables */
109  int norigvars, /**< number of original variables */
110  int size /**< number of expected solutions */
111  );
112 
113 /** get the number of checked solutions during the reoptimization process */
115  SCIP_REOPT* reopt /**< reoptimization data */
116  );
117 
118 /** update the number of checked solutions during the reoptimization process */
120  SCIP_REOPT* reopt, /**< reoptimization data */
121  int ncheckedsols /**< number of updated solutions */
122  );
123 
124 /** get the number of checked solutions during the reoptimization process */
126  SCIP_REOPT* reopt /**< reoptimization data */
127  );
128 
129 /** update the number of checked solutions during the reoptimization process */
131  SCIP_REOPT* reopt, /**< reoptimization data */
132  int nimprovingsols /**< number of improving solutions */
133  );
134 
135 /** returns number of solutions stored in the solution tree of a given run */
137  SCIP_REOPT* reopt, /**< reoptimization data */
138  int run /**< number of the run (1,2,..) */
139  );
140 
141 /** returns number of all solutions of all runs */
143  SCIP_REOPT* reopt /**< reoptimization data */
144  );
145 
146 /** return the stored solutions of a given run */
148  SCIP_REOPT* reopt, /**< reopt data */
149  int run, /**< number of the run (1,2,...) */
150  SCIP_SOL** sols, /**< array of solutions to fill */
151  int solssize, /**< length of the array */
152  int* nsols /**< pointer to store the number of added solutions */
153  );
154 
155 /** returns the number of saved solutions overall runs */
157  SCIP_REOPT* reopt /**< reoptimization data */
158  );
159 
160 /** Check if the reoptimization process should be (locally) restarted.
161  *
162  * First, we check whether the current node is the root node, e.g., node == NULL. In this case, we do not need to calculate
163  * the similarity again. We trigger a restart if
164  * 1. the objective function has changed too much, or
165  * 2. the number of stored nodes is exceeded, or
166  * 3. the last n optimal solutions were found by heur_reoptsols (in this case, the stored tree was only needed to
167  * prove the optimality and this can probably be done faster by solving from scratch).
168  *
169  * If the current node is different to the root node we calculate the local similarity, i.e., exclude all variables
170  * that are already fixed at the given node.
171  */
173  SCIP_REOPT* reopt, /**< reopt data */
174  SCIP_SET* set, /**< global SCIP settings */
175  BMS_BLKMEM* blkmem, /**< block memory */
176  SCIP_NODE* node, /**< current node of the branch and bound tree (or NULL) */
177  SCIP_VAR** transvars, /**< transformed problem variables */
178  int ntransvars, /**< number of transformed problem variables */
179  SCIP_Bool* restart /**< pointer to store if the reoptimization process should be restarted */
180  );
181 
182 /** returns the similarity to the previous objective function */
184  SCIP_REOPT* reopt /**< reoptimization data */
185  );
186 
187 /** returns the similarity to the first objective functions */
189  SCIP_REOPT* reopt /**< reoptimization data */
190  );
191 
192 /** return the similarity between two of objective functions of two given runs */
194  SCIP_REOPT* reopt, /**< reoptimization data structure */
195  SCIP_SET* set, /**< global SCIP settings */
196  int run1, /**< number of the first run */
197  int run2, /**< number of the second run */
198  SCIP_VAR** origvars, /**< original problem variables */
199  int norigvars /**< number of original problem variables */
200  );
201 
202 /** returns the best solution of the last run */
204  SCIP_REOPT* reopt /**< reoptimization data */
205  );
206 
207 /** returns the node of the reoptimization tree corresponding to the unique @p id */
209  SCIP_REOPT* reopt, /**< reoptimization data structure */
210  unsigned int id /**< unique id */
211  );
212 
213 /** returns the coefficent of variable with index @p idx in run @p run */
215  SCIP_REOPT* reopt, /**< reopt data */
216  int run, /**< number of the run */
217  int idx /**< problem index of variable */
218  );
219 
220 /** return the best solution of a given run
221  *
222  * @note the returned solution is part of the original space.
223  */
225  SCIP_REOPT* reopt, /**< reoptimization data structure */
226  int run /**< number of the run (1,2,...) */
227  );
228 
229 /** reset solving specific paramters */
231  SCIP_REOPT* reopt, /**< reoptimization data structure */
232  SCIP_SET* set, /**< global SCIP settings */
233  BMS_BLKMEM* blkmem /**< block memory */
234  );
235 
236 /** reset marks of stored solutions to not updated */
238  SCIP_REOPT* reopt /**< reoptimization data */
239  );
240 
241 /** returns the number of stored nodes */
243  SCIP_REOPT* reopt, /**< reoptimization data */
244  SCIP_NODE* node /**< node of the search tree */
245  );
246 
247 /** save information that given node is infeasible */
249  SCIP_REOPT* reopt, /**< reoptimization data */
250  SCIP_SET* set, /**< global SCIP settings */
251  BMS_BLKMEM* blkmem, /**< block memory */
252  SCIP_NODE* node /**< node of the search tree */
253  );
254 
255 /** check the reason for cut off a node and if necessary store the node */
257  SCIP_REOPT* reopt, /**< reoptimization data structure */
258  SCIP_SET* set, /**< global SCIP settings */
259  BMS_BLKMEM* blkmem, /**< block memery */
260  SCIP_NODE* node, /**< node of the search tree */
261  SCIP_EVENTTYPE eventtype, /**< eventtype */
262  SCIP_LP* lp, /**< LP data */
263  SCIP_LPSOLSTAT lpsolstat, /**< solution status of the LP */
264  SCIP_Bool isrootnode, /**< the node is the root */
265  SCIP_Bool isfocusnode, /**< the node is the current focus node */
266  SCIP_Real lowerbound, /**< lower bound of the node */
267  int effectiverootdepth /**< effective root depth */
268  );
269 
270 /** store bound change based on dual information */
272  SCIP_REOPT* reopt, /**< reoptimization data structure */
273  SCIP_SET* set, /**< global SCIP settings */
274  BMS_BLKMEM* blkmem, /**< block memory */
275  SCIP_NODE* node, /**< node of the search tree */
276  SCIP_VAR* var, /**< variables */
277  SCIP_Real newval, /**< new bound */
278  SCIP_Real oldval /**< old bound */
279  );
280 
281 /** returns the number of bound changes based on dual information */
283  SCIP_REOPT* reopt, /**< reoptimization data */
284  SCIP_NODE* node /**< node of the search tree */
285  );
286 
287 /** returns the number of leaf nodes of the subtree induced by @p node (of the whole tree if node == NULL) */
289  SCIP_REOPT* reopt, /**< reoptimization data */
290  SCIP_NODE* node /**< node of the search tree */
291  );
292 
293 /** returns the child nodes of @p node that need to be reoptimized next or NULL if @p node is a leaf */
295  SCIP_REOPT* reopt, /**< reoptimization data structure */
296  SCIP_SET* set, /**< global SCIP settings */
297  BMS_BLKMEM* blkmem, /**< block memory */
298  SCIP_NODE* node, /**< node of the search tree */
299  unsigned int* childs, /**< array to store the child ids */
300  int childssize, /**< size of the childs array */
301  int* nchilds /**< pointer to store the number of child nodes */
302  );
303 
304 /** returns all leaves of the subtree induced by @p node */
306  SCIP_REOPT* reopt, /**< reoptimization data */
307  SCIP_NODE* node, /**< node of the search tree */
308  unsigned int* leaves, /**< array to the the ids */
309  int leavessize, /**< size of leaves array */
310  int* nleaves /**< pointer to store the number of leaf node */
311  );
312 
313 /** returns the time needed to store the nodes for reoptimization */
315  SCIP_REOPT* reopt /**< reoptimization data */
316  );
317 
318 /** store a global constraint that should be added at the beginning of the next iteration */
320  SCIP_REOPT* reopt, /**< reoptimization data */
321  SCIP_VAR** vars, /**< array to store the variables of the constraint */
322  SCIP_Real* vals, /**< array to store the coefficients of the variables */
323  int nvars, /**< pointer to store the size of the constraints */
324  BMS_BLKMEM* blkmem /**< block memory */
325  );
326 
327 /** add the stored constraints globally to the problem */
329  SCIP* scip, /**< SCIP data structure */
330  SCIP_REOPT* reopt, /**< reoptimization data structure */
331  SCIP_SET* set, /**< global SCIP settings */
332  SCIP_STAT* stat, /**< dynamic problem statistics */
333  BMS_BLKMEM* blkmem /**< block memory */
334  );
335 
336 /** add the stored cuts to the separation storage */
338  SCIP_REOPT* reopt, /**< reoptimization data structure */
339  SCIP_NODE* node, /**< current focus node */
340  SCIP_SEPASTORE* sepastore, /**< separation storage */
341  SCIP_CUTPOOL* cutpool, /**< global cutpool */
342  BMS_BLKMEM* blkmem, /**< block memory */
343  SCIP_SET* set, /**< global SCIP settings */
344  SCIP_STAT* stat, /**< dynamic problem statistics */
345  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
346  SCIP_EVENTFILTER* eventfilter, /**< event filter */
347  SCIP_LP* lp, /**< current LP */
348  SCIP_Bool root /**< bool whether the current node is the root */
349  );
350 
351 /** check if the LP of the given node should be solved or not */
353  SCIP_REOPT* reopt, /**< reoptimization data structure */
354  SCIP_SET* set, /**< global SCIP settings */
355  SCIP_NODE* node /**< node of the current search tree */
356  );
357 
358 /** reactivate the given @p reoptnode and split them into several nodes if necessary */
360  SCIP_REOPT* reopt, /**< reoptimization data structure */
361  SCIP* scip, /**< SCIP data structure */
362  SCIP_SET* set, /**< global SCIP settings */
363  SCIP_STAT* stat, /**< dynamic problem statistics */
364  SCIP_PROB* transprob, /**< transformed problem */
365  SCIP_PROB* origprob, /**< original problem */
366  SCIP_TREE* tree, /**< branching tree */
367  SCIP_LP* lp, /**< current LP */
368  SCIP_BRANCHCAND* branchcand, /**< branching candidate */
369  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
370  SCIP_CLIQUETABLE* cliquetable, /**< clique table */
371  BMS_BLKMEM* blkmem, /**< block memory */
372  SCIP_REOPTNODE* reoptnode, /**< node of the reoptimization tree to reactivate */
373  unsigned int id, /**< id of the node to reactivate */
374  SCIP_Real estimate, /**< estimate of the child nodes that should be created */
375  SCIP_NODE** childnodes, /**< array to store the created child nodes */
376  int* ncreatedchilds, /**< pointer to store number of created child nodes */
377  int* naddedconss, /**< pointer to store number of generated constraints */
378  int childnodessize, /**< available size of childnodes array */
379  SCIP_Bool* success /**< pointer store the result */
380  );
381 
382 /** delete a node stored in the reoptimization tree */
384  SCIP_REOPT* reopt, /**< reoptimization data */
385  SCIP_SET* set, /**< global SCIP settings */
386  unsigned int id, /**< id of the node */
387  BMS_BLKMEM* blkmem /**< block memory */
388  );
389 
390 /** reset the stored information abound bound changes based on dual information */
392  SCIP_REOPT* reopt, /**< reoptimization data */
393  SCIP_NODE* node, /**< node of the search tree */
394  BMS_BLKMEM* blkmem /**< block memory */
395  );
396 
397 /** splits the root into several nodes and moves the child nodes of the root to one of the created nodes */
399  SCIP_REOPT* reopt, /**< reoptimization data structure */
400  SCIP_TREE* tree, /**< branch and bound tree */
401  SCIP_SET* set, /**< global SCIP settings */
402  SCIP_STAT* stat, /**< dynamic SCIP statistics */
403  BMS_BLKMEM* blkmem, /**< block memory */
404  int* ncreatedchilds, /**< pointer to store the number of created nodes */
405  int* naddedconss /**< pointer to store the number added constraints */
406  );
407 
408 /** reset the complete tree and set the given search frontier */
410  SCIP_REOPT* reopt, /**< reoptimization data structure */
411  SCIP_SET* set, /**< global SCIP settings */
412  BMS_BLKMEM* blkmem, /**< block memory */
413  SCIP_REOPTNODE** representatives, /**< array of representatives */
414  int nrepresentatives, /**< number of representatives */
415  SCIP_Bool* success /**< pointer to store if the method was successful */
416  );
417 
418 /** add all unprocessed nodes to the reoptimization tree */
420  SCIP_REOPT* reopt, /**< reoptimization data structure */
421  SCIP_SET* set, /**< global SCIP settings */
422  SCIP_LP* lp, /**< LP data */
423  BMS_BLKMEM* blkmem, /**< block memory */
424  SCIP_NODE** leaves, /**< array of open leave nodes */
425  int nleaves, /**< number of open leave nodes */
426  SCIP_NODE** childs, /**< array of open children nodes */
427  int nchilds, /**< number of open leave nodes */
428  SCIP_NODE** siblings, /**< array of open sibling nodes */
429  int nsiblings /**< number of open leave nodes */
430  );
431 
432 /** merges the variable history of the current run with the stored history */
434  SCIP_REOPT* reopt, /**< reoptimization data structure */
435  SCIP_SET* set, /**< global SCIP settings */
436  SCIP_STAT* stat, /**< dynamic problem statistics */
437  SCIP_VAR** vars, /**< original problem variables */
438  int nvars /**< number of original problem variables */
439  );
440 
441 /** updates the variable history */
443  SCIP_REOPT* reopt, /**< reoptimization data structure */
444  SCIP_SET* set, /**< global SCIP settings */
445  SCIP_STAT* stat, /**< dynamic problem statistics */
446  BMS_BLKMEM* blkmem, /**< block memory */
447  SCIP_VAR** vars, /**< variable array */
448  int nvars /**< number of variables */
449  );
450 
451 /*
452  * methods for reoptnode
453  */
454 
455 /** initialize an empty node */
456 void SCIPreoptnodeInit(
457  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
458  SCIP_SET* set /**< global SCIP settings */
459  );
460 
461 /** reset the given reoptimization node */
463  SCIP_REOPT* reopt, /**< reoptimization data structure */
464  SCIP_SET* set, /**< global SCIP settings */
465  BMS_BLKMEM* blkmem, /**< block memory */
466  SCIP_REOPTNODE* reoptnode /**< reoptimization node */
467  );
468 
469 /** delete the given reoptimization node */
471  SCIP_REOPTNODE** reoptnode, /**< pointer of reoptnode */
472  BMS_BLKMEM* blkmem /**< block memory */
473  );
474 
475 /** add a variable to a given reoptnode */
477  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
478  SCIP_SET* set, /**< global SCIP settings */
479  BMS_BLKMEM* blkmem, /**< block memory */
480  SCIP_VAR* var, /**< variable to add */
481  SCIP_Real val, /**< value of the variable */
482  SCIP_BOUNDTYPE boundtype /**< boundtype of the variable */
483  );
484 
485 /** add a constraint to a given reoptnode */
487  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
488  SCIP_SET* set, /**< global SCIP settings */
489  BMS_BLKMEM* blkmem, /**< block memory */
490  SCIP_VAR** vars, /**< variables which are part of the constraint */
491  SCIP_Real* bounds, /**< bounds of the variables */
492  SCIP_BOUNDTYPE* boundtypes, /**< boundtypes of the varibales (or NULL is the constraint is a cut) */
493  SCIP_Real lhs, /**< lhs of the constraint */
494  SCIP_Real rhs, /**< rhs of the constraint */
495  int nvars, /**< number of variables */
496  REOPT_CONSTYPE constype, /**< type of the constraint */
497  SCIP_Bool linear /**< the given constraint has a linear representation */
498  );
499 
500 /** return the branching path of the given node in the reoptimization tree */
502  SCIP_REOPT* reopt, /**< reoptimization data structure */
503  SCIP_REOPTNODE* reoptnode, /**< node of the reoptimization tree */
504  SCIP_VAR** vars, /**< array for variables */
505  SCIP_Real* vals, /**< array for values */
506  SCIP_BOUNDTYPE* boundtypes, /**< array for bound types */
507  int varssize, /**< size of arrays vars, vals, and boundtypes */
508  int* nbndchgs, /**< pointer to store the number of bound changes */
509  int* nbndchgsafterdual /**< pointer to store the number of bound changes applied after
510  * the first dual reduction at the given node */
511  );
512 
513 /** add a constraint to the reoptimization data structure */
515  SCIP_REOPT* reopt, /**< reoptimization data structure */
516  SCIP_SET* set, /**< global SCIP settings */
517  BMS_BLKMEM* blkmem, /**< block memory */
518  SCIP_CONS* cons /**< constraint to add */
519  );
520 
521 /** save global lower and upper bounds
522  *
523  * @note this method can only called once, i.e., after fishing presolving of the first problem
524  */
526  SCIP_REOPT* reopt, /**< reoptimization data structure */
527  SCIP_PROB* transprob, /**< transformed problem data */
528  BMS_BLKMEM* blkmem /**< block memory */
529  );
530 
531 /** save active constraints
532  *
533  * @note this method can only called once, i.e., after fishing presolving of the first problem
534  */
536  SCIP_REOPT* reopt, /**< reoptimization data structure */
537  SCIP_SET* set, /**< global SCIP settings */
538  SCIP_PROB* transprob, /**< transformed problem data */
539  BMS_BLKMEM* blkmem /**< block memory */
540  );
541 
542 /** installs global lower and upper bounds */
544  SCIP_REOPT* reopt, /**< reoptimization data structure */
545  SCIP_SET* set, /**< global SCIP settings */
546  SCIP_STAT* stat, /**< dynamic SCIP statistics */
547  SCIP_PROB* transprob, /**< transformed problem data */
548  SCIP_LP* lp, /**< current LP data */
549  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
550  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
551  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
552  BMS_BLKMEM* blkmem /**< block memory */
553  );
554 
555 /** reactivate globally valid constraints that were deactivated and necessary to ensure correctness */
557  SCIP_REOPT* reopt, /**< reoptimization data structure */
558  SCIP_SET* set, /**< global SCIP settings */
559  SCIP_STAT* stat /**< dynamic SCIP statistics */
560  );
561 
562 
563 /** returns whether a constraint is necessary to ensure correctness and cannot be deleted */
565  SCIP_REOPT* reopt, /**< reoptimization data structure */
566  SCIP_CONS* cons /**< problem constraint */
567  );
568 
569 #ifdef __cplusplus
570 }
571 #endif
572 
573 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_REOPTNODE * SCIPreoptGetReoptnode(SCIP_REOPT *reopt, unsigned int id)
Definition: reopt.c:5714
SCIP_RETCODE SCIPreoptAddCons(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_CONS *cons)
Definition: reopt.c:8149
SCIP_Real SCIPreoptGetSimToPrevious(SCIP_REOPT *reopt)
Definition: reopt.c:5663
type definitions for miscellaneous datastructures
SCIP_Real SCIPreoptGetSavingtime(SCIP_REOPT *reopt)
Definition: reopt.c:7650
SCIP_RETCODE SCIPreoptApplyCompression(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_REOPTNODE **representatives, int nrepresentatives, SCIP_Bool *success)
Definition: reopt.c:6723
SCIP_SOL * SCIPreoptGetBestSolRun(SCIP_REOPT *reopt, int run)
Definition: reopt.c:5744
SCIP_RETCODE SCIPreoptMergeVarHistory(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR **vars, int nvars)
Definition: reopt.c:6571
SCIP_RETCODE SCIPreoptReleaseData(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
Definition: reopt.c:5158
SCIP_Bool SCIPreoptGetSolveLP(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_NODE *node)
Definition: reopt.c:7917
SCIP_Bool SCIPreoptConsCanBeDeleted(SCIP_REOPT *reopt, SCIP_CONS *cons)
Definition: reopt.c:8371
SCIP_RETCODE SCIPreoptnodeDelete(SCIP_REOPTNODE **reoptnode, BMS_BLKMEM *blkmem)
Definition: reopt.c:8015
SCIP_RETCODE SCIPreoptFree(SCIP_REOPT **reopt, SCIP_SET *set, SCIP_PRIMAL *origprimal, BMS_BLKMEM *blkmem)
Definition: reopt.c:5186
int SCIPreoptGetNLeaves(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:5965
SCIP_RETCODE SCIPreoptGetLeaves(SCIP_REOPT *reopt, SCIP_NODE *node, unsigned int *leaves, int leavessize, int *nleaves)
Definition: reopt.c:6455
SCIP_RETCODE SCIPreoptApply(SCIP_REOPT *reopt, SCIP *scip, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, BMS_BLKMEM *blkmem, SCIP_REOPTNODE *reoptnode, unsigned int id, SCIP_Real estimate, SCIP_NODE **childnodes, int *ncreatedchilds, int *naddedconss, int childnodessize, SCIP_Bool *success)
Definition: reopt.c:7346
SCIP_RETCODE SCIPreoptGetSolsRun(SCIP_REOPT *reopt, int run, SCIP_SOL **sols, int solssize, int *nsols)
Definition: reopt.c:5525
SCIP_RETCODE SCIPreoptAddDualBndchg(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newval, SCIP_Real oldval)
Definition: reopt.c:6292
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for global SCIP settings
SCIP_Real SCIPreoptGetSimilarity(SCIP_REOPT *reopt, SCIP_SET *set, int run1, int run2, SCIP_VAR **origvars, int norigvars)
Definition: reopt.c:5681
SCIP_RETCODE SCIPreoptAddSol(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *origprimal, BMS_BLKMEM *blkmem, SCIP_SOL *sol, SCIP_Bool bestsol, SCIP_Bool *added, SCIP_VAR **vars, int nvars, int run)
Definition: reopt.c:5328
SCIP_RETCODE SCIPreoptAddOptSol(SCIP_REOPT *reopt, SCIP_SOL *sol, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *origprimal, SCIP_VAR **vars, int nvars)
Definition: reopt.c:5381
SCIP_RETCODE SCIPreoptApplyCuts(SCIP_REOPT *reopt, SCIP_NODE *node, SCIP_SEPASTORE *sepastore, SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_Bool root)
Definition: reopt.c:7784
public methods for reoptimization
type definitions for return codes for SCIP methods
void SCIPreoptResetSolMarks(SCIP_REOPT *reopt)
Definition: reopt.c:5792
SCIP_Real SCIPreoptGetOldObjCoef(SCIP_REOPT *reopt, int run, int idx)
Definition: reopt.c:5728
enum SCIP_LPSolStat SCIP_LPSOLSTAT
Definition: type_lp.h:42
type definitions for collecting reoptimization information
type definitions for branching rules
type definitions for problem statistics
int SCIPreoptGetNDualBndchgs(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:6382
void SCIPreoptnodeGetPath(SCIP_REOPT *reopt, SCIP_REOPTNODE *reoptnode, SCIP_VAR **vars, SCIP_Real *vals, SCIP_BOUNDTYPE *boundtypes, int varssize, int *nbndchgs, int *nbndchgsafterdual)
Definition: reopt.c:7267
void SCIPreoptnodeInit(SCIP_REOPTNODE *reoptnode, SCIP_SET *set)
Definition: reopt.c:7964
SCIP_SOL * SCIPreoptGetLastBestSol(SCIP_REOPT *reopt)
Definition: reopt.c:5700
SCIP_RETCODE SCIPreoptnodeAddCons(SCIP_REOPTNODE *reoptnode, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR **vars, SCIP_Real *bounds, SCIP_BOUNDTYPE *boundtypes, SCIP_Real lhs, SCIP_Real rhs, int nvars, REOPT_CONSTYPE constype, SCIP_Bool linear)
Definition: reopt.c:8057
SCIP_RETCODE SCIPreoptResetActiveConss(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat)
Definition: reopt.c:8329
SCIP_RETCODE SCIPreoptSaveOpenNodes(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_LP *lp, BMS_BLKMEM *blkmem, SCIP_NODE **leaves, int nleaves, SCIP_NODE **childs, int nchilds, SCIP_NODE **siblings, int nsiblings)
Definition: reopt.c:6519
type definitions for storing cuts in a cut pool
SCIP_RETCODE SCIPreoptCreate(SCIP_REOPT **reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
Definition: reopt.c:5076
int SCIPreoptGetNSols(SCIP_REOPT *reopt)
Definition: reopt.c:5509
SCIP_RETCODE SCIPreoptResetDualBndchgs(SCIP_REOPT *reopt, SCIP_NODE *node, BMS_BLKMEM *blkmem)
Definition: reopt.c:7242
int SCIPreoptGetNNodes(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:5813
type definitions for storing separated cuts
SCIP_RETCODE SCIPreoptCheckRestart(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, SCIP_VAR **transvars, int ntransvars, SCIP_Bool *restart)
Definition: reopt.c:5594
data structures for collecting reoptimization information
#define SCIP_Bool
Definition: def.h:70
void SCIPreoptAddNImprovingSols(SCIP_REOPT *reopt, int nimprovingsols)
Definition: reopt.c:5483
SCIP_RETCODE SCIPreoptDeleteNode(SCIP_REOPT *reopt, SCIP_SET *set, unsigned int id, BMS_BLKMEM *blkmem)
Definition: reopt.c:7326
SCIP_RETCODE SCIPreoptnodeAddBndchg(SCIP_REOPTNODE *reoptnode, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE boundtype)
Definition: reopt.c:8029
SCIP_RETCODE SCIPreoptUpdateVarHistory(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_VAR **vars, int nvars)
Definition: reopt.c:6666
SCIP_RETCODE SCIPreoptSaveActiveConss(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_PROB *transprob, BMS_BLKMEM *blkmem)
Definition: reopt.c:8238
datastructures for branching and inference history
int SCIPreoptGetNAddedConss(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:5304
int SCIPreoptGetNSolsRun(SCIP_REOPT *reopt, int run)
Definition: reopt.c:5494
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPreoptReset(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
Definition: reopt.c:5756
SCIP_RETCODE SCIPreoptGetChildIDs(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, unsigned int *childs, int childssize, int *nchilds)
Definition: reopt.c:6402
SCIP_RETCODE SCIPreoptCheckCutoff(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node, SCIP_EVENTTYPE eventtype, SCIP_LP *lp, SCIP_LPSOLSTAT lpsolstat, SCIP_Bool isrootnode, SCIP_Bool isfocusnode, SCIP_Real lowerbound, int effectiverootdepth)
Definition: reopt.c:6024
SCIP_RETCODE SCIPreoptInstallBounds(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, BMS_BLKMEM *blkmem)
Definition: reopt.c:8279
SCIP_Real SCIPreoptGetSimToFirst(SCIP_REOPT *reopt)
Definition: reopt.c:5672
datastructures for problem variables
SCIP_RETCODE SCIPreoptAddRun(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR **origvars, int norigvars, int size)
Definition: reopt.c:5416
SCIP_RETCODE SCIPreoptnodeReset(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:7997
#define SCIP_Real
Definition: def.h:163
enum Reopt_ConsType REOPT_CONSTYPE
Definition: type_reopt.h:67
void SCIPreoptAddNCheckedSols(SCIP_REOPT *reopt, int ncheckedsols)
Definition: reopt.c:5462
SCIP_RETCODE SCIPreoptAddInfNode(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node)
Definition: reopt.c:6000
int SCIPreoptGetNCheckedSols(SCIP_REOPT *reopt)
Definition: reopt.c:5452
type definitions for collecting primal CIP solutions and primal informations
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:429
int SCIPreoptGetNSavedSols(SCIP_REOPT *reopt)
Definition: reopt.c:5567
int SCIPreoptGetNImprovingSols(SCIP_REOPT *reopt)
Definition: reopt.c:5473
SCIP_RETCODE SCIPreoptSaveGlobalBounds(SCIP_REOPT *reopt, SCIP_PROB *transprob, BMS_BLKMEM *blkmem)
Definition: reopt.c:8200
SCIP_RETCODE SCIPreoptAddGlbCons(SCIP_REOPT *reopt, SCIP_VAR **vars, SCIP_Real *vals, int nvars, BMS_BLKMEM *blkmem)
SCIP_RETCODE SCIPreoptSplitRoot(SCIP_REOPT *reopt, SCIP_TREE *tree, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, int *ncreatedchilds, int *naddedconss)
Definition: reopt.c:6948
uint64_t SCIP_EVENTTYPE
Definition: type_event.h:142
SCIP_RETCODE SCIPreoptApplyGlbConss(SCIP *scip, SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem)
Definition: reopt.c:7660
memory allocation routines