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-2017 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_SOL* sol, /**< primal solution that was separated, or NULL for LP solution */
95  SCIP_ROW* cut, /**< separated cut */
96  SCIP_Bool forcecut, /**< should the cut be forced to enter the LP? */
97  SCIP_Bool root, /**< are we at the root node? */
98  SCIP_Bool* infeasible /**< pointer to store whether the cut is infeasible */
99  );
100 
101 /** adds cuts to the LP and clears separation storage */
102 extern
104  SCIP_SEPASTORE* sepastore, /**< separation storage */
105  BMS_BLKMEM* blkmem, /**< block memory */
106  SCIP_SET* set, /**< global SCIP settings */
107  SCIP_STAT* stat, /**< problem statistics */
108  SCIP_PROB* transprob, /**< transformed problem */
109  SCIP_PROB* origprob, /**< original problem */
110  SCIP_TREE* tree, /**< branch and bound tree */
111  SCIP_REOPT* reopt, /**< reoptimization data structure */
112  SCIP_LP* lp, /**< LP data */
113  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
114  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
115  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
116  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
117  SCIP_Bool root, /**< are we at the root node? */
118  SCIP_EFFICIACYCHOICE efficiacychoice, /**< type of solution to base efficiacy computation on */
119  SCIP_Bool* cutoff /**< pointer to store whether an empty domain was created */
120  );
121 
122 /** clears the separation storage without adding the cuts to the LP */
123 extern
125  SCIP_SEPASTORE* sepastore, /**< separation storage */
126  BMS_BLKMEM* blkmem, /**< block memory */
127  SCIP_SET* set, /**< global SCIP settings */
128  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
129  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
130  SCIP_LP* lp /**< LP data */
131  );
132 
133 /** removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP */
134 extern
136  SCIP_SEPASTORE* sepastore, /**< separation storage */
137  BMS_BLKMEM* blkmem, /**< block memory */
138  SCIP_SET* set, /**< global SCIP settings */
139  SCIP_STAT* stat, /**< problem statistics data */
140  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
141  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
142  SCIP_LP* lp, /**< LP data */
143  SCIP_Bool root, /**< are we at the root node? */
144  SCIP_EFFICIACYCHOICE efficiacychoice /**< type of solution to base efficiacy computation on */
145  );
146 
147 /** indicates whether a cut is applicable
148  *
149  * A cut is applicable if it is modifiable, not a bound change, or a bound change that changes bounds by at least epsilon.
150  */
151 extern
153  SCIP_SET* set, /**< global SCIP settings */
154  SCIP_ROW* cut /**< cut to check */
155  );
156 
157 /** get cuts in the separation storage */
158 extern
160  SCIP_SEPASTORE* sepastore /**< separation storage */
161  );
162 
163 /** get number of cuts in the separation storage */
164 extern
166  SCIP_SEPASTORE* sepastore /**< separation storage */
167  );
168 
169 /** get total number of cuts found so far */
170 extern
172  SCIP_SEPASTORE* sepastore /**< separation storage */
173  );
174 
175 /** get number of cuts found so far in current separation round */
176 extern
178  SCIP_SEPASTORE* sepastore /**< separation storage */
179  );
180 
181 /** get total number of cuts applied to the LPs */
182 extern
184  SCIP_SEPASTORE* sepastore /**< separation storage */
185  );
186 
187 #ifdef __cplusplus
188 }
189 #endif
190 
191 #endif
void SCIPsepastoreEndForceCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:159
SCIP_ROW ** SCIPsepastoreGetCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1318
type definitions for implications, variable bounds, and cliques
enum SCIP_Efficiacychoice SCIP_EFFICIACYCHOICE
int SCIPsepastoreGetNCutsApplied(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1358
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:1309
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:1268
SCIP_RETCODE SCIPsepastoreCreate(SCIP_SEPASTORE **sepastore)
Definition: sepastore.c:79
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1328
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:61
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:406
int SCIPsepastoreGetNCutsFound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1338
type definitions for branch and bound tree
type definitions for storing and manipulating the main problem
int SCIPsepastoreGetNCutsFoundRound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1348
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:1088
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:1220
memory allocation routines