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