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