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 visit 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  * @author Robert Lion Gottwald
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_SEPASTORE_H__
26 #define __SCIP_SEPASTORE_H__
27 
28 
29 #include "scip/def.h"
30 #include "blockmemshell/memory.h"
31 #include "scip/type_implics.h"
32 #include "scip/type_retcode.h"
33 #include "scip/type_set.h"
34 #include "scip/type_stat.h"
35 #include "scip/type_event.h"
36 #include "scip/type_lp.h"
37 #include "scip/type_prob.h"
38 #include "scip/type_tree.h"
39 #include "scip/type_reopt.h"
40 #include "scip/type_sepastore.h"
41 #include "scip/type_branch.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 /** creates separation storage */
48 extern
50  SCIP_SEPASTORE** sepastore, /**< pointer to store separation storage */
51  BMS_BLKMEM* blkmem, /**< block memory */
52  SCIP_SET* set /**< global SCIP settings */
53  );
54 
55 /** frees separation storage */
56 extern
58  SCIP_SEPASTORE** sepastore, /**< pointer to store separation storage */
59  BMS_BLKMEM* blkmem /**< block memory */
60  );
61 
62 /** informs separation storage that the setup of the initial LP starts now */
63 extern
65  SCIP_SEPASTORE* sepastore /**< separation storage */
66  );
67 
68 /** informs separation storage that the setup of the initial LP is now finished */
69 extern
71  SCIP_SEPASTORE* sepastore /**< separation storage */
72  );
73 
74 /** informs separation storage that the following cuts should be used in any case */
75 extern
77  SCIP_SEPASTORE* sepastore /**< separation storage */
78  );
79 
80 /** informs separation storage that the following cuts should no longer be used in any case */
81 extern
83  SCIP_SEPASTORE* sepastore /**< separation storage */
84  );
85 
86 /** adds cut to separation storage and captures it */
87 extern
89  SCIP_SEPASTORE* sepastore, /**< separation storage */
90  BMS_BLKMEM* blkmem, /**< block memory */
91  SCIP_SET* set, /**< global SCIP settings */
92  SCIP_STAT* stat, /**< problem statistics data */
93  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
94  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
95  SCIP_LP* lp, /**< LP data */
96  SCIP_ROW* cut, /**< separated cut */
97  SCIP_Bool forcecut, /**< should the cut be forced to enter the LP? */
98  SCIP_Bool root, /**< are we at the root node? */
99  SCIP_Bool* infeasible /**< pointer to store whether the cut is infeasible */
100  );
101 
102 /** adds cuts to the LP and clears separation storage */
103 extern
105  SCIP_SEPASTORE* sepastore, /**< separation storage */
106  BMS_BLKMEM* blkmem, /**< block memory */
107  SCIP_SET* set, /**< global SCIP settings */
108  SCIP_STAT* stat, /**< problem statistics */
109  SCIP_PROB* transprob, /**< transformed problem */
110  SCIP_PROB* origprob, /**< original problem */
111  SCIP_TREE* tree, /**< branch and bound tree */
112  SCIP_REOPT* reopt, /**< reoptimization data structure */
113  SCIP_LP* lp, /**< LP data */
114  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
115  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
116  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
117  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
118  SCIP_Bool root, /**< are we at the root node? */
119  SCIP_EFFICIACYCHOICE efficiacychoice, /**< type of solution to base efficiacy computation on */
120  SCIP_Bool* cutoff /**< pointer to store whether an empty domain was created */
121  );
122 
123 /** clears the separation storage without adding the cuts to the LP */
124 extern
126  SCIP_SEPASTORE* sepastore, /**< separation storage */
127  BMS_BLKMEM* blkmem, /**< block memory */
128  SCIP_SET* set, /**< global SCIP settings */
129  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
130  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
131  SCIP_LP* lp /**< LP data */
132  );
133 
134 /** removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP */
135 extern
137  SCIP_SEPASTORE* sepastore, /**< separation storage */
138  BMS_BLKMEM* blkmem, /**< block memory */
139  SCIP_SET* set, /**< global SCIP settings */
140  SCIP_STAT* stat, /**< problem statistics data */
141  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
142  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
143  SCIP_LP* lp, /**< LP data */
144  SCIP_Bool root, /**< are we at the root node? */
145  SCIP_EFFICIACYCHOICE efficiacychoice /**< type of solution to base efficiacy computation on */
146  );
147 
148 /** indicates whether a cut is applicable
149  *
150  * A cut is applicable if it is modifiable, not a bound change, or a bound change that changes bounds by at least epsilon.
151  */
152 extern
154  SCIP_SET* set, /**< global SCIP settings */
155  SCIP_ROW* cut /**< cut to check */
156  );
157 
158 /** get cuts in the separation storage */
159 extern
161  SCIP_SEPASTORE* sepastore /**< separation storage */
162  );
163 
164 /** get number of cuts in the separation storage */
165 extern
167  SCIP_SEPASTORE* sepastore /**< separation storage */
168  );
169 
170 /** get total number of cuts found so far */
171 extern
173  SCIP_SEPASTORE* sepastore /**< separation storage */
174  );
175 
176 /** get number of cuts found so far in current separation round */
177 extern
179  SCIP_SEPASTORE* sepastore /**< separation storage */
180  );
181 
182 /** get total number of cuts applied to the LPs */
183 extern
185  SCIP_SEPASTORE* sepastore /**< separation storage */
186  );
187 
188 #ifdef __cplusplus
189 }
190 #endif
191 
192 #endif
void SCIPsepastoreEndForceCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:153
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:399
SCIP_ROW ** SCIPsepastoreGetCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1075
type definitions for implications, variable bounds, and cliques
enum SCIP_Efficiacychoice SCIP_EFFICIACYCHOICE
int SCIPsepastoreGetNCutsApplied(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1115
void SCIPsepastoreStartForceCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:142
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:1066
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:1009
SCIP_RETCODE SCIPsepastoreCreate(SCIP_SEPASTORE **sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: sepastore.c:75
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1085
type definitions for storing separated cuts
type definitions for managing events
#define SCIP_Bool
Definition: def.h:62
void SCIPsepastoreStartInitialLP(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:118
int SCIPsepastoreGetNCutsFound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1095
type definitions for branch and bound tree
type definitions for storing and manipulating the main problem
int SCIPsepastoreGetNCutsFoundRound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1105
void SCIPsepastoreEndInitialLP(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:130
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:859
SCIP_RETCODE SCIPsepastoreFree(SCIP_SEPASTORE **sepastore, BMS_BLKMEM *blkmem)
Definition: sepastore.c:101
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:963
memory allocation routines