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-2017 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 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 
28 #include "scip/def.h"
29 #include "scip/pub_reopt.h"
30 #include "scip/type_primal.h"
31 #include "scip/type_sepastore.h"
32 #include "scip/type_cutpool.h"
33 #include "scip/type_retcode.h"
34 #include "scip/type_misc.h"
35 #include "scip/type_reopt.h"
36 #include "scip/struct_reopt.h"
37 #include "scip/struct_var.h"
38 #include "scip/struct_history.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /** creates reopt data */
45 extern
47  SCIP_REOPT** reopt, /**< pointer to reoptimization data structure */
48  SCIP_SET* set, /**< global SCIP settings */
49  BMS_BLKMEM* blkmem /**< block memory */
50  );
51 
52 /** frees reopt data */
53 extern
55  SCIP_REOPT** reopt, /**< reoptimization data structure */
56  SCIP_SET* set, /**< global SCIP settings */
57  SCIP_PRIMAL* origprimal, /**< original primal */
58  BMS_BLKMEM* blkmem /**< block memory */
59  );
60 
61 /** returns the number of constraints added by the reoptimization plug-in */
62 extern
64  SCIP_REOPT* reopt, /**< reoptimization data */
65  SCIP_NODE* node /**< node of the search tree */
66  );
67 
68 /** add a solution to the solution tree */
69 extern
71  SCIP_REOPT* reopt, /**< reoptimization data */
72  SCIP_SET* set, /**< global SCIP settings */
73  SCIP_STAT* stat, /**< dynamic problem statistics */
74  SCIP_PRIMAL* origprimal, /**< original primal */
75  BMS_BLKMEM* blkmem, /**< block memory */
76  SCIP_SOL* sol, /**< solution to add */
77  SCIP_Bool bestsol, /**< is the current solution an optimal solution? */
78  SCIP_Bool* added, /**< pointer to store the information if the soltion was added */
79  SCIP_VAR** vars, /**< variable array */
80  int nvars, /**< number of variables */
81  int run /**< number of the current run (1,2,...) */
82  );
83 
84 /** add optimal solution */
85 extern
87  SCIP_REOPT* reopt, /**< reoptimization data structure */
88  SCIP_SOL* sol, /**< solution to add */
89  BMS_BLKMEM* blkmem, /**< block memory */
90  SCIP_SET* set, /**< global SCIP settings */
91  SCIP_STAT* stat, /**< dynamic problem statistics */
92  SCIP_PRIMAL* origprimal, /**< original primal */
93  SCIP_VAR** vars, /**< original problem variables */
94  int nvars /**< number of original problem variables */
95  );
96 
97 /** add a run */
98 extern
100  SCIP_REOPT* reopt, /**< reoptimization data sturcture */
101  SCIP_SET* set, /**< global SCIP settings */
102  BMS_BLKMEM* blkmem, /**< block memory */
103  SCIP_VAR** origvars, /**< original problem variables */
104  int norigvars, /**< number of original variables */
105  int size /**< number of expected solutions */
106  );
107 
108 /** get the number of checked solutions during the reoptimization process */
109 extern
111  SCIP_REOPT* reopt /**< reoptimization data */
112  );
113 
114 /** update the number of checked solutions during the reoptimization process */
115 extern
117  SCIP_REOPT* reopt, /**< reoptimization data */
118  int ncheckedsols /**< number of updated solutions */
119  );
120 
121 /** get the number of checked solutions during the reoptimization process */
122 extern
124  SCIP_REOPT* reopt /**< reoptimization data */
125  );
126 
127 /** update the number of checked solutions during the reoptimization process */
128 extern
130  SCIP_REOPT* reopt, /**< reoptimization data */
131  int nimprovingsols /**< number of improving solutions */
132  );
133 
134 /** returns number of solutions stored in the solution tree of a given run */
135 extern
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 */
142 extern
144  SCIP_REOPT* reopt /**< reoptimization data */
145  );
146 
147 /** return the stored solutions of a given run */
148 extern
150  SCIP_REOPT* reopt, /**< reopt data */
151  int run, /**< number of the run (1,2,...) */
152  SCIP_SOL** sols, /**< array of solutions to fill */
153  int solssize, /**< length of the array */
154  int* nsols /**< pointer to store the number of added solutions */
155  );
156 
157 /** returns the number of saved solutions overall runs */
158 extern
160  SCIP_REOPT* reopt /**< reoptimization data */
161  );
162 
163 /** Check if the reoptimization process should be (locally) restarted.
164  *
165  * First, we check whether the current node is the root node, e.g., node == NULL. In this case, we do not need to calculate
166  * the similarity again. We trigger a restart if
167  * 1. the objective function has changed too much, or
168  * 2. the number of stored nodes is exceeded, or
169  * 3. the last n optimal solutions were found by heur_reoptsols (in this case, the stored tree was only needed to
170  * prove the optimality and this can probably be done faster by solving from scratch).
171  *
172  * If the current node is different to the root node we calculate the local similarity, i.e., exclude all variables
173  * that are already fixed at the given node.
174  */
175 extern
177  SCIP_REOPT* reopt, /**< reopt data */
178  SCIP_SET* set, /**< global SCIP settings */
179  BMS_BLKMEM* blkmem, /**< block memory */
180  SCIP_NODE* node, /**< current node of the branch and bound tree (or NULL) */
181  SCIP_VAR** transvars, /**< transformed problem variables */
182  int ntransvars, /**< number of transformed problem variables */
183  SCIP_Bool* restart /**< pointer to store if the reoptimization process should be restarted */
184  );
185 
186 /** returns the similarity to the previous objective function */
187 extern
189  SCIP_REOPT* reopt /**< reoptimization data */
190  );
191 
192 /** returns the similarity to the first objective functions */
193 extern
195  SCIP_REOPT* reopt /**< reoptimization data */
196  );
197 
198 /** return the similarity between two of objective functions of two given runs */
199 extern
201  SCIP_REOPT* reopt, /**< reoptimization data structure */
202  SCIP_SET* set, /**< global SCIP settings */
203  int run1, /**< number of the first run */
204  int run2, /**< number of the second run */
205  SCIP_VAR** origvars, /**< original problem variables */
206  int norigvars /**< number of original problem variables */
207  );
208 
209 /** returns the best solution of the last run */
210 extern
212  SCIP_REOPT* reopt /**< reoptimization data */
213  );
214 
215 /** returns the node of the reoptimization tree corresponding to the unique @p id */
216 extern
218  SCIP_REOPT* reopt, /**< reoptimization data structure */
219  unsigned int id /**< unique id */
220  );
221 
222 /** returns the coefficent of variable with index @p idx in run @p run */
223 extern
225  SCIP_REOPT* reopt, /**< reopt data */
226  int run, /**< number of the run */
227  int idx /**< problem index of variable */
228  );
229 
230 /** return the best solution of a given run
231  *
232  * @note the returned solution is part of the original space.
233  */
235  SCIP_REOPT* reopt, /**< reoptimization data structure */
236  int run /**< number of the run (1,2,...) */
237  );
238 
239 /** reset solving specific paramters */
241  SCIP_REOPT* reopt, /**< reoptimization data structure */
242  SCIP_SET* set, /**< global SCIP settings */
243  BMS_BLKMEM* blkmem /**< block memory */
244  );
245 
246 /** reset marks of stored solutions to not updated */
247 extern
249  SCIP_REOPT* reopt /**< reoptimization data */
250  );
251 
252 /** returns the number of stored nodes */
253 extern
255  SCIP_REOPT* reopt, /**< reoptimization data */
256  SCIP_NODE* node /**< node of the search tree */
257  );
258 
259 /** save information that given node is infeasible */
260 extern
262  SCIP_REOPT* reopt, /**< reoptimization data */
263  SCIP_SET* set, /**< global SCIP settings */
264  BMS_BLKMEM* blkmem, /**< block memory */
265  SCIP_NODE* node /**< node of the search tree */
266  );
267 
268 /** check the reason for cut off a node and if necessary store the node */
269 extern
271  SCIP_REOPT* reopt, /**< reoptimization data structure */
272  SCIP_SET* set, /**< global SCIP settings */
273  BMS_BLKMEM* blkmem, /**< block memery */
274  SCIP_NODE* node, /**< node of the search tree */
275  SCIP_EVENTTYPE eventtype, /**< eventtype */
276  SCIP_LP* lp, /**< LP data */
277  SCIP_LPSOLSTAT lpsolstat, /**< solution status of the LP */
278  SCIP_Bool isrootnode, /**< the node is the root */
279  SCIP_Bool isfocusnode, /**< the node is the current focus node */
280  SCIP_Real lowerbound, /**< lower bound of the node */
281  int effectiverootdepth /**< effective root depth */
282  );
283 
284 /** store bound change based on dual information */
285 extern
287  SCIP_REOPT* reopt, /**< reoptimization data structure */
288  SCIP_SET* set, /**< global SCIP settings */
289  BMS_BLKMEM* blkmem, /**< block memory */
290  SCIP_NODE* node, /**< node of the search tree */
291  SCIP_VAR* var, /**< variables */
292  SCIP_Real newval, /**< new bound */
293  SCIP_Real oldval /**< old bound */
294  );
295 
296 /** returns the number of bound changes based on dual information */
297 extern
299  SCIP_REOPT* reopt, /**< reoptimization data */
300  SCIP_NODE* node /**< node of the search tree */
301  );
302 
303 /** returns the number of leaf nodes of the subtree induced by @p node (of the whole tree if node == NULL) */
304 extern
306  SCIP_REOPT* reopt, /**< reoptimization data */
307  SCIP_NODE* node /**< node of the search tree */
308  );
309 
310 /** returns the child nodes of @p node that need to be reoptimized next or NULL if @p node is a leaf */
311 extern
313  SCIP_REOPT* reopt, /**< reoptimization data structure */
314  SCIP_SET* set, /**< global SCIP settings */
315  BMS_BLKMEM* blkmem, /**< block memory */
316  SCIP_NODE* node, /**< node of the search tree */
317  unsigned int* childs, /**< array to store the child ids */
318  int childssize, /**< size of the childs array */
319  int* nchilds /**< pointer to store the number of child nodes */
320  );
321 
322 /** returns all leaves of the subtree induced by @p node */
323 extern
325  SCIP_REOPT* reopt, /**< reoptimization data */
326  SCIP_NODE* node, /**< node of the search tree */
327  unsigned int* leaves, /**< array to the the ids */
328  int leavessize, /**< size of leaves array */
329  int* nleaves /**< pointer to store the number of leaf node */
330  );
331 
332 /** returns the time needed to store the nodes for reoptimization */
333 extern
335  SCIP_REOPT* reopt /**< reoptimization data */
336  );
337 
338 /** store a global constraint that should be added at the beginning of the next iteration */
339 extern
341  SCIP_REOPT* reopt, /**< reoptimization data */
342  SCIP_VAR** vars, /**< array to store the variables of the constraint */
343  SCIP_Real* vals, /**< array to store the coefficients of the variables */
344  int nvars, /**< pointer to store the size of the constraints */
345  BMS_BLKMEM* blkmem /**< block memory */
346  );
347 
348 /** add the stored constraints globally to the problem */
349 extern
351  SCIP* scip, /**< SCIP data structure */
352  SCIP_REOPT* reopt, /**< reoptimization data structure */
353  SCIP_SET* set, /**< global SCIP settings */
354  SCIP_STAT* stat, /**< dynamic problem statistics */
355  BMS_BLKMEM* blkmem /**< block memory */
356  );
357 
358 /** add the stored cuts to the separation storage */
360  SCIP_REOPT* reopt, /**< reoptimization data structure */
361  SCIP_NODE* node, /**< current focus node */
362  SCIP_SEPASTORE* sepastore, /**< separation storage */
363  SCIP_CUTPOOL* cutpool, /**< global cutpool */
364  BMS_BLKMEM* blkmem, /**< block memory */
365  SCIP_SET* set, /**< global SCIP settings */
366  SCIP_STAT* stat, /**< dynamic problem statistics */
367  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
368  SCIP_EVENTFILTER* eventfilter, /**< event filter */
369  SCIP_LP* lp, /**< current LP */
370  SCIP_Bool root /**< bool whether the current node is the root */
371  );
372 
373 /** check if the LP of the given node should be solved or not */
374 extern
376  SCIP_REOPT* reopt, /**< reoptimization data structure */
377  SCIP_SET* set, /**< global SCIP settings */
378  SCIP_NODE* node /**< node of the current search tree */
379  );
380 
381 /** reactivate the given @p reoptnode and split them into several nodes if necessary */
382 extern
384  SCIP_REOPT* reopt, /**< reoptimization data structure */
385  SCIP* scip, /**< SCIP data structure */
386  SCIP_SET* set, /**< global SCIP settings */
387  SCIP_STAT* stat, /**< dynamic problem statistics */
388  SCIP_PROB* transprob, /**< transformed problem */
389  SCIP_PROB* origprob, /**< original problem */
390  SCIP_TREE* tree, /**< branching tree */
391  SCIP_LP* lp, /**< current LP */
392  SCIP_BRANCHCAND* branchcand, /**< branching candidate */
393  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
394  SCIP_CLIQUETABLE* cliquetable, /**< clique table */
395  BMS_BLKMEM* blkmem, /**< block memory */
396  SCIP_REOPTNODE* reoptnode, /**< node of the reoptimization tree to reactivate */
397  unsigned int id, /**< id of the node to reactivate */
398  SCIP_Real estimate, /**< estimate of the child nodes that should be created */
399  SCIP_NODE** childnodes, /**< array to store the created child nodes */
400  int* ncreatedchilds, /**< pointer to store number of created child nodes */
401  int* naddedconss, /**< pointer to store number of generated constraints */
402  int childnodessize, /**< available size of childnodes array */
403  SCIP_Bool* success /**< pointer store the result */
404  );
405 
406 /** delete a node stored in the reoptimization tree */
407 extern
409  SCIP_REOPT* reopt, /**< reoptimization data */
410  SCIP_SET* set, /**< global SCIP settings */
411  unsigned int id, /**< id of the node */
412  BMS_BLKMEM* blkmem /**< block memory */
413  );
414 
415 /** reset the stored information abound bound changes based on dual information */
416 extern
418  SCIP_REOPT* reopt, /**< reoptimization data */
419  SCIP_NODE* node, /**< node of the search tree */
420  BMS_BLKMEM* blkmem /**< block memory */
421  );
422 
423 /** splits the root into several nodes and moves the child nodes of the root to one of the created nodes */
424 extern
426  SCIP_REOPT* reopt, /**< reoptimization data structure */
427  SCIP_TREE* tree, /**< branch and bound tree */
428  SCIP_SET* set, /**< global SCIP settings */
429  SCIP_STAT* stat, /**< dynamic SCIP statistics */
430  BMS_BLKMEM* blkmem, /**< block memory */
431  int* ncreatedchilds, /**< pointer to store the number of created nodes */
432  int* naddedconss /**< pointer to store the number added constraints */
433  );
434 
435 /** reset the complete tree and set the given search frontier */
436 extern
438  SCIP_REOPT* reopt, /**< reoptimization data structure */
439  SCIP_SET* set, /**< global SCIP settings */
440  BMS_BLKMEM* blkmem, /**< block memory */
441  SCIP_REOPTNODE** representatives, /**< array of representatives */
442  int nrepresentatives, /**< number of representatives */
443  SCIP_Bool* success /**< pointer to store if the method was successful */
444  );
445 
446 /** add all unprocessed nodes to the reoptimization tree */
447 extern
449  SCIP_REOPT* reopt, /**< reoptimization data structure */
450  SCIP_SET* set, /**< global SCIP settings */
451  SCIP_LP* lp, /**< LP data */
452  BMS_BLKMEM* blkmem, /**< block memory */
453  SCIP_NODE** leaves, /**< array of open leave nodes */
454  int nleaves, /**< number of open leave nodes */
455  SCIP_NODE** childs, /**< array of open children nodes */
456  int nchilds, /**< number of open leave nodes */
457  SCIP_NODE** siblings, /**< array of open sibling nodes */
458  int nsiblings /**< number of open leave nodes */
459  );
460 
461 /** merges the variable history of the current run with the stored history */
462 extern
464  SCIP_REOPT* reopt, /**< reoptimization data structure */
465  SCIP_SET* set, /**< global SCIP settings */
466  SCIP_STAT* stat, /**< dynamic problem statistics */
467  SCIP_VAR** vars, /**< original problem variables */
468  int nvars /**< number of original problem variables */
469  );
470 
471 /** updates the variable history */
472 extern
474  SCIP_REOPT* reopt, /**< reoptimization data structure */
475  SCIP_SET* set, /**< global SCIP settings */
476  SCIP_STAT* stat, /**< dynamic problem statistics */
477  BMS_BLKMEM* blkmem, /**< block memory */
478  SCIP_VAR** vars, /**< variable array */
479  int nvars /**< number of variables */
480  );
481 
482 /*
483  * methods for reoptnode
484  */
485 
486 /** initialize an empty node */
487 extern
488 void SCIPreoptnodeInit(
489  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
490  SCIP_SET* set /**< global SCIP settings */
491  );
492 
493 /** reset the given reoptimization node */
494 extern
496  SCIP_REOPT* reopt, /**< reoptimization data structure */
497  SCIP_SET* set, /**< global SCIP settings */
498  BMS_BLKMEM* blkmem, /**< block memory */
499  SCIP_REOPTNODE* reoptnode /**< reoptimization node */
500  );
501 
502 /** delete the given reoptimization node */
503 extern
505  SCIP_REOPTNODE** reoptnode, /**< pointer of reoptnode */
506  BMS_BLKMEM* blkmem /**< block memory */
507  );
508 
509 /** add a variable to a given reoptnode */
510 extern
512  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
513  SCIP_SET* set, /**< global SCIP settings */
514  BMS_BLKMEM* blkmem, /**< block memory */
515  SCIP_VAR* var, /**< variable to add */
516  SCIP_Real val, /**< value of the variable */
517  SCIP_BOUNDTYPE boundtype /**< boundtype of the variable */
518  );
519 
520 /** add a constraint to a given reoptnode */
521 extern
523  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
524  SCIP_SET* set, /**< global SCIP settings */
525  BMS_BLKMEM* blkmem, /**< block memory */
526  SCIP_VAR** vars, /**< variables which are part of the constraint */
527  SCIP_Real* bounds, /**< bounds of the variables */
528  SCIP_BOUNDTYPE* boundtypes, /**< boundtypes of the varibales (or NULL is the constraint is a cut) */
529  SCIP_Real lhs, /**< lhs of the constraint */
530  SCIP_Real rhs, /**< rhs of the constraint */
531  int nvars, /**< number of variables */
532  REOPT_CONSTYPE constype, /**< type of the constraint */
533  SCIP_Bool linear /**< the given constraint has a linear representation */
534  );
535 
536 /** return the branching path of the given node in the reoptimization tree */
537 extern
539  SCIP_REOPT* reopt, /**< reoptimization data structure */
540  SCIP_REOPTNODE* reoptnode, /**< node of the reoptimization tree */
541  SCIP_VAR** vars, /**< array for variables */
542  SCIP_Real* vals, /**< array for values */
543  SCIP_BOUNDTYPE* boundtypes, /**< array for bound types */
544  int varssize, /**< size of arrays vars, vals, and boundtypes */
545  int* nbndchgs, /**< pointer to store the number of bound changes */
546  int* nbndchgsafterdual /**< pointer to store the number of bound changes applied after
547  * the first dual reduction at the given node */
548  );
549 
550 /** add a constraint to the reoptimization data structure */
551 extern
553  SCIP_REOPT* reopt, /**< reoptimization data structure */
554  SCIP_SET* set, /**< global SCIP settings */
555  BMS_BLKMEM* blkmem, /**< block memory */
556  SCIP_CONS* cons /**< constraint to add */
557  );
558 
559 /** save global lower and upper bounds
560  *
561  * @note this method can only called once, i.e., after fishing presolving of the first problem
562  */
563 extern
565  SCIP_REOPT* reopt, /**< reoptimization data structure */
566  SCIP_PROB* transprob, /**< transformed problem data */
567  BMS_BLKMEM* blkmem /**< block memory */
568  );
569 
570 /** save active constraints
571  *
572  * @note this method can only called once, i.e., after fishing presolving of the first problem
573  */
574 extern
576  SCIP_REOPT* reopt, /**< reoptimization data structure */
577  SCIP_PROB* transprob, /**< transformed problem data */
578  BMS_BLKMEM* blkmem /**< block memory */
579  );
580 
581 /** installs global lower and upper bounds */
582 extern
584  SCIP_REOPT* reopt, /**< reoptimization data structure */
585  SCIP_SET* set, /**< global SCIP settings */
586  SCIP_STAT* stat, /**< dynamic SCIP statistics */
587  SCIP_PROB* transprob, /**< transformed problem data */
588  SCIP_LP* lp, /**< current LP data */
589  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
590  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
591  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
592  BMS_BLKMEM* blkmem /**< block memory */
593  );
594 
595 /** reactivate globally valid constraints that were deactivated and necessary to ensure correctness */
596 extern
598  SCIP_REOPT* reopt, /**< reoptimization data structure */
599  SCIP_SET* set, /**< global SCIP settings */
600  SCIP_STAT* stat /**< dynamic SCIP statistics */
601  );
602 
603 
604 /** returns whether a constraint is necessary to ensure correctness and cannot be deleted */
605 extern
607  SCIP_REOPT* reopt, /**< reoptimization data structure */
608  SCIP_CONS* cons /**< problem constraint */
609  );
610 
611 #ifdef __cplusplus
612 }
613 #endif
614 
615 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_REOPTNODE * SCIPreoptGetReoptnode(SCIP_REOPT *reopt, unsigned int id)
Definition: reopt.c:5600
SCIP_RETCODE SCIPreoptAddCons(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_CONS *cons)
Definition: reopt.c:8028
SCIP_Real SCIPreoptGetSimToPrevious(SCIP_REOPT *reopt)
Definition: reopt.c:5549
type definitions for miscellaneous datastructures
SCIP_Real SCIPreoptGetSavingtime(SCIP_REOPT *reopt)
Definition: reopt.c:7534
SCIP_RETCODE SCIPreoptApplyCompression(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_REOPTNODE **representatives, int nrepresentatives, SCIP_Bool *success)
Definition: reopt.c:6606
SCIP_SOL * SCIPreoptGetBestSolRun(SCIP_REOPT *reopt, int run)
Definition: reopt.c:5630
SCIP_RETCODE SCIPreoptMergeVarHistory(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, SCIP_VAR **vars, int nvars)
Definition: reopt.c:6454
SCIP_Bool SCIPreoptGetSolveLP(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_NODE *node)
Definition: reopt.c:7797
SCIP_Bool SCIPreoptConsCanBeDeleted(SCIP_REOPT *reopt, SCIP_CONS *cons)
Definition: reopt.c:8236
SCIP_RETCODE SCIPreoptnodeDelete(SCIP_REOPTNODE **reoptnode, BMS_BLKMEM *blkmem)
Definition: reopt.c:7895
SCIP_RETCODE SCIPreoptFree(SCIP_REOPT **reopt, SCIP_SET *set, SCIP_PRIMAL *origprimal, BMS_BLKMEM *blkmem)
Definition: reopt.c:5071
int SCIPreoptGetNLeaves(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:5847
SCIP_RETCODE SCIPreoptGetLeaves(SCIP_REOPT *reopt, SCIP_NODE *node, unsigned int *leaves, int leavessize, int *nleaves)
Definition: reopt.c:6338
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:7230
SCIP_RETCODE SCIPreoptGetSolsRun(SCIP_REOPT *reopt, int run, SCIP_SOL **sols, int solssize, int *nsols)
Definition: reopt.c:5411
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:6175
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_Real SCIPreoptGetSimilarity(SCIP_REOPT *reopt, SCIP_SET *set, int run1, int run2, SCIP_VAR **origvars, int norigvars)
Definition: reopt.c:5567
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:5215
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:5268
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:7664
public methods for reoptimization
type definitions for return codes for SCIP methods
void SCIPreoptResetSolMarks(SCIP_REOPT *reopt)
Definition: reopt.c:5674
SCIP_Real SCIPreoptGetOldObjCoef(SCIP_REOPT *reopt, int run, int idx)
Definition: reopt.c:5614
enum SCIP_LPSolStat SCIP_LPSOLSTAT
Definition: type_lp.h:42
type definitions for collecting reoptimization information
int SCIPreoptGetNDualBndchgs(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:6265
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:7151
void SCIPreoptnodeInit(SCIP_REOPTNODE *reoptnode, SCIP_SET *set)
Definition: reopt.c:7844
SCIP_SOL * SCIPreoptGetLastBestSol(SCIP_REOPT *reopt)
Definition: reopt.c:5586
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:7937
SCIP_RETCODE SCIPreoptResetActiveConss(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat)
Definition: reopt.c:8195
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:6402
type definitions for storing cuts in a cut pool
SCIP_RETCODE SCIPreoptCreate(SCIP_REOPT **reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
Definition: reopt.c:4992
int SCIPreoptGetNSols(SCIP_REOPT *reopt)
Definition: reopt.c:5395
SCIP_RETCODE SCIPreoptResetDualBndchgs(SCIP_REOPT *reopt, SCIP_NODE *node, BMS_BLKMEM *blkmem)
Definition: reopt.c:7126
int SCIPreoptGetNNodes(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:5695
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:5480
data structures for collecting reoptimization information
#define SCIP_Bool
Definition: def.h:61
void SCIPreoptAddNImprovingSols(SCIP_REOPT *reopt, int nimprovingsols)
Definition: reopt.c:5369
SCIP_RETCODE SCIPreoptDeleteNode(SCIP_REOPT *reopt, SCIP_SET *set, unsigned int id, BMS_BLKMEM *blkmem)
Definition: reopt.c:7210
SCIP_RETCODE SCIPreoptnodeAddBndchg(SCIP_REOPTNODE *reoptnode, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_VAR *var, SCIP_Real val, SCIP_BOUNDTYPE boundtype)
Definition: reopt.c:7909
SCIP_RETCODE SCIPreoptUpdateVarHistory(SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_VAR **vars, int nvars)
Definition: reopt.c:6549
datastructures for branching and inference history
int SCIPreoptGetNAddedConss(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:5191
int SCIPreoptGetNSolsRun(SCIP_REOPT *reopt, int run)
Definition: reopt.c:5380
SCIP_RETCODE SCIPreoptReset(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem)
Definition: reopt.c:5642
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:6285
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:5906
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:8145
SCIP_Real SCIPreoptGetSimToFirst(SCIP_REOPT *reopt)
Definition: reopt.c:5558
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:5302
SCIP_RETCODE SCIPreoptnodeReset(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:7877
#define SCIP_Real
Definition: def.h:135
SCIP_RETCODE SCIPreoptSaveActiveConss(SCIP_REOPT *reopt, SCIP_PROB *transprob, BMS_BLKMEM *blkmem)
Definition: reopt.c:8113
enum Reopt_ConsType REOPT_CONSTYPE
Definition: type_reopt.h:67
void SCIPreoptAddNCheckedSols(SCIP_REOPT *reopt, int ncheckedsols)
Definition: reopt.c:5348
SCIP_RETCODE SCIPreoptAddInfNode(SCIP_REOPT *reopt, SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_NODE *node)
Definition: reopt.c:5882
int SCIPreoptGetNCheckedSols(SCIP_REOPT *reopt)
Definition: reopt.c:5338
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:392
int SCIPreoptGetNSavedSols(SCIP_REOPT *reopt)
Definition: reopt.c:5453
int SCIPreoptGetNImprovingSols(SCIP_REOPT *reopt)
Definition: reopt.c:5359
SCIP_RETCODE SCIPreoptSaveGlobalBounds(SCIP_REOPT *reopt, SCIP_PROB *transprob, BMS_BLKMEM *blkmem)
Definition: reopt.c:8075
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:6833
uint64_t SCIP_EVENTTYPE
Definition: type_event.h:134
SCIP_RETCODE SCIPreoptApplyGlbConss(SCIP *scip, SCIP_REOPT *reopt, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem)
Definition: reopt.c:7544