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-2016 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 solve.h
17  * @brief internal methods for main solving loop and node processing
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_SOLVE_H__
24 #define __SCIP_SOLVE_H__
25 
26 
27 #include <stdio.h>
28 
29 #include "scip/def.h"
30 #include "blockmemshell/memory.h"
31 #include "scip/type_retcode.h"
32 #include "scip/type_set.h"
33 #include "scip/type_stat.h"
34 #include "scip/type_event.h"
35 #include "scip/type_lp.h"
36 #include "scip/type_prob.h"
37 #include "scip/type_primal.h"
38 #include "scip/type_tree.h"
39 #include "scip/type_reopt.h"
40 #include "scip/type_pricestore.h"
41 #include "scip/type_sepastore.h"
42 #include "scip/type_cutpool.h"
43 #include "scip/type_conflict.h"
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /** returns whether the solving process will be / was stopped before proving optimality;
50  * if the solving process was stopped, stores the reason as status in stat
51  */
52 extern
54  SCIP_SET* set, /**< global SCIP settings */
55  SCIP_STAT* stat, /**< dynamic problem statistics */
56  SCIP_Bool checknodelimits /**< should the node limits be involved in the check? */
57  );
58 
59 /** applies domain propagation on current node and flushes the conflict storage afterwards */
60 extern
62  BMS_BLKMEM* blkmem, /**< block memory buffers */
63  SCIP_SET* set, /**< global SCIP settings */
64  SCIP_STAT* stat, /**< dynamic problem statistics */
65  SCIP_PROB* transprob, /**< transformed problem */
66  SCIP_PROB* origprob, /**< original problem */
67  SCIP_PRIMAL* primal, /**< primal data */
68  SCIP_TREE* tree, /**< branch and bound tree */
69  SCIP_REOPT* reopt, /**< reoptimization data structure */
70  SCIP_LP* lp, /**< LP data */
71  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
72  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
73  SCIP_CONFLICT* conflict, /**< conflict analysis data */
74  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
75  int depth, /**< depth level to use for propagator frequency checks */
76  int maxrounds, /**< maximal number of propagation rounds (-1: no limit, 0: parameter settings) */
77  unsigned int timingmask, /**< timing mask to decide which propagators are executed */
78  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
79  );
80 
81 /** puts all constraints with initial flag TRUE into the LP */
82 extern
84  BMS_BLKMEM* blkmem, /**< block memory buffers */
85  SCIP_SET* set, /**< global SCIP settings */
86  SCIP_SEPASTORE* sepastore, /**< separation storage */
87  SCIP_STAT* stat, /**< dynamic problem statistics */
88  SCIP_PROB* transprob, /**< transformed problem */
89  SCIP_PROB* origprob, /**< original problem */
90  SCIP_TREE* tree, /**< branch and bound tree */
91  SCIP_REOPT* reopt, /**< reoptimization data structure */
92  SCIP_LP* lp, /**< LP data */
93  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
94  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
95  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
96  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
97  SCIP_Bool root, /**< is this the initial root LP? */
98  SCIP_Bool firstsubtreeinit, /**< is this the first call in the current subtree after jumping through the tree? */
99  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
100  );
101 
102 /** constructs the LP of the current node, but does not load the LP state and warmstart information */
103 extern
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_BRANCHCAND* branchcand, /**< branching candidate storage */
116  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
117  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
118  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
119  SCIP_Bool newinitconss, /**< do we have to add new initial constraints? */
120  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
121  );
122 
123 /** calls primal heuristics */
124 extern
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  );
138 
139 /** applies one round of separation on the given primal solution or on the LP solution */
140 extern
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 onlydelayed, /**< should only delayed separators be called? */
156  SCIP_Bool* delayed, /**< pointer to store whether a separator was delayed */
157  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
158  );
159 
160 /** solves the current LP completely with pricing in new variables */
161 extern
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_BRANCHCAND* branchcand, /**< branching candidate storage */
176  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
177  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
178  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
179  SCIP_Bool pretendroot, /**< should the pricers be called as if we are at the root node? */
180  SCIP_Bool displayinfo, /**< should info lines be displayed after each pricing round? */
181  int maxpricerounds, /**< maximal number of pricing rounds (-1: no limit);
182  * a finite limit means that the LP might not be solved to optimality! */
183  int* npricedcolvars, /**< pointer to store number of column variables after problem vars were priced */
184  SCIP_Bool* mustsepa, /**< pointer to store TRUE if a separation round should follow */
185  SCIP_Bool* lperror, /**< pointer to store whether an unresolved error in LP solving occured */
186  SCIP_Bool* aborted /**< pointer to store whether the pricing was aborted and the lower bound must
187  * not be used */
188  );
189 
190 /** main solving loop */
191 extern
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_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
212  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
213  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
214  SCIP_Bool* restart /**< should solving process be started again with presolving? */
215  );
216 
217 #ifdef __cplusplus
218 }
219 #endif
220 
221 #endif
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_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool newinitconss, SCIP_Bool *cutoff)
Definition: solve.c:1145
unsigned int SCIP_HEURTIMING
Definition: type_timing.h:95
type definitions for storing priced variables
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
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 SCIPinitConssLP(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_SEPASTORE *sepastore, 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:1032
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:53
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 onlydelayed, SCIP_Bool *delayed, SCIP_Bool *cutoff)
Definition: solve.c:1768
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_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:1819
type definitions for branch and bound tree
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)
Definition: solve.c:170
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, unsigned int timingmask, SCIP_Bool *cutoff)
Definition: solve.c:566
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_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool *restart)
Definition: solve.c:4275
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
SCIP_Bool SCIPsolveIsStopped(SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool checknodelimits)
Definition: solve.c:69
memory allocation routines