GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
solver.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
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-2026 Operations Research, RWTH Aachen University */
10/* Zuse Institute Berlin (ZIB) */
11/* */
12/* Licensed under the Apache License, Version 2.0 (the "License"); */
13/* you may not use this file except in compliance with the License. */
14/* You may obtain a copy of the License at */
15/* */
16/* http://www.apache.org/licenses/LICENSE-2.0 */
17/* */
18/* Unless required by applicable law or agreed to in writing, software */
19/* distributed under the License is distributed on an "AS IS" BASIS, */
20/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
21/* See the License for the specific language governing permissions and */
22/* limitations under the License. */
23/* */
24/* You should have received a copy of the Apache-2.0 license */
25/* along with GCG; see the file LICENSE. If not visit gcg.or.rwth-aachen.de.*/
26/* */
27/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
28
29/**@file solver.h
30 * @ingroup PRICING
31 * @brief private methods for GCG pricing solvers
32 * @author Henri Lotze
33 * @author Christian Puchert
34 */
35
36/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
37
38#ifndef GCG_SOLVER_H_
39#define GCG_SOLVER_H_
40
41
42#include "gcg/type_solver.h"
43#include "scip/scip.h"
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/**
50 * @ingroup PRICING
51 *
52 * @{
53 */
54
55/** creates a GCG pricing solver */
58 GCG* gcg, /**< GCG data structure */
59 GCG_SOLVER** solver, /**< pointer to pricing solver data structure */
60 const char* name, /**< name of solver */
61 const char* desc, /**< description of solver */
62 int priority, /**< priority of solver */
63 SCIP_Bool heurenabled, /**< flag to indicate whether heuristic solving method of the solver is enabled */
64 SCIP_Bool exactenabled, /**< flag to indicate whether exact solving method of the solver is enabled */
65 GCG_DECL_SOLVERUPDATE((*solverupdate)), /**< update method for solver */
66 GCG_DECL_SOLVERSOLVE ((*solversolve)), /**< solving method for solver */
67 GCG_DECL_SOLVERSOLVEHEUR((*solveheur)), /**< heuristic solving method for solver */
68 GCG_DECL_SOLVERFREE ((*solverfree)), /**< free method of solver */
69 GCG_DECL_SOLVERINIT ((*solverinit)), /**< init method of solver */
70 GCG_DECL_SOLVEREXIT ((*solverexit)), /**< exit method of solver */
71 GCG_DECL_SOLVERINITSOL((*solverinitsol)), /**< initsol method of solver */
72 GCG_DECL_SOLVEREXITSOL((*solverexitsol)), /**< exitsol method of solver */
73 GCG_SOLVERDATA* solverdata /**< pricing solver data */
74 );
75
76/** calls destructor and frees memory of GCG pricing solver */
79 GCG* gcg, /**< GCG data structure */
80 GCG_SOLVER** solver /**< pointer to pricing solver data structure */
81 );
82
83/** initializes GCG pricing solver */
86 GCG* gcg, /**< GCG data structure */
87 GCG_SOLVER* solver /**< pricing solver */
88 );
89
90/** calls exit method of GCG pricing solver */
93 GCG* gcg, /**< GCG data structure */
94 GCG_SOLVER* solver /**< pricing solver */
95 );
96
97/** calls solving process initialization method of GCG pricing solver */
100 GCG* gcg, /**< GCG data structure */
101 GCG_SOLVER* solver /**< pricing solver */
102 );
103
104/** calls solving process deinitialization method of GCG pricing solver */
107 GCG* gcg, /**< GCG data structure */
108 GCG_SOLVER* solver /**< pricing solver */
109 );
110
111/** calls update method of GCG pricing solver */
114 GCG* gcg, /**< GCG data structure */
115 SCIP* pricingprob, /**< the pricing problem that should be solved */
116 GCG_SOLVER* solver, /**< pricing solver */
117 int probnr, /**< number of the pricing problem */
118 SCIP_Bool varobjschanged, /**< have the objective coefficients changed? */
119 SCIP_Bool varbndschanged, /**< have the lower and upper bounds changed? */
120 SCIP_Bool consschanged /**< have the constraints changed? */
121 );
122
123/** calls heuristic or exact solving method of GCG pricing solver */
126 GCG* gcg, /**< GCG data structure */
127 SCIP* pricingprob, /**< the pricing problem that should be solved */
128 GCG_SOLVER* solver, /**< pricing solver */
129 SCIP_Bool redcost, /**< is reduced cost (TRUE) or Farkas (FALSE) pricing performed? */
130 SCIP_Bool heuristic, /**< shall the pricing problem be solved heuristically? */
131 int probnr, /**< number of the pricing problem */
132 SCIP_Real dualsolconv, /**< dual solution of the corresponding convexity constraint */
133 SCIP_Real* lowerbound, /**< pointer to store lower bound of pricing problem */
134 GCG_PRICINGSTATUS* status, /**< pointer to store the returned pricing status */
135 SCIP_Bool* solved /**< pointer to store whether the solution method was called */
136 );
137/**@} */
138#ifdef __cplusplus
139}
140#endif
141
142#endif
#define GCG_EXPORT
Definition def.h:59
#define SCIP_Bool
#define SCIP_Real
SCIP_RETCODE GCGsolverFree(GCG *gcg, GCG_SOLVER **solver)
Definition solver.c:152
SCIP_RETCODE GCGsolverCreate(GCG *gcg, GCG_SOLVER **solver, const char *name, const char *desc, int priority, SCIP_Bool heurenabled, SCIP_Bool exactenabled, 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)
Definition solver.c:64
SCIP_RETCODE GCGsolverSolve(GCG *gcg, SCIP *pricingprob, GCG_SOLVER *solver, SCIP_Bool redcost, SCIP_Bool heuristic, int probnr, SCIP_Real dualsolconv, SCIP_Real *lowerbound, GCG_PRICINGSTATUS *status, SCIP_Bool *solved)
Definition solver.c:293
SCIP_RETCODE GCGsolverInit(GCG *gcg, GCG_SOLVER *solver)
Definition solver.c:183
SCIP_RETCODE GCGsolverExitsol(GCG *gcg, GCG_SOLVER *solver)
Definition solver.c:252
SCIP_RETCODE GCGsolverUpdate(GCG *gcg, SCIP *pricingprob, GCG_SOLVER *solver, int probnr, SCIP_Bool varobjschanged, SCIP_Bool varbndschanged, SCIP_Bool consschanged)
Definition solver.c:269
SCIP_RETCODE GCGsolverExit(GCG *gcg, GCG_SOLVER *solver)
Definition solver.c:218
SCIP_RETCODE GCGsolverInitsol(GCG *gcg, GCG_SOLVER *solver)
Definition solver.c:235
struct Gcg GCG
Definition type_gcg.h:44
enum GCG_PricingStatus GCG_PRICINGSTATUS
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
type definitions for pricing problem solvers in GCG project
struct GCG_Solver GCG_SOLVER
Definition type_solver.h:51
#define GCG_DECL_SOLVERFREE(x)
Definition type_solver.h:60
#define GCG_DECL_SOLVERUPDATE(x)
#define GCG_DECL_SOLVEREXITSOL(x)
Definition type_solver.h:98
#define GCG_DECL_SOLVERINITSOL(x)
Definition type_solver.h:87
#define GCG_DECL_SOLVERSOLVE(x)
#define GCG_DECL_SOLVERINIT(x)
Definition type_solver.h:68
#define GCG_DECL_SOLVEREXIT(x)
Definition type_solver.h:76
#define GCG_DECL_SOLVERSOLVEHEUR(x)
struct GCG_SolverData GCG_SOLVERDATA
Definition type_solver.h:50