Scippy

SCIP

Solving Constraint Integer Programs

benders.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-2020 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 scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip/src/scip/benders.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for Benders' decomposition
19  * @author Stephen J. Maher
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_BENDERS_H__
25 #define __SCIP_BENDERS_H__
26 
27 #include "blockmemshell/memory.h"
28 #include "scip/def.h"
29 #include "scip/type_benders.h"
30 #include "scip/type_benderscut.h"
31 #include "scip/type_dcmp.h"
32 #include "scip/type_message.h"
33 #include "scip/type_misc.h"
34 #include "scip/type_result.h"
35 #include "scip/type_retcode.h"
36 #include "scip/type_scip.h"
37 #include "scip/type_set.h"
38 #include "scip/type_sol.h"
39 #include "scip/type_stat.h"
40 #include "scip/type_var.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 
47 /** copies the given Benders' decomposition to a new scip */
49  SCIP_BENDERS* benders, /**< Benders' decomposition */
50  SCIP_SET* sourceset, /**< SCIP_SET of SCIP to copy from */
51  SCIP_SET* targetset, /**< SCIP_SET of SCIP to copy to */
52  SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of source variables corresponding
53  * target variables; must not be NULL */
54  SCIP_Bool copysubproblems, /**< must the subproblems be copied with the Benders' decomposition copy */
55  SCIP_Bool* valid /**< was the copying process valid? */
56  );
57 
58 /** creates a Benders' decomposition */
60  SCIP_BENDERS** benders, /**< pointer to Benders' decomposition data structure */
61  SCIP_SET* set, /**< global SCIP settings */
62  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
63  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
64  const char* name, /**< name of Benders' decomposition */
65  const char* desc, /**< description of Benders' decomposition */
66  int priority, /**< priority of the Benders' decomposition */
67  SCIP_Bool cutlp, /**< should Benders' cuts be generated for LP solutions */
68  SCIP_Bool cutpseudo, /**< should Benders' cuts be generated for pseudo solutions */
69  SCIP_Bool cutrelax, /**< should Benders' cuts be generated for relaxation solutions */
70  SCIP_Bool shareauxvars, /**< should this Benders' use the highest priority Benders aux vars */
71  SCIP_DECL_BENDERSCOPY ((*benderscopy)), /**< copy method of Benders' decomposition or NULL if you don't want to copy your plugin into sub-SCIPs */
72  SCIP_DECL_BENDERSFREE ((*bendersfree)), /**< destructor of Benders' decomposition */
73  SCIP_DECL_BENDERSINIT ((*bendersinit)), /**< initialize Benders' decomposition */
74  SCIP_DECL_BENDERSEXIT ((*bendersexit)), /**< deinitialize Benders' decomposition */
75  SCIP_DECL_BENDERSINITPRE((*bendersinitpre)),/**< presolving initialization method for Benders' decomposition */
76  SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)),/**< presolving deinitialization method for Benders' decomposition */
77  SCIP_DECL_BENDERSINITSOL((*bendersinitsol)),/**< solving process initialization method of Benders' decomposition */
78  SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)),/**< solving process deinitialization method of Benders' decomposition */
79  SCIP_DECL_BENDERSGETVAR((*bendersgetvar)),/**< returns the master variable for a given subproblem variable */
80  SCIP_DECL_BENDERSCREATESUB((*benderscreatesub)),/**< creates a Benders' decomposition subproblem */
81  SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)),/**< called prior to the subproblem solving loop */
82  SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)),/**< the solving method for convex Benders' decomposition subproblems */
83  SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)),/**< the solving method for the Benders' decomposition subproblems */
84  SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)),/**< called after the subproblems are solved. */
85  SCIP_DECL_BENDERSFREESUB((*bendersfreesub)),/**< the freeing method for the Benders' decomposition subproblems */
86  SCIP_BENDERSDATA* bendersdata /**< Benders' decomposition data */
87  );
88 
89 /** calls destructor and frees memory of Benders' decomposition */
91  SCIP_BENDERS** benders, /**< pointer to Benders' decomposition data structure */
92  SCIP_SET* set /**< global SCIP settings */
93  );
94 
95 /** initializes Benders' decomposition */
97  SCIP_BENDERS* benders, /**< Benders' decomposition */
98  SCIP_SET* set /**< global SCIP settings */
99  );
100 
101 /** calls exit method of Benders' decomposition */
103  SCIP_BENDERS* benders, /**< Benders' decomposition */
104  SCIP_SET* set /**< global SCIP settings */
105  );
106 
107 /** informs the Benders' decomposition that the presolving process is being started */
109  SCIP_BENDERS* benders, /**< Benders' decomposition */
110  SCIP_SET* set, /**< global SCIP settings */
111  SCIP_STAT* stat /**< dynamic problem statistics */
112  );
113 
114 /** informs the Benders' decomposition that the presolving process has completed */
116  SCIP_BENDERS* benders, /**< Benders' decomposition */
117  SCIP_SET* set, /**< global SCIP settings */
118  SCIP_STAT* stat /**< dynamic problem statistics */
119  );
120 
121 /** informs Benders' decomposition that the branch and bound process is being started */
123  SCIP_BENDERS* benders, /**< Benders' decomposition */
124  SCIP_SET* set /**< global SCIP settings */
125  );
126 
127 /** informs Benders' decomposition that the branch and bound process data is being freed */
129  SCIP_BENDERS* benders, /**< Benders' decomposition */
130  SCIP_SET* set /**< global SCIP settings */
131  );
132 
133 /** activates Benders' decomposition such that it is called in LP solving loop */
135  SCIP_BENDERS* benders, /**< the Benders' decomposition structure */
136  SCIP_SET* set, /**< global SCIP settings */
137  int nsubproblems /**< the number subproblems used in this decomposition */
138  );
139 
140 /** deactivates Benders' decomposition such that it is no longer called in LP solving loop */
142  SCIP_BENDERS* benders, /**< the Benders' decomposition structure */
143  SCIP_SET* set /**< global SCIP settings */
144  );
145 
146 /** enables or disables all clocks of Benders' decomposition depending on the value of the flag */
148  SCIP_BENDERS* benders, /**< the Benders' decomposition for which all clocks should be enabled or disabled */
149  SCIP_Bool enable /**< should the clocks of the Benders' decomposition be enabled? */
150  );
151 
152 /** solves the subproblem using the current master problem solution.
153  *
154  * The checkint flag indicates whether integer feasibility can be assumed. If it is not assumed, i.e. checkint ==
155  * FALSE, then only the convex relaxations of the subproblems are solved. If integer feasibility is assumed, i.e.
156  * checkint == TRUE, then the convex relaxations and the full CIP are solved to generate Benders' cuts and check
157  * solution feasibility.
158  */
160  SCIP_BENDERS* benders, /**< Benders' decomposition */
161  SCIP_SET* set, /**< global SCIP settings */
162  SCIP_SOL* sol, /**< primal CIP solution */
163  SCIP_RESULT* result, /**< result of the pricing process */
164  SCIP_Bool* infeasible, /**< is the master problem infeasible with respect to the Benders' cuts? */
165  SCIP_Bool* auxviol, /**< set to TRUE only if the solution is feasible but the aux vars are violated */
166  SCIP_BENDERSENFOTYPE type, /**< the type of solution being enforced */
167  SCIP_Bool checkint /**< should the integer solution be checked by the subproblems */
168  );
169 
170 /** Executes the subproblem solving process. */
172  SCIP_BENDERS* benders, /**< Benders' decomposition */
173  SCIP_SET* set, /**< global SCIP settings */
174  SCIP_SOL* sol, /**< primal CIP solution */
175  int probnum, /**< the subproblem number */
176  SCIP_BENDERSSOLVELOOP solveloop, /**< the solve loop iteration. The first iter is for LP, the second for IP */
177  SCIP_Bool enhancement, /**< is the solve performed as part of an enhancement? */
178  SCIP_Bool* solved, /**< flag to indicate whether the subproblem was solved */
179  SCIP_Bool* infeasible, /**< returns whether the current subproblem is infeasible */
180  SCIP_BENDERSENFOTYPE type /**< the enforcement type calling this function */
181  );
182 
183 /** sets up the subproblem using the solution to the master problem */
185  SCIP_BENDERS* benders, /**< Benders' decomposition */
186  SCIP_SET* set, /**< global SCIP settings */
187  SCIP_SOL* sol, /**< primal CIP solution */
188  int probnumber, /**< the subproblem number */
189  SCIP_BENDERSENFOTYPE type /**< the enforcement type calling this function */
190  );
191 
192 /** Solve a Benders' decomposition subproblems. This will either call the user defined method or the generic solving
193  * methods. If the generic method is called, then the subproblem must be set up before calling this method. */
195  SCIP_BENDERS* benders, /**< Benders' decomposition */
196  SCIP_SET* set, /**< global SCIP settings */
197  SCIP_SOL* sol, /**< primal CIP solution, can be NULL */
198  int probnumber, /**< the subproblem number */
199  SCIP_Bool* infeasible, /**< returns whether the current subproblem is infeasible */
200  SCIP_Bool solvecip, /**< directly solve the CIP subproblem */
201  SCIP_Real* objective /**< the objective function value of the subproblem, can be NULL */
202  );
203 
204 /** frees the subproblems */
206  SCIP_BENDERS* benders, /**< Benders' decomposition */
207  SCIP_SET* set, /**< global SCIP settings */
208  int probnumber /**< the subproblem number */
209  );
210 
211 /** compares the subproblem objective value with the auxiliary variable value for optimality */
213  SCIP_BENDERS* benders, /**< the benders' decomposition structure */
214  SCIP_SET* set, /**< global SCIP settings */
215  SCIP_SOL* sol, /**< primal CIP solution */
216  int probnumber /**< the subproblem number */
217  );
218 
219 /** returns the value of the auxiliary variable value in a master problem solution */
221  SCIP_BENDERS* benders, /**< the benders' decomposition structure */
222  SCIP_SET* set, /**< global SCIP settings */
223  SCIP_SOL* sol, /**< primal CIP solution */
224  int probnumber /**< the subproblem number */
225  );
226 
227 /** Solves an independent subproblem to identify its lower bound. The lower bound is then used to update the bound on
228  * the auxiliary variable.
229  */
231  SCIP_BENDERS* benders, /**< Benders' decomposition */
232  SCIP_SET* set, /**< global SCIP settings */
233  int probnumber, /**< the subproblem to be evaluated */
234  SCIP_Real* lowerbound, /**< the lowerbound for the subproblem */
235  SCIP_Bool* infeasible /**< was the subproblem found to be infeasible? */
236  );
237 
238 /** merges a subproblem into the master problem. This process just adds a copy of the subproblem variables and
239  * constraints to the master problem, but keeps the subproblem stored in the Benders' decomposition data structure.
240  * The reason for keeping the subproblem available is for when it is queried for solutions after the problem is solved.
241  *
242  * Once the subproblem is merged into the master problem, then the subproblem is flagged as disabled. This means that
243  * it will not be solved in the subsequent subproblem solving loops.
244  *
245  * The associated auxiliary variables are kept in the master problem. The objective function of the merged subproblem
246  * is added as an underestimator constraint.
247  */
249  SCIP_BENDERS* benders, /**< Benders' decomposition */
250  SCIP_SET* set, /**< global SCIP settings */
251  SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of subproblem variables corresponding
252  * to the newly created master variables, or NULL */
253  SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of subproblem constraints to the
254  corresponding newly created constraints, or NULL */
255  int probnumber /**< the number of the subproblem that will be merged into the master problem*/
256  );
257 
258 /** Applies a Benders' decomposition to the problem based upon the decomposition selected from the storage */
259 extern
261  SCIP_BENDERS* benders, /**< Benders' decomposition */
262  SCIP_SET* set, /**< global SCIP settings */
263  SCIP_DECOMP* decomp /**< the decomposition to apply to the problem */
264  );
265 
266 /** sets priority of Benders' decomposition */
268  SCIP_BENDERS* benders, /**< Benders' decomposition */
269  SCIP_SET* set, /**< global SCIP settings */
270  int priority /**< new priority of the Benders' decomposition */
271  );
272 
273 /** sets copy callback of Benders' decomposition */
274 void SCIPbendersSetCopy(
275  SCIP_BENDERS* benders, /**< Benders' decomposition */
276  SCIP_DECL_BENDERSCOPY ((*benderscopy)) /**< copy callback of Benders' decomposition */
277  );
278 
279 /** sets destructor callback of Benders' decomposition */
280 void SCIPbendersSetFree(
281  SCIP_BENDERS* benders, /**< Benders' decomposition */
282  SCIP_DECL_BENDERSFREE ((*bendersfree)) /**< destructor of Benders' decomposition */
283  );
284 
285 /** sets initialization callback of Benders' decomposition */
286 void SCIPbendersSetInit(
287  SCIP_BENDERS* benders, /**< Benders' decomposition */
288  SCIP_DECL_BENDERSINIT((*bendersinit)) /**< initialize Benders' decomposition */
289  );
290 
291 /** sets deinitialization callback of Benders' decomposition */
292 void SCIPbendersSetExit(
293  SCIP_BENDERS* benders, /**< Benders' decomposition */
294  SCIP_DECL_BENDERSEXIT((*bendersexit)) /**< deinitialize Benders' decomposition */
295  );
296 
297 /** sets presolving initialization callback of Benders' decomposition */
299  SCIP_BENDERS* benders, /**< Benders' decomposition */
300  SCIP_DECL_BENDERSINITPRE((*bendersinitpre))/**< initialize presolving for Benders' decomposition */
301  );
302 
303 /** sets presolving deinitialization callback of Benders' decomposition */
305  SCIP_BENDERS* benders, /**< Benders' decomposition */
306  SCIP_DECL_BENDERSEXITPRE((*bendersexitpre))/**< deinitialize presolving for Benders' decomposition */
307  );
308 
309 /** sets solving process initialization callback of Benders' decomposition */
311  SCIP_BENDERS* benders, /**< Benders' decomposition */
312  SCIP_DECL_BENDERSINITSOL((*bendersinitsol))/**< solving process initialization callback of Benders' decomposition */
313  );
314 
315 /** sets solving process deinitialization callback of Benders' decomposition */
317  SCIP_BENDERS* benders, /**< Benders' decomposition */
318  SCIP_DECL_BENDERSEXITSOL((*bendersexitsol))/**< solving process deinitialization callback of Benders' decomposition */
319  );
320 
321 /** sets the pre subproblem solve callback of Benders' decomposition */
323  SCIP_BENDERS* benders, /**< Benders' decomposition */
324  SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve))/**< called prior to the subproblem solving loop */
325  );
326 
327 /** sets convex solve callback of Benders' decomposition */
329  SCIP_BENDERS* benders, /**< Benders' decomposition */
330  SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex))/**< solving method for the convex Benders' decomposition subproblem */
331  );
332 
333 /** sets solve callback of Benders' decomposition */
335  SCIP_BENDERS* benders, /**< Benders' decomposition */
336  SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub))/**< solving method for a Benders' decomposition subproblem */
337  );
338 
339 /** sets post-solve callback of Benders' decomposition */
341  SCIP_BENDERS* benders, /**< Benders' decomposition */
342  SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve))/**< solving process deinitialization callback of Benders' decomposition */
343  );
344 
345 /** sets post-solve callback of Benders' decomposition */
347  SCIP_BENDERS* benders, /**< Benders' decomposition */
348  SCIP_DECL_SORTPTRCOMP((*benderssubcomp)) /**< a comparator for defining the solving order of the subproblems */
349  );
350 
351 /** sets free subproblem callback of Benders' decomposition */
353  SCIP_BENDERS* benders, /**< Benders' decomposition */
354  SCIP_DECL_BENDERSFREESUB((*bendersfreesub))/**< the freeing callback for the subproblem */
355  );
356 
357 /** Returns the corresponding master or subproblem variable for the given variable.
358  * This provides a call back for the variable mapping between the master and subproblems. */
360  SCIP_BENDERS* benders, /**< Benders' decomposition */
361  SCIP_SET* set, /**< global SCIP settings */
362  SCIP_VAR* var, /**< the variable for which the corresponding variable is desired */
363  SCIP_VAR** mappedvar, /**< the variable that is mapped to var */
364  int probnumber /**< the problem number for the desired variable, -1 for the master problem */
365  );
366 
367 /** adds a subproblem to the Benders' decomposition data */
369  SCIP_BENDERS* benders, /**< Benders' decomposition */
370  SCIP* subproblem /**< subproblem to be added to the data storage */
371  );
372 
373 /** removes the subproblems from the Benders' decomposition data */
375  SCIP_BENDERS* benders /**< Benders' decomposition */
376  );
377 
378 /** Sets whether the subproblem is enabled or disabled. A subproblem is disabled if it has been merged into the master
379  * problem.
380  */
382  SCIP_BENDERS* benders, /**< Benders' decomposition */
383  int probnumber, /**< the subproblem number */
384  SCIP_Bool enabled /**< flag to indicate whether the subproblem is enabled */
385  );
386 
387 /** changes all of the master problem variables in the given subproblem to continuous */
389  SCIP_BENDERS* benders, /**< Benders' decomposition */
390  SCIP_SET* set, /**< global SCIP settings */
391  int probnumber /**< the subproblem number */
392  );
393 
394 /** sets a flag to indicate whether the master variables are all set to continuous */
396  SCIP_BENDERS* benders, /**< Benders' decomposition */
397  int probnumber, /**< the subproblem number */
398  SCIP_Bool arecont /**< flag to indicate whether the master problem variables are continuous */
399  );
400 
401 /** returns whether the master variables are all set to continuous */
403  SCIP_BENDERS* benders, /**< Benders' decomposition */
404  int probnumber /**< the subproblem number */
405  );
406 
407 /** adds the data for the generated cuts to the Benders' cut storage */
409  SCIP_BENDERS* benders, /**< Benders' decomposition cut */
410  SCIP_SET* set, /**< global SCIP settings */
411  SCIP_VAR** vars, /**< the variables that have non-zero coefficients in the cut */
412  SCIP_Real* vals, /**< the coefficients of the variables in the cut */
413  SCIP_Real lhs, /**< the left hand side of the cut */
414  SCIP_Real rhs, /**< the right hand side of the cut */
415  int nvars /**< the number of variables with non-zero coefficients in the cut */
416  );
417 
418 /** inserts a Benders' cut algorithm plugin into the Benders' cuts plugin list */
420  SCIP_BENDERS* benders, /**< Benders' decomposition structure */
421  SCIP_SET* set, /**< global SCIP settings */
422  SCIP_BENDERSCUT* benderscut /**< Benders' cut */
423  );
424 
425 /** sets the Benders' cuts sorted flags in the Benders' decomposition */
427  SCIP_BENDERS* benders, /**< Benders' decomposition structure */
428  SCIP_Bool sorted /**< the value to set the sorted flag to */
429  );
430 
431 /** sorts Benders' decomposition cuts by priorities */
433  SCIP_BENDERS* benders /**< Benders' decomposition */
434  );
435 
436 /** sorts Benders' decomposition cuts by name */
438  SCIP_BENDERS* benders /**< Benders' decomposition */
439  );
440 
441 #ifdef __cplusplus
442 }
443 #endif
444 
445 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
#define SCIP_DECL_BENDERSCREATESUB(x)
Definition: type_benders.h:184
SCIP_RETCODE SCIPbendersGetVar(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_VAR *var, SCIP_VAR **mappedvar, int probnumber)
Definition: benders.c:5704
void SCIPbendersSetExit(SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXIT((*bendersexit)))
Definition: benders.c:5784
void SCIPbendersSetBenderscutsSorted(SCIP_BENDERS *benders, SCIP_Bool sorted)
Definition: benders.c:6862
type definitions for miscellaneous datastructures
SCIP_RETCODE SCIPbendersAddSubproblem(SCIP_BENDERS *benders, SCIP *subproblem)
Definition: benders.c:6105
#define SCIP_DECL_BENDERSINITSOL(x)
Definition: type_benders.h:142
#define SCIP_DECL_BENDERSFREE(x)
Definition: type_benders.h:94
SCIP_RETCODE SCIPbendersFree(SCIP_BENDERS **benders, SCIP_SET *set)
Definition: benders.c:1269
void SCIPbendersSetFreesub(SCIP_BENDERS *benders, SCIP_DECL_BENDERSFREESUB((*bendersfreesub)))
Definition: benders.c:5894
#define SCIP_DECL_BENDERSINITPRE(x)
Definition: type_benders.h:123
SCIP_RETCODE SCIPbendersInitsol(SCIP_BENDERS *benders, SCIP_SET *set)
Definition: benders.c:2445
SCIP_RETCODE SCIPbendersMergeSubproblemIntoMaster(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, int probnumber)
Definition: benders.c:5272
SCIP_RETCODE SCIPbendersFreeSubproblem(SCIP_BENDERS *benders, SCIP_SET *set, int probnumber)
Definition: benders.c:5004
#define SCIP_DECL_BENDERSGETVAR(x)
Definition: type_benders.h:356
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
enum SCIP_BendersEnfoType SCIP_BENDERSENFOTYPE
Definition: type_benders.h:42
type definitions for global SCIP settings
void SCIPbendersSetPriority(SCIP_BENDERS *benders, SCIP_SET *set, int priority)
Definition: benders.c:5935
void SCIPbendersSetInitsol(SCIP_BENDERS *benders, SCIP_DECL_BENDERSINITSOL((*bendersinitsol)))
Definition: benders.c:5817
#define SCIP_DECL_BENDERSINIT(x)
Definition: type_benders.h:103
type definitions for return codes for SCIP methods
type definitions for problem statistics
void SCIPbendersRemoveSubproblems(SCIP_BENDERS *benders)
Definition: benders.c:6129
SCIP_RETCODE SCIPbendersExitpre(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_STAT *stat)
Definition: benders.c:2419
#define SCIP_DECL_BENDERSFREESUB(x)
Definition: type_benders.h:340
SCIP_RETCODE SCIPbendersExecSubproblemSolve(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnum, SCIP_BENDERSSOLVELOOP solveloop, SCIP_Bool enhancement, SCIP_Bool *solved, SCIP_Bool *infeasible, SCIP_BENDERSENFOTYPE type)
Definition: benders.c:4190
SCIP_Bool SCIPbendersSubproblemIsOptimal(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber)
Definition: benders.c:5054
SCIP_RETCODE SCIPbendersChgMastervarsToCont(SCIP_BENDERS *benders, SCIP_SET *set, int probnumber)
Definition: benders.c:6438
#define SCIP_DECL_BENDERSEXIT(x)
Definition: type_benders.h:112
void SCIPbendersSetSolvesub(SCIP_BENDERS *benders, SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)))
Definition: benders.c:5861
#define SCIP_DECL_BENDERSSOLVESUB(x)
Definition: type_benders.h:282
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPbendersActivate(SCIP_BENDERS *benders, SCIP_SET *set, int nsubproblems)
Definition: benders.c:2534
void SCIPbendersSortBenderscuts(SCIP_BENDERS *benders)
Definition: benders.c:6963
void SCIPbendersSetFree(SCIP_BENDERS *benders, SCIP_DECL_BENDERSFREE((*bendersfree)))
Definition: benders.c:5762
struct SCIP_BendersData SCIP_BENDERSDATA
Definition: type_benders.h:73
#define SCIP_DECL_BENDERSSOLVESUBCONVEX(x)
Definition: type_benders.h:249
type definitions for problem variables
void SCIPbendersSetCopy(SCIP_BENDERS *benders, SCIP_DECL_BENDERSCOPY((*benderscopy)))
Definition: benders.c:5751
SCIP_RETCODE SCIPbendersCopyInclude(SCIP_BENDERS *benders, SCIP_SET *sourceset, SCIP_SET *targetset, SCIP_HASHMAP *varmap, SCIP_Bool copysubproblems, SCIP_Bool *valid)
Definition: benders.c:921
#define SCIP_DECL_BENDERSCOPY(x)
Definition: type_benders.h:86
SCIP_RETCODE SCIPbendersSetupSubproblem(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber, SCIP_BENDERSENFOTYPE type)
Definition: benders.c:4359
#define SCIP_Bool
Definition: def.h:70
SCIP_RETCODE SCIPbendersStoreCut(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, int nvars)
Definition: benders.c:6814
SCIP_RETCODE SCIPbendersSolveSubproblem(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber, SCIP_Bool *infeasible, SCIP_Bool solvecip, SCIP_Real *objective)
Definition: benders.c:4503
void SCIPbendersSetExitsol(SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)))
Definition: benders.c:5828
SCIP_RETCODE SCIPbendersIncludeBenderscut(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_BENDERSCUT *benderscut)
Definition: benders.c:6874
SCIP_RETCODE SCIPbendersSetMastervarsCont(SCIP_BENDERS *benders, int probnumber, SCIP_Bool arecont)
Definition: benders.c:6635
void SCIPbendersSetInit(SCIP_BENDERS *benders, SCIP_DECL_BENDERSINIT((*bendersinit)))
Definition: benders.c:5773
SCIP_RETCODE SCIPbendersInit(SCIP_BENDERS *benders, SCIP_SET *set)
Definition: benders.c:1989
SCIP_Bool SCIPbendersGetMastervarsCont(SCIP_BENDERS *benders, int probnumber)
Definition: benders.c:6670
type definitions for Benders&#39; decomposition methods
void SCIPbendersSetSolvesubconvex(SCIP_BENDERS *benders, SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)))
Definition: benders.c:5850
type definitions for storing primal CIP solutions
type definitions for Benders&#39; decomposition cut
void SCIPbendersSetExitpre(SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)))
Definition: benders.c:5806
SCIP_RETCODE SCIPbendersDeactivate(SCIP_BENDERS *benders, SCIP_SET *set)
Definition: benders.c:2620
void SCIPbendersSetPresubsolve(SCIP_BENDERS *benders, SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)))
Definition: benders.c:5839
enum SCIP_BendersSolveLoop SCIP_BENDERSSOLVELOOP
Definition: type_benders.h:51
SCIP_RETCODE SCIPbendersApplyDecomposition(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_DECOMP *decomp)
Definition: benders.c:5584
#define SCIP_DECL_SORTPTRCOMP(x)
Definition: type_misc.h:172
#define SCIP_DECL_BENDERSEXITSOL(x)
Definition: type_benders.h:153
void SCIPbendersEnableOrDisableClocks(SCIP_BENDERS *benders, SCIP_Bool enable)
Definition: benders.c:6041
void SCIPbendersSortBenderscutsName(SCIP_BENDERS *benders)
Definition: benders.c:6978
#define SCIP_Real
Definition: def.h:163
SCIP_RETCODE SCIPbendersComputeSubproblemLowerbound(SCIP_BENDERS *benders, SCIP_SET *set, int probnumber, SCIP_Real *lowerbound, SCIP_Bool *infeasible)
Definition: benders.c:5104
result codes for SCIP callback methods
SCIP_RETCODE SCIPbendersCreate(SCIP_BENDERS **benders, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_Bool cutlp, SCIP_Bool cutpseudo, SCIP_Bool cutrelax, SCIP_Bool shareauxvars, SCIP_DECL_BENDERSCOPY((*benderscopy)), SCIP_DECL_BENDERSFREE((*bendersfree)), SCIP_DECL_BENDERSINIT((*bendersinit)), SCIP_DECL_BENDERSEXIT((*bendersexit)), SCIP_DECL_BENDERSINITPRE((*bendersinitpre)), SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)), SCIP_DECL_BENDERSINITSOL((*bendersinitsol)), SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)), SCIP_DECL_BENDERSGETVAR((*bendersgetvar)), SCIP_DECL_BENDERSCREATESUB((*benderscreatesub)), SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)), SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)), SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)), SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)), SCIP_DECL_BENDERSFREESUB((*bendersfreesub)), SCIP_BENDERSDATA *bendersdata)
Definition: benders.c:1190
SCIP_RETCODE SCIPbendersExec(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, SCIP_RESULT *result, SCIP_Bool *infeasible, SCIP_Bool *auxviol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint)
Definition: benders.c:3589
type definitions for decompositions and the decomposition store
void SCIPbendersSetSubproblemEnabled(SCIP_BENDERS *benders, int probnumber, SCIP_Bool enabled)
Definition: benders.c:6597
SCIP_RETCODE SCIPbendersInitpre(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_STAT *stat)
Definition: benders.c:2376
#define SCIP_DECL_BENDERSPOSTSOLVE(x)
Definition: type_benders.h:318
#define SCIP_DECL_BENDERSEXITPRE(x)
Definition: type_benders.h:131
type definitions for message output methods
SCIP_RETCODE SCIPbendersExitsol(SCIP_BENDERS *benders, SCIP_SET *set)
Definition: benders.c:2478
void SCIPbendersSetPostsolve(SCIP_BENDERS *benders, SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)))
Definition: benders.c:5872
SCIP_RETCODE SCIPbendersExit(SCIP_BENDERS *benders, SCIP_SET *set)
Definition: benders.c:2233
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:429
void SCIPbendersSetInitpre(SCIP_BENDERS *benders, SCIP_DECL_BENDERSINITPRE((*bendersinitpre)))
Definition: benders.c:5795
void SCIPbendersSetSubproblemComp(SCIP_BENDERS *benders, SCIP_DECL_SORTPTRCOMP((*benderssubcomp)))
Definition: benders.c:5883
SCIP_Real SCIPbendersGetAuxiliaryVarVal(SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber)
Definition: benders.c:5083
#define SCIP_DECL_BENDERSPRESUBSOLVE(x)
Definition: type_benders.h:208
memory allocation routines