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-2014 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_retcode.h"
30 #include "scip/type_set.h"
31 #include "scip/type_stat.h"
32 #include "scip/type_event.h"
33 #include "scip/type_lp.h"
34 #include "scip/type_prob.h"
35 #include "scip/type_tree.h"
36 #include "scip/type_sepastore.h"
37 #include "scip/type_branch.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /** creates separation storage */
44 extern
46  SCIP_SEPASTORE** sepastore /**< pointer to store separation storage */
47  );
48 
49 /** frees separation storage */
50 extern
52  SCIP_SEPASTORE** sepastore /**< pointer to store separation storage */
53  );
54 
55 /** informs separation storage, that the setup of the initial LP starts now */
56 extern
58  SCIP_SEPASTORE* sepastore /**< separation storage */
59  );
60 
61 /** informs separation storage, that the setup of the initial LP is now finished */
62 extern
64  SCIP_SEPASTORE* sepastore /**< separation storage */
65  );
66 
67 /** informs separation storage, that the following cuts should be used in any case */
68 extern
70  SCIP_SEPASTORE* sepastore /**< separation storage */
71  );
72 
73 /** informs separation storage, that the following cuts should no longer be used in any case */
74 extern
76  SCIP_SEPASTORE* sepastore /**< separation storage */
77  );
78 
79 /** adds cut to separation storage and captures it;
80  * if the cut should be forced to enter the LP, an infinite score has to be used
81  */
82 extern
84  SCIP_SEPASTORE* sepastore, /**< separation storage */
85  BMS_BLKMEM* blkmem, /**< block memory */
86  SCIP_SET* set, /**< global SCIP settings */
87  SCIP_STAT* stat, /**< problem statistics data */
88  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
89  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
90  SCIP_LP* lp, /**< LP data */
91  SCIP_SOL* sol, /**< primal solution that was separated, or NULL for LP solution */
92  SCIP_ROW* cut, /**< separated cut */
93  SCIP_Bool forcecut, /**< should the cut be forced to enter the LP? */
94  SCIP_Bool root, /**< are we at the root node? */
95  SCIP_Bool* infeasible /**< pointer to store whether the cut is infeasible */
96  );
97 
98 /** adds cuts to the LP and clears separation storage */
99 extern
101  SCIP_SEPASTORE* sepastore, /**< separation storage */
102  BMS_BLKMEM* blkmem, /**< block memory */
103  SCIP_SET* set, /**< global SCIP settings */
104  SCIP_STAT* stat, /**< problem statistics */
105  SCIP_PROB* transprob, /**< transformed problem */
106  SCIP_PROB* origprob, /**< original problem */
107  SCIP_TREE* tree, /**< branch and bound tree */
108  SCIP_LP* lp, /**< LP data */
109  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
110  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
111  SCIP_EVENTFILTER* eventfilter, /**< global event filter */
112  SCIP_Bool root, /**< are we at the root node? */
113  SCIP_EFFICIACYCHOICE efficiacychoice, /**< type of solution to base efficiacy computation on */
114  SCIP_Bool* cutoff /**< pointer to store whether an empty domain was created */
115  );
116 
117 /** clears the separation storage without adding the cuts to the LP */
118 extern
120  SCIP_SEPASTORE* sepastore, /**< separation storage */
121  BMS_BLKMEM* blkmem, /**< block memory */
122  SCIP_SET* set, /**< global SCIP settings */
123  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
124  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
125  SCIP_LP* lp /**< LP data */
126  );
127 
128 /** removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP */
129 extern
131  SCIP_SEPASTORE* sepastore, /**< separation storage */
132  BMS_BLKMEM* blkmem, /**< block memory */
133  SCIP_SET* set, /**< global SCIP settings */
134  SCIP_STAT* stat, /**< problem statistics data */
135  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
136  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
137  SCIP_LP* lp, /**< LP data */
138  SCIP_Bool root, /**< are we at the root node? */
139  SCIP_EFFICIACYCHOICE efficiacychoice /**< type of solution to base efficiacy computation on */
140  );
141 
142 /** indicates whether a cut is applicable
143  *
144  * A cut is applicable if it is modifiable, not a bound change, or a bound change that changes bounds by at least epsilon.
145  */
146 extern
148  SCIP_SET* set, /**< global SCIP settings */
149  SCIP_ROW* cut /**< cut to check */
150  );
151 
152 /** get cuts in the separation storage */
153 extern
155  SCIP_SEPASTORE* sepastore /**< separation storage */
156  );
157 
158 /** get number of cuts in the separation storage */
159 extern
161  SCIP_SEPASTORE* sepastore /**< separation storage */
162  );
163 
164 /** get total number of cuts found so far */
165 extern
167  SCIP_SEPASTORE* sepastore /**< separation storage */
168  );
169 
170 /** get number of cuts found so far in current separation round */
171 extern
173  SCIP_SEPASTORE* sepastore /**< separation storage */
174  );
175 
176 /** get total number of cuts applied to the LPs */
177 extern
179  SCIP_SEPASTORE* sepastore /**< separation storage */
180  );
181 
182 #ifdef __cplusplus
183 }
184 #endif
185 
186 #endif
187