pricer_gcg.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
4 /* GCG --- Generic Column Generation */
5 /* a Dantzig-Wolfe decomposition based extension */
6 /* of the branch-cut-and-price framework */
7 /* SCIP --- Solving Constraint Integer Programs */
8 /* */
9 /* Copyright (C) 2010-2018 Operations Research, RWTH Aachen University */
10 /* Zuse Institute Berlin (ZIB) */
11 /* */
12 /* This program is free software; you can redistribute it and/or */
13 /* modify it under the terms of the GNU Lesser General Public License */
14 /* as published by the Free Software Foundation; either version 3 */
15 /* of the License, or (at your option) any later version. */
16 /* */
17 /* This program is distributed in the hope that it will be useful, */
18 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
19 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
20 /* GNU Lesser General Public License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with this program; if not, write to the Free Software */
24 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
25 /* */
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
36 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
37 
38 #ifndef GCG_PRICER_GCG__
39 #define GCG_PRICER_GCG__
40 
41 #include "scip/scip.h"
42 #include "type_solver.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
49 {
54 };
56 
57 
58 
60 extern
61 SCIP_RETCODE SCIPincludePricerGcg(
62  SCIP* scip,
63  SCIP* origprob
64  );
65 
67 extern
69  SCIP* scip
70  );
71 
73 extern
74 SCIP_VAR** GCGmasterGetPricedvars(
75  SCIP* scip
76  );
77 
79 extern
81  SCIP* scip
82  );
83 
85 extern
87  SCIP* scip,
88  SCIP_CONS* cons,
89  int pos
90  );
91 
93 extern
94 SCIP_RETCODE GCGmasterSetRootLPSol(
95  SCIP* scip,
96  SCIP_SOL** sol
97  );
98 
99 #ifdef SCIP_STATISTIC
100 
101 extern
102 SCIP_SOL* GCGmasterGetRootLPSol(
103  SCIP* scip
104  );
105 #endif
106 
108 extern
109 SCIP_RETCODE GCGpricerIncludeSolver(
110  SCIP* scip,
111  const char* name,
112  const char* desc,
113  int priority,
114  SCIP_Bool enabled,
115  GCG_DECL_SOLVERUPDATE((*solverupdate)),
116  GCG_DECL_SOLVERSOLVE ((*solversolve)),
117  GCG_DECL_SOLVERSOLVEHEUR((*solveheur)),
118  GCG_DECL_SOLVERFREE ((*solverfree)),
119  GCG_DECL_SOLVERINIT ((*solverinit)),
120  GCG_DECL_SOLVEREXIT ((*solverexit)),
121  GCG_DECL_SOLVERINITSOL((*solverinitsol)),
122  GCG_DECL_SOLVEREXITSOL((*solverexitsol)),
123  GCG_SOLVERDATA* solverdata
124  );
125 
126 
128 extern
130  SCIP* scip
131  );
132 
134 extern
136  SCIP* scip
137  );
138 
140 extern
142  SCIP* scip
143  );
144 
146 extern
148  SCIP* scip,
149  FILE* file
150  );
151 
152 extern
154  SCIP* scip,
155  FILE* file
156  );
157 
159 extern
160 SCIP_RETCODE GCGpricerExistRays(
161  SCIP* scip,
162  SCIP_Bool* exist
163  );
164 
166 extern
168  SCIP* scip,
169  int probnr
170  );
171 
173 extern
175  SCIP* scip,
176  int probnr
177  );
178 
180 extern
182  SCIP* scip
183  );
184 
186 extern
188  SCIP* scip
189  );
190 
192 extern
193 SCIP_RETCODE GCGpricerAddCol(
194  SCIP* scip,
195  GCG_COL* col
196  );
197 
200 extern
202  SCIP* scip,
203  SCIP_SOL* origsol,
204  SCIP_Bool* stored
205  );
206 
208 extern
210  SCIP* scip
211  );
212 
214 extern
215 SCIP_Real GCGmasterGetDegeneracy(
216  SCIP* scip
217  );
218 
220 extern
222  SCIP* scip
223  );
224 
225 extern
226 SCIP_Bool GCGmasterIsBestsolValid(
227  SCIP* scip
228  );
229 
230 extern
231 SCIP_Bool GCGmasterIsSolValid(
232  SCIP* scip,
233  SCIP_SOL* mastersol
234  );
235 
236 
238 extern
240  SCIP* scip
241  );
242 
244 extern
245 SCIP_RETCODE GCGmasterPrintSimplexIters(
246  SCIP* scip,
247  FILE* file
248  );
249 
251 extern
252 SCIP_RETCODE GCGsetPricingObjs(
253  SCIP* scip,
254  SCIP_Real* dualsolconv
255  );
256 
258 extern
260  SCIP* scip,
261  SCIP_Bool infarkas,
262  GCG_COL* gcgcol,
263  SCIP_Bool force,
264  SCIP_Bool* added,
265  SCIP_VAR** addedvar,
266  SCIP_Real score
268  );
269 
271 extern
272 SCIP_Real GCGcomputeRedCostGcgCol(
273  SCIP* scip,
274  SCIP_Bool infarkas,
275  GCG_COL* gcgcol,
276  SCIP_Real* objvalptr
277  );
278 
279 
281 extern
282 SCIP_RETCODE GCGcomputeColMastercoefs(
283  SCIP* scip,
284  GCG_COL* gcgcol
285  );
286 
287 #ifdef __cplusplus
288 }
289 #endif
290 
291 #endif
SCIP_RETCODE GCGpricerAddCol(SCIP *scip, GCG_COL *col)
int GCGmasterGetNPricedvars(SCIP *scip)
enum GCG_Pricetype GCG_PRICETYPE
Definition: pricer_gcg.h:55
SCIP_RETCODE GCGpricerIncludeSolver(SCIP *scip, const char *name, const char *desc, int priority, SCIP_Bool enabled, GCG_DECL_SOLVERUPDATE((*solverupdate)), GCG_DECL_SOLVERSOLVE((*solversolve)), GCG_DECL_SOLVERSOLVEHEUR((*solveheur)), GCG_DECL_SOLVERFREE((*solverfree)), GCG_DECL_SOLVERINIT((*solverinit)), GCG_DECL_SOLVEREXIT((*solverexit)), GCG_DECL_SOLVERINITSOL((*solverinitsol)), GCG_DECL_SOLVEREXITSOL((*solverexitsol)), GCG_SOLVERDATA *solverdata)
struct GCG_Solver GCG_SOLVER
Definition: type_solver.h:50
int GCGpricerGetNSolvers(SCIP *scip)
SCIP_RETCODE GCGsetPricingObjs(SCIP *scip, SCIP_Real *dualsolconv)
#define GCG_DECL_SOLVEREXIT(x)
Definition: type_solver.h:75
SCIP_Bool GCGmasterIsBestsolValid(SCIP *scip)
int GCGpricerGetMaxColsProb(SCIP *scip)
SCIP_RETCODE GCGmasterTransOrigSolToMasterVars(SCIP *scip, SCIP_SOL *origsol, SCIP_Bool *stored)
SCIP_RETCODE GCGcreateNewMasterVarFromGcgCol(SCIP *scip, SCIP_Bool infarkas, GCG_COL *gcgcol, SCIP_Bool force, SCIP_Bool *added, SCIP_VAR **addedvar, SCIP_Real score)
void GCGpricerPrintPricingStatistics(SCIP *scip, FILE *file)
type definitions for pricing problem solvers in GCG project
void GCGpricerPrintStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE GCGpricerExistRays(SCIP *scip, SCIP_Bool *exist)
#define GCG_DECL_SOLVERFREE(x)
Definition: type_solver.h:59
void GCGpricerPrintListOfSolvers(SCIP *scip)
struct GCG_Col GCG_COL
Definition: type_gcgcol.h:45
SCIP_RETCODE GCGmasterCreateInitialMastervars(SCIP *scip)
GCG_SOLVER ** GCGpricerGetSolvers(SCIP *scip)
#define GCG_DECL_SOLVERINITSOL(x)
Definition: type_solver.h:86
SCIP_Real GCGmasterGetDegeneracy(SCIP *scip)
GCG_Pricetype
Definition: pricer_gcg.h:48
#define GCG_DECL_SOLVEREXITSOL(x)
Definition: type_solver.h:97
SCIP_RETCODE GCGcomputeColMastercoefs(SCIP *scip, GCG_COL *gcgcol)
SCIP_Real GCGcomputeRedCostGcgCol(SCIP *scip, SCIP_Bool infarkas, GCG_COL *gcgcol, SCIP_Real *objvalptr)
SCIP_RETCODE GCGmasterPrintSimplexIters(SCIP *scip, FILE *file)
int GCGpricerGetMaxColsRound(SCIP *scip)
int GCGpricerGetNRaysProb(SCIP *scip, int probnr)
SCIP_Longint GCGmasterGetPricingSimplexIters(SCIP *scip)
#define GCG_DECL_SOLVERUPDATE(x)
Definition: type_solver.h:105
SCIP_Bool GCGmasterIsCurrentSolValid(SCIP *scip)
SCIP_VAR ** GCGmasterGetPricedvars(SCIP *scip)
#define GCG_DECL_SOLVERSOLVE(x)
Definition: type_solver.h:119
SCIP * GCGmasterGetOrigprob(SCIP *scip)
int GCGpricerGetNPointsProb(SCIP *scip, int probnr)
#define GCG_DECL_SOLVERINIT(x)
Definition: type_solver.h:67
SCIP_Bool GCGmasterIsSolValid(SCIP *scip, SCIP_SOL *mastersol)
SCIP_RETCODE GCGmasterAddMasterconsToHashmap(SCIP *scip, SCIP_CONS *cons, int pos)
SCIP_RETCODE GCGmasterSetRootLPSol(SCIP *scip, SCIP_SOL **sol)
#define GCG_DECL_SOLVERSOLVEHEUR(x)
Definition: type_solver.h:133
SCIP_RETCODE SCIPincludePricerGcg(SCIP *scip, SCIP *origprob)