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