Scippy

SCIP

Solving Constraint Integer Programs

type_benderscut.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 2002-2022 Zuse Institute Berlin */
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 type_benderscut.h
26  * @ingroup TYPEDEFINITIONS
27  * @brief type definitions for Benders' decomposition cut
28  * @author Stephen J. Maher
29  *
30  * This file defines the interface for Benders' decomposition cut implemented in C.
31  *
32  */
33 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 #ifndef __SCIP_TYPE_BENDERSCUT_H__
37 #define __SCIP_TYPE_BENDERSCUT_H__
38 
39 #include "scip/def.h"
40 #include "scip/type_scip.h"
41 #include "scip/type_result.h"
42 #include "scip/type_timing.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 typedef struct SCIP_Benderscut SCIP_BENDERSCUT; /**< Benders' decomposition cut */
49 typedef struct SCIP_BenderscutData SCIP_BENDERSCUTDATA; /**< locally defined Benders' decomposition cut data */
50 
51 
52 /** copy method for the Benders' decomposition cut plugins (called when SCIP copies plugins)
53  *
54  * input:
55  * - scip : SCIP main data structure
56  * - benders : the Benders' decomposition structure
57  * - benderscut : the Benders' decomposition cut structure
58  */
59 #define SCIP_DECL_BENDERSCUTCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut)
60 
61 /** destructor of the Benders' decomposition cut to free user data (called when SCIP is exiting)
62  *
63  * input:
64  * - scip : SCIP main data structure
65  * - benderscut : the Benders' decomposition cut structure
66  */
67 #define SCIP_DECL_BENDERSCUTFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_BENDERSCUT* benderscut)
68 
69 /** initialization method of the Benders' decomposition cut (called after problem was transformed)
70  *
71  * input:
72  * - scip : SCIP main data structure
73  * - benderscut : the Benders' decomposition cut structure
74  */
75 #define SCIP_DECL_BENDERSCUTINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_BENDERSCUT* benderscut)
76 
77 /** deinitialization method of the Benders' decomposition cut (called before transformed problem is freed)
78  *
79  * input:
80  * - scip : SCIP main data structure
81  * - benderscut : the Benders' decomposition cut structure
82  */
83 #define SCIP_DECL_BENDERSCUTEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_BENDERSCUT* benderscut)
84 
85 /** solving process initialization method of the Benders' decomposition cut (called when branch and bound process is about to begin)
86  *
87  * This method is called when the presolving was finished and the branch and bound process is about to begin.
88  *
89  * input:
90  * - scip : SCIP main data structure
91  * - benderscut : the Benders' decomposition cut structure
92  */
93 #define SCIP_DECL_BENDERSCUTINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_BENDERSCUT* benderscut)
94 
95 /** solving process deinitialization method of the Benders' decomposition cut (called before branch and bound process data is freed)
96  *
97  * This method is called before the branch and bound process is freed.
98  * The Benders' decomposition cut should use this call to clean up its branch and bound data.
99  *
100  * input:
101  * - scip : SCIP main data structure
102  * - benderscut : the Benders' decomposition cut structure
103  */
104 #define SCIP_DECL_BENDERSCUTEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_BENDERSCUT* benderscut)
105 
106 /** execution method of the Benders' decomposition cut technique
107  *
108  * input:
109  * - scip : SCIP main data structure
110  * - benders : the Benders' decomposition structure
111  * - benderscut : the Benders' cut structure
112  * - sol : the solution that was used for setting up the subproblems
113  * - probnumber : the number of the subproblem from which the cut is generated
114  * - type : the enforcement type that called the subproblem solve
115  * - result : pointer to store the result of the cut algorithm
116  *
117  * possible return values for *result (if more than one applies, the first in the list should be used):
118  * - SCIP_DIDNOTRUN : if the Benders' cut was not run.
119  * - SCIP_DIDNOTFIND : if the Benders' cut was run, but there was an error in generating the cut.
120  * - SCIP_FEASIBLE : if the Benders' decomposition cut algorithm has not generated a constraint or cut.
121  * - SCIP_CONSADDED : an additional constraint for the Benders' decomposition cut was generated
122  * - SCIP_SEPARATED : a cutting plane representing the Benders' decomposition cut was generated
123  */
124 #define SCIP_DECL_BENDERSCUTEXEC(x) SCIP_RETCODE x (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut,\
125  SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result)
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
131 #endif
timing definitions for SCIP
struct SCIP_BenderscutData SCIP_BENDERSCUTDATA
type definitions for SCIP&#39;s main datastructure
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP