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-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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file pub_reopt.h
17  * @ingroup PUBLICCOREAPI
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** bounds, /**< 2-dim array of bounds */
96  SCIP_BOUNDTYPE** boundtypes, /**< 2-dim array of boundtypes */
97  int mem, /**< allocated memory for constraints */
98  int* nconss, /**< pointer to store the number of constraints */
99  int* nvars /**< pointer to store the number of variables */
100  );
101 
102 /** set the parent id */
103 extern
105  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
106  unsigned int parentid /**< id of the parent node */
107  );
108 
109 /*
110  * Reopt methods
111  */
112 
113 /** returns the number of global restarts */
114 extern
116  SCIP_REOPT* reopt /**< reoptimization data */
117  );
118 
119 /** returns the number of local restarts in the current run */
121  SCIP_REOPT* reopt /**< reoptimization data structure */
122  );
123 
124 /** returns the number of local restarts over all runs */
126  SCIP_REOPT* reopt /**< reoptimization data structure */
127  );
128 
129 /** returns the number of iteration with the first global restarts */
130 extern
132  SCIP_REOPT* reopt /**< reoptimization data structure */
133  );
134 
135 /** returns the number of iteration with the last global restarts */
136 extern
138  SCIP_REOPT* reopt /**< reoptimization data structure */
139  );
140 
141 /** returns the number of nodes providing an improving feasible LP solution in the current run */
142 extern
144  SCIP_REOPT* reopt /**< reoptimization data structure */
145  );
146 
147 /** returns the number of nodes providing an improving feasible LP solution over all runs */
148 extern
150  SCIP_REOPT* reopt /**< reoptimization data structure */
151  );
152 
153 /** returns the number of nodes that exceeded the cutoff bound in the current run */
154 extern
156  SCIP_REOPT* reopt /**< reoptimization data structure */
157  );
158 
159 /** returns the number of nodes that exceeded the cutoff bound over all runs */
160 extern
162  SCIP_REOPT* reopt /**< reoptimization data structure */
163  );
164 
165 /** returns the number of reoptimized nodes that were cut off in the current run */
166 extern
168  SCIP_REOPT* reopt /*< reoptimization data structure */
169  );
170 
171 /** returns the number of reoptimized nodes that were cut off over all runs */
172 extern
174  SCIP_REOPT* reopt /*< reoptimization data structure */
175  );
176 
177 /** returns the number of stored nodes with an infeasible LP in the current run */
178 extern
180  SCIP_REOPT* reopt /*< reoptimization data structure */
181  );
182 
183 /** returns the number of stored nodes with an infeasible LP over all runs */
184 extern
186  SCIP_REOPT* reopt /*< reoptimization data structure */
187  );
188 
189 #ifdef NDEBUG
190 
191 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
192  * speed up the algorithms.
193  */
194 
195 #define SCIPreoptnodeGetNVars(reoptnode) (reoptnode->nvars)
196 #define SCIPreoptnodeGetNConss(reoptnode) (reoptnode->nconss)
197 #define SCIPreoptnodeGetNDualBoundChgs(reoptnode) (reoptnode->dualconscur->nvars)
198 #define SCIPreoptnodeGetNChildren(reoptnode) (reoptnode->nchilds)
199 #define SCIPreoptnodeGetLowerbound(reoptnode) (reoptnode->lowerbound)
200 #define SCIPreoptnodeGetType(reoptnode) (reoptnode->reopttype)
201 
202 #define SCIPreoptGetNRestartsGlobal(reopt) (reopt->nglbrestarts)
203 #define SCIPreoptGetNRestartsLocal(reopt) (reopt->nlocrestarts)
204 #define SCIPreoptGetNTotalRestartsLocal(reopt) (reopt->ntotallocrestarts)
205 #define SCIPreoptGetFirstRestarts(reopt) (reopt->firstrestart)
206 #define SCIPreoptGetLastRestarts(reopt) (reopt->lastrestart)
207 #define SCIPreoptGetNFeasNodes(reopt) (reopt->reopttree->nfeasnodes)
208 #define SCIPreoptGetNTotalFeasNodes(reopt) (reopt->reopttree->ntotalfeasnodes)
209 #define SCIPreoptGetNPrunedNodes(reopt) (reopt->reopttree->nprunednodes)
210 #define SCIPreoptGetNTotalPrunedNodes(reopt) (reopt->reopttree->ntotalprunednodes)
211 #define SCIPreoptGetNCutoffReoptnodes(reopt) (reopt->reopttree->ncutoffreoptnodes)
212 #define SCIPreoptGetNTotalCutoffReoptnodes(reopt) (reopt->reopttree->ntotalcutoffreoptnodes)
213 #define SCIPreoptGetNInfNodes(reopt) (reopt->reopttree->ninfsubtrees)
214 #define SCIPreoptGetNTotalInfNodes(reopt) (reopt->reopttree->ntotalinfnodes)
215 
216 #endif
217 
218 #ifdef __cplusplus
219 }
220 #endif
221 
222 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
int SCIPreoptGetNInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:5013
type definitions for collecting reoptimization information
int SCIPreoptGetLastRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:4943
int SCIPreoptGetNTotalInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:5023
int SCIPreoptnodeGetNDualBoundChgs(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5818
void SCIPreoptnodeGetSplitCons(SCIP_REOPTNODE *reoptnode, SCIP_VAR **vars, SCIP_Real *vals, REOPT_CONSTYPE *constype, int conssize, int *nvars)
int SCIPreoptGetFirstRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:4933
int SCIPreoptGetNRestartsGlobal(SCIP_REOPT *reopt)
Definition: reopt.c:4903
void SCIPreoptnodeSetParentID(SCIP_REOPTNODE *reoptnode, unsigned int parentid)
Definition: reopt.c:5898
enum SCIP_ReoptType SCIP_REOPTTYPE
Definition: type_reopt.h:58
int SCIPreoptGetNTotalFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4963
int SCIPreoptnodeGetNVars(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5798
data structures for collecting reoptimization information
int SCIPreoptnodeGetNChildren(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5831
SCIP_Real SCIPreoptnodeGetLowerbound(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5841
int SCIPreoptGetNTotalCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:5003
int SCIPreoptGetNCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:4993
int SCIPreoptGetNFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4953
void SCIPreoptnodeGetConss(SCIP_REOPTNODE *reoptnode, SCIP_VAR ***vars, SCIP_Real **bounds, SCIP_BOUNDTYPE **boundtypes, int mem, int *nconss, int *nvars)
Definition: reopt.c:5861
#define SCIP_Real
Definition: def.h:149
int SCIPreoptGetNRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:4913
int SCIPreoptGetNPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4973
enum Reopt_ConsType REOPT_CONSTYPE
Definition: type_reopt.h:67
SCIP_REOPTTYPE SCIPreoptnodeGetType(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5851
common defines and data types used in all packages of SCIP
int SCIPreoptGetNTotalRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:4923
int SCIPreoptGetNTotalPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4983
int SCIPreoptnodeGetNConss(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5808