Scippy

GCG

Branch-and-Price & Column Generation for Everyone

reader_dec.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
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-2021 Operations Research, RWTH Aachen University */
10 /* Zuse Institute Berlin (ZIB) */
11 /* */
12 /* This program is free software; you can redistribute it and/or */
13 /* modify it under the terms of the GNU Lesser General Public License */
14 /* as published by the Free Software Foundation; either version 3 */
15 /* of the License, or (at your option) any later version. */
16 /* */
17 /* This program is distributed in the hope that it will be useful, */
18 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
19 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
20 /* GNU Lesser General Public License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with this program; if not, write to the Free Software */
24 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
25 /* */
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
28 /**@file reader_dec.h
29  * @brief DEC file reader for structure information
30  * @author Martin Bergner
31  * @author Lukas Kirchhart
32  * @author Micahel Bastubbe
33  * @ingroup FILEREADERS
34 
35  * This reader reads and write files in .dec format. A data format to pass a (possibly partial) decomposition to GCG, prerequisite is a given MIP, whose constraints and variables are referred to by name
36  * – everything behind a backslash (“\”) is a comment and is ignored
37  * – information is given section-wise
38  * – sections are started by key words (ignoring the case of the characters) and finished by starting a new section or reaching end of file
39  * – each line in a section provides one value
40  * – key words for sections are:
41  * – consdefaultmaster:
42  * – optional; followed by line with possible values: {0, 1}; default: 1; description: if set to 1 then (directly after file is read) each unassigned constraint is assigned to the master (needed for backward compatibility)
43  * – presolved:
44  * – mandatory; followed by line with possible values: {0, 1}; description: if set to 0 (1) then the decomposition is considered for the unpresolved (presolved) problem
45  * – nblocks
46  * – mandatory; possible values: N; description: number of (possibly empty) blocks this decomposition file has information for
47  * – block (alternatives: blockconss or blockcons)
48  * – optional; directly followed by block index (starting with 1); each following line contains name of a constraint belonging to this block
49  * – masterconss (alternative: mastercons)
50  * + optional; each following line contains name of a constraint belonging to the master
51  * – blockvars
52  * + optional; directly followed by block index (starting with 1); each following line contains name of a variable belonging to this block
53  * – mastervars (alternative: mastervar)
54  * + optional; each following line contains name of a master variable; (belongs explicitly only to master constraints)
55  * – linkingvars (alternative: linkingvar)
56  * + optional; each following line contains name of a linking variable
57  * – decomposition is rejected if there are any inconsistencies
58  * – after reading (and and possibly assigning unassigned constraints because of consdefaultmaster, see above) implicit assignments are made:
59  * – unassigned constraints hitting at least two blocks -> assign to master;
60  * – unassigned variables hitting at least two blocks -> assign to linking ;
61  * – all constraints of an unassigned variable are master constraints -> variable is master variable;
62  *
63  */
64 
65 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
66 
67 #ifndef GCG_READER_DEC_H__
68 #define GCG_READER_DEC_H__
69 
70 
71 #include "scip/scip.h"
72 #include "type_decomp.h"
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
78 /** includes the dec file reader into SCIP */
79 extern
80 SCIP_RETCODE GCGincludeReaderDec(
81  SCIP* scip /**< SCIP data structure */
82  );
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif
SCIP_RETCODE GCGincludeReaderDec(SCIP *scip)
type definitions for decomposition information in GCG projects