Scippy

GCG

Branch-and-Price & Column Generation for Everyone

struct_decomp.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_decomp.h
30 * @ingroup DECOMP
31 * @ingroup DATASTRUCTURES
32 * @brief structure information for decomposition information in GCG projects
33 * @author Martin Bergner
34 * @author Michael Bastubbe
35 */
36
37/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
38
39#ifndef GCG_STRUCT_DECOMP_H_
40#define GCG_STRUCT_DECOMP_H_
41
42
43#include "scip/scip.h"
44#include "gcg/type_decomp.h"
45#include "gcg/type_detector.h"
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51/** decomposition structure information */
53{
54 SCIP_Bool presolved; /**< does the decomposition refer to the presolved problem? */
55 int nblocks; /**< number of blocks in this decomposition */
56 SCIP_VAR*** subscipvars; /**< two dimensional array of variables in each block
57 Usage: Usage: subscipvars[b][v] is variable v in block b */
58 int* nsubscipvars; /**< array of number of variables in each block
59 Usage: nsubscipvars[b] is the number of variables of block b */
60 SCIP_CONS*** subscipconss; /**< two dimensional array of constraints in each block
61 Usage: subscipcons[b][c] is constraint c in block b */
62 int* nsubscipconss; /**< array of number of constraints in each block
63 Usage: nsubscipcons[b] is the number of constraints of block b */
64 SCIP_CONS** linkingconss; /**< array of constraints linking the blocks
65 Usage: linkingcons[c] is linking constraint number c */
66 int nlinkingconss; /**< number of linking constraints */
67 SCIP_VAR** linkingvars; /**< array of variables linking the blocks
68 Usage: linkingvars[v] is linking variable number v */
69 int nlinkingvars; /**< number of linking variables */
70 int nfixedlinkingvars; /**< number of linking variables that are fixed */
71 int nmastervars; /**< number of linking variables that are purely master variables*/
72 SCIP_VAR*** stairlinkingvars; /**< array of variables staircaselinking the blocks */
73 int* nstairlinkingvars; /**< number of staircaselinking variables */
74 SCIP_HASHMAP* vartoblock; /**< hashmap mapping variables to their blocks (from 1 to nblocks)
75 Usage: SCIPhashmapGetImage(vartoblock, var) returns b+1, where b is the block of
76 variable var. This map is somehow inverse of the subscipcvars array. */
77 SCIP_HASHMAP* constoblock; /**< hashmap mapping constraints to their blocks (from 1 to nblocks)
78 Usage: Usage: SCIPhashmapGetImage(constoblock, cons) returns b+1, where b is the block of
79 constraint cons. This map is somehow inverse of the subscipconss array.*/
80 SCIP_HASHMAP* varindex; /**< hashmap mapping variables to indices for a visual ordering */
81 SCIP_HASHMAP* consindex; /**< hashmap mapping constraints to indices for visual ordering */
82 GCG_DECTYPE type; /**< type of the decomposition */
83 GCG_DETECTOR** detectorchain; /**< array of detectors that worked on this decomposition */
84 GCG_DETECTOR* detector; /**< detector that found this decomposition */
85 int sizedetectorchain; /**< number of detectors that worked on this decomposition */
86 int partialdecid; /**< id of the partialdec this decomposition originates from */
87 SCIP_Real* detectorclocktimes; /**< times of the detectors that worked on this decomposition */
88 SCIP_Real* pctvarstoborder; /**< percentages of variables assigned to the border of the corresponding detectors on this decomposition */
89 SCIP_Real* pctconsstoborder; /**< percentages of constraints assigned to the border of the corresponding detectors on this decomposition */
90 SCIP_Real* pctvarstoblock; /**< percentages of variables assigned to a block of the corresponding detectors on this decomposition */
91 SCIP_Real* pctconsstoblock; /**< percentages of variables assigned to a block of the corresponding detectors on this decomposition */
92 SCIP_Real* pctvarsfromopen; /**< percentages of variables assigned to a block or border of the corresponding detectors on this decomposition */
93 SCIP_Real* pctconssfromopen; /**< percentages of constraints assigned to a block or the border of the corresponding detectors on this decomposition */
94 int* nnewblocks; /**< number of new blocks of the corresponding detectors on this decomposition */
95 char* detectorchainstring;/**< string for the detector information working on that decomposition */
96 SCIP_Real maxwhitescore; /**< maximum white score (i.e. [fraction of white area] (nonborder+nonblock) ) */
97};
98
99#ifdef __cplusplus
100}
101#endif
102
103#endif /* STRUCT_DECOMP_H_ */
#define SCIP_Bool
#define SCIP_Real
SCIP_Real * pctconssfromopen
Definition: struct_decomp.h:93
SCIP_Bool presolved
Definition: struct_decomp.h:54
int * nsubscipconss
Definition: struct_decomp.h:62
GCG_DETECTOR ** detectorchain
Definition: struct_decomp.h:83
SCIP_Real * pctvarstoblock
Definition: struct_decomp.h:90
SCIP_HASHMAP * varindex
Definition: struct_decomp.h:80
SCIP_HASHMAP * vartoblock
Definition: struct_decomp.h:74
int * nnewblocks
Definition: struct_decomp.h:94
GCG_DECTYPE type
Definition: struct_decomp.h:82
SCIP_Real * pctvarstoborder
Definition: struct_decomp.h:88
SCIP_Real * pctconsstoblock
Definition: struct_decomp.h:91
SCIP_Real maxwhitescore
Definition: struct_decomp.h:96
SCIP_VAR *** stairlinkingvars
Definition: struct_decomp.h:72
SCIP_Real * pctconsstoborder
Definition: struct_decomp.h:89
GCG_DETECTOR * detector
Definition: struct_decomp.h:84
int sizedetectorchain
Definition: struct_decomp.h:85
int partialdecid
Definition: struct_decomp.h:86
int * nstairlinkingvars
Definition: struct_decomp.h:73
int nlinkingconss
Definition: struct_decomp.h:66
int * nsubscipvars
Definition: struct_decomp.h:58
SCIP_CONS ** linkingconss
Definition: struct_decomp.h:64
SCIP_HASHMAP * consindex
Definition: struct_decomp.h:81
SCIP_HASHMAP * constoblock
Definition: struct_decomp.h:77
SCIP_VAR ** linkingvars
Definition: struct_decomp.h:67
SCIP_VAR *** subscipvars
Definition: struct_decomp.h:56
SCIP_Real * pctvarsfromopen
Definition: struct_decomp.h:92
int nfixedlinkingvars
Definition: struct_decomp.h:70
SCIP_Real * detectorclocktimes
Definition: struct_decomp.h:87
int nlinkingvars
Definition: struct_decomp.h:69
char * detectorchainstring
Definition: struct_decomp.h:95
SCIP_CONS *** subscipconss
Definition: struct_decomp.h:60
type definitions for decomposition information in GCG projects
enum Dectype GCG_DECTYPE
Definition: type_decomp.h:57
type definitions for detectors in GCG projects