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-2025 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file pub_reopt.h
26 * @ingroup PUBLICCOREAPI
27 * @brief public methods for reoptimization
28 * @author Jakob Witzig
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_PUB_REOPT_H__
34#define __SCIP_PUB_REOPT_H__
35
36#include "scip/def.h"
37#include "scip/type_lp.h"
38#include "scip/type_reopt.h"
39#include "scip/type_var.h"
40
41#ifdef NDEBUG
42#include "scip/struct_reopt.h"
43#endif
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/*
50 * ReoptNode methods
51 */
52
53/** returns the number of bound changes stored in the reoptnode */
54SCIP_EXPORT
56 SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
57 );
58
59/** returns the number of bound changes at the node stored at ID id */
60SCIP_EXPORT
62 SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
63 );
64
65/** returns the number of stored bound changes based on dual information in the reopttree at ID id */
66SCIP_EXPORT
68 SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
69 );
70
71/** returns the number of child nodes of @p reoptnode */
72SCIP_EXPORT
74 SCIP_REOPTNODE* reoptnode /**< node of the reoptimizzation tree */
75 );
76
77/* return the lower bound stored at @p ID id */
78SCIP_EXPORT
80 SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
81 );
82
83/** returns the type of the @p reoptnode */
84SCIP_EXPORT
86 SCIP_REOPTNODE* reoptnode /**< node of the reoptimization tree */
87 );
88
89/** returns all added constraints at ID id */
90SCIP_EXPORT
92 SCIP_REOPTNODE* reoptnode, /**< reoptimization data structure */
93 SCIP_VAR*** vars, /**< 2-dim array of variables */
94 SCIP_Real** bounds, /**< 2-dim array of bounds */
95 SCIP_BOUNDTYPE** boundtypes, /**< 2-dim array of boundtypes */
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 */
102SCIP_EXPORT
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 */
113SCIP_EXPORT
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 */
129SCIP_EXPORT
131 SCIP_REOPT* reopt /**< reoptimization data structure */
132 );
133
134/** returns the number of iteration with the last global restarts */
135SCIP_EXPORT
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 */
141SCIP_EXPORT
143 SCIP_REOPT* reopt /**< reoptimization data structure */
144 );
145
146/** returns the number of nodes providing an improving feasible LP solution over all runs */
147SCIP_EXPORT
149 SCIP_REOPT* reopt /**< reoptimization data structure */
150 );
151
152/** returns the number of nodes that exceeded the cutoff bound in the current run */
153SCIP_EXPORT
155 SCIP_REOPT* reopt /**< reoptimization data structure */
156 );
157
158/** returns the number of nodes that exceeded the cutoff bound over all runs */
159SCIP_EXPORT
161 SCIP_REOPT* reopt /**< reoptimization data structure */
162 );
163
164/** returns the number of reoptimized nodes that were cut off in the current run */
165SCIP_EXPORT
167 SCIP_REOPT* reopt /*< reoptimization data structure */
168 );
169
170/** returns the number of reoptimized nodes that were cut off over all runs */
171SCIP_EXPORT
173 SCIP_REOPT* reopt /*< reoptimization data structure */
174 );
175
176/** returns the number of stored nodes with an infeasible LP in the current run */
177SCIP_EXPORT
179 SCIP_REOPT* reopt /*< reoptimization data structure */
180 );
181
182/** returns the number of stored nodes with an infeasible LP over all runs */
183SCIP_EXPORT
185 SCIP_REOPT* reopt /*< reoptimization data structure */
186 );
187
188#ifdef NDEBUG
189
190/* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
191 * speed up the algorithms.
192 */
193
194#define SCIPreoptnodeGetNVars(reoptnode) (reoptnode->nvars)
195#define SCIPreoptnodeGetNConss(reoptnode) (reoptnode->nconss)
196#define SCIPreoptnodeGetNDualBoundChgs(reoptnode) (reoptnode->dualconscur->nvars)
197#define SCIPreoptnodeGetNChildren(reoptnode) (reoptnode->nchilds)
198#define SCIPreoptnodeGetLowerbound(reoptnode) (reoptnode->lowerbound)
199#define SCIPreoptnodeGetType(reoptnode) (reoptnode->reopttype)
200
201#define SCIPreoptGetNRestartsGlobal(reopt) (reopt->nglbrestarts)
202#define SCIPreoptGetNRestartsLocal(reopt) (reopt->nlocrestarts)
203#define SCIPreoptGetNTotalRestartsLocal(reopt) (reopt->ntotallocrestarts)
204#define SCIPreoptGetFirstRestarts(reopt) (reopt->firstrestart)
205#define SCIPreoptGetLastRestarts(reopt) (reopt->lastrestart)
206#define SCIPreoptGetNFeasNodes(reopt) (reopt->reopttree->nfeasnodes)
207#define SCIPreoptGetNTotalFeasNodes(reopt) (reopt->reopttree->ntotalfeasnodes)
208#define SCIPreoptGetNPrunedNodes(reopt) (reopt->reopttree->nprunednodes)
209#define SCIPreoptGetNTotalPrunedNodes(reopt) (reopt->reopttree->ntotalprunednodes)
210#define SCIPreoptGetNCutoffReoptnodes(reopt) (reopt->reopttree->ncutoffreoptnodes)
211#define SCIPreoptGetNTotalCutoffReoptnodes(reopt) (reopt->reopttree->ntotalcutoffreoptnodes)
212#define SCIPreoptGetNInfNodes(reopt) (reopt->reopttree->ninfsubtrees)
213#define SCIPreoptGetNTotalInfNodes(reopt) (reopt->reopttree->ntotalinfnodes)
214
215#endif
216
217#ifdef __cplusplus
218}
219#endif
220
221#endif
common defines and data types used in all packages of SCIP
#define SCIP_Real
Definition: def.h:156
int SCIPreoptGetNTotalPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4967
int SCIPreoptGetNTotalFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4947
int SCIPreoptGetFirstRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:4917
int SCIPreoptGetNTotalRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:4907
int SCIPreoptGetNPrunedNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4957
int SCIPreoptGetNFeasNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4937
SCIP_Real SCIPreoptnodeGetLowerbound(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5837
int SCIPreoptGetNRestartsLocal(SCIP_REOPT *reopt)
Definition: reopt.c:4897
void SCIPreoptnodeSetParentID(SCIP_REOPTNODE *reoptnode, unsigned int parentid)
Definition: reopt.c:5892
int SCIPreoptnodeGetNConss(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5804
void SCIPreoptnodeGetConss(SCIP_REOPTNODE *reoptnode, SCIP_VAR ***vars, SCIP_Real **bounds, SCIP_BOUNDTYPE **boundtypes, int mem, int *nconss, int *nvars)
Definition: reopt.c:5857
int SCIPreoptGetLastRestarts(SCIP_REOPT *reopt)
Definition: reopt.c:4927
int SCIPreoptnodeGetNVars(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5794
int SCIPreoptGetNTotalCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:4987
SCIP_REOPTTYPE SCIPreoptnodeGetType(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5847
int SCIPreoptGetNTotalInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:5007
int SCIPreoptGetNCutoffReoptnodes(SCIP_REOPT *reopt)
Definition: reopt.c:4977
int SCIPreoptnodeGetNChildren(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5827
int SCIPreoptnodeGetNDualBoundChgs(SCIP_REOPTNODE *reoptnode)
Definition: reopt.c:5814
int SCIPreoptGetNRestartsGlobal(SCIP_REOPT *reopt)
Definition: reopt.c:4887
int SCIPreoptGetNInfNodes(SCIP_REOPT *reopt)
Definition: reopt.c:4997
data structures for collecting reoptimization information
type definitions for LP management
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:60
type definitions for collecting reoptimization information
enum SCIP_ReoptType SCIP_REOPTTYPE
Definition: type_reopt.h:67
type definitions for problem variables