Scippy

SCIP

Solving Constraint Integer Programs

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-2014 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 presol.h
17  * @brief internal methods for presolvers
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_PRESOL_H__
24 #define __SCIP_PRESOL_H__
25 
26 
27 #include "scip/def.h"
28 #include "blockmemshell/memory.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_result.h"
31 #include "scip/type_set.h"
32 #include "scip/type_presol.h"
33 #include "scip/pub_presol.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /** copies the given presolver to a new scip */
40 extern
42  SCIP_PRESOL* presol, /**< presolver */
43  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
44  );
45 
46 /** creates a presolver */
47 extern
49  SCIP_PRESOL** presol, /**< pointer to store presolver */
50  SCIP_SET* set, /**< global SCIP settings */
51  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
52  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
53  const char* name, /**< name of presolver */
54  const char* desc, /**< description of presolver */
55  int priority, /**< priority of the presolver (>= 0: before, < 0: after constraint handlers) */
56  int maxrounds, /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */
57  SCIP_Bool delay, /**< should presolver be delayed, if other presolvers found reductions? */
58  SCIP_DECL_PRESOLCOPY ((*presolcopy)), /**< copy method of presolver or NULL if you don't want to copy your plugin into sub-SCIPs */
59  SCIP_DECL_PRESOLFREE ((*presolfree)), /**< destructor of presolver to free user data (called when SCIP is exiting) */
60  SCIP_DECL_PRESOLINIT ((*presolinit)), /**< initialization method of presolver (called after problem was transformed) */
61  SCIP_DECL_PRESOLEXIT ((*presolexit)), /**< deinitialization method of presolver (called before transformed problem is freed) */
62  SCIP_DECL_PRESOLINITPRE((*presolinitpre)),/**< presolving initialization method of presolver (called when presolving is about to begin) */
63  SCIP_DECL_PRESOLEXITPRE((*presolexitpre)),/**< presolving deinitialization method of presolver (called after presolving has been finished) */
64  SCIP_DECL_PRESOLEXEC ((*presolexec)), /**< execution method of presolver */
65  SCIP_PRESOLDATA* presoldata /**< presolver data */
66  );
67 
68 /** frees memory of presolver */
69 extern
71  SCIP_PRESOL** presol, /**< pointer to presolver data structure */
72  SCIP_SET* set /**< global SCIP settings */
73  );
74 
75 /** initializes presolver */
76 extern
78  SCIP_PRESOL* presol, /**< presolver */
79  SCIP_SET* set /**< global SCIP settings */
80  );
81 
82 /** deinitializes presolver */
83 extern
85  SCIP_PRESOL* presol, /**< presolver */
86  SCIP_SET* set /**< global SCIP settings */
87  );
88 
89 /** informs presolver that the presolving process is being started */
90 extern
92  SCIP_PRESOL* presol, /**< presolver */
93  SCIP_SET* set /**< global SCIP settings */
94  );
95 
96 /** informs presolver that the presolving process is finished */
97 extern
99  SCIP_PRESOL* presol, /**< presolver */
100  SCIP_SET* set /**< global SCIP settings */
101  );
102 
103 /** executes presolver */
104 extern
106  SCIP_PRESOL* presol, /**< presolver */
107  SCIP_SET* set, /**< global SCIP settings */
108  SCIP_Bool execdelayed, /**< execute presolver even if it is marked to be delayed */
109  int nrounds, /**< number of presolving rounds already done */
110  int* nfixedvars, /**< pointer to total number of variables fixed of all presolvers */
111  int* naggrvars, /**< pointer to total number of variables aggregated of all presolvers */
112  int* nchgvartypes, /**< pointer to total number of variable type changes of all presolvers */
113  int* nchgbds, /**< pointer to total number of variable bounds tightened of all presolvers */
114  int* naddholes, /**< pointer to total number of domain holes added of all presolvers */
115  int* ndelconss, /**< pointer to total number of deleted constraints of all presolvers */
116  int* naddconss, /**< pointer to total number of added constraints of all presolvers */
117  int* nupgdconss, /**< pointer to total number of upgraded constraints of all presolvers */
118  int* nchgcoefs, /**< pointer to total number of changed coefficients of all presolvers */
119  int* nchgsides, /**< pointer to total number of changed left/right hand sides of all presolvers */
120  SCIP_RESULT* result /**< pointer to store the result of the callback method */
121  );
122 
123 /** sets priority of presolver */
124 extern
126  SCIP_PRESOL* presol, /**< presolver */
127  SCIP_SET* set, /**< global SCIP settings */
128  int priority /**< new priority of the presolver */
129  );
130 
131 /** sets copy method of presolver */
132 extern
133 void SCIPpresolSetCopy(
134  SCIP_PRESOL* presol, /**< presolver */
135  SCIP_DECL_PRESOLCOPY ((*presolcopy)) /**< copy method of presolver or NULL if you don't want to copy your plugin into sub-SCIPs */
136  );
137 
138 /** sets destructor method of presolver */
139 extern
140 void SCIPpresolSetFree(
141  SCIP_PRESOL* presol, /**< presolver */
142  SCIP_DECL_PRESOLFREE ((*presolfree)) /**< destructor of presolver */
143  );
144 
145 /** sets initialization method of presolver */
146 extern
147 void SCIPpresolSetInit(
148  SCIP_PRESOL* presol, /**< presolver */
149  SCIP_DECL_PRESOLINIT ((*presolinit)) /**< initialize presolver */
150  );
151 
152 /** sets deinitialization method of presolver */
153 extern
154 void SCIPpresolSetExit(
155  SCIP_PRESOL* presol, /**< presolver */
156  SCIP_DECL_PRESOLEXIT ((*presolexit)) /**< deinitialize presolver */
157  );
158 
159 /** sets solving process initialization method of presolver */
160 extern
162  SCIP_PRESOL* presol, /**< presolver */
163  SCIP_DECL_PRESOLINITPRE ((*presolinitpre))/**< solving process initialization method of presolver */
164  );
165 
166 /** sets solving process deinitialization method of presolver */
167 extern
169  SCIP_PRESOL* presol, /**< presolver */
170  SCIP_DECL_PRESOLEXITPRE ((*presolexitpre))/**< solving process deinitialization method of presolver */
171  );
172 
173 
174 #ifdef __cplusplus
175 }
176 #endif
177 
178 #endif
179