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-2019 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  */
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 */
63  BMS_BLKMEM* blkmem, /**< block memory buffers */
64  SCIP_SET* set, /**< global SCIP settings */
65  SCIP_STAT* stat, /**< dynamic problem statistics */
66  SCIP_PROB* transprob, /**< transformed problem */
67  SCIP_PROB* origprob, /**< original problem */
68  SCIP_PRIMAL* primal, /**< primal data */
69  SCIP_TREE* tree, /**< branch and bound tree */
70  SCIP_REOPT* reopt, /**< reoptimization data structure */
71  SCIP_LP* lp, /**< LP data */
72  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
73  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
74  SCIP_CONFLICT* conflict, /**< conflict analysis data */
75  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
76  int depth, /**< depth level to use for propagator frequency checks */
77  int maxrounds, /**< maximal number of propagation rounds (-1: no limit, 0: parameter settings) */
78  SCIP_PROPTIMING timingmask, /**< timing mask to decide which propagators are executed */
79  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
80  );
81 
82 /** puts all constraints with initial flag TRUE into the LP */
84  BMS_BLKMEM* blkmem, /**< block memory buffers */
85  SCIP_SET* set, /**< global SCIP settings */
86  SCIP_SEPASTORE* sepastore, /**< separation storage */
87  SCIP_CUTPOOL* cutpool, /**< global cutpool */
88  SCIP_STAT* stat, /**< dynamic problem statistics */
89  SCIP_PROB* transprob, /**< transformed problem */
90  SCIP_PROB* origprob, /**< original problem */
91  SCIP_TREE* tree, /**< branch and bound tree */
92  SCIP_REOPT* reopt, /**< reoptimization data structure */
93  SCIP_LP* lp, /**< LP data */
94  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
95  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
96  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
97  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
98  SCIP_Bool root, /**< is this the initial root LP? */
99  SCIP_Bool firstsubtreeinit, /**< is this the first call in the current subtree after jumping through the tree? */
100  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
101  );
102 
103 /** constructs the LP of the current node, but does not load the LP state and warmstart information */
105  BMS_BLKMEM* blkmem, /**< block memory buffers */
106  SCIP_SET* set, /**< global SCIP settings */
107  SCIP_STAT* stat, /**< dynamic problem statistics */
108  SCIP_PROB* transprob, /**< transformed problem */
109  SCIP_PROB* origprob, /**< original problem */
110  SCIP_TREE* tree, /**< branch and bound tree */
111  SCIP_REOPT* reopt, /**< reoptimization data structure */
112  SCIP_LP* lp, /**< LP data */
113  SCIP_PRICESTORE* pricestore, /**< pricing storage */
114  SCIP_SEPASTORE* sepastore, /**< separation storage */
115  SCIP_CUTPOOL* cutpool, /**< global cutpool */
116  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
117  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
118  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
119  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
120  SCIP_Bool newinitconss, /**< do we have to add new initial constraints? */
121  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
122  );
123 
124 /** calls primal heuristics */
126  SCIP_SET* set, /**< global SCIP settings */
127  SCIP_STAT* stat, /**< dynamic problem statistics */
128  SCIP_PROB* prob, /**< transformed problem after presolve */
129  SCIP_PRIMAL* primal, /**< primal data */
130  SCIP_TREE* tree, /**< branch and bound tree */
131  SCIP_LP* lp, /**< LP data */
132  SCIP_NODE* nextnode, /**< next node that will be processed, or NULL if no more nodes left
133  * (only needed when calling after node heuristics) */
134  SCIP_HEURTIMING heurtiming, /**< current point in the node solving process */
135  SCIP_Bool nodeinfeasible, /**< was the current node already detected to be infeasible? */
136  SCIP_Bool* foundsol, /**< pointer to store whether a solution has been found */
137  SCIP_Bool* unbounded /**< pointer to store whether an unbounded ray was found in the LP */
138  );
139 
140 /** applies one round of separation on the given primal solution or on the LP solution */
142  BMS_BLKMEM* blkmem, /**< block memory buffers */
143  SCIP_SET* set, /**< global SCIP settings */
144  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
145  SCIP_STAT* stat, /**< dynamic problem statistics */
146  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
147  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
148  SCIP_PROB* prob, /**< transformed problem after presolve */
149  SCIP_PRIMAL* primal, /**< primal data */
150  SCIP_TREE* tree, /**< branch and bound tree */
151  SCIP_LP* lp, /**< LP data */
152  SCIP_SEPASTORE* sepastore, /**< separation storage */
153  SCIP_SOL* sol, /**< primal solution that should be separated, or NULL for LP solution */
154  int actdepth, /**< current depth in the tree */
155  SCIP_Bool allowlocal, /**< should the separator be asked to separate local cuts */
156  SCIP_Bool onlydelayed, /**< should only delayed separators be called? */
157  SCIP_Bool* delayed, /**< pointer to store whether a separator was delayed */
158  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
159  );
160 
161 /** solves the current LP completely with pricing in new variables */
163  BMS_BLKMEM* blkmem, /**< block memory buffers */
164  SCIP_SET* set, /**< global SCIP settings */
165  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
166  SCIP_STAT* stat, /**< dynamic problem statistics */
167  SCIP_PROB* transprob, /**< transformed problem */
168  SCIP_PROB* origprob, /**< original problem */
169  SCIP_PRIMAL* primal, /**< primal data */
170  SCIP_TREE* tree, /**< branch and bound tree */
171  SCIP_REOPT* reopt, /**< reoptimization data structure */
172  SCIP_LP* lp, /**< LP data */
173  SCIP_PRICESTORE* pricestore, /**< pricing storage */
174  SCIP_SEPASTORE* sepastore, /**< separation storage */
175  SCIP_CUTPOOL* cutpool, /**< global cutpool */
176  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
177  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
178  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
179  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
180  SCIP_Bool pretendroot, /**< should the pricers be called as if we are at the root node? */
181  SCIP_Bool displayinfo, /**< should info lines be displayed after each pricing round? */
182  int maxpricerounds, /**< maximal number of pricing rounds (-1: no limit);
183  * a finite limit means that the LP might not be solved to optimality! */
184  int* npricedcolvars, /**< pointer to store number of column variables after problem vars were priced */
185  SCIP_Bool* mustsepa, /**< pointer to store TRUE if a separation round should follow */
186  SCIP_Bool* lperror, /**< pointer to store whether an unresolved error in LP solving occured */
187  SCIP_Bool* aborted /**< pointer to store whether the pricing was aborted and the lower bound must
188  * not be used */
189  );
190 
191 /** main solving loop */
193  BMS_BLKMEM* blkmem, /**< block memory buffers */
194  SCIP_SET* set, /**< global SCIP settings */
195  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
196  SCIP_STAT* stat, /**< dynamic problem statistics */
197  SCIP_MEM* mem, /**< block memory pools */
198  SCIP_PROB* origprob, /**< original problem */
199  SCIP_PROB* transprob, /**< transformed problem after presolve */
200  SCIP_PRIMAL* primal, /**< primal data */
201  SCIP_TREE* tree, /**< branch and bound tree */
202  SCIP_REOPT* reopt, /**< reoptimization data structure */
203  SCIP_LP* lp, /**< LP data */
204  SCIP_RELAXATION* relaxation, /**< global relaxation data */
205  SCIP_PRICESTORE* pricestore, /**< pricing storage */
206  SCIP_SEPASTORE* sepastore, /**< separation storage */
207  SCIP_CUTPOOL* cutpool, /**< global cut pool */
208  SCIP_CUTPOOL* delayedcutpool, /**< global delayed cut pool */
209  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
210  SCIP_CONFLICT* conflict, /**< conflict analysis data */
211  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
212  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
213  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
214  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
215  SCIP_Bool* restart /**< should solving process be started again with presolving? */
216  );
217 
218 #ifdef __cplusplus
219 }
220 #endif
221 
222 #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:1956
type definitions for conflict store
unsigned int SCIP_HEURTIMING
Definition: type_timing.h:97
#define SCIP_EXPORT
Definition: def.h:98
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:1279
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:4809
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:70
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:2009
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:636
type definitions for block memory pools and memory buffers
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:66
SCIP_EXPORT SCIP_Bool SCIPsolveIsStopped(SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool checknodelimits)
Definition: solve.c:92
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:204
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:427
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:1101
memory allocation routines