Scippy

SCIP

Solving Constraint Integer Programs

solve.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-2018 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file solve.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for main solving loop and node processing
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_SOLVE_H__
25 #define __SCIP_SOLVE_H__
26 
27 
28 #include "blockmemshell/memory.h"
29 #include "scip/def.h"
30 #include "scip/type_conflict.h"
32 #include "scip/type_cutpool.h"
33 #include "scip/type_event.h"
34 #include "scip/type_lp.h"
35 #include "scip/type_mem.h"
36 #include "scip/type_message.h"
37 #include "scip/type_pricestore.h"
38 #include "scip/type_primal.h"
39 #include "scip/type_prob.h"
40 #include "scip/type_reopt.h"
41 #include "scip/type_retcode.h"
42 #include "scip/type_sepastore.h"
43 #include "scip/type_set.h"
44 #include "scip/type_stat.h"
45 #include "scip/type_tree.h"
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /** returns whether the solving process will be / was stopped before proving optimality;
52  * if the solving process was stopped, stores the reason as status in stat
53  */
54 extern
56  SCIP_SET* set, /**< global SCIP settings */
57  SCIP_STAT* stat, /**< dynamic problem statistics */
58  SCIP_Bool checknodelimits /**< should the node limits be involved in the check? */
59  );
60 
61 /** applies domain propagation on current node and flushes the conflict store afterwards */
62 extern
64  BMS_BLKMEM* blkmem, /**< block memory buffers */
65  SCIP_SET* set, /**< global SCIP settings */
66  SCIP_STAT* stat, /**< dynamic problem statistics */
67  SCIP_PROB* transprob, /**< transformed problem */
68  SCIP_PROB* origprob, /**< original problem */
69  SCIP_PRIMAL* primal, /**< primal data */
70  SCIP_TREE* tree, /**< branch and bound tree */
71  SCIP_REOPT* reopt, /**< reoptimization data structure */
72  SCIP_LP* lp, /**< LP data */
73  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
74  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
75  SCIP_CONFLICT* conflict, /**< conflict analysis data */
76  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
77  int depth, /**< depth level to use for propagator frequency checks */
78  int maxrounds, /**< maximal number of propagation rounds (-1: no limit, 0: parameter settings) */
79  SCIP_PROPTIMING timingmask, /**< timing mask to decide which propagators are executed */
80  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
81  );
82 
83 /** puts all constraints with initial flag TRUE into the LP */
84 extern
86  BMS_BLKMEM* blkmem, /**< block memory buffers */
87  SCIP_SET* set, /**< global SCIP settings */
88  SCIP_SEPASTORE* sepastore, /**< separation storage */
89  SCIP_CUTPOOL* cutpool, /**< global cutpool */
90  SCIP_STAT* stat, /**< dynamic problem statistics */
91  SCIP_PROB* transprob, /**< transformed problem */
92  SCIP_PROB* origprob, /**< original problem */
93  SCIP_TREE* tree, /**< branch and bound tree */
94  SCIP_REOPT* reopt, /**< reoptimization data structure */
95  SCIP_LP* lp, /**< LP data */
96  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
97  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
98  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
99  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
100  SCIP_Bool root, /**< is this the initial root LP? */
101  SCIP_Bool firstsubtreeinit, /**< is this the first call in the current subtree after jumping through the tree? */
102  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
103  );
104 
105 /** constructs the LP of the current node, but does not load the LP state and warmstart information */
106 extern
108  BMS_BLKMEM* blkmem, /**< block memory buffers */
109  SCIP_SET* set, /**< global SCIP settings */
110  SCIP_STAT* stat, /**< dynamic problem statistics */
111  SCIP_PROB* transprob, /**< transformed problem */
112  SCIP_PROB* origprob, /**< original problem */
113  SCIP_TREE* tree, /**< branch and bound tree */
114  SCIP_REOPT* reopt, /**< reoptimization data structure */
115  SCIP_LP* lp, /**< LP data */
116  SCIP_PRICESTORE* pricestore, /**< pricing storage */
117  SCIP_SEPASTORE* sepastore, /**< separation storage */
118  SCIP_CUTPOOL* cutpool, /**< global cutpool */
119  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
120  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
121  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
122  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
123  SCIP_Bool newinitconss, /**< do we have to add new initial constraints? */
124  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
125  );
126 
127 /** calls primal heuristics */
128 extern
130  SCIP_SET* set, /**< global SCIP settings */
131  SCIP_STAT* stat, /**< dynamic problem statistics */
132  SCIP_PROB* prob, /**< transformed problem after presolve */
133  SCIP_PRIMAL* primal, /**< primal data */
134  SCIP_TREE* tree, /**< branch and bound tree */
135  SCIP_LP* lp, /**< LP data */
136  SCIP_NODE* nextnode, /**< next node that will be processed, or NULL if no more nodes left
137  * (only needed when calling after node heuristics) */
138  SCIP_HEURTIMING heurtiming, /**< current point in the node solving process */
139  SCIP_Bool nodeinfeasible, /**< was the current node already detected to be infeasible? */
140  SCIP_Bool* foundsol, /**< pointer to store whether a solution has been found */
141  SCIP_Bool* unbounded /**< pointer to store whether an unbounded ray was found in the LP */
142  );
143 
144 /** applies one round of separation on the given primal solution or on the LP solution */
145 extern
147  BMS_BLKMEM* blkmem, /**< block memory buffers */
148  SCIP_SET* set, /**< global SCIP settings */
149  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
150  SCIP_STAT* stat, /**< dynamic problem statistics */
151  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
152  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
153  SCIP_PROB* prob, /**< transformed problem after presolve */
154  SCIP_PRIMAL* primal, /**< primal data */
155  SCIP_TREE* tree, /**< branch and bound tree */
156  SCIP_LP* lp, /**< LP data */
157  SCIP_SEPASTORE* sepastore, /**< separation storage */
158  SCIP_SOL* sol, /**< primal solution that should be separated, or NULL for LP solution */
159  int actdepth, /**< current depth in the tree */
160  SCIP_Bool allowlocal, /**< should the separator be asked to separate local cuts */
161  SCIP_Bool onlydelayed, /**< should only delayed separators be called? */
162  SCIP_Bool* delayed, /**< pointer to store whether a separator was delayed */
163  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
164  );
165 
166 /** solves the current LP completely with pricing in new variables */
167 extern
169  BMS_BLKMEM* blkmem, /**< block memory buffers */
170  SCIP_SET* set, /**< global SCIP settings */
171  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
172  SCIP_STAT* stat, /**< dynamic problem statistics */
173  SCIP_PROB* transprob, /**< transformed problem */
174  SCIP_PROB* origprob, /**< original problem */
175  SCIP_PRIMAL* primal, /**< primal data */
176  SCIP_TREE* tree, /**< branch and bound tree */
177  SCIP_REOPT* reopt, /**< reoptimization data structure */
178  SCIP_LP* lp, /**< LP data */
179  SCIP_PRICESTORE* pricestore, /**< pricing storage */
180  SCIP_SEPASTORE* sepastore, /**< separation storage */
181  SCIP_CUTPOOL* cutpool, /**< global cutpool */
182  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
183  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
184  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
185  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
186  SCIP_Bool pretendroot, /**< should the pricers be called as if we are at the root node? */
187  SCIP_Bool displayinfo, /**< should info lines be displayed after each pricing round? */
188  int maxpricerounds, /**< maximal number of pricing rounds (-1: no limit);
189  * a finite limit means that the LP might not be solved to optimality! */
190  int* npricedcolvars, /**< pointer to store number of column variables after problem vars were priced */
191  SCIP_Bool* mustsepa, /**< pointer to store TRUE if a separation round should follow */
192  SCIP_Bool* lperror, /**< pointer to store whether an unresolved error in LP solving occured */
193  SCIP_Bool* aborted /**< pointer to store whether the pricing was aborted and the lower bound must
194  * not be used */
195  );
196 
197 /** main solving loop */
198 extern
200  BMS_BLKMEM* blkmem, /**< block memory buffers */
201  SCIP_SET* set, /**< global SCIP settings */
202  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
203  SCIP_STAT* stat, /**< dynamic problem statistics */
204  SCIP_MEM* mem, /**< block memory pools */
205  SCIP_PROB* origprob, /**< original problem */
206  SCIP_PROB* transprob, /**< transformed problem after presolve */
207  SCIP_PRIMAL* primal, /**< primal data */
208  SCIP_TREE* tree, /**< branch and bound tree */
209  SCIP_REOPT* reopt, /**< reoptimization data structure */
210  SCIP_LP* lp, /**< LP data */
211  SCIP_RELAXATION* relaxation, /**< global relaxation data */
212  SCIP_PRICESTORE* pricestore, /**< pricing storage */
213  SCIP_SEPASTORE* sepastore, /**< separation storage */
214  SCIP_CUTPOOL* cutpool, /**< global cut pool */
215  SCIP_CUTPOOL* delayedcutpool, /**< global delayed cut pool */
216  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
217  SCIP_CONFLICT* conflict, /**< conflict analysis data */
218  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
219  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
220  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
221  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
222  SCIP_Bool* restart /**< should solving process be started again with presolving? */
223  );
224 
225 #ifdef __cplusplus
226 }
227 #endif
228 
229 #endif
SCIP_RETCODE SCIPseparationRound(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, int actdepth, SCIP_Bool allowlocal, SCIP_Bool onlydelayed, SCIP_Bool *delayed, SCIP_Bool *cutoff)
Definition: solve.c:1918
type definitions for conflict store
unsigned int SCIP_HEURTIMING
Definition: type_timing.h:97
type definitions for storing priced variables
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
SCIP_RETCODE SCIPconstructCurrentLP(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_PRICESTORE *pricestore, SCIP_SEPASTORE *sepastore, SCIP_CUTPOOL *cutpool, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool newinitconss, SCIP_Bool *cutoff)
Definition: solve.c:1241
type definitions for return codes for SCIP methods
type definitions for collecting reoptimization information
type definitions for problem statistics
type definitions for LP management
SCIP_RETCODE SCIPsolveCIP(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_MEM *mem, SCIP_PROB *origprob, SCIP_PROB *transprob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_RELAXATION *relaxation, SCIP_PRICESTORE *pricestore, SCIP_SEPASTORE *sepastore, SCIP_CUTPOOL *cutpool, SCIP_CUTPOOL *delayedcutpool, SCIP_BRANCHCAND *branchcand, SCIP_CONFLICT *conflict, SCIP_CONFLICTSTORE *conflictstore, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *restart)
Definition: solve.c:4768
type definitions for storing cuts in a cut pool
type definitions for storing separated cuts
type definitions for conflict analysis
type definitions for managing events
#define SCIP_Bool
Definition: def.h:62
type definitions for branch and bound tree
SCIP_RETCODE SCIPpriceLoop(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_PRICESTORE *pricestore, SCIP_SEPASTORE *sepastore, SCIP_CUTPOOL *cutpool, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool pretendroot, SCIP_Bool displayinfo, int maxpricerounds, int *npricedcolvars, SCIP_Bool *mustsepa, SCIP_Bool *lperror, SCIP_Bool *aborted)
Definition: solve.c:1971
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPpropagateDomains(BMS_BLKMEM *blkmem, SCIP_SET *set, 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_EVENTQUEUE *eventqueue, SCIP_CONFLICT *conflict, SCIP_CLIQUETABLE *cliquetable, int depth, int maxrounds, SCIP_PROPTIMING timingmask, SCIP_Bool *cutoff)
Definition: solve.c:635
type definitions for block memory pools and memory buffers
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:66
SCIP_RETCODE SCIPprimalHeuristics(SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_NODE *nextnode, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_Bool *foundsol, SCIP_Bool *unbounded)
Definition: solve.c:203
type definitions for message output methods
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:419
SCIP_Bool SCIPsolveIsStopped(SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool checknodelimits)
Definition: solve.c:91
SCIP_RETCODE SCIPinitConssLP(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_SEPASTORE *sepastore, SCIP_CUTPOOL *cutpool, 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_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool root, SCIP_Bool firstsubtreeinit, SCIP_Bool *cutoff)
Definition: solve.c:1100
memory allocation routines