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  int maxnselectedcuts, /**< maximum number of cuts to be selected */
73  int* nselectedcuts /**< pointer to return number of selected cuts */
74  );
75 
76 /** copies the given cut selector to a new scip */
78  SCIP_CUTSEL* cutsel, /**< cut selector */
79  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
80  );
81 
82 /** sets copy method of cut selector */
84  SCIP_CUTSEL* cutsel, /**< cut selector */
85  SCIP_DECL_CUTSELCOPY ((*cutselcopy)) /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
86  );
87 
88 /** initializes cut selector */
90  SCIP_CUTSEL* cutsel, /**< cut selector */
91  SCIP_SET* set /**< global SCIP settings */
92  );
93 
94 /** deinitializes cut selector */
96  SCIP_CUTSEL* cutsel, /**< cut selector */
97  SCIP_SET* set /**< global SCIP settings */
98  );
99 
100 /** frees memory of cut selector */
102  SCIP_CUTSEL** cutsel, /**< pointer to cut selector data structure */
103  SCIP_SET* set /**< global SCIP settings */
104  );
105 
106 /** informs cut selector that the branch and bound process is being started */
108  SCIP_CUTSEL* cutsel, /**< cut selector */
109  SCIP_SET* set /**< global SCIP settings */
110  );
111 
112 /** informs cut selector that the branch and bound process is being started */
114  SCIP_CUTSEL* cutsel, /**< cut selector */
115  SCIP_SET* set /**< global SCIP settings */
116  );
117 
118 /** sets destructor method of cut selector */
119 void SCIPcutselSetFree(
120  SCIP_CUTSEL* cutsel, /**< cut selector */
121  SCIP_DECL_CUTSELFREE ((*cutselfree)) /**< destructor of cut selector */
122  );
123 
124 /** sets initialization method of cut selector */
125 void SCIPcutselSetInit(
126  SCIP_CUTSEL* cutsel, /**< cut selector */
127  SCIP_DECL_CUTSELINIT ((*cutselinit)) /**< initialize cut selector */
128  );
129 
130 /** sets deinitialization method of cut selector */
131 void SCIPcutselSetExit(
132  SCIP_CUTSEL* cutsel, /**< cut selector */
133  SCIP_DECL_CUTSELEXIT ((*cutselexit)) /**< deinitialize cut selector */
134  );
135 
136 /** sets solving process initialization method of cut selector */
138  SCIP_CUTSEL* cutsel, /**< cut selector */
139  SCIP_DECL_CUTSELINITSOL ((*cutselinitsol))/**< solving process initialization method of cut selector */
140  );
141 
142 /** sets solving process deinitialization method of cut selector */
144  SCIP_CUTSEL* cutsel, /**< cut selector */
145  SCIP_DECL_CUTSELEXITSOL ((*cutselexitsol))/**< solving process deinitialization method of cut selector */
146  );
147 
148 /** sets priority of cut selector */
150  SCIP_CUTSEL* cutsel, /**< cut selector */
151  SCIP_SET* set, /**< global SCIP settings */
152  int priority /**< new priority of the cut selector */
153  );
154 
155 #ifdef __cplusplus
156 }
157 #endif
158 
159 #endif
SCIP_RETCODE SCIPcutselInitsol(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:323
SCIP_RETCODE SCIPcutselFree(SCIP_CUTSEL **cutsel, SCIP_SET *set)
Definition: cutsel.c:225
SCIP_RETCODE SCIPcutselExitsol(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:347
#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:483
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:111
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:207
#define SCIP_DECL_CUTSELSELECT(x)
Definition: type_cutsel.h:123
void SCIPcutselEnableOrDisableClocks(SCIP_CUTSEL *cutsel, SCIP_Bool enable)
Definition: cutsel.c:402
void SCIPcutselSetCopy(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELCOPY((*cutselcopy)))
Definition: cutsel.c:417
void SCIPcutselSetExitsol(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)))
Definition: cutsel.c:472
#define SCIP_DECL_CUTSELINIT(x)
Definition: type_cutsel.h:69
SCIP_RETCODE SCIPcutselInit(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:256
#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:293
void SCIPcutselSetExit(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXIT((*cutselexit)))
Definition: cutsel.c:450
void SCIPcutselSetFree(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELFREE((*cutselfree)))
Definition: cutsel.c:428
void SCIPcutselSetInit(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINIT((*cutselinit)))
Definition: cutsel.c:439
#define SCIP_DECL_CUTSELFREE(x)
Definition: type_cutsel.h:61
void SCIPcutselSetInitsol(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINITSOL((*cutselinitsol)))
Definition: cutsel.c:461
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
SCIP_RETCODE SCIPcutselsSelect(SCIP_SET *set, SCIP_ROW **cuts, int ncuts, int nforcedcuts, SCIP_Bool root, int maxnselectedcuts, int *nselectedcuts)
Definition: cutsel.c:152
memory allocation routines