Scippy

SCIP

Solving Constraint Integer Programs

type_presol.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 type_presol.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for presolvers
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_TYPE_PRESOL_H__
25 #define __SCIP_TYPE_PRESOL_H__
26 
27 #include "scip/def.h"
28 #include "scip/type_retcode.h"
29 #include "scip/type_result.h"
30 #include "scip/type_scip.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 typedef struct SCIP_Presol SCIP_PRESOL; /**< presolver data structure */
37 typedef struct SCIP_PresolData SCIP_PRESOLDATA; /**< presolver specific data */
38 
39 
40 /** copy method for presolver plugins (called when SCIP copies plugins)
41  *
42  * input:
43  * - scip : SCIP main data structure
44  * - presol : the presolver itself
45  */
46 #define SCIP_DECL_PRESOLCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_PRESOL* presol)
47 
48 /** destructor of presolver to free user data (called when SCIP is exiting)
49  *
50  * input:
51  * - scip : SCIP main data structure
52  * - presol : the presolver itself
53  */
54 #define SCIP_DECL_PRESOLFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_PRESOL* presol)
55 
56 /** initialization method of presolver (called after problem was transformed)
57  *
58  * input:
59  * - scip : SCIP main data structure
60  * - presol : the presolver itself
61  */
62 #define SCIP_DECL_PRESOLINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_PRESOL* presol)
63 
64 /** deinitialization method of presolver (called before transformed problem is freed)
65  *
66  * input:
67  * - scip : SCIP main data structure
68  * - presol : the presolver itself
69  */
70 #define SCIP_DECL_PRESOLEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_PRESOL* presol)
71 
72 /** presolving initialization method of presolver (called when presolving is about to begin)
73  *
74  * This method is called when the presolving process is about to begin, even if presolving is turned off.
75  * The presolver may use this call to initialize its data structures.
76  *
77  * Necessary modifications that have to be performed even if presolving is turned off should be done here or in the
78  * presolving deinitialization call (SCIP_DECL_PRESOLSEXITPRE()).
79  *
80  * input:
81  * - scip : SCIP main data structure
82  * - presol : the presolver itself
83  */
84 #define SCIP_DECL_PRESOLINITPRE(x) SCIP_RETCODE x (SCIP* scip, SCIP_PRESOL* presol)
85 
86 /** presolving deinitialization method of presolver (called after presolving has been finished)
87  *
88  * This method is called after the presolving has been finished, even if presolving is turned off.
89  * The presolver may use this call e.g. to clean up or modify its data structures.
90  *
91  * Necessary modifications that have to be performed even if presolving is turned off should be done here or in the
92  * presolving initialization call (SCIP_DECL_PRESOLINITPRE()).
93  *
94  * Besides necessary modifications and clean up, no time consuming operations should be performed, especially if the
95  * problem has already been solved. Use the method SCIPgetStatus(), which in this case returns SCIP_STATUS_OPTIMAL,
96  * SCIP_STATUS_INFEASIBLE, SCIP_STATUS_UNBOUNDED, or SCIP_STATUS_INFORUNBD.
97  *
98  * input:
99  * - scip : SCIP main data structure
100  * - presol : the presolver itself
101  */
102 #define SCIP_DECL_PRESOLEXITPRE(x) SCIP_RETCODE x (SCIP* scip, SCIP_PRESOL* presol)
103 
104 /** execution method of presolver
105  *
106  * The presolver should go through the variables and constraints and tighten the domains or
107  * constraints. Each tightening should increase the given total numbers of changes.
108  *
109  * input:
110  * - scip : SCIP main data structure
111  * - presol : the presolver itself
112  * - nrounds : number of presolving rounds already done
113  * - presoltiming : current presolving timing
114  * - nnewfixedvars : number of variables fixed since the last call to the presolver
115  * - nnewaggrvars : number of variables aggregated since the last call to the presolver
116  * - nnewchgvartypes : number of variable type changes since the last call to the presolver
117  * - nnewchgbds : number of variable bounds tightened since the last call to the presolver
118  * - nnewholes : number of domain holes added since the last call to the presolver
119  * - nnewdelconss : number of deleted constraints since the last call to the presolver
120  * - nnewaddconss : number of added constraints since the last call to the presolver
121  * - nnewupgdconss : number of upgraded constraints since the last call to the presolver
122  * - nnewchgcoefs : number of changed coefficients since the last call to the presolver
123  * - nnewchgsides : number of changed left or right hand sides since the last call to the presolver
124  *
125  * @note the counters state the changes since the last call including the changes of this presolver during its last
126  * last call
127  *
128  * @note if the presolver uses dual information it is nesassary to check via calling SCIPallowDualReds if dual
129  * reductions are allowed.
130  *
131  * input/output:
132  * - nfixedvars : pointer to total number of variables fixed of all presolvers
133  * - naggrvars : pointer to total number of variables aggregated of all presolvers
134  * - nchgvartypes : pointer to total number of variable type changes of all presolvers
135  * - nchgbds : pointer to total number of variable bounds tightened of all presolvers
136  * - naddholes : pointer to total number of domain holes added of all presolvers
137  * - ndelconss : pointer to total number of deleted constraints of all presolvers
138  * - naddconss : pointer to total number of added constraints of all presolvers
139  * - nupgdconss : pointer to total number of upgraded constraints of all presolvers
140  * - nchgcoefs : pointer to total number of changed coefficients of all presolvers
141  * - nchgsides : pointer to total number of changed left/right hand sides of all presolvers
142  *
143  * output:
144  * - result : pointer to store the result of the presolving call
145  *
146  * possible return values for *result:
147  * - SCIP_UNBOUNDED : at least one variable is not bounded by any constraint in obj. direction -> problem is unbounded
148  * - SCIP_CUTOFF : at least one constraint is infeasible in the variable's bounds -> problem is infeasible
149  * - SCIP_SUCCESS : the presolver found a reduction
150  * - SCIP_DIDNOTFIND : the presolver searched, but did not find a presolving change
151  * - SCIP_DIDNOTRUN : the presolver was skipped
152  */
153 #define SCIP_DECL_PRESOLEXEC(x) SCIP_RETCODE x (SCIP* scip, SCIP_PRESOL* presol, int nrounds, SCIP_PRESOLTIMING presoltiming, \
154  int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, \
155  int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, \
156  int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, \
157  int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result)
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif
struct SCIP_PresolData SCIP_PRESOLDATA
Definition: type_presol.h:37
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
result codes for SCIP callback methods
struct SCIP_Presol SCIP_PRESOL
Definition: type_presol.h:36
common defines and data types used in all packages of SCIP