Scippy

SCIP

Solving Constraint Integer Programs

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 cutsel.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for cut selectors
19  * @author Felipe Serrano
20  * @author Mark Turner
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_CUTSEL_H__
26 #define __SCIP_CUTSEL_H__
27 
28 
29 #include "scip/def.h"
30 #include "blockmemshell/memory.h"
31 #include "scip/type_retcode.h"
32 #include "scip/type_set.h"
33 #include "scip/pub_cutsel.h"
34 #include "scip/lp.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /** creates a cut selector */
42  SCIP_CUTSEL** cutsel, /**< pointer to store cut selector */
43  SCIP_SET* set, /**< global SCIP settings */
44  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
45  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
46  const char* name, /**< name of cut selector */
47  const char* desc, /**< description of cut selector */
48  int priority, /**< priority of the cut selector in standard mode */
49  SCIP_DECL_CUTSELCOPY ((*cutselcopy)), /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
50  SCIP_DECL_CUTSELFREE ((*cutselfree)), /**< destructor of cut selector */
51  SCIP_DECL_CUTSELINIT ((*cutselinit)), /**< initialize cut selector */
52  SCIP_DECL_CUTSELEXIT ((*cutselexit)), /**< deinitialize cut selector */
53  SCIP_DECL_CUTSELINITSOL((*cutselinitsol)),/**< solving process initialization method of cut selector */
54  SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)),/**< solving process deinitialization method of cut selector */
55  SCIP_DECL_CUTSELSELECT((*cutselselect)), /**< cut selection method */
56  SCIP_CUTSELDATA* cutseldata /**< cut selector data */
57  );
58 
59 /** enables or disables all clocks of @p cutsel, depending on the value of the flag */
61  SCIP_CUTSEL* cutsel, /**< the cut selector for which all clocks should be enabled or disabled */
62  SCIP_Bool enable /**< should the clocks of the cut selector be enabled? */
63  );
64 
65 /** calls cut selectors to select cuts */
67  SCIP_SET* set, /**< global SCIP settings */
68  SCIP_ROW** cuts, /**< array with cuts to select from */
69  int ncuts, /**< length of cuts */
70  int nforcedcuts, /**< number of forced cuts at start of given array */
71  SCIP_Bool root, /**< are we at the root node? */
72  SCIP_Bool initiallp, /**< is the separation storage currently being filled with the initial LP rows? */
73  int maxnselectedcuts, /**< maximum number of cuts to be selected */
74  int* nselectedcuts /**< pointer to return number of selected cuts */
75  );
76 
77 /** copies the given cut selector to a new scip */
79  SCIP_CUTSEL* cutsel, /**< cut selector */
80  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
81  );
82 
83 /** sets copy method of cut selector */
85  SCIP_CUTSEL* cutsel, /**< cut selector */
86  SCIP_DECL_CUTSELCOPY ((*cutselcopy)) /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
87  );
88 
89 /** initializes cut selector */
91  SCIP_CUTSEL* cutsel, /**< cut selector */
92  SCIP_SET* set /**< global SCIP settings */
93  );
94 
95 /** deinitializes cut selector */
97  SCIP_CUTSEL* cutsel, /**< cut selector */
98  SCIP_SET* set /**< global SCIP settings */
99  );
100 
101 /** frees memory of cut selector */
103  SCIP_CUTSEL** cutsel, /**< pointer to cut selector data structure */
104  SCIP_SET* set /**< global SCIP settings */
105  );
106 
107 /** informs cut selector that the branch and bound process is being started */
109  SCIP_CUTSEL* cutsel, /**< cut selector */
110  SCIP_SET* set /**< global SCIP settings */
111  );
112 
113 /** informs cut selector that the branch and bound process is being started */
115  SCIP_CUTSEL* cutsel, /**< cut selector */
116  SCIP_SET* set /**< global SCIP settings */
117  );
118 
119 /** sets destructor method of cut selector */
120 void SCIPcutselSetFree(
121  SCIP_CUTSEL* cutsel, /**< cut selector */
122  SCIP_DECL_CUTSELFREE ((*cutselfree)) /**< destructor of cut selector */
123  );
124 
125 /** sets initialization method of cut selector */
126 void SCIPcutselSetInit(
127  SCIP_CUTSEL* cutsel, /**< cut selector */
128  SCIP_DECL_CUTSELINIT ((*cutselinit)) /**< initialize cut selector */
129  );
130 
131 /** sets deinitialization method of cut selector */
132 void SCIPcutselSetExit(
133  SCIP_CUTSEL* cutsel, /**< cut selector */
134  SCIP_DECL_CUTSELEXIT ((*cutselexit)) /**< deinitialize cut selector */
135  );
136 
137 /** sets solving process initialization method of cut selector */
139  SCIP_CUTSEL* cutsel, /**< cut selector */
140  SCIP_DECL_CUTSELINITSOL ((*cutselinitsol))/**< solving process initialization method of cut selector */
141  );
142 
143 /** sets solving process deinitialization method of cut selector */
145  SCIP_CUTSEL* cutsel, /**< cut selector */
146  SCIP_DECL_CUTSELEXITSOL ((*cutselexitsol))/**< solving process deinitialization method of cut selector */
147  );
148 
149 /** sets priority of cut selector */
151  SCIP_CUTSEL* cutsel, /**< cut selector */
152  SCIP_SET* set, /**< global SCIP settings */
153  int priority /**< new priority of the cut selector */
154  );
155 
156 #ifdef __cplusplus
157 }
158 #endif
159 
160 #endif
SCIP_RETCODE SCIPcutselInitsol(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:361
SCIP_RETCODE SCIPcutselFree(SCIP_CUTSEL **cutsel, SCIP_SET *set)
Definition: cutsel.c:263
SCIP_RETCODE SCIPcutselExitsol(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:385
#define SCIP_DECL_CUTSELINITSOL(x)
Definition: type_cutsel.h:88
struct SCIP_CutselData SCIP_CUTSELDATA
Definition: type_cutsel.h:44
void SCIPcutselSetPriority(SCIP_CUTSEL *cutsel, SCIP_SET *set, int priority)
Definition: cutsel.c:521
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPcutselCreate(SCIP_CUTSEL **cutsel, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELCOPY((*cutselcopy)), SCIP_DECL_CUTSELFREE((*cutselfree)), SCIP_DECL_CUTSELINIT((*cutselinit)), SCIP_DECL_CUTSELEXIT((*cutselexit)), SCIP_DECL_CUTSELINITSOL((*cutselinitsol)), SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)), SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
Definition: cutsel.c:119
type definitions for global SCIP settings
#define SCIP_DECL_CUTSELEXIT(x)
Definition: type_cutsel.h:77
type definitions for return codes for SCIP methods
internal methods for LP management
SCIP_RETCODE SCIPcutselCopyInclude(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:245
#define SCIP_DECL_CUTSELSELECT(x)
Definition: type_cutsel.h:123
void SCIPcutselEnableOrDisableClocks(SCIP_CUTSEL *cutsel, SCIP_Bool enable)
Definition: cutsel.c:440
void SCIPcutselSetCopy(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELCOPY((*cutselcopy)))
Definition: cutsel.c:455
void SCIPcutselSetExitsol(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)))
Definition: cutsel.c:510
SCIP_RETCODE SCIPcutselsSelect(SCIP_SET *set, SCIP_ROW **cuts, int ncuts, int nforcedcuts, SCIP_Bool root, SCIP_Bool initiallp, int maxnselectedcuts, int *nselectedcuts)
Definition: cutsel.c:160
#define SCIP_DECL_CUTSELINIT(x)
Definition: type_cutsel.h:69
SCIP_RETCODE SCIPcutselInit(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:294
#define SCIP_DECL_CUTSELCOPY(x)
Definition: type_cutsel.h:53
#define SCIP_Bool
Definition: def.h:84
SCIP_RETCODE SCIPcutselExit(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:331
void SCIPcutselSetExit(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXIT((*cutselexit)))
Definition: cutsel.c:488
void SCIPcutselSetFree(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELFREE((*cutselfree)))
Definition: cutsel.c:466
void SCIPcutselSetInit(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINIT((*cutselinit)))
Definition: cutsel.c:477
#define SCIP_DECL_CUTSELFREE(x)
Definition: type_cutsel.h:61
void SCIPcutselSetInitsol(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINITSOL((*cutselinitsol)))
Definition: cutsel.c:499
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:430
public methods for cut selectors
#define SCIP_DECL_CUTSELEXITSOL(x)
Definition: type_cutsel.h:99
memory allocation routines