Scippy

SCIP

Solving Constraint Integer Programs

pub_reopt.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 pub_reopt.h
17  * @ingroup PUBLICMETHODS
18  * @brief public methods for reoptimization
19  * @author Jakob Witzig
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_REOPT_H__
25 #define __SCIP_PUB_REOPT_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_reopt.h"
30 
31 #ifdef NDEBUG
32 #include "scip/struct_reopt.h"
33 #endif
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /*
40  * ReoptNode methods
41  */
42 
43 /** returns the number of bound changes stored in the reoptnode */
44 extern
46  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
47  );
48 
49 /** returns the number of bound changes at the node stored at ID id */
50 extern
52  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
53  );
54 
55 /** returns the number of stored bound changes based on dual information in the reopttree at ID id */
56 extern
58  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
59  );
60 
61 /** returns the number of child nodes of @p reoptnode */
62 extern
64  SCIP_REOPTNODE* reoptnode /**< node of the reoptimizzation tree */
65  );
66 
67 /* return the lower bound stored at @p ID id */
68 extern
70  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
71  );
72 
73 /** returns the type of the @p reoptnode */
74 extern
76  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
77  );
78 
79 /** create the constraint which splits the node stored at ID id on the basis of the stored dual information. */
80 extern
82  SCIP_REOPTNODE* reoptnode, /**< node of the reoptimization tree */
83  SCIP_VAR** vars, /**< array to store the variables of the constraint */
84  SCIP_Real* vals, /**< array to store the coefficients of the variables */
85  REOPT_CONSTYPE* constype, /**< type of the constraint */
86  int conssize, /**< size of the arrays */
87  int* nvars /**< pointer to store the size of the constraints */
88  );
89 
90 /** returns all added constraints at ID id */
91 extern
93  SCIP_REOPTNODE* reoptnode, /**< reoptimization data structure */
94  SCIP_VAR*** vars, /**< 2-dim array of variables */
95  SCIP_Real** vals, /**< 2-dim array of values */
96  int mem, /**< allocated memory for constraints */
97  int* nconss, /**< pointer to store the number of constraints */
98  int* nvars /**< pointer to store the number of variables */
99  );
100 
101 /** set the parent id */
102 extern
104  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
105  unsigned int parentid /**< id of the parent node */
106  );
107 
108 /*
109  * Reopt methods
110  */
111 
112 /** returns the number of global restarts */
113 extern
115  SCIP_REOPT* reopt /**< reoptimization data */
116  );
117 
118 /** returns the number of local restarts in the current run */
120  SCIP_REOPT* reopt /**< reoptimization data structure */
121  );
122 
123 /** returns the number of local restarts over all runs */
125  SCIP_REOPT* reopt /**< reoptimization data structure */
126  );
127 
128 /** returns the number of iteration with the first global restarts */
129 extern
131  SCIP_REOPT* reopt /**< reoptimization data structure */
132  );
133 
134 /** returns the number of iteration with the last global restarts */
135 extern
137  SCIP_REOPT* reopt /**< reoptimization data structure */
138  );
139 
140 /** returns the number of nodes providing an improving feasible LP solution in the current run */
141 extern
143  SCIP_REOPT* reopt /**< reoptimization data structure */
144  );
145 
146 /** returns the number of nodes providing an improving feasible LP solution over all runs */
147 extern
149  SCIP_REOPT* reopt /**< reoptimization data structure */
150  );
151 
152 /** returns the number of nodes that exceeded the cutoff bound in the current run */
153 extern
155  SCIP_REOPT* reopt /**< reoptimization data structure */
156  );
157 
158 /** returns the number of nodes that exceeded the cutoff bound over all runs */
159 extern
161  SCIP_REOPT* reopt /**< reoptimization data structure */
162  );
163 
164 /** returns the number of reoptimized nodes that were cut off in the current run */
165 extern
167  SCIP_REOPT* reopt /*< reoptimization data structure */
168  );
169 
170 /** returns the number of reoptimized nodes that were cut off over all runs */
171 extern
173  SCIP_REOPT* reopt /*< reoptimization data structure */
174  );
175 
176 /** returns the number of stored nodes with an infeasible LP in the current run */
177 extern
179  SCIP_REOPT* reopt /*< reoptimization data structure */
180  );
181 
182 /** returns the number of stored nodes with an infeasible LP over all runs */
183 extern
185  SCIP_REOPT* reopt /*< reoptimization data structure */
186  );
187 
188 /** returns the number of found infeasible subtrees */
189 extern
191  SCIP_REOPT* reopt /*< reoptimization data structure */
192  );
193 
194 #ifdef NDEBUG
195 
196 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
197  * speed up the algorithms.
198  */
199 
200 #define SCIPreoptnodeGetNVars(reoptnode) (reoptnode->nvars)
201 #define SCIPreoptnodeGetNConss(reoptnode) (reoptnode->nconss)
202 #define SCIPreoptnodeGetNDualBoundChgs(reoptnode) (reoptnode->dualconscur->nvars)
203 #define SCIPreoptnodeGetNChildren(reoptnode) (reoptnode->nchilds)
204 #define SCIPreoptnodeGetLowerbound(reoptnode) (reoptnode->lowerbound)
205 #define SCIPreoptnodeGetType(reoptnode) (reoptnode->reopttype)
206 
207 #define SCIPreoptGetNRestartsGlobal(reopt) (reopt->nglbrestarts)
208 #define SCIPreoptGetNRestartsLocal(reopt) (reopt->nlocrestarts)
209 #define SCIPreoptGetNTotalRestartsLocal(reopt) (reopt->ntotallocrestarts)
210 #define SCIPreoptGetFirstRestarts(reopt) (reopt->firstrestart)
211 #define SCIPreoptGetLastRestarts(reopt) (reopt->lastrestart)
212 #define SCIPreoptGetNFeasNodes(reopt) (reopt->reopttree->nfeasnodes)
213 #define SCIPreoptGetNTotalFeasNodes(reopt) (reopt->reopttree->ntotalfeasnodes)
214 #define SCIPreoptGetNPrunedNodes(reopt) (reopt->reopttree->nprunednodes)
215 #define SCIPreoptGetNTotalPrunedNodes(reopt) (reopt->reopttree->ntotalprunednodes)
216 #define SCIPreoptGetNCutoffReoptnodes(reopt) (reopt->reopttree->ncutoffreoptnodes)
217 #define SCIPreoptGetNTotalCutoffReoptnodes(reopt) (reopt->reopttree->ntotalcutoffreoptnodes)
218 #define SCIPreoptGetNInfNodes(reopt) (reopt->reopttree->ninfsubtrees)
219 #define SCIPreoptGetNTotalInfNodes(reopt) (reopt->reopttree->ntotalinfnodes)
220 #define SCIPreoptGetNInfSubtrees(reopt) (reopt->reopttree->ninfsubtrees)
221 
222 #endif
223 
224 #ifdef __cplusplus
225 }
226 #endif
227 
228 #endif
int SCIPreoptGetNInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:3946
type definitions for collecting reoptimization information
int SCIPreoptGetLastRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:3876
int SCIPreoptGetNTotalInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:3956
int SCIPreoptGetNInfSubtrees(SCIP_REOPT *reopt)
Definition: reopt.c:3966
void SCIPreoptnodeGetConss(SCIP_REOPTNODE *reoptnode, SCIP_VAR ***vars, SCIP_Real **vals, int mem, int *nconss, int *nvars)
Definition: reopt.c:4718
int SCIPreoptnodeGetNDualBoundChgs(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:4641
void SCIPreoptnodeGetSplitCons(SCIP_REOPTNODE *reoptnode, SCIP_VAR **vars, SCIP_Real *vals, REOPT_CONSTYPE *constype, int conssize, int *nvars)
Definition: reopt.c:4686
int SCIPreoptGetFirstRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:3866
int SCIPreoptGetNRestartsGlobal(SCIP_REOPT *reopt)
Definition: reopt.c:3836
void SCIPreoptnodeSetParentID(SCIP_REOPTNODE *reoptnode, unsigned int parentid)
Definition: reopt.c:4754
enum SCIP_ReoptType SCIP_REOPTTYPE
Definition: type_reopt.h:56
int SCIPreoptGetNTotalFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:3896
int SCIPreoptnodeGetNVars(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:4621
data structures for collecting reoptimization information
int SCIPreoptnodeGetNChildren(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:4654
SCIP_Real SCIPreoptnodeGetLowerbound(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:4664
int SCIPreoptGetNTotalCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:3936
int SCIPreoptGetNCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:3926
int SCIPreoptGetNFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:3886
#define SCIP_Real
Definition: def.h:127
int SCIPreoptGetNRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:3846
int SCIPreoptGetNPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:3906
enum Reopt_ConsType REOPT_CONSTYPE
Definition: type_reopt.h:64
SCIP_REOPTTYPE SCIPreoptnodeGetType(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:4674
common defines and data types used in all packages of SCIP
int SCIPreoptGetNTotalRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:3856
int SCIPreoptGetNTotalPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:3916
int SCIPreoptnodeGetNConss(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:4631