Scippy

GCG

Branch-and-Price & Column Generation for Everyone

solver_knapsack.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_knapsack.h
30 * @brief knapsack solver for pricing problems
31 * @author Gerald Gamrath
32 * @ingroup PRICINGSOLVERS
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#ifndef GCG_SOLVER_KNAPSACK_H__
38#define GCG_SOLVER_KNAPSACK_H__
39
40#include "scip/scip.h"
41
42#include "gcg/gcg.h"
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/** creates the knapsack solver for pricing problems and includes it in GCG */
51 GCG* gcg /**< GCG data structure */
52 );
53
56 SCIP_Bool exactly, /**< should the pricing problem be solved to optimality or heuristically? */
57 SCIP* pricingprob, /**< pricing problem SCIP data structure */
58 SCIP_Real* solval, /**< pointer to store the solution objective value */
59 GCG_PRICINGSTATUS* status, /**< pointer to store pricing problem status */
60 SCIP_VAR*** solvars, /**< pointer to store solution vars (will be allocated as buffer array and must be freed afterwards) */
61 SCIP_Real** solvals, /**< pointer to store solution vals (will be allocated as buffer array and must be freed afterwards) */
62 int* nsolvars /**< pointer to store the number of solution vars */
63 );
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif
#define GCG_EXPORT
Definition: def.h:59
GCG interface methods.
GCG_EXPORT SCIP_RETCODE GCGsolverKnapsackSolveKnapsack(SCIP_Bool exactly, SCIP *pricingprob, SCIP_Real *solval, GCG_PRICINGSTATUS *status, SCIP_VAR ***solvars, SCIP_Real **solvals, int *nsolvars)
GCG_EXPORT SCIP_RETCODE GCGincludeSolverKnapsack(GCG *gcg)
Definition: struct_gcg.h:55
enum GCG_PricingStatus GCG_PRICINGSTATUS
enum SCIP_Retcode SCIP_RETCODE