Scippy

GCG

Branch-and-Price & Column Generation for Everyone

type_solver.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-2021 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 
28 /**@file type_solver.h
29  * @ingroup TYPEDEFINITIONS
30  * @brief type definitions for pricing problem solvers in GCG project
31  * @author Gerald Gamrath
32  * @author Christian Puchert
33  */
34 
35 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36 
37 #ifndef GCG_TYPE_SOLVER_H__
38 #define GCG_TYPE_SOLVER_H__
39 
40 #include "scip/def.h"
41 #include "scip/type_scip.h"
42 #include "type_gcgcol.h"
43 #include "type_pricingstatus.h"
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 typedef struct GCG_SolverData GCG_SOLVERDATA; /**< solver data */
50 typedef struct GCG_Solver GCG_SOLVER; /**< the solver */
51 
52 
53 /** destructor of pricing solver to free user data (called when GCG is exiting)
54  *
55  * input:
56  * - scip : SCIP main data structure (master problem)
57  * - solver : the pricing solver itself
58  */
59 #define GCG_DECL_SOLVERFREE(x) SCIP_RETCODE x (SCIP* scip, GCG_SOLVER* solver)
60 
61 /** initialization method of pricing solver (called after problem was transformed and solver is active)
62  *
63  * input:
64  * - scip : SCIP main data structure (master problem)
65  * - solver : the pricing solver itself
66  */
67 #define GCG_DECL_SOLVERINIT(x) SCIP_RETCODE x (SCIP* scip, GCG_SOLVER* solver)
68 
69 /** deinitialization method of pricing solver (called before transformed problem is freed and solver is active)
70  *
71  * input:
72  * - scip : SCIP main data structure (master problem)
73  * - solver : the pricing solver itself
74  */
75 #define GCG_DECL_SOLVEREXIT(x) SCIP_RETCODE x (SCIP* scip, GCG_SOLVER* solver)
76 
77 /** solving process initialization method of pricing solver (called when branch and bound process is about to begin)
78  *
79  * This method is called when the presolving was finished and the branch and bound process is about to begin.
80  * The pricing solver may use this call to initialize its branch and bound specific data.
81  *
82  * input:
83  * - scip : SCIP main data structure (master problem)
84  * - solver : the pricing solver itself
85  */
86 #define GCG_DECL_SOLVERINITSOL(x) SCIP_RETCODE x (SCIP* scip, GCG_SOLVER* solver)
87 
88 /** solving process deinitialization method of pricing solver (called before branch and bound process data is freed)
89  *
90  * This method is called before the branch and bound process is freed.
91  * The pricing solver should use this call to clean up its branch and bound data.
92  *
93  * input:
94  * - scip : SCIP main data structure (master problem)
95  * - solver : the pricing solver itself
96  */
97 #define GCG_DECL_SOLVEREXITSOL(x) SCIP_RETCODE x (SCIP* scip, GCG_SOLVER* solver)
98 
99 /**
100  * update method for pricing solver, used to update solver specific pricing problem data
101  *
102  * The pricing solver may use this method to update its own representation of the pricing problem,
103  * i.e. to apply changes on variable objectives and bounds and to apply branching constraints
104  */
105 #define GCG_DECL_SOLVERUPDATE(x) SCIP_RETCODE x (SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Bool varobjschanged, SCIP_Bool varbndschanged, SCIP_Bool consschanged)
106 
107 /** solving method for pricing solver which solves the pricing problem to optimality
108  *
109  *
110  * input:
111  * - scip : SCIP main data structure (master problem)
112  * - pricingprob : the pricing problem that should be solved
113  * - solver : the pricing solver itself
114  * - probnr : number of the pricing problem
115  * - dualsolconv : dual solution of the corresponding convexity constraint
116  * - lowerbound : pointer to store lower bound of pricing problem
117  * - status : pointer to store the pricing status
118  */
119 #define GCG_DECL_SOLVERSOLVE(x) SCIP_RETCODE x (SCIP* scip, SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Real dualsolconv, SCIP_Real* lowerbound, GCG_PRICINGSTATUS* status)
120 
121 /** solving method for pricing solver using heuristic pricing only
122  *
123  *
124  * input:
125  * - scip : SCIP main data structure (master problem)
126  * - pricingprob : the pricing problem that should be solved
127  * - solver : the pricing solver itself
128  * - probnr : number of the pricing problem
129  * - dualsolconv : dual solution of the corresponding convexity constraint
130  * - lowerbound : pointer to store lower bound of pricing problem
131  * - status : pointer to store the pricing status
132  */
133 #define GCG_DECL_SOLVERSOLVEHEUR(x) SCIP_RETCODE x (SCIP* scip, SCIP* pricingprob, GCG_SOLVER* solver, int probnr, SCIP_Real dualsolconv, SCIP_Real* lowerbound, GCG_PRICINGSTATUS* status)
134 
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 
140 #endif
type definitions for gcg column data structure
type definitions for pricing status