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-2016 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  * @brief internal methods for storing separated cuts
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_SEPASTORE_H__
24 #define __SCIP_SEPASTORE_H__
25 
26 
27 #include "scip/def.h"
28 #include "blockmemshell/memory.h"
29 #include "scip/type_implics.h"
30 #include "scip/type_retcode.h"
31 #include "scip/type_set.h"
32 #include "scip/type_stat.h"
33 #include "scip/type_event.h"
34 #include "scip/type_lp.h"
35 #include "scip/type_prob.h"
36 #include "scip/type_tree.h"
37 #include "scip/type_reopt.h"
38 #include "scip/type_sepastore.h"
39 #include "scip/type_branch.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /** creates separation storage */
46 extern
48  SCIP_SEPASTORE** sepastore /**< pointer to store separation storage */
49  );
50 
51 /** frees separation storage */
52 extern
54  SCIP_SEPASTORE** sepastore /**< pointer to store separation storage */
55  );
56 
57 /** informs separation storage, that the setup of the initial LP starts now */
58 extern
60  SCIP_SEPASTORE* sepastore /**< separation storage */
61  );
62 
63 /** informs separation storage, that the setup of the initial LP is now finished */
64 extern
66  SCIP_SEPASTORE* sepastore /**< separation storage */
67  );
68 
69 /** informs separation storage, that the following cuts should be used in any case */
70 extern
72  SCIP_SEPASTORE* sepastore /**< separation storage */
73  );
74 
75 /** informs separation storage, that the following cuts should no longer be used in any case */
76 extern
78  SCIP_SEPASTORE* sepastore /**< separation storage */
79  );
80 
81 /** adds cut to separation storage and captures it;
82  * if the cut should be forced to enter the LP, an infinite score has to be used
83  */
84 extern
86  SCIP_SEPASTORE* sepastore, /**< separation storage */
87  BMS_BLKMEM* blkmem, /**< block memory */
88  SCIP_SET* set, /**< global SCIP settings */
89  SCIP_STAT* stat, /**< problem statistics data */
90  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
91  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
92  SCIP_LP* lp, /**< LP data */
93  SCIP_SOL* sol, /**< primal solution that was separated, or NULL for LP solution */
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:159
SCIP_ROW ** SCIPsepastoreGetCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1347
type definitions for implications, variable bounds, and cliques
enum SCIP_Efficiacychoice SCIP_EFFICIACYCHOICE
int SCIPsepastoreGetNCutsApplied(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1387
void SCIPsepastoreStartForceCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:148
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:1338
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:1297
SCIP_RETCODE SCIPsepastoreCreate(SCIP_SEPASTORE **sepastore)
Definition: sepastore.c:79
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1357
type definitions for storing separated cuts
type definitions for managing events
SCIP_RETCODE SCIPsepastoreFree(SCIP_SEPASTORE **sepastore)
Definition: sepastore.c:105
#define SCIP_Bool
Definition: def.h:53
void SCIPsepastoreStartInitialLP(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:124
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_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool root, SCIP_Bool *infeasible)
Definition: sepastore.c:554
int SCIPsepastoreGetNCutsFound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1367
type definitions for branch and bound tree
type definitions for storing and manipulating the main problem
int SCIPsepastoreGetNCutsFoundRound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1377
void SCIPsepastoreEndInitialLP(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:136
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:1117
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
SCIP_RETCODE SCIPsepastoreClearCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp)
Definition: sepastore.c:1249
memory allocation routines