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-2014 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_pricestore.h"
40 #include "scip/type_sepastore.h"
41 #include "scip/type_cutpool.h"
42 #include "scip/type_conflict.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /** returns whether the solving process will be / was stopped before proving optimality;
49  * if the solving process was stopped, stores the reason as status in stat
50  */
51 extern
53  SCIP_SET* set, /**< global SCIP settings */
54  SCIP_STAT* stat, /**< dynamic problem statistics */
55  SCIP_Bool checknodelimits /**< should the node limits be involved in the check? */
56  );
57 
58 /** applies domain propagation on current node and flushes the conflict storage afterwards */
59 extern
61  BMS_BLKMEM* blkmem, /**< block memory buffers */
62  SCIP_SET* set, /**< global SCIP settings */
63  SCIP_STAT* stat, /**< dynamic problem statistics */
64  SCIP_PROB* transprob, /**< transformed problem */
65  SCIP_PROB* origprob, /**< original problem */
66  SCIP_PRIMAL* primal, /**< primal data */
67  SCIP_TREE* tree, /**< branch and bound tree */
68  SCIP_LP* lp, /**< LP data */
69  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
70  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
71  SCIP_CONFLICT* conflict, /**< conflict analysis data */
72  int depth, /**< depth level to use for propagator frequency checks */
73  int maxrounds, /**< maximal number of propagation rounds (-1: no limit, 0: parameter settings) */
74  unsigned int timingmask, /**< timing mask to decide which propagators are executed */
75  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
76  );
77 
78 /** puts all constraints with initial flag TRUE into the LP */
79 extern
81  BMS_BLKMEM* blkmem, /**< block memory buffers */
82  SCIP_SET* set, /**< global SCIP settings */
83  SCIP_SEPASTORE* sepastore, /**< separation storage */
84  SCIP_STAT* stat, /**< dynamic problem statistics */
85  SCIP_PROB* transprob, /**< transformed problem */
86  SCIP_PROB* origprob, /**< original problem */
87  SCIP_TREE* tree, /**< branch and bound tree */
88  SCIP_LP* lp, /**< LP data */
89  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
90  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
91  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
92  SCIP_Bool root, /**< is this the initial root LP? */
93  SCIP_Bool firstsubtreeinit, /**< is this the first call in the current subtree after jumping through the tree? */
94  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
95  );
96 
97 /** constructs the LP of the current node, but does not load the LP state and warmstart information */
98 extern
100  BMS_BLKMEM* blkmem, /**< block memory buffers */
101  SCIP_SET* set, /**< global SCIP settings */
102  SCIP_STAT* stat, /**< dynamic problem statistics */
103  SCIP_PROB* transprob, /**< transformed problem */
104  SCIP_PROB* origprob, /**< original problem */
105  SCIP_TREE* tree, /**< branch and bound tree */
106  SCIP_LP* lp, /**< LP data */
107  SCIP_PRICESTORE* pricestore, /**< pricing storage */
108  SCIP_SEPASTORE* sepastore, /**< separation storage */
109  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
110  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
111  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
112  SCIP_Bool newinitconss, /**< do we have to add new initial constraints? */
113  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
114  );
115 
116 /** calls primal heuristics */
117 extern
119  SCIP_SET* set, /**< global SCIP settings */
120  SCIP_STAT* stat, /**< dynamic problem statistics */
121  SCIP_PROB* prob, /**< transformed problem after presolve */
122  SCIP_PRIMAL* primal, /**< primal data */
123  SCIP_TREE* tree, /**< branch and bound tree */
124  SCIP_LP* lp, /**< LP data */
125  SCIP_NODE* nextnode, /**< next node that will be processed, or NULL if no more nodes left
126  * (only needed when calling after node heuristics) */
127  SCIP_HEURTIMING heurtiming, /**< current point in the node solving process */
128  SCIP_Bool nodeinfeasible, /**< was the current node already detected to be infeasible? */
129  SCIP_Bool* foundsol /**< pointer to store whether a solution has been found */
130  );
131 
132 /** applies one round of separation on the given primal solution or on the LP solution */
133 extern
135  BMS_BLKMEM* blkmem, /**< block memory buffers */
136  SCIP_SET* set, /**< global SCIP settings */
137  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
138  SCIP_STAT* stat, /**< dynamic problem statistics */
139  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
140  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
141  SCIP_PROB* prob, /**< transformed problem after presolve */
142  SCIP_PRIMAL* primal, /**< primal data */
143  SCIP_TREE* tree, /**< branch and bound tree */
144  SCIP_LP* lp, /**< LP data */
145  SCIP_SEPASTORE* sepastore, /**< separation storage */
146  SCIP_SOL* sol, /**< primal solution that should be separated, or NULL for LP solution */
147  int actdepth, /**< current depth in the tree */
148  SCIP_Bool onlydelayed, /**< should only delayed separators be called? */
149  SCIP_Bool* delayed, /**< pointer to store whether a separator was delayed */
150  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
151  );
152 
153 /** solves the current LP completely with pricing in new variables */
154 extern
156  BMS_BLKMEM* blkmem, /**< block memory buffers */
157  SCIP_SET* set, /**< global SCIP settings */
158  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
159  SCIP_STAT* stat, /**< dynamic problem statistics */
160  SCIP_PROB* transprob, /**< transformed problem */
161  SCIP_PROB* origprob, /**< original problem */
162  SCIP_PRIMAL* primal, /**< primal data */
163  SCIP_TREE* tree, /**< branch and bound tree */
164  SCIP_LP* lp, /**< LP data */
165  SCIP_PRICESTORE* pricestore, /**< pricing storage */
166  SCIP_SEPASTORE* sepastore, /**< separation storage */
167  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
168  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
169  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
170  SCIP_Bool pretendroot, /**< should the pricers be called as if we are at the root node? */
171  SCIP_Bool displayinfo, /**< should info lines be displayed after each pricing round? */
172  int maxpricerounds, /**< maximal number of pricing rounds (-1: no limit);
173  * a finite limit means that the LP might not be solved to optimality! */
174  int* npricedcolvars, /**< pointer to store number of column variables after problem vars were priced */
175  SCIP_Bool* mustsepa, /**< pointer to store TRUE if a separation round should follow */
176  SCIP_Bool* lperror, /**< pointer to store whether an unresolved error in LP solving occured */
177  SCIP_Bool* aborted /**< pointer to store whether the pricing was aborted and the lower bound must
178  * not be used */
179  );
180 
181 /** main solving loop */
182 extern
184  BMS_BLKMEM* blkmem, /**< block memory buffers */
185  SCIP_SET* set, /**< global SCIP settings */
186  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
187  SCIP_STAT* stat, /**< dynamic problem statistics */
188  SCIP_MEM* mem, /**< block memory pools */
189  SCIP_PROB* origprob, /**< original problem */
190  SCIP_PROB* transprob, /**< transformed problem after presolve */
191  SCIP_PRIMAL* primal, /**< primal data */
192  SCIP_TREE* tree, /**< branch and bound tree */
193  SCIP_LP* lp, /**< LP data */
194  SCIP_RELAXATION* relaxation, /**< global relaxation data */
195  SCIP_PRICESTORE* pricestore, /**< pricing storage */
196  SCIP_SEPASTORE* sepastore, /**< separation storage */
197  SCIP_CUTPOOL* cutpool, /**< global cut pool */
198  SCIP_CUTPOOL* delayedcutpool, /**< global delayed cut pool */
199  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
200  SCIP_CONFLICT* conflict, /**< conflict analysis data */
201  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
202  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
203  SCIP_Bool* restart /**< should solving process be started again with presolving? */
204  );
205 
206 #ifdef __cplusplus
207 }
208 #endif
209 
210 #endif
SCIP_RETCODE SCIPconstructCurrentLP(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_LP *lp, SCIP_PRICESTORE *pricestore, SCIP_SEPASTORE *sepastore, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_Bool newinitconss, SCIP_Bool *cutoff)
Definition: solve.c:1128
unsigned int SCIP_HEURTIMING
Definition: type_timing.h:79
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_LP *lp, SCIP_PRICESTORE *pricestore, SCIP_SEPASTORE *sepastore, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_Bool pretendroot, SCIP_Bool displayinfo, int maxpricerounds, int *npricedcolvars, SCIP_Bool *mustsepa, SCIP_Bool *lperror, SCIP_Bool *aborted)
Definition: solve.c:1798
type definitions for storing priced variables
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_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CONFLICT *conflict, int depth, int maxrounds, unsigned int timingmask, SCIP_Bool *cutoff)
Definition: solve.c:563
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
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_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_Bool root, SCIP_Bool firstsubtreeinit, SCIP_Bool *cutoff)
Definition: solve.c:1019
type definitions for return codes for SCIP methods
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_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_Bool *restart)
Definition: solve.c:4212
type definitions for problem statistics
type definitions for LP management
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:49
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:1747
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:171
type definitions for storing and manipulating the main problem
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:371
SCIP_Bool SCIPsolveIsStopped(SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool checknodelimits)
Definition: solve.c:69
memory allocation routines