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-2019 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 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 #include "scip/def.h"
28 #include "scip/type_lp.h"
29 #include "scip/type_reopt.h"
30 #include "scip/type_var.h"
31 
32 #ifdef NDEBUG
33 #include "scip/struct_reopt.h"
34 #endif
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * ReoptNode methods
42  */
43 
44 /** returns the number of bound changes stored in the reoptnode */
45 extern
47  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
48  );
49 
50 /** returns the number of bound changes at the node stored at ID id */
51 extern
53  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
54  );
55 
56 /** returns the number of stored bound changes based on dual information in the reopttree at ID id */
57 extern
59  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
60  );
61 
62 /** returns the number of child nodes of @p reoptnode */
63 extern
65  SCIP_REOPTNODE* reoptnode /**< node of the reoptimizzation tree */
66  );
67 
68 /* return the lower bound stored at @p ID id */
69 extern
71  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
72  );
73 
74 /** returns the type of the @p reoptnode */
75 extern
77  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
78  );
79 
80 /** create the constraint which splits the node stored at ID id on the basis of the stored dual information. */
81 extern
83  SCIP_REOPTNODE* reoptnode, /**< node of the reoptimization tree */
84  SCIP_VAR** vars, /**< array to store the variables of the constraint */
85  SCIP_Real* vals, /**< array to store the coefficients of the variables */
86  REOPT_CONSTYPE* constype, /**< type of the constraint */
87  int conssize, /**< size of the arrays */
88  int* nvars /**< pointer to store the size of the constraints */
89  );
90 
91 /** returns all added constraints at ID id */
92 extern
94  SCIP_REOPTNODE* reoptnode, /**< reoptimization data structure */
95  SCIP_VAR*** vars, /**< 2-dim array of variables */
96  SCIP_Real** bounds, /**< 2-dim array of bounds */
97  SCIP_BOUNDTYPE** boundtypes, /**< 2-dim array of boundtypes */
98  int mem, /**< allocated memory for constraints */
99  int* nconss, /**< pointer to store the number of constraints */
100  int* nvars /**< pointer to store the number of variables */
101  );
102 
103 /** set the parent id */
104 extern
106  SCIP_REOPTNODE* reoptnode, /**< node of the reopttree */
107  unsigned int parentid /**< id of the parent node */
108  );
109 
110 /*
111  * Reopt methods
112  */
113 
114 /** returns the number of global restarts */
115 extern
117  SCIP_REOPT* reopt /**< reoptimization data */
118  );
119 
120 /** returns the number of local restarts in the current run */
122  SCIP_REOPT* reopt /**< reoptimization data structure */
123  );
124 
125 /** returns the number of local restarts over all runs */
127  SCIP_REOPT* reopt /**< reoptimization data structure */
128  );
129 
130 /** returns the number of iteration with the first global restarts */
131 extern
133  SCIP_REOPT* reopt /**< reoptimization data structure */
134  );
135 
136 /** returns the number of iteration with the last global restarts */
137 extern
139  SCIP_REOPT* reopt /**< reoptimization data structure */
140  );
141 
142 /** returns the number of nodes providing an improving feasible LP solution in the current run */
143 extern
145  SCIP_REOPT* reopt /**< reoptimization data structure */
146  );
147 
148 /** returns the number of nodes providing an improving feasible LP solution over all runs */
149 extern
151  SCIP_REOPT* reopt /**< reoptimization data structure */
152  );
153 
154 /** returns the number of nodes that exceeded the cutoff bound in the current run */
155 extern
157  SCIP_REOPT* reopt /**< reoptimization data structure */
158  );
159 
160 /** returns the number of nodes that exceeded the cutoff bound over all runs */
161 extern
163  SCIP_REOPT* reopt /**< reoptimization data structure */
164  );
165 
166 /** returns the number of reoptimized nodes that were cut off in the current run */
167 extern
169  SCIP_REOPT* reopt /*< reoptimization data structure */
170  );
171 
172 /** returns the number of reoptimized nodes that were cut off over all runs */
173 extern
175  SCIP_REOPT* reopt /*< reoptimization data structure */
176  );
177 
178 /** returns the number of stored nodes with an infeasible LP in the current run */
179 extern
181  SCIP_REOPT* reopt /*< reoptimization data structure */
182  );
183 
184 /** returns the number of stored nodes with an infeasible LP over all runs */
185 extern
187  SCIP_REOPT* reopt /*< reoptimization data structure */
188  );
189 
190 #ifdef NDEBUG
191 
192 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
193  * speed up the algorithms.
194  */
195 
196 #define SCIPreoptnodeGetNVars(reoptnode) (reoptnode->nvars)
197 #define SCIPreoptnodeGetNConss(reoptnode) (reoptnode->nconss)
198 #define SCIPreoptnodeGetNDualBoundChgs(reoptnode) (reoptnode->dualconscur->nvars)
199 #define SCIPreoptnodeGetNChildren(reoptnode) (reoptnode->nchilds)
200 #define SCIPreoptnodeGetLowerbound(reoptnode) (reoptnode->lowerbound)
201 #define SCIPreoptnodeGetType(reoptnode) (reoptnode->reopttype)
202 
203 #define SCIPreoptGetNRestartsGlobal(reopt) (reopt->nglbrestarts)
204 #define SCIPreoptGetNRestartsLocal(reopt) (reopt->nlocrestarts)
205 #define SCIPreoptGetNTotalRestartsLocal(reopt) (reopt->ntotallocrestarts)
206 #define SCIPreoptGetFirstRestarts(reopt) (reopt->firstrestart)
207 #define SCIPreoptGetLastRestarts(reopt) (reopt->lastrestart)
208 #define SCIPreoptGetNFeasNodes(reopt) (reopt->reopttree->nfeasnodes)
209 #define SCIPreoptGetNTotalFeasNodes(reopt) (reopt->reopttree->ntotalfeasnodes)
210 #define SCIPreoptGetNPrunedNodes(reopt) (reopt->reopttree->nprunednodes)
211 #define SCIPreoptGetNTotalPrunedNodes(reopt) (reopt->reopttree->ntotalprunednodes)
212 #define SCIPreoptGetNCutoffReoptnodes(reopt) (reopt->reopttree->ncutoffreoptnodes)
213 #define SCIPreoptGetNTotalCutoffReoptnodes(reopt) (reopt->reopttree->ntotalcutoffreoptnodes)
214 #define SCIPreoptGetNInfNodes(reopt) (reopt->reopttree->ninfsubtrees)
215 #define SCIPreoptGetNTotalInfNodes(reopt) (reopt->reopttree->ntotalinfnodes)
216 
217 #endif
218 
219 #ifdef __cplusplus
220 }
221 #endif
222 
223 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
int SCIPreoptGetNInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:5014
type definitions for collecting reoptimization information
int SCIPreoptGetLastRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:4944
int SCIPreoptGetNTotalInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:5024
type definitions for LP management
int SCIPreoptnodeGetNDualBoundChgs(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5822
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:4934
int SCIPreoptGetNRestartsGlobal(SCIP_REOPT *reopt)
Definition: reopt.c:4904
void SCIPreoptnodeSetParentID(SCIP_REOPTNODE *reoptnode, unsigned int parentid)
Definition: reopt.c:5902
enum SCIP_ReoptType SCIP_REOPTTYPE
Definition: type_reopt.h:58
type definitions for problem variables
int SCIPreoptGetNTotalFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4964
int SCIPreoptnodeGetNVars(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5802
data structures for collecting reoptimization information
int SCIPreoptnodeGetNChildren(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5835
SCIP_Real SCIPreoptnodeGetLowerbound(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5845
int SCIPreoptGetNTotalCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:5004
int SCIPreoptGetNCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:4994
int SCIPreoptGetNFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4954
void SCIPreoptnodeGetConss(SCIP_REOPTNODE *reoptnode, SCIP_VAR ***vars, SCIP_Real **bounds, SCIP_BOUNDTYPE **boundtypes, int mem, int *nconss, int *nvars)
Definition: reopt.c:5865
#define SCIP_Real
Definition: def.h:157
int SCIPreoptGetNRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:4914
int SCIPreoptGetNPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4974
enum Reopt_ConsType REOPT_CONSTYPE
Definition: type_reopt.h:67
SCIP_REOPTTYPE SCIPreoptnodeGetType(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5855
common defines and data types used in all packages of SCIP
int SCIPreoptGetNTotalRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:4924
int SCIPreoptGetNTotalPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4984
int SCIPreoptnodeGetNConss(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5812