Scippy

SCIP

Solving Constraint Integer Programs

sepastore.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-2018 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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file sepastore.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for storing separated cuts
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_SEPASTORE_H__
25 #define __SCIP_SEPASTORE_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/type_implics.h"
31 #include "scip/type_retcode.h"
32 #include "scip/type_set.h"
33 #include "scip/type_stat.h"
34 #include "scip/type_event.h"
35 #include "scip/type_lp.h"
36 #include "scip/type_prob.h"
37 #include "scip/type_tree.h"
38 #include "scip/type_reopt.h"
39 #include "scip/type_sepastore.h"
40 #include "scip/type_branch.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /** creates separation storage */
47 extern
49  SCIP_SEPASTORE** sepastore /**< pointer to store separation storage */
50  );
51 
52 /** frees separation storage */
53 extern
55  SCIP_SEPASTORE** sepastore /**< pointer to store separation storage */
56  );
57 
58 /** informs separation storage, that the setup of the initial LP starts now */
59 extern
61  SCIP_SEPASTORE* sepastore /**< separation storage */
62  );
63 
64 /** informs separation storage, that the setup of the initial LP is now finished */
65 extern
67  SCIP_SEPASTORE* sepastore /**< separation storage */
68  );
69 
70 /** informs separation storage, that the following cuts should be used in any case */
71 extern
73  SCIP_SEPASTORE* sepastore /**< separation storage */
74  );
75 
76 /** informs separation storage, that the following cuts should no longer be used in any case */
77 extern
79  SCIP_SEPASTORE* sepastore /**< separation storage */
80  );
81 
82 /** adds cut to separation storage and captures it;
83  * if the cut should be forced to enter the LP, an infinite score has to be used
84  */
85 extern
87  SCIP_SEPASTORE* sepastore, /**< separation storage */
88  BMS_BLKMEM* blkmem, /**< block memory */
89  SCIP_SET* set, /**< global SCIP settings */
90  SCIP_STAT* stat, /**< problem statistics data */
91  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
92  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
93  SCIP_LP* lp, /**< LP data */
94  SCIP_ROW* cut, /**< separated cut */
95  SCIP_Bool forcecut, /**< should the cut be forced to enter the LP? */
96  SCIP_Bool root, /**< are we at the root node? */
97  SCIP_Bool* infeasible /**< pointer to store whether the cut is infeasible */
98  );
99 
100 /** adds cuts to the LP and clears separation storage */
101 extern
103  SCIP_SEPASTORE* sepastore, /**< separation storage */
104  BMS_BLKMEM* blkmem, /**< block memory */
105  SCIP_SET* set, /**< global SCIP settings */
106  SCIP_STAT* stat, /**< problem statistics */
107  SCIP_PROB* transprob, /**< transformed problem */
108  SCIP_PROB* origprob, /**< original problem */
109  SCIP_TREE* tree, /**< branch and bound tree */
110  SCIP_REOPT* reopt, /**< reoptimization data structure */
111  SCIP_LP* lp, /**< LP data */
112  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
113  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
114  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
115  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
116  SCIP_Bool root, /**< are we at the root node? */
117  SCIP_EFFICIACYCHOICE efficiacychoice, /**< type of solution to base efficiacy computation on */
118  SCIP_Bool* cutoff /**< pointer to store whether an empty domain was created */
119  );
120 
121 /** clears the separation storage without adding the cuts to the LP */
122 extern
124  SCIP_SEPASTORE* sepastore, /**< separation storage */
125  BMS_BLKMEM* blkmem, /**< block memory */
126  SCIP_SET* set, /**< global SCIP settings */
127  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
128  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
129  SCIP_LP* lp /**< LP data */
130  );
131 
132 /** removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP */
133 extern
135  SCIP_SEPASTORE* sepastore, /**< separation storage */
136  BMS_BLKMEM* blkmem, /**< block memory */
137  SCIP_SET* set, /**< global SCIP settings */
138  SCIP_STAT* stat, /**< problem statistics data */
139  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
140  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
141  SCIP_LP* lp, /**< LP data */
142  SCIP_Bool root, /**< are we at the root node? */
143  SCIP_EFFICIACYCHOICE efficiacychoice /**< type of solution to base efficiacy computation on */
144  );
145 
146 /** indicates whether a cut is applicable
147  *
148  * A cut is applicable if it is modifiable, not a bound change, or a bound change that changes bounds by at least epsilon.
149  */
150 extern
152  SCIP_SET* set, /**< global SCIP settings */
153  SCIP_ROW* cut /**< cut to check */
154  );
155 
156 /** get cuts in the separation storage */
157 extern
159  SCIP_SEPASTORE* sepastore /**< separation storage */
160  );
161 
162 /** get number of cuts in the separation storage */
163 extern
165  SCIP_SEPASTORE* sepastore /**< separation storage */
166  );
167 
168 /** get total number of cuts found so far */
169 extern
171  SCIP_SEPASTORE* sepastore /**< separation storage */
172  );
173 
174 /** get number of cuts found so far in current separation round */
175 extern
177  SCIP_SEPASTORE* sepastore /**< separation storage */
178  );
179 
180 /** get total number of cuts applied to the LPs */
181 extern
183  SCIP_SEPASTORE* sepastore /**< separation storage */
184  );
185 
186 #ifdef __cplusplus
187 }
188 #endif
189 
190 #endif
void SCIPsepastoreEndForceCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:150
SCIP_RETCODE SCIPsepastoreAddCut(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool root, SCIP_Bool *infeasible)
Definition: sepastore.c:394
SCIP_ROW ** SCIPsepastoreGetCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1227
type definitions for implications, variable bounds, and cliques
enum SCIP_Efficiacychoice SCIP_EFFICIACYCHOICE
int SCIPsepastoreGetNCutsApplied(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1267
void SCIPsepastoreStartForceCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:139
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
type definitions for return codes for SCIP methods
type definitions for collecting reoptimization information
SCIP_Bool SCIPsepastoreIsCutApplicable(SCIP_SET *set, SCIP_ROW *cut)
Definition: sepastore.c:1218
type definitions for branching rules
type definitions for problem statistics
type definitions for LP management
SCIP_RETCODE SCIPsepastoreRemoveInefficaciousCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_Bool root, SCIP_EFFICIACYCHOICE efficiacychoice)
Definition: sepastore.c:1162
SCIP_RETCODE SCIPsepastoreCreate(SCIP_SEPASTORE **sepastore)
Definition: sepastore.c:76
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1237
type definitions for storing separated cuts
type definitions for managing events
SCIP_RETCODE SCIPsepastoreFree(SCIP_SEPASTORE **sepastore)
Definition: sepastore.c:99
#define SCIP_Bool
Definition: def.h:61
void SCIPsepastoreStartInitialLP(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:115
int SCIPsepastoreGetNCutsFound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1247
type definitions for branch and bound tree
type definitions for storing and manipulating the main problem
int SCIPsepastoreGetNCutsFoundRound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1257
void SCIPsepastoreEndInitialLP(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:127
SCIP_RETCODE SCIPsepastoreApplyCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_CLIQUETABLE *cliquetable, SCIP_Bool root, SCIP_EFFICIACYCHOICE efficiacychoice, SCIP_Bool *cutoff)
Definition: sepastore.c:978
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:419
SCIP_RETCODE SCIPsepastoreClearCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp)
Definition: sepastore.c:1114
memory allocation routines