Scippy

SCIP

Solving Constraint Integer Programs

type_cutsel.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-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 type_cutsel.h
26  * @ingroup TYPEDEFINITIONS
27  * @brief type definitions for cut selectors
28  * @author Felipe Serrano
29  * @author Mark Turner
30  */
31 
32 /** @defgroup DEFPLUGINS_CUTSEL Default cut selectors
33  * @ingroup DEFPLUGINS
34  * @brief implementation files (.c files) of the default cut selectors of SCIP
35  */
36 
37 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
38 
39 #ifndef __SCIP_TYPE_CUTSEL_H__
40 #define __SCIP_TYPE_CUTSEL_H__
41 
42 #include "scip/def.h"
43 #include "scip/type_retcode.h"
44 #include "scip/type_scip.h"
45 #include "scip/type_lp.h"
46 #include "scip/type_result.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 typedef struct SCIP_Cutsel SCIP_CUTSEL; /**< cut selector data structure */
53 typedef struct SCIP_CutselData SCIP_CUTSELDATA; /**< cut selector specific data */
54 
55 
56 /** copy method for cut selector plugins (called when SCIP copies plugins)
57  *
58  * input:
59  * - scip : SCIP main data structure
60  * - cutsel : the cut selector itself
61  */
62 #define SCIP_DECL_CUTSELCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_CUTSEL* cutsel)
63 
64 /** destructor of cut selector to free user data (called when SCIP is exiting)
65  *
66  * input:
67  * - scip : SCIP main data structure
68  * - cutsel : the cut selector itself
69  */
70 #define SCIP_DECL_CUTSELFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CUTSEL* cutsel)
71 
72 /** initialization method of cut selector (called after problem was transformed)
73  *
74  * input:
75  * - scip : SCIP main data structure
76  * - cutsel : the cut selector itself
77  */
78 #define SCIP_DECL_CUTSELINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CUTSEL* cutsel)
79 
80 /** deinitialization method of cut selector (called before transformed problem is freed)
81  *
82  * input:
83  * - scip : SCIP main data structure
84  * - cutsel : the cut selector itself
85  */
86 #define SCIP_DECL_CUTSELEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CUTSEL* cutsel)
87 
88 /** solving process initialization method of cut selector (called when branch and bound process is about to begin)
89  *
90  * This method is called when the presolving was finished and the branch and bound process is about to begin.
91  * The cut selector may use this call to initialize its branch and bound specific data.
92  *
93  * input:
94  * - scip : SCIP main data structure
95  * - cutsel : the cut selector itself
96  */
97 #define SCIP_DECL_CUTSELINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CUTSEL* cutsel)
98 
99 /** solving process deinitialization method of cut selector (called before branch and bound process data is freed)
100  *
101  * This method is called before the branch and bound process is freed.
102  * The cut selector should use this call to clean up its branch and bound data.
103  *
104  * input:
105  * - scip : SCIP main data structure
106  * - cutsel : the cut selector itself
107  */
108 #define SCIP_DECL_CUTSELEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CUTSEL* cutsel)
109 
110 /** cut selection method of cut selector
111  *
112  * This method is called to select the cuts to be added to the LP.
113  * Forcedcuts must not be changed, and cuts should only be resorted, with the first nselectedcuts of cuts being chosen.
114  * These nselectededcuts are used in addition to the forcedcuts (do not delete nor modify elements, simply resort).
115  *
116  * input:
117  * - scip : SCIP main data structure
118  * - cutsel : the cut selector itself
119  * - cuts : cutting planes to select from
120  * - ncuts : number of cutting planes to select from (length of cuts)
121  * - forcedcuts : list of cuts that are forced to be applied (i.e they are going to be selected no matter what)
122  * - nforcedcuts : number of forced cuts
123  * - root : are we at the root node?
124  * - maxselectedcuts : maximum number of cuts that can be selected (upper bound for nselectedcuts)
125  * - nselectedcuts : the first nselectedcuts from cuts are selected
126  * - result : pointer to store the result of the cut selection call
127  *
128  * possible return values for *result (if more than one applies, the first in the list should be used):
129  * - SCIP_SUCCESS : the cut selection succeeded
130  * - SCIP_DIDNOTFIND : the cut selection did not find good enough cuts to select
131  */
132 #define SCIP_DECL_CUTSELSELECT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CUTSEL* cutsel, SCIP_ROW** cuts, int ncuts, \
133  SCIP_ROW** forcedcuts, int nforcedcuts, SCIP_Bool root, int maxnselectedcuts, int* nselectedcuts, SCIP_RESULT* result)
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif
struct SCIP_CutselData SCIP_CUTSELDATA
Definition: type_cutsel.h:53
type definitions for return codes for SCIP methods
type definitions for LP management
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