1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program */
/* GCG --- Generic Column Generation */
/* a Dantzig-Wolfe decomposition based extension */
/* of the branch-cut-and-price framework */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2010-2022 Operations Research, RWTH Aachen University */
/* Zuse Institute Berlin (ZIB) */
/* */
/* This program is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU Lesser General Public License */
/* as published by the Free Software Foundation; either version 3 */
/* of the License, or (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU Lesser General Public License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file solver.h
* @ingroup PRICING
* @brief private methods for GCG pricing solvers
* @author Henri Lotze
* @author Christian Puchert
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef GCG_SOLVER_H_
#define GCG_SOLVER_H_
#include "type_solver.h"
#include "scip/scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @ingroup PRICING
*
* @{
*/
/** creates a GCG pricing solver */
SCIP_EXPORT
SCIP_RETCODE GCGsolverCreate(
SCIP* scip, /**< SCIP data structure (master problem) */
GCG_SOLVER** solver, /**< pointer to pricing solver data structure */
const char* name, /**< name of solver */
const char* desc, /**< description of solver */
int priority, /**< priority of solver */
SCIP_Bool heurenabled, /**< flag to indicate whether heuristic solving method of the solver is enabled */
SCIP_Bool exactenabled, /**< flag to indicate whether exact solving method of the solver is enabled */
GCG_DECL_SOLVERUPDATE((*solverupdate)), /**< update method for solver */
GCG_DECL_SOLVERSOLVE ((*solversolve)), /**< solving method for solver */
GCG_DECL_SOLVERSOLVEHEUR((*solveheur)), /**< heuristic solving method for solver */
GCG_DECL_SOLVERFREE ((*solverfree)), /**< free method of solver */
GCG_DECL_SOLVERINIT ((*solverinit)), /**< init method of solver */
GCG_DECL_SOLVEREXIT ((*solverexit)), /**< exit method of solver */
GCG_DECL_SOLVERINITSOL((*solverinitsol)), /**< initsol method of solver */
GCG_DECL_SOLVEREXITSOL((*solverexitsol)), /**< exitsol method of solver */
GCG_SOLVERDATA* solverdata /**< pricing solver data */
);
/** calls destructor and frees memory of GCG pricing solver */
SCIP_EXPORT
SCIP_RETCODE GCGsolverFree(
SCIP* scip, /**< SCIP data structure (master problem) */
GCG_SOLVER** solver /**< pointer to pricing solver data structure */
);
/** initializes GCG pricing solver */
SCIP_EXPORT
SCIP_RETCODE GCGsolverInit(
SCIP* scip, /**< SCIP data structure (master problem) */
GCG_SOLVER* solver /**< pricing solver */
);
/** calls exit method of GCG pricing solver */
SCIP_EXPORT
SCIP_RETCODE GCGsolverExit(
SCIP* scip, /**< SCIP data structure (master problem) */
GCG_SOLVER* solver /**< pricing solver */
);
/** calls solving process initialization method of GCG pricing solver */
SCIP_EXPORT
SCIP_RETCODE GCGsolverInitsol(
SCIP* scip, /**< SCIP data structure (master problem) */
GCG_SOLVER* solver /**< pricing solver */
);
/** calls solving process deinitialization method of GCG pricing solver */
SCIP_EXPORT
SCIP_RETCODE GCGsolverExitsol(
SCIP* scip, /**< SCIP data structure (master problem) */
GCG_SOLVER* solver /**< pricing solver */
);
/** calls update method of GCG pricing solver */
SCIP_EXPORT
SCIP_RETCODE GCGsolverUpdate(
SCIP* pricingprob, /**< the pricing problem that should be solved */
GCG_SOLVER* solver, /**< pricing solver */
int probnr, /**< number of the pricing problem */
SCIP_Bool varobjschanged, /**< have the objective coefficients changed? */
SCIP_Bool varbndschanged, /**< have the lower and upper bounds changed? */
SCIP_Bool consschanged /**< have the constraints changed? */
);
/** calls heuristic or exact solving method of GCG pricing solver */
SCIP_EXPORT
SCIP_RETCODE GCGsolverSolve(
SCIP* scip, /**< SCIP data structure (master problem) */
SCIP* pricingprob, /**< the pricing problem that should be solved */
GCG_SOLVER* solver, /**< pricing solver */
SCIP_Bool redcost, /**< is reduced cost (TRUE) or Farkas (FALSE) pricing performed? */
SCIP_Bool heuristic, /**< shall the pricing problem be solved heuristically? */
int probnr, /**< number of the pricing problem */
SCIP_Real dualsolconv, /**< dual solution of the corresponding convexity constraint */
SCIP_Real* lowerbound, /**< pointer to store lower bound of pricing problem */
GCG_PRICINGSTATUS* status, /**< pointer to store the returned pricing status */
SCIP_Bool* solved /**< pointer to store whether the solution method was called */
);
/**@} */
#ifdef __cplusplus
}
#endif
#endif