Scippy

GCG

Branch-and-Price & Column Generation for Everyone

struct_gcgcol.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 struct_gcgcol.h
30 * @ingroup DATASTRUCTURES
31 * @brief data structure to store columns (solutions from a pricing problem)
32 * @author Jonas Witt
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#ifndef GCG_STRUCT_GCGCOL_H_
38#define GCG_STRUCT_GCGCOL_H_
39
40#include "scip/def.h"
41#include "scip/type_misc.h"
42#include "scip/scip.h"
43
44#include "gcg/type_gcgcol.h"
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50/** Column data structure */
51struct GCG_Col
52{
53 SCIP* pricingprob; /**< SCIP data structure (pricing problem)*/
54 int probnr; /**< number of corresponding pricing problem */
55 SCIP_VAR** vars; /**< (sorted) array of variables of corresponding pricing problem */
56 SCIP_Real* vals; /**< array of solution values (belonging to vars) */
57 int nvars; /**< number of variables */
58 int maxvars; /**< capacity of vars */
59 SCIP_VAR** inferredpricingvars;/**< (sorted) array of inferrred (coefficient) pricing variables */
60 SCIP_Real* inferredpricingvals;/**< inferred (coefficient) pricing variables solution values */
61 int ninferredpricingvars;/**< number of inferred pricing variables */
62 int maxinferredpricingvars;/**< capacity of inferred pricing variables array */
63 SCIP_Bool isray; /**< is the column a ray? */
64 SCIP_Real redcost; /**< last known reduced cost */
65 int age; /**< age of column (number of iterations since it was created;
66 each time reduced cost are calculated counts as an interation) */
67 int pos; /**< position in pricestore or column pool (or -1) */
68 SCIP_Real* mastercoefs; /**< array of master coefficients */
69 int nmastercoefs; /**< number of master coefficients */
70 int maxmastercoefs; /**< capacity of mastercoefs */
71 SCIP_Real* originalsepamastercuts;/**< array of original seperator cut coefficients in the master problem */
72 int noriginalsepamastercuts;/**< number of original seperator cut coefficients in the master problem */
73 int maxoriginalsepamastercuts;/**< capacity of originalsepamastercuts */
74 SCIP_Real* mastersepacutcoeffs; /**< arrays of master separator cut coefficients */
75 int nmastersepacutcoeffs; /**< number of master separator cut coefficients */
76 int mastersepacutscoeffssize; /**< size of array of master separator cut coefficients */
77 SCIP_Real norm; /**< norm of the coefficients in the master */
78 int* linkvars; /**< array of indices of variables in var-array which are linking variables */
79 int nlinkvars; /**< number of variables in var-array which are linking variables */
80 int maxlinkvars; /**< capacity of linkvars */
81 SCIP_Bool initcoefs; /**< returns if mastercoefs and linkvars have been computed */
82};
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif /* STRUCT_GCGCOL_H_ */
#define SCIP_Bool
#define SCIP_Real
SCIP * pricingprob
Definition: struct_gcgcol.h:53
SCIP_Real norm
Definition: struct_gcgcol.h:77
SCIP_Real redcost
Definition: struct_gcgcol.h:64
int nmastersepacutcoeffs
Definition: struct_gcgcol.h:75
int * linkvars
Definition: struct_gcgcol.h:78
int maxinferredpricingvars
Definition: struct_gcgcol.h:62
SCIP_Bool initcoefs
Definition: struct_gcgcol.h:81
int maxoriginalsepamastercuts
Definition: struct_gcgcol.h:73
SCIP_VAR ** inferredpricingvars
Definition: struct_gcgcol.h:59
int ninferredpricingvars
Definition: struct_gcgcol.h:61
SCIP_Real * vals
Definition: struct_gcgcol.h:56
int maxvars
Definition: struct_gcgcol.h:58
int maxmastercoefs
Definition: struct_gcgcol.h:70
SCIP_Real * originalsepamastercuts
Definition: struct_gcgcol.h:71
int mastersepacutscoeffssize
Definition: struct_gcgcol.h:76
SCIP_Bool isray
Definition: struct_gcgcol.h:63
int probnr
Definition: struct_gcgcol.h:54
int maxlinkvars
Definition: struct_gcgcol.h:80
int nmastercoefs
Definition: struct_gcgcol.h:69
int nlinkvars
Definition: struct_gcgcol.h:79
SCIP_Real * mastersepacutcoeffs
Definition: struct_gcgcol.h:74
SCIP_Real * inferredpricingvals
Definition: struct_gcgcol.h:60
int noriginalsepamastercuts
Definition: struct_gcgcol.h:72
SCIP_VAR ** vars
Definition: struct_gcgcol.h:55
SCIP_Real * mastercoefs
Definition: struct_gcgcol.h:68
type definitions for gcg data structure