Scippy

SCIP

Solving Constraint Integer Programs

pricer.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 pricer.h
17  * @brief internal methods for variable pricers
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_PRICER_H__
24 #define __SCIP_PRICER_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_lp.h"
33 #include "scip/type_prob.h"
34 #include "scip/type_pricestore.h"
35 #include "scip/type_pricer.h"
36 #include "scip/pub_pricer.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 
43 /** copies the given pricer to a new scip */
44 extern
46  SCIP_PRICER* pricer, /**< pricer */
47  SCIP_SET* set, /**< SCIP_SET of SCIP to copy to */
48  SCIP_Bool* valid /**< was the copying process valid? */
49  );
50 
51 /** creates a variable pricer */
52 extern
54  SCIP_PRICER** pricer, /**< pointer to variable pricer data structure */
55  SCIP_SET* set, /**< global SCIP settings */
56  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
57  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
58  const char* name, /**< name of variable pricer */
59  const char* desc, /**< description of variable pricer */
60  int priority, /**< priority of the variable pricer */
61  SCIP_Bool delay, /**< should the pricer be delayed until no other pricers or already existing
62  * problem variables with negative reduced costs are found */
63  SCIP_DECL_PRICERCOPY ((*pricercopy)), /**< copy method of pricer or NULL if you don't want to copy your plugin into sub-SCIPs */
64  SCIP_DECL_PRICERFREE ((*pricerfree)), /**< destructor of variable pricer */
65  SCIP_DECL_PRICERINIT ((*pricerinit)), /**< initialize variable pricer */
66  SCIP_DECL_PRICEREXIT ((*pricerexit)), /**< deinitialize variable pricer */
67  SCIP_DECL_PRICERINITSOL((*pricerinitsol)),/**< solving process initialization method of variable pricer */
68  SCIP_DECL_PRICEREXITSOL((*pricerexitsol)),/**< solving process deinitialization method of variable pricer */
69  SCIP_DECL_PRICERREDCOST((*pricerredcost)),/**< reduced cost pricing method of variable pricer for feasible LPs */
70  SCIP_DECL_PRICERFARKAS((*pricerfarkas)), /**< Farkas pricing method of variable pricer for infeasible LPs */
71  SCIP_PRICERDATA* pricerdata /**< variable pricer data */
72  );
73 
74 /** calls destructor and frees memory of variable pricer */
75 extern
77  SCIP_PRICER** pricer, /**< pointer to variable pricer data structure */
78  SCIP_SET* set /**< global SCIP settings */
79  );
80 
81 /** initializes variable pricer */
82 extern
84  SCIP_PRICER* pricer, /**< variable pricer */
85  SCIP_SET* set /**< global SCIP settings */
86  );
87 
88 /** calls exit method of variable pricer */
89 extern
91  SCIP_PRICER* pricer, /**< variable pricer */
92  SCIP_SET* set /**< global SCIP settings */
93  );
94 
95 /** informs variable pricer that the branch and bound process is being started */
96 extern
98  SCIP_PRICER* pricer, /**< variable pricer */
99  SCIP_SET* set /**< global SCIP settings */
100  );
101 
102 /** informs variable pricer that the branch and bound process data is being freed */
103 extern
105  SCIP_PRICER* pricer, /**< variable pricer */
106  SCIP_SET* set /**< global SCIP settings */
107  );
108 
109 /** activates pricer such that it is called in LP solving loop */
110 extern
112  SCIP_PRICER* pricer, /**< variable pricer */
113  SCIP_SET* set /**< global SCIP settings */
114  );
115 
116 /** deactivates pricer such that it is no longer called in LP solving loop */
117 extern
119  SCIP_PRICER* pricer, /**< variable pricer */
120  SCIP_SET* set /**< global SCIP settings */
121  );
122 
123 /** calls reduced cost pricing method of variable pricer */
124 extern
126  SCIP_PRICER* pricer, /**< variable pricer */
127  SCIP_SET* set, /**< global SCIP settings */
128  SCIP_PROB* prob, /**< transformed problem */
129  SCIP_Real* lowerbound, /**< local lower bound computed by the pricer */
130  SCIP_Bool* stopearly, /**< should pricing be stopped, although new variables were added? */
131  SCIP_RESULT* result /**< result of the pricing process */
132  );
133 
134 /** calls Farkas pricing method of variable pricer */
135 extern
137  SCIP_PRICER* pricer, /**< variable pricer */
138  SCIP_SET* set, /**< global SCIP settings */
139  SCIP_PROB* prob /**< transformed problem */
140  );
141 
142 /** depending on the LP's solution status, calls reduced cost or Farkas pricing method of variable pricer */
143 extern
145  SCIP_PRICER* pricer, /**< variable pricer */
146  SCIP_SET* set, /**< global SCIP settings */
147  SCIP_PROB* prob, /**< transformed problem */
148  SCIP_LP* lp, /**< LP data */
149  SCIP_PRICESTORE* pricestore, /**< pricing storage */
150  SCIP_Real* lowerbound, /**< local lower bound computed by the pricer */
151  SCIP_Bool* stopearly, /**< should pricing be stopped, although new variables were added? */
152  SCIP_RESULT* result /**< result of the pricing process */
153  );
154 
155 /** sets priority of variable pricer */
156 extern
158  SCIP_PRICER* pricer, /**< variable pricer */
159  SCIP_SET* set, /**< global SCIP settings */
160  int priority /**< new priority of the variable pricer */
161  );
162 
163 /** sets copy callback of pricer */
164 extern
165 void SCIPpricerSetCopy(
166  SCIP_PRICER* pricer, /**< variable pricer */
167  SCIP_DECL_PRICERCOPY ((*pricercopy)) /**< copy callback of pricer */
168  );
169 
170 /** sets destructor callback of pricer */
171 extern
172 void SCIPpricerSetFree(
173  SCIP_PRICER* pricer, /**< pricer */
174  SCIP_DECL_PRICERFREE ((*pricerfree)) /**< destructor of pricer */
175  );
176 
177 /** sets initialization callback of pricer */
178 extern
179 void SCIPpricerSetInit(
180  SCIP_PRICER* pricer, /**< pricer */
181  SCIP_DECL_PRICERINIT ((*pricerinit)) /**< initialize pricer */
182  );
183 
184 /** sets deinitialization callback of pricer */
185 extern
186 void SCIPpricerSetExit(
187  SCIP_PRICER* pricer, /**< pricer */
188  SCIP_DECL_PRICEREXIT ((*pricerexit)) /**< deinitialize pricer */
189  );
190 
191 /** sets solving process initialization callback of pricer */
192 extern
194  SCIP_PRICER* pricer, /**< pricer */
195  SCIP_DECL_PRICERINITSOL ((*pricerinitsol))/**< solving process initialization callback of pricer */
196  );
197 
198 /** sets solving process deinitialization callback of pricer */
199 extern
201  SCIP_PRICER* pricer, /**< pricer */
202  SCIP_DECL_PRICEREXITSOL ((*pricerexitsol))/**< solving process deinitialization callback of pricer */
203  );
204 
205 #ifdef __cplusplus
206 }
207 #endif
208 
209 #endif
210