Scippy

SCIP

Solving Constraint Integer Programs

scip_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-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 scip_benders.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for Benders decomposition
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Robert Lion Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_BENDERS_H__
32 #define __SCIP_SCIP_BENDERS_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_benderscut.h"
37 #include "scip/type_benders.h"
38 #include "scip/type_cons.h"
39 #include "scip/type_lp.h"
40 #include "scip/type_misc.h"
41 #include "scip/type_result.h"
42 #include "scip/type_retcode.h"
43 #include "scip/type_scip.h"
44 #include "scip/type_sol.h"
45 #include "scip/type_var.h"
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /**@addtogroup PublicBendersMethods
52  *
53  * @{
54  */
55 
56 /** creates a Benders' decomposition and includes it in SCIP
57  *
58  * To use the Benders' decomposition for solving a problem, it first has to be activated with a call to SCIPactivateBenders().
59  * This should be done during the problem creation stage.
60  *
61  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
62  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
63  *
64  * @pre This method can be called if SCIP is in one of the following stages:
65  * - \ref SCIP_STAGE_INIT
66  * - \ref SCIP_STAGE_PROBLEM
67  *
68  * @note method has all Benders' decomposition callbacks as arguments and is thus changed every time a new callback is
69  * added in future releases; consider using SCIPincludeBendersBasic() and setter functions
70  * if you seek for a method which is less likely to change in future releases
71  */
74  SCIP* scip, /**< SCIP data structure */
75  const char* name, /**< name of Benders' decomposition */
76  const char* desc, /**< description of Benders' decomposition */
77  int priority, /**< priority of the Benders' decomposition */
78  SCIP_Bool cutlp, /**< should Benders' cuts be generated for LP solutions */
79  SCIP_Bool cutpseudo, /**< should Benders' cuts be generated for pseudo solutions */
80  SCIP_Bool cutrelax, /**< should Benders' cuts be generated for relaxation solutions */
81  SCIP_Bool shareauxvars, /**< should this Benders' use the highest priority Benders aux vars */
82  SCIP_DECL_BENDERSCOPY ((*benderscopy)), /**< copy method of Benders' decomposition or NULL if you don't want to copy your plugin into sub-SCIPs */
83  SCIP_DECL_BENDERSFREE ((*bendersfree)), /**< destructor of Benders' decomposition */
84  SCIP_DECL_BENDERSINIT ((*bendersinit)), /**< initialize Benders' decomposition */
85  SCIP_DECL_BENDERSEXIT ((*bendersexit)), /**< deinitialize Benders' decomposition */
86  SCIP_DECL_BENDERSINITPRE((*bendersinitpre)),/**< presolving initialization method for Benders' decomposition */
87  SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)),/**< presolving deinitialization method for Benders' decomposition */
88  SCIP_DECL_BENDERSINITSOL((*bendersinitsol)),/**< solving process initialization method of Benders' decomposition */
89  SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)),/**< solving process deinitialization method of Benders' decomposition */
90  SCIP_DECL_BENDERSGETVAR((*bendersgetvar)),/**< returns the master variable for a given subproblem variable */
91  SCIP_DECL_BENDERSCREATESUB((*benderscreatesub)),/**< creates a Benders' decomposition subproblem */
92  SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)),/**< the execution method of the Benders' decomposition algorithm */
93  SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)),/**< the solving method for convex Benders' decomposition subproblems */
94  SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)),/**< the solving method for the Benders' decomposition subproblems */
95  SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)),/**< called after the subproblems are solved. */
96  SCIP_DECL_BENDERSFREESUB((*bendersfreesub)),/**< the freeing method for the Benders' decomposition subproblems */
97  SCIP_BENDERSDATA* bendersdata /**< Benders' decomposition data */
98  );
99 
100 /** creates a Benders' decomposition and includes it in SCIP with all non-fundamental callbacks set to NULL
101  *
102  * If needed, the non-fundamental callbacks can be added afterwards via setter functions SCIPsetBendersCopy(),
103  * SCIPsetBendersFree(), SCIPsetBendersInity(), SCIPsetBendersExit(), SCIPsetBendersInitsol(), SCIPsetBendersExitsol(),
104  * SCIPsetBendersFarkas().
105  *
106  * To use the Benders' decomposition for solving a problem, it first has to be activated with a call to SCIPactivateBenders().
107  * This should be done during the problem creation stage.
108  *
109  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
110  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
111  *
112  * @pre This method can be called if SCIP is in one of the following stages:
113  * - \ref SCIP_STAGE_INIT
114  * - \ref SCIP_STAGE_PROBLEM
115  *
116  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeBenders() instead
117  */
120  SCIP* scip, /**< SCIP data structure */
121  SCIP_BENDERS** bendersptr, /**< reference to a benders, or NULL */
122  const char* name, /**< name of Benders' decomposition */
123  const char* desc, /**< description of Benders' decomposition */
124  int priority, /**< priority of the Benders' decomposition */
125  SCIP_Bool cutlp, /**< should Benders' cuts be generated for LP solutions */
126  SCIP_Bool cutpseudo, /**< should Benders' cuts be generated for pseudo solutions */
127  SCIP_Bool cutrelax, /**< should Benders' cuts be generated for relaxation solutions */
128  SCIP_Bool shareauxvars, /**< should this Benders' use the highest priority Benders aux vars */
129  SCIP_DECL_BENDERSGETVAR((*bendersgetvar)),/**< returns the master variable for a given subproblem variable */
130  SCIP_DECL_BENDERSCREATESUB((*benderscreatesub)),/**< creates a Benders' decomposition subproblem */
131  SCIP_BENDERSDATA* bendersdata /**< Benders' decomposition data */
132  );
133 
134 /** sets copy method of benders
135  *
136  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
137  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
138  *
139  * @pre This method can be called if SCIP is in one of the following stages:
140  * - \ref SCIP_STAGE_INIT
141  * - \ref SCIP_STAGE_PROBLEM
142  */
145  SCIP* scip, /**< SCIP data structure */
146  SCIP_BENDERS* benders, /**< Benders' decomposition */
147  SCIP_DECL_BENDERSCOPY((*benderscopy)) /**< copy method of Benders' decomposition or NULL if you don't want to copy your plugin into sub-SCIPs */
148  );
149 
150 /** sets destructor method of benders
151  *
152  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
153  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
154  *
155  * @pre This method can be called if SCIP is in one of the following stages:
156  * - \ref SCIP_STAGE_INIT
157  * - \ref SCIP_STAGE_PROBLEM
158  */
161  SCIP* scip, /**< SCIP data structure */
162  SCIP_BENDERS* benders, /**< Benders' decomposition */
163  SCIP_DECL_BENDERSFREE((*bendersfree)) /**< destructor of Benders' decomposition */
164  );
165 
166 /** sets initialization method of benders
167  *
168  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
169  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
170  *
171  * @pre This method can be called if SCIP is in one of the following stages:
172  * - \ref SCIP_STAGE_INIT
173  * - \ref SCIP_STAGE_PROBLEM
174  */
177  SCIP* scip, /**< SCIP data structure */
178  SCIP_BENDERS* benders, /**< Benders' decomposition */
179  SCIP_DECL_BENDERSINIT ((*bendersinit)) /**< initialize Benders' decomposition */
180  );
181 
182 /** sets deinitialization method of benders
183  *
184  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
185  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
186  *
187  * @pre This method can be called if SCIP is in one of the following stages:
188  * - \ref SCIP_STAGE_INIT
189  * - \ref SCIP_STAGE_PROBLEM
190  */
193  SCIP* scip, /**< SCIP data structure */
194  SCIP_BENDERS* benders, /**< Benders' decomposition */
195  SCIP_DECL_BENDERSEXIT ((*bendersexit)) /**< deinitialize Benders' decomposition */
196  );
197 
198 /** sets presolving initialization method of benders
199  *
200  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
201  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
202  *
203  * @pre This method can be called if SCIP is in one of the following stages:
204  * - \ref SCIP_STAGE_INIT
205  * - \ref SCIP_STAGE_PROBLEM
206  */
209  SCIP* scip, /**< SCIP data structure */
210  SCIP_BENDERS* benders, /**< Benders' decomposition */
211  SCIP_DECL_BENDERSINITPRE((*bendersinitpre))/**< presolving initialization method of Benders' decomposition */
212  );
213 
214 /** sets presolving deinitialization method of benders
215  *
216  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
217  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
218  *
219  * @pre This method can be called if SCIP is in one of the following stages:
220  * - \ref SCIP_STAGE_INIT
221  * - \ref SCIP_STAGE_PROBLEM
222  */
225  SCIP* scip, /**< SCIP data structure */
226  SCIP_BENDERS* benders, /**< Benders' decomposition */
227  SCIP_DECL_BENDERSEXITPRE((*bendersexitpre))/**< presolving deinitialization method of Benders' decomposition */
228  );
229 
230 /** sets solving process initialization method of benders
231  *
232  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
233  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
234  *
235  * @pre This method can be called if SCIP is in one of the following stages:
236  * - \ref SCIP_STAGE_INIT
237  * - \ref SCIP_STAGE_PROBLEM
238  */
241  SCIP* scip, /**< SCIP data structure */
242  SCIP_BENDERS* benders, /**< Benders' decomposition */
243  SCIP_DECL_BENDERSINITSOL((*bendersinitsol))/**< solving process initialization method of Benders' decomposition */
244  );
245 
246 /** sets solving process deinitialization method of benders
247  *
248  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
249  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
250  *
251  * @pre This method can be called if SCIP is in one of the following stages:
252  * - \ref SCIP_STAGE_INIT
253  * - \ref SCIP_STAGE_PROBLEM
254  */
257  SCIP* scip, /**< SCIP data structure */
258  SCIP_BENDERS* benders, /**< Benders' decomposition */
259  SCIP_DECL_BENDERSEXITSOL((*bendersexitsol))/**< solving process deinitialization method of Benders' decomposition */
260  );
261 
262 /** sets the method called prior to solving the subproblems for benders
263  *
264  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
265  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
266  *
267  * @pre This method can be called if SCIP is in one of the following stages:
268  * - \ref SCIP_STAGE_INIT
269  * - \ref SCIP_STAGE_PROBLEM
270  */
273  SCIP* scip, /**< SCIP data structure */
274  SCIP_BENDERS* benders, /**< Benders' decomposition */
275  SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve))/**< method called prior to solving the subproblems */
276  );
277 
278 /** sets the subproblem solving and freeing methods for Benders' decomposition
279  *
280  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
281  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
282  *
283  * @pre This method can be called if SCIP is in one of the following stages:
284  * - \ref SCIP_STAGE_INIT
285  * - \ref SCIP_STAGE_PROBLEM
286  */
289  SCIP* scip, /**< SCIP data structure */
290  SCIP_BENDERS* benders, /**< Benders' decomposition */
291  SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)),/**< the solving method for convex Benders' decomposition subproblems */
292  SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)),/**< solving method for a Benders' decomposition subproblem */
293  SCIP_DECL_BENDERSFREESUB((*bendersfreesub))/**< the subproblem freeing method for Benders' decomposition */
294  );
295 
296 /** sets the post solving methods for benders
297  *
298  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
299  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
300  *
301  * @pre This method can be called if SCIP is in one of the following stages:
302  * - \ref SCIP_STAGE_INIT
303  * - \ref SCIP_STAGE_PROBLEM
304  */
307  SCIP* scip, /**< SCIP data structure */
308  SCIP_BENDERS* benders, /**< Benders' decomposition */
309  SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve))/**< solving process deinitialization method of Benders' decomposition */
310  );
311 
312 /** returns the Benders' decomposition of the given name, or NULL if not existing */
315  SCIP* scip, /**< SCIP data structure */
316  const char* name /**< name of Benders' decomposition */
317  );
318 
319 /** returns the array of currently available Benders' decomposition; active Benders' decomposition are in the first
320  * slots of the array
321  */
324  SCIP* scip /**< SCIP data structure */
325  );
326 
327 /** returns the number of currently available Benders' decomposition */
329 int SCIPgetNBenders(
330  SCIP* scip /**< SCIP data structure */
331  );
332 
333 /** returns the number of currently active Benders' decomposition */
336  SCIP* scip /**< SCIP data structure */
337  );
338 
339 /** activates the Benders' decomposition to be used for the current problem
340  *
341  * This method should be called during the problem creation stage for all pricers that are necessary to solve
342  * the problem model.
343  *
344  * @note The Benders' decompositions are automatically deactivated when the problem is freed.
345  *
346  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
347  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
348  *
349  * @pre This method can be called if SCIP is in one of the following stages:
350  * - \ref SCIP_STAGE_PROBLEM
351  */
354  SCIP* scip, /**< SCIP data structure */
355  SCIP_BENDERS* benders, /**< the Benders' decomposition structure */
356  int nsubproblems /**< the number of subproblems in the Benders' decomposition */
357  );
358 
359 /** deactivates the Benders' decomposition
360  *
361  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
362  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
363  *
364  * @pre This method can be called if SCIP is in one of the following stages:
365  * - \ref SCIP_STAGE_PROBLEM
366  * - \ref SCIP_STAGE_EXITSOLVE
367  */
370  SCIP* scip, /**< SCIP data structure */
371  SCIP_BENDERS* benders /**< the Benders' decomposition structure */
372  );
373 
374 /** sets the priority of a Benders' decomposition */
377  SCIP* scip, /**< SCIP data structure */
378  SCIP_BENDERS* benders, /**< Benders' decomposition */
379  int priority /**< new priority of the Benders' decomposition */
380  );
381 
382 /** calls the exec method of Benders' decomposition to solve the subproblems
383  *
384  * The checkint flag indicates whether integer feasibility can be assumed. If it is not assumed, i.e. checkint ==
385  * FALSE, then only the convex relaxations of the subproblems are solved. If integer feasibility is assumed, i.e.
386  * checkint == TRUE, then the convex relaxations and the full CIP are solved to generate Benders' cuts and check
387  * solution feasibility.
388  *
389  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
390  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
391  *
392  * @pre This method can be called if SCIP is in one of the following stages:
393  * - \ref SCIP_STAGE_INITPRESOLVE
394  * - \ref SCIP_STAGE_PRESOLVING
395  * - \ref SCIP_STAGE_EXITPRESOLVE
396  * - \ref SCIP_STAGE_PRESOLVED
397  * - \ref SCIP_STAGE_INITSOLVE
398  * - \ref SCIP_STAGE_SOLVING
399  * - \ref SCIP_STAGE_SOLVED
400  */
403  SCIP* scip, /**< SCIP data structure */
404  SCIP_BENDERS* benders, /**< Benders' decomposition */
405  SCIP_SOL* sol, /**< primal CIP solution, can be NULL */
406  SCIP_RESULT* result, /**< result of the pricing process */
407  SCIP_Bool* infeasible, /**< is the master problem infeasible with respect to the Benders' cuts? */
408  SCIP_Bool* auxviol, /**< set to TRUE only if the solution is feasible but the aux vars are violated */
409  SCIP_BENDERSENFOTYPE type, /**< the type of solution being enforced */
410  SCIP_Bool checkint /**< should the integer solution be checked by the subproblems */
411  );
412 
413 /** returns the master problem variable for the given subproblem variable
414  *
415  * This function is used as part of the cut generation process.
416  *
417  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
418  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
419  *
420  * @pre This method can be called if SCIP is in one of the following stages:
421  * - \ref SCIP_STAGE_INITPRESOLVE
422  * - \ref SCIP_STAGE_PRESOLVING
423  * - \ref SCIP_STAGE_EXITPRESOLVE
424  * - \ref SCIP_STAGE_PRESOLVED
425  * - \ref SCIP_STAGE_INITSOLVE
426  * - \ref SCIP_STAGE_SOLVING
427  * - \ref SCIP_STAGE_SOLVED
428  */
431  SCIP* scip, /**< SCIP data structure */
432  SCIP_BENDERS* benders, /**< Benders' decomposition */
433  SCIP_VAR* var, /**< the subproblem variable */
434  SCIP_VAR** mappedvar /**< pointer to store the master variable that var is mapped to */
435  );
436 
437 /** returns the subproblem problem variable for the given master variable
438  *
439  * This function is used as part of the cut generation process.
440  *
441  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
442  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
443  *
444  * @pre This method can be called if SCIP is in one of the following stages:
445  * - \ref SCIP_STAGE_INITPRESOLVE
446  * - \ref SCIP_STAGE_PRESOLVING
447  * - \ref SCIP_STAGE_EXITPRESOLVE
448  * - \ref SCIP_STAGE_PRESOLVED
449  * - \ref SCIP_STAGE_INITSOLVE
450  * - \ref SCIP_STAGE_SOLVING
451  * - \ref SCIP_STAGE_SOLVED
452  */
455  SCIP* scip, /**< SCIP data structure */
456  SCIP_BENDERS* benders, /**< Benders' decomposition */
457  SCIP_VAR* var, /**< the master variable */
458  SCIP_VAR** mappedvar, /**< pointer to store the subproblem variable that var is mapped to */
459  int probnumber /**< the subproblem number */
460  );
461 
462 /** returns the number of subproblems that are stored in the given Benders' decomposition
463  *
464  * @return the number of subproblems in the Benders' decomposition
465  */
468  SCIP* scip, /**< SCIP data structure */
469  SCIP_BENDERS* benders /**< Benders' decomposition */
470  );
471 
472 /** registers the Benders' decomposition subproblem with the Benders' decomposition struct.
473  *
474  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
475  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
476  *
477  * @pre This method can be called if SCIP is in one of the following stages:
478  * - \ref SCIP_STAGE_INIT
479  * - \ref SCIP_STAGE_PROBLEM
480  */
483  SCIP* scip, /**< SCIP data structure */
484  SCIP_BENDERS* benders, /**< Benders' decomposition */
485  SCIP* subproblem /**< Benders' decomposition subproblem */
486  );
487 
488 /** calls the generic subproblem setup method for a Benders' decomposition subproblem
489  *
490  * This is called if the user requires to solve the Benders' decomposition subproblem separately from the main Benders'
491  * solving loop. This could be in the case of enhancement techniques.
492  *
493  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
494  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
495  *
496  * @pre This method can be called if SCIP is in one of the following stages:
497  * - \ref SCIP_STAGE_INITPRESOLVE
498  * - \ref SCIP_STAGE_PRESOLVING
499  * - \ref SCIP_STAGE_EXITPRESOLVE
500  * - \ref SCIP_STAGE_PRESOLVED
501  * - \ref SCIP_STAGE_INITSOLVE
502  * - \ref SCIP_STAGE_SOLVING
503  * - \ref SCIP_STAGE_SOLVED
504  */
507  SCIP* scip, /**< SCIP data structure */
508  SCIP_BENDERS* benders, /**< the Benders' decomposition data structure */
509  SCIP_SOL* sol, /**< primal solution used to setup tht problem, NULL for LP solution */
510  int probnumber /**< the subproblem number */
511  );
512 
513 /** calls the solving method for a single Benders' decomposition subproblem
514  *
515  * The method either calls the users solve subproblem method or calls the generic method. In the case of the generic
516  * method, the user must set up the subproblem prior to calling this method.
517  *
518  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
519  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
520  *
521  * @pre This method can be called if SCIP is in one of the following stages:
522  * - \ref SCIP_STAGE_INITPRESOLVE
523  * - \ref SCIP_STAGE_PRESOLVING
524  * - \ref SCIP_STAGE_EXITPRESOLVE
525  * - \ref SCIP_STAGE_PRESOLVED
526  * - \ref SCIP_STAGE_INITSOLVE
527  * - \ref SCIP_STAGE_SOLVING
528  * - \ref SCIP_STAGE_SOLVED
529  */
532  SCIP* scip, /**< SCIP data structure */
533  SCIP_BENDERS* benders, /**< Benders' decomposition */
534  SCIP_SOL* sol, /**< primal CIP solution, can be NULL for the current LP/Pseudo solution */
535  int probnumber, /**< the subproblem number */
536  SCIP_Bool* infeasible, /**< returns whether the current subproblem is infeasible */
537  SCIP_BENDERSENFOTYPE type, /**< the enforcement type calling this function */
538  SCIP_Bool solvecip, /**< directly solve the CIP subproblem */
539  SCIP_Real* objective /**< the objective function value of the subproblem, can be NULL */
540  );
541 
542 /** frees the subproblem after calling the solve subproblem method
543  *
544  * This will either call the user defined free
545  * subproblem callback for Benders' decomposition or the default freeing methods. In the default case, if the
546  * subproblem is an LP, then SCIPendProbing is called. If the subproblem is a MIP, then SCIPfreeTransform is called.
547  *
548  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
549  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
550  *
551  * @pre This method can be called if SCIP is in one of the following stages:
552  * - \ref SCIP_STAGE_INITPRESOLVE
553  * - \ref SCIP_STAGE_PRESOLVING
554  * - \ref SCIP_STAGE_EXITPRESOLVE
555  * - \ref SCIP_STAGE_PRESOLVED
556  * - \ref SCIP_STAGE_INITSOLVE
557  * - \ref SCIP_STAGE_SOLVING
558  * - \ref SCIP_STAGE_SOLVED
559  * - \ref SCIP_STAGE_EXITSOLVE
560  * - \ref SCIP_STAGE_FREETRANS
561  */
564  SCIP* scip, /**< SCIP data structure */
565  SCIP_BENDERS* benders, /**< Benders' decomposition */
566  int probnumber /**< the subproblem number */
567  );
568 
569 /** checks the optimality of a Benders' decomposition subproblem by comparing the objective function value against the
570  * value of the corresponding auxiliary variable
571  *
572  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
573  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
574  *
575  * @pre This method can be called if SCIP is in one of the following stages:
576  * - \ref SCIP_STAGE_PRESOLVING
577  * - \ref SCIP_STAGE_SOLVING
578  * - \ref SCIP_STAGE_SOLVED
579  *
580  * @pre This method can be called if requested subproblem is in one of the following stages:
581  * - \ref SCIP_STAGE_SOLVING
582  * - \ref SCIP_STAGE_SOLVED
583  */
586  SCIP* scip, /**< SCIP data structure */
587  SCIP_BENDERS* benders, /**< the benders' decomposition structure */
588  SCIP_SOL* sol, /**< primal CIP solution, can be NULL for the current LP solution */
589  int probnumber, /**< the number of the pricing problem */
590  SCIP_Bool* optimal /**< flag to indicate whether the current subproblem is optimal for the master */
591  );
592 
593 /** returns the value of the auxiliary variable for a given subproblem */
596  SCIP* scip, /**< SCIP data structure */
597  SCIP_BENDERS* benders, /**< the benders' decomposition structure */
598  SCIP_SOL* sol, /**< primal CIP solution, can be NULL for the current LP solution */
599  int probnumber /**< the number of the pricing problem */
600  );
601 
602 /** solves an independent subproblem to identify its lower bound and updates the lower bound of the corresponding
603  * auxiliary variable
604  *
605  * @pre This method can be called if SCIP is in one of the following stages:
606  * - \ref SCIP_STAGE_INITPRESOLVE
607  * - \ref SCIP_STAGE_PRESOLVING
608  * - \ref SCIP_STAGE_EXITPRESOLVE
609  * - \ref SCIP_STAGE_PRESOLVED
610  * - \ref SCIP_STAGE_INITSOLVE
611  * - \ref SCIP_STAGE_SOLVING
612  *
613  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
614  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
615  */
617  SCIP* scip, /**< the SCIP data structure */
618  SCIP_BENDERS* benders, /**< Benders' decomposition */
619  int probnumber, /**< the subproblem to be evaluated */
620  SCIP_Real* lowerbound, /**< the lowerbound for the subproblem */
621  SCIP_Bool* infeasible /**< was the subproblem found to be infeasible? */
622  );
623 
624 /** merges a subproblem into the master problem.
625  *
626  * This process just adds a copy of the subproblem variables and constraints to the master problem, but keeps the
627  * subproblem stored in the Benders' decomposition data structure. The reason for keeping the subproblem available is
628  * for when it is queried for solutions after the problem is solved.
629  *
630  * Once the subproblem is merged into the master problem, then the subproblem is flagged as disabled. This means that
631  * it will not be solved in the subsequent subproblem solving loops.
632  *
633  * The associated auxiliary variables are kept in the master problem. The objective function of the merged subproblem
634  * is added as an underestimator constraint.
635  *
636  * @pre This method can be called if SCIP is in one of the following stages:
637  * - \ref SCIP_STAGE_INITPRESOLVE
638  * - \ref SCIP_STAGE_PRESOLVING
639  * - \ref SCIP_STAGE_EXITPRESOLVE
640  * - \ref SCIP_STAGE_PRESOLVED
641  * - \ref SCIP_STAGE_INITSOLVE
642  * - \ref SCIP_STAGE_SOLVING
643  *
644  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
645  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
646  */
649  SCIP* scip, /**< the SCIP data structure */
650  SCIP_BENDERS* benders, /**< Benders' decomposition */
651  SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of subproblem variables corresponding
652  * to the newly created master variables, or NULL */
653  SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of subproblem constraints to the
654  corresponding newly created constraints, or NULL */
655  int probnumber /**< the number of the subproblem that will be merged into the master problem*/
656  );
657 
658 /* @} */
659 
660 /**@addtogroup PublicBenderscutsMethods
661  *
662  * @{
663  */
664 
665 /** creates a Benders' cut algorithms and includes it in the associated Benders' decomposition
666  *
667  * This should be called from the SCIPincludeBendersXyz for the associated Benders' decomposition. It is only possible
668  * to include a Benders' cut algorithm if a Benders' decomposition has already been included
669  * This should be done during the problem creation stage.
670  *
671  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
672  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
673  *
674  * @pre This method can be called if SCIP is in one of the following stages:
675  * - \ref SCIP_STAGE_INIT
676  * - \ref SCIP_STAGE_PROBLEM
677  *
678  * @note method has all Benders' decomposition callbacks as arguments and is thus changed every time a new callback is
679  * added in future releases; consider using SCIPincludeBendersBasic() and setter functions
680  * if you seek for a method which is less likely to change in future releases
681  */
684  SCIP* scip, /**< SCIP data structure */
685  SCIP_BENDERS* benders, /**< Benders' decomposition */
686  const char* name, /**< name of Benders' decomposition cuts */
687  const char* desc, /**< description of Benders' decomposition cuts */
688  int priority, /**< priority of the Benders' decomposition cuts */
689  SCIP_Bool islpcut, /**< indicates whether the cut is generated from the LP solution */
690  SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy)),/**< copy method of Benders' decomposition cuts or NULL if you don't want to copy your plugin into sub-SCIPs */
691  SCIP_DECL_BENDERSCUTFREE((*benderscutfree)),/**< destructor of Benders' decomposition cuts */
692  SCIP_DECL_BENDERSCUTINIT((*benderscutinit)),/**< initialize Benders' decomposition cuts */
693  SCIP_DECL_BENDERSCUTEXIT((*benderscutexit)),/**< deinitialize Benders' decomposition cuts */
694  SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol)),/**< solving process initialization method of Benders' decomposition cuts */
695  SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol)),/**< solving process deinitialization method of Benders' decomposition cuts */
696  SCIP_DECL_BENDERSCUTEXEC((*benderscutexec)),/**< execution method of Benders' decomposition cuts */
697  SCIP_BENDERSCUTDATA* benderscutdata /**< Benders' decomposition cuts data */
698  );
699 
700 /** creates a Benders' cut and includes it an associated Benders' decomposition with all non-fundamental callbacks set to NULL
701  *
702  * If needed, the non-fundamental callbacks can be added afterwards via setter functions SCIPsetBenderscutCopy(),
703  * SCIPsetBenderscutFree(), SCIPsetBenderscutInit(), SCIPsetBenderscutExit(), SCIPsetBenderscutInitsol(),
704  * SCIPsetBenderscutExitsol().
705  *
706  * This should be done during the problem creation stage.
707  *
708  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
709  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
710  *
711  * @pre This method can be called if SCIP is in one of the following stages:
712  * - \ref SCIP_STAGE_INIT
713  * - \ref SCIP_STAGE_PROBLEM
714  *
715  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeBenders() instead
716  */
719  SCIP* scip, /**< SCIP data structure */
720  SCIP_BENDERS* benders, /**< Benders' decomposition */
721  SCIP_BENDERSCUT** benderscutptr, /**< reference to a Benders' decomposition cut, or NULL */
722  const char* name, /**< name of Benders' decomposition */
723  const char* desc, /**< description of Benders' decomposition */
724  int priority, /**< priority of the Benders' decomposition */
725  SCIP_Bool islpcut, /**< indicates whether the cut is generated from the LP solution */
726  SCIP_DECL_BENDERSCUTEXEC((*benderscutexec)),/**< the execution method of the Benders' cut algorithm */
727  SCIP_BENDERSCUTDATA* benderscutdata /**< Benders' cut data */
728  );
729 
730 /** sets copy method of Benders' decomposition cut
731  *
732  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
733  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
734  *
735  * @pre This method can be called if SCIP is in one of the following stages:
736  * - \ref SCIP_STAGE_INIT
737  * - \ref SCIP_STAGE_PROBLEM
738  */
741  SCIP* scip, /**< SCIP data structure */
742  SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
743  SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy))/**< copy method of benderscut or NULL if you don't want to copy your plugin into sub-SCIPs */
744  );
745 
746 /** sets destructor method of benderscut
747  *
748  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
749  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
750  *
751  * @pre This method can be called if SCIP is in one of the following stages:
752  * - \ref SCIP_STAGE_INIT
753  * - \ref SCIP_STAGE_PROBLEM
754  */
757  SCIP* scip, /**< SCIP data structure */
758  SCIP_BENDERSCUT* benderscut, /**< benderscut */
759  SCIP_DECL_BENDERSCUTFREE((*benderscutfree))/**< destructor of benderscut */
760  );
761 
762 /** sets initialization method of benderscut
763  *
764  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
765  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
766  *
767  * @pre This method can be called if SCIP is in one of the following stages:
768  * - \ref SCIP_STAGE_INIT
769  * - \ref SCIP_STAGE_PROBLEM
770  */
773  SCIP* scip, /**< SCIP data structure */
774  SCIP_BENDERSCUT* benderscut, /**< benderscut */
775  SCIP_DECL_BENDERSCUTINIT((*benderscutinit))/**< initialize benderscut */
776  );
777 
778 /** sets deinitialization method of benderscut
779  *
780  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
781  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
782  *
783  * @pre This method can be called if SCIP is in one of the following stages:
784  * - \ref SCIP_STAGE_INIT
785  * - \ref SCIP_STAGE_PROBLEM
786  */
789  SCIP* scip, /**< SCIP data structure */
790  SCIP_BENDERSCUT* benderscut, /**< benderscut */
791  SCIP_DECL_BENDERSCUTEXIT((*benderscutexit))/**< deinitialize benderscut */
792  );
793 
794 /** sets solving process initialization method of benderscut
795  *
796  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
797  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
798  *
799  * @pre This method can be called if SCIP is in one of the following stages:
800  * - \ref SCIP_STAGE_INIT
801  * - \ref SCIP_STAGE_PROBLEM
802  */
805  SCIP* scip, /**< SCIP data structure */
806  SCIP_BENDERSCUT* benderscut, /**< benderscut */
807  SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol))/**< solving process initialization method of benderscut */
808  );
809 
810 /** sets solving process deinitialization method of benderscut
811  *
812  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
813  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
814  *
815  * @pre This method can be called if SCIP is in one of the following stages:
816  * - \ref SCIP_STAGE_INIT
817  * - \ref SCIP_STAGE_PROBLEM
818  */
821  SCIP* scip, /**< SCIP data structure */
822  SCIP_BENDERSCUT* benderscut, /**< benderscut */
823  SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol))/**< solving process deinitialization method of benderscut */
824  );
825 
826 /** sets the priority of a Benders' decomposition cut algorithm
827  *
828  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
829  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
830  *
831  * @pre This method can be called if SCIP is in one of the following stages:
832  * - \ref SCIP_STAGE_INIT
833  * - \ref SCIP_STAGE_PROBLEM
834  */
837  SCIP* scip, /**< SCIP data structure */
838  SCIP_BENDERSCUT* benderscut, /**< benderscut */
839  int priority /**< new priority of the Benders' decomposition */
840  );
841 
842 /** adds the generated cuts to the Benders' cut storage
843  *
844  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
845  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
846  *
847  * @pre This method can be called if SCIP is in one of the following stages:
848  * - \ref SCIP_STAGE_INITPRESOLVE
849  * - \ref SCIP_STAGE_PRESOLVING
850  * - \ref SCIP_STAGE_EXITPRESOLVE
851  * - \ref SCIP_STAGE_PRESOLVED
852  * - \ref SCIP_STAGE_INITSOLVE
853  * - \ref SCIP_STAGE_SOLVING
854  */
857  SCIP* scip, /**< the SCIP data structure */
858  SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cuts */
859  SCIP_VAR** vars, /**< the variables that have non-zero coefficients in the cut */
860  SCIP_Real* vals, /**< the coefficients of the variables in the cut */
861  SCIP_Real lhs, /**< the left hand side of the cut */
862  SCIP_Real rhs, /**< the right hand side of the cut */
863  int nvars /**< the number of variables with non-zero coefficients in the cut */
864  );
865 
866 /* @} */
867 
868 #ifdef __cplusplus
869 }
870 #endif
871 
872 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
#define SCIP_DECL_BENDERSCREATESUB(x)
Definition: type_benders.h:170
SCIP_EXPORT SCIP_RETCODE SCIPsetBenderscutExitsol(SCIP *scip, SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol)))
SCIP_EXPORT SCIP_RETCODE SCIPgetBendersSubproblemVar(SCIP *scip, SCIP_BENDERS *benders, SCIP_VAR *var, SCIP_VAR **mappedvar, int probnumber)
Definition: scip_benders.c:658
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersPresubsolve(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)))
Definition: scip_benders.c:375
type definitions for miscellaneous datastructures
struct SCIP_BenderscutData SCIP_BENDERSCUTDATA
#define SCIP_DECL_BENDERSINITSOL(x)
Definition: type_benders.h:130
#define SCIP_DECL_BENDERSFREE(x)
Definition: type_benders.h:82
SCIP_EXPORT SCIP_BENDERS ** SCIPgetBenders(SCIP *scip)
Definition: scip_benders.c:470
#define SCIP_DECL_BENDERSINITPRE(x)
Definition: type_benders.h:111
#define SCIP_DECL_BENDERSCUTFREE(x)
#define SCIP_EXPORT
Definition: def.h:98
#define SCIP_DECL_BENDERSGETVAR(x)
Definition: type_benders.h:339
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersPostsolve(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)))
Definition: scip_benders.c:439
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersFree(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSFREE((*bendersfree)))
Definition: scip_benders.c:207
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersSolveAndFreesub(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)), SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)), SCIP_DECL_BENDERSFREESUB((*bendersfreesub)))
Definition: scip_benders.c:399
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
enum SCIP_BendersEnfoType SCIP_BENDERSENFOTYPE
Definition: type_benders.h:42
SCIP_EXPORT SCIP_RETCODE SCIPincludeBenders(SCIP *scip, 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: scip_benders.c:62
#define SCIP_DECL_BENDERSINIT(x)
Definition: type_benders.h:91
type definitions for return codes for SCIP methods
#define SCIP_DECL_BENDERSCUTEXEC(x)
SCIP_EXPORT SCIP_RETCODE SCIPcheckBendersSubproblemOptimality(SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_Bool *optimal)
Definition: scip_benders.c:853
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInitsol(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSINITSOL((*bendersinitsol)))
Definition: scip_benders.c:327
SCIP_EXPORT SCIP_RETCODE SCIPdeactivateBenders(SCIP *scip, SCIP_BENDERS *benders)
Definition: scip_benders.c:539
SCIP_EXPORT SCIP_Real SCIPgetBendersAuxiliaryVarVal(SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber)
Definition: scip_benders.c:879
#define SCIP_DECL_BENDERSCUTCOPY(x)
SCIP_EXPORT void SCIPsetBendersPriority(SCIP *scip, SCIP_BENDERS *benders, int priority)
Definition: scip_benders.c:552
#define SCIP_DECL_BENDERSCUTINIT(x)
SCIP_EXPORT int SCIPgetBendersNSubproblems(SCIP *scip, SCIP_BENDERS *benders)
Definition: scip_benders.c:684
type definitions for LP management
SCIP_EXPORT SCIP_RETCODE SCIPgetBendersMasterVar(SCIP *scip, SCIP_BENDERS *benders, SCIP_VAR *var, SCIP_VAR **mappedvar)
Definition: scip_benders.c:622
SCIP_EXPORT SCIP_BENDERS * SCIPfindBenders(SCIP *scip, const char *name)
Definition: scip_benders.c:455
SCIP_EXPORT SCIP_RETCODE SCIPsetBenderscutExit(SCIP *scip, SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTEXIT((*benderscutexit)))
SCIP_RETCODE SCIPcomputeBendersSubproblemLowerbound(SCIP *scip, SCIP_BENDERS *benders, int probnumber, SCIP_Real *lowerbound, SCIP_Bool *infeasible)
Definition: scip_benders.c:907
#define SCIP_DECL_BENDERSFREESUB(x)
Definition: type_benders.h:323
SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscut(SCIP *scip, SCIP_BENDERS *benders, const char *name, const char *desc, int priority, SCIP_Bool islpcut, SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy)), SCIP_DECL_BENDERSCUTFREE((*benderscutfree)), SCIP_DECL_BENDERSCUTINIT((*benderscutinit)), SCIP_DECL_BENDERSCUTEXIT((*benderscutexit)), SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol)), SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol)), SCIP_DECL_BENDERSCUTEXEC((*benderscutexec)), SCIP_BENDERSCUTDATA *benderscutdata)
Definition: scip_benders.c:985
#define SCIP_DECL_BENDERSEXIT(x)
Definition: type_benders.h:100
SCIP_EXPORT SCIP_RETCODE SCIPsolveBendersSubproblems(SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, SCIP_RESULT *result, SCIP_Bool *infeasible, SCIP_Bool *auxviol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint)
Definition: scip_benders.c:584
#define SCIP_DECL_BENDERSSOLVESUB(x)
Definition: type_benders.h:265
type definitions for SCIP&#39;s main datastructure
SCIP_EXPORT SCIP_RETCODE SCIPmergeBendersSubproblemIntoMaster(SCIP *scip, SCIP_BENDERS *benders, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, int probnumber)
Definition: scip_benders.c:947
SCIP_EXPORT SCIP_RETCODE SCIPsetupBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber)
Definition: scip_benders.c:738
#define SCIP_DECL_BENDERSCUTEXIT(x)
struct SCIP_BendersData SCIP_BENDERSDATA
Definition: type_benders.h:63
SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutBasic(SCIP *scip, SCIP_BENDERS *benders, SCIP_BENDERSCUT **benderscutptr, const char *name, const char *desc, int priority, SCIP_Bool islpcut, SCIP_DECL_BENDERSCUTEXEC((*benderscutexec)), SCIP_BENDERSCUTDATA *benderscutdata)
SCIP_EXPORT int SCIPgetNBenders(SCIP *scip)
Definition: scip_benders.c:483
#define SCIP_DECL_BENDERSSOLVESUBCONVEX(x)
Definition: type_benders.h:232
type definitions for problem variables
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersCopy(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSCOPY((*benderscopy)))
Definition: scip_benders.c:183
#define SCIP_DECL_BENDERSCOPY(x)
Definition: type_benders.h:74
SCIP_EXPORT SCIP_RETCODE SCIPsetBenderscutPriority(SCIP *scip, SCIP_BENDERSCUT *benderscut, int priority)
#define SCIP_Bool
Definition: def.h:70
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInitpre(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSINITPRE((*bendersinitpre)))
Definition: scip_benders.c:279
SCIP_EXPORT SCIP_RETCODE SCIPsetBenderscutCopy(SCIP *scip, SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy)))
SCIP_EXPORT int SCIPgetNActiveBenders(SCIP *scip)
Definition: scip_benders.c:494
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInit(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSINIT((*bendersinit)))
Definition: scip_benders.c:231
type definitions for Benders&#39; decomposition methods
type definitions for storing primal CIP solutions
SCIP_EXPORT SCIP_RETCODE SCIPsetBenderscutInitsol(SCIP *scip, SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol)))
type definitions for Benders&#39; decomposition cut
SCIP_EXPORT SCIP_RETCODE SCIPincludeBendersBasic(SCIP *scip, SCIP_BENDERS **bendersptr, const char *name, const char *desc, int priority, SCIP_Bool cutlp, SCIP_Bool cutpseudo, SCIP_Bool cutrelax, SCIP_Bool shareauxvars, SCIP_DECL_BENDERSGETVAR((*bendersgetvar)), SCIP_DECL_BENDERSCREATESUB((*benderscreatesub)), SCIP_BENDERSDATA *bendersdata)
Definition: scip_benders.c:137
SCIP_EXPORT SCIP_RETCODE SCIPstoreBenderscutCut(SCIP *scip, SCIP_BENDERSCUT *benderscut, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, int nvars)
SCIP_EXPORT SCIP_RETCODE SCIPsetBenderscutFree(SCIP *scip, SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTFREE((*benderscutfree)))
SCIP_EXPORT SCIP_RETCODE SCIPsolveBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_Bool *infeasible, SCIP_BENDERSENFOTYPE type, SCIP_Bool solvecip, SCIP_Real *objective)
Definition: scip_benders.c:775
SCIP_EXPORT SCIP_RETCODE SCIPfreeBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, int probnumber)
Definition: scip_benders.c:819
#define SCIP_DECL_BENDERSEXITSOL(x)
Definition: type_benders.h:141
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExitpre(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)))
Definition: scip_benders.c:303
#define SCIP_Real
Definition: def.h:164
result codes for SCIP callback methods
#define SCIP_DECL_BENDERSCUTEXITSOL(x)
SCIP_EXPORT SCIP_RETCODE SCIPaddBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, SCIP *subproblem)
Definition: scip_benders.c:703
SCIP_EXPORT SCIP_RETCODE SCIPsetBenderscutInit(SCIP *scip, SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTINIT((*benderscutinit)))
#define SCIP_DECL_BENDERSPOSTSOLVE(x)
Definition: type_benders.h:301
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExitsol(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)))
Definition: scip_benders.c:351
#define SCIP_DECL_BENDERSEXITPRE(x)
Definition: type_benders.h:119
SCIP_EXPORT SCIP_RETCODE SCIPactivateBenders(SCIP *scip, SCIP_BENDERS *benders, int nsubproblems)
Definition: scip_benders.c:517
common defines and data types used in all packages of SCIP
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExit(SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXIT((*bendersexit)))
Definition: scip_benders.c:255
#define SCIP_DECL_BENDERSCUTINITSOL(x)
type definitions for constraints and constraint handlers
#define SCIP_DECL_BENDERSPRESUBSOLVE(x)
Definition: type_benders.h:192