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-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 sepastore.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for storing separated cuts
19  * @author Tobias Achterberg
20  * @author Leona 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 */
49  SCIP_SEPASTORE** sepastore, /**< pointer to store separation storage */
50  BMS_BLKMEM* blkmem, /**< block memory */
51  SCIP_SET* set /**< global SCIP settings */
52  );
53 
54 /** frees separation storage */
56  SCIP_SEPASTORE** sepastore, /**< pointer to store separation storage */
57  BMS_BLKMEM* blkmem /**< block memory */
58  );
59 
60 /** informs separation storage that the setup of the initial LP starts now */
62  SCIP_SEPASTORE* sepastore /**< separation storage */
63  );
64 
65 /** informs separation storage that the setup of the initial LP is now finished */
67  SCIP_SEPASTORE* sepastore /**< separation storage */
68  );
69 
70 /** informs separation storage that the following cuts should be used in any case */
72  SCIP_SEPASTORE* sepastore /**< separation storage */
73  );
74 
75 /** informs separation storage that the following cuts should no longer be used in any case */
77  SCIP_SEPASTORE* sepastore /**< separation storage */
78  );
79 
80 /** adds cut to separation storage and captures it */
82  SCIP_SEPASTORE* sepastore, /**< separation storage */
83  BMS_BLKMEM* blkmem, /**< block memory */
84  SCIP_SET* set, /**< global SCIP settings */
85  SCIP_STAT* stat, /**< problem statistics data */
86  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
87  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
88  SCIP_LP* lp, /**< LP data */
89  SCIP_ROW* cut, /**< separated cut */
90  SCIP_Bool forcecut, /**< should the cut be forced to enter the LP? */
91  SCIP_Bool root, /**< are we at the root node? */
92  SCIP_Bool* infeasible /**< pointer to store whether the cut is infeasible */
93  );
94 
95 /** adds cuts to the LP and clears separation storage */
97  SCIP_SEPASTORE* sepastore, /**< separation storage */
98  BMS_BLKMEM* blkmem, /**< block memory */
99  SCIP_SET* set, /**< global SCIP settings */
100  SCIP_STAT* stat, /**< problem statistics */
101  SCIP_PROB* transprob, /**< transformed problem */
102  SCIP_PROB* origprob, /**< original problem */
103  SCIP_TREE* tree, /**< branch and bound tree */
104  SCIP_REOPT* reopt, /**< reoptimization data structure */
105  SCIP_LP* lp, /**< LP data */
106  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
107  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
108  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
109  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
110  SCIP_Bool root, /**< are we at the root node? */
111  SCIP_EFFICIACYCHOICE efficiacychoice, /**< type of solution to base efficiacy computation on */
112  SCIP_Bool* cutoff /**< pointer to store whether an empty domain was created */
113  );
114 
115 /** clears the separation storage without adding the cuts to the LP */
117  SCIP_SEPASTORE* sepastore, /**< separation storage */
118  BMS_BLKMEM* blkmem, /**< block memory */
119  SCIP_SET* set, /**< global SCIP settings */
120  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
121  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
122  SCIP_LP* lp /**< LP data */
123  );
124 
125 /** removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP */
127  SCIP_SEPASTORE* sepastore, /**< separation storage */
128  BMS_BLKMEM* blkmem, /**< block memory */
129  SCIP_SET* set, /**< global SCIP settings */
130  SCIP_STAT* stat, /**< problem statistics data */
131  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
132  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
133  SCIP_LP* lp, /**< LP data */
134  SCIP_Bool root, /**< are we at the root node? */
135  SCIP_EFFICIACYCHOICE efficiacychoice /**< type of solution to base efficiacy computation on */
136  );
137 
138 /** indicates whether a cut is applicable
139  *
140  * A cut is applicable if it is modifiable, not a bound change, or a bound change that changes bounds by at least epsilon.
141  */
143  SCIP_SET* set, /**< global SCIP settings */
144  SCIP_ROW* cut /**< cut to check */
145  );
146 
147 /** get cuts in the separation storage */
149  SCIP_SEPASTORE* sepastore /**< separation storage */
150  );
151 
152 /** get number of cuts in the separation storage */
154  SCIP_SEPASTORE* sepastore /**< separation storage */
155  );
156 
157 /** get total number of cuts found so far */
159  SCIP_SEPASTORE* sepastore /**< separation storage */
160  );
161 
162 /** get number of cuts found so far in current separation round */
164  SCIP_SEPASTORE* sepastore /**< separation storage */
165  );
166 
167 /** get total number of cuts applied to the LPs */
169  SCIP_SEPASTORE* sepastore /**< separation storage */
170  );
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif
void SCIPsepastoreEndForceCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:156
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:402
SCIP_ROW ** SCIPsepastoreGetCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1081
type definitions for implications, variable bounds, and cliques
enum SCIP_Efficiacychoice SCIP_EFFICIACYCHOICE
int SCIPsepastoreGetNCutsApplied(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1121
void SCIPsepastoreStartForceCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:145
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
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:1072
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:1015
SCIP_RETCODE SCIPsepastoreCreate(SCIP_SEPASTORE **sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: sepastore.c:78
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1091
type definitions for storing separated cuts
type definitions for managing events
#define SCIP_Bool
Definition: def.h:84
void SCIPsepastoreStartInitialLP(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:121
int SCIPsepastoreGetNCutsFound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1101
type definitions for branch and bound tree
type definitions for storing and manipulating the main problem
int SCIPsepastoreGetNCutsFoundRound(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1111
void SCIPsepastoreEndInitialLP(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:133
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:866
SCIP_RETCODE SCIPsepastoreFree(SCIP_SEPASTORE **sepastore, BMS_BLKMEM *blkmem)
Definition: sepastore.c:104
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:430
SCIP_RETCODE SCIPsepastoreClearCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp)
Definition: sepastore.c:969
memory allocation routines