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 */
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 */
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 */
59  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
60  );
61 
62 /** returns the number of child nodes of @p reoptnode */
65  SCIP_REOPTNODE* reoptnode /**< node of the reoptimizzation tree */
66  );
67 
68 /* return the lower bound stored at @p ID id */
71  SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
72  );
73 
74 /** returns the type of the @p reoptnode */
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. */
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 */
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 */
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 */
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 */
133  SCIP_REOPT* reopt /**< reoptimization data structure */
134  );
135 
136 /** returns the number of iteration with the last global restarts */
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 */
145  SCIP_REOPT* reopt /**< reoptimization data structure */
146  );
147 
148 /** returns the number of nodes providing an improving feasible LP solution over all runs */
151  SCIP_REOPT* reopt /**< reoptimization data structure */
152  );
153 
154 /** returns the number of nodes that exceeded the cutoff bound in the current run */
157  SCIP_REOPT* reopt /**< reoptimization data structure */
158  );
159 
160 /** returns the number of nodes that exceeded the cutoff bound over all runs */
163  SCIP_REOPT* reopt /**< reoptimization data structure */
164  );
165 
166 /** returns the number of reoptimized nodes that were cut off in the current run */
169  SCIP_REOPT* reopt /*< reoptimization data structure */
170  );
171 
172 /** returns the number of reoptimized nodes that were cut off over all runs */
175  SCIP_REOPT* reopt /*< reoptimization data structure */
176  );
177 
178 /** returns the number of stored nodes with an infeasible LP in the current run */
181  SCIP_REOPT* reopt /*< reoptimization data structure */
182  );
183 
184 /** returns the number of stored nodes with an infeasible LP over all runs */
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
SCIP_EXPORT int SCIPreoptGetNCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:4994
SCIP_EXPORT int SCIPreoptGetNTotalPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4984
SCIP_EXPORT int SCIPreoptGetNTotalCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:5004
#define SCIP_EXPORT
Definition: def.h:98
SCIP_EXPORT int SCIPreoptGetNPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4974
SCIP_EXPORT int SCIPreoptnodeGetNChildren(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5835
SCIP_EXPORT void SCIPreoptnodeSetParentID(SCIP_REOPTNODE *reoptnode, unsigned int parentid)
Definition: reopt.c:5902
type definitions for collecting reoptimization information
SCIP_EXPORT int SCIPreoptnodeGetNVars(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5802
type definitions for LP management
SCIP_EXPORT int SCIPreoptGetNRestartsGlobal(SCIP_REOPT *reopt)
Definition: reopt.c:4904
enum SCIP_ReoptType SCIP_REOPTTYPE
Definition: type_reopt.h:58
type definitions for problem variables
SCIP_EXPORT void SCIPreoptnodeGetSplitCons(SCIP_REOPTNODE *reoptnode, SCIP_VAR **vars, SCIP_Real *vals, REOPT_CONSTYPE *constype, int conssize, int *nvars)
SCIP_EXPORT SCIP_Real SCIPreoptnodeGetLowerbound(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5845
SCIP_EXPORT int SCIPreoptGetNInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:5014
SCIP_EXPORT int SCIPreoptnodeGetNDualBoundChgs(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5822
data structures for collecting reoptimization information
SCIP_EXPORT int SCIPreoptGetNTotalFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4964
SCIP_EXPORT SCIP_REOPTTYPE SCIPreoptnodeGetType(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5855
SCIP_EXPORT int SCIPreoptGetFirstRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:4934
SCIP_EXPORT int SCIPreoptGetLastRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:4944
SCIP_EXPORT void SCIPreoptnodeGetConss(SCIP_REOPTNODE *reoptnode, SCIP_VAR ***vars, SCIP_Real **bounds, SCIP_BOUNDTYPE **boundtypes, int mem, int *nconss, int *nvars)
Definition: reopt.c:5865
SCIP_EXPORT int SCIPreoptGetNTotalInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:5024
#define SCIP_Real
Definition: def.h:164
SCIP_EXPORT int SCIPreoptGetNFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4954
SCIP_EXPORT int SCIPreoptnodeGetNConss(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5812
int SCIPreoptGetNRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:4914
enum Reopt_ConsType REOPT_CONSTYPE
Definition: type_reopt.h:67
common defines and data types used in all packages of SCIP
int SCIPreoptGetNTotalRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:4924