Scippy

SCIP

Solving Constraint Integer Programs

reader_dec.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file reader_dec.h
17  * @ingroup FILEREADERS
18  * @brief file reader for decompositions in the constraint based dec-file format.
19  * @author Gregor Hendel
20  *
21  *
22  * This reader allows to read a file containing decompositions for constraints of the current original problem. The
23  * standard line ending for this format is '.dec'. The content of the file should obey the following format
24  *
25  * \\ place for comments and statistics
26  * NBLOCKS
27  * 2
28  * BLOCK 0
29  * consA
30  * consB
31  * [...]
32  * BLOCK 1
33  * consC
34  * consD
35  * [...]
36  * MASTERCONSS
37  * linkingcons
38  *
39  * A block in a problem decomposition is a set of constraints that are independent from all other blocks after removing
40  * the special blocks of linking constraints denoted as MASTERCONSS.
41  *
42  * Imagine the following example, which involves seven variables
43  * and the five constraints from the file above. The asterisks (*) indicate that the variable affects the feasibility
44  * of the constraint. In the special case of a linear optimization problem, the asterisks correspond to the
45  * nonzero entries of the constraint matrix.
46  *
47  * x1 x2 x3 x4 x5 x6 x7
48  * consA * * \ BLOCK 0
49  * consB * * /
50  * consC * * \ BLOCK 1
51  * consD * * /
52  * linkingconss * * * * * * * > MASTERCONSS
53  *
54  * The nonzero pattern has been chosen in a way that after the removal of the last constraint 'linkingcons', the remaining problem
55  * consists of two independent parts, namely the blocks '0' and '1'.
56  *
57  * The corresponding variable labels are inferred from the constraint labels. A variable is assigned the label
58  *
59  * - of its unique block, if it only occurs in exactly 1 named block, and probably in MASTERCONSS.
60  * - the special label of a linking variable if it occurs only in the master constraints or in 2 or even more named blocks.
61  *
62  * @note A trivial decomposition is to assign all constraints of a problem to the MASTERCONSS.
63  *
64  * @note The number of blocks is the number of named blocks: a trivial decomposition should have 0 blocks
65  */
66 
67 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
68 
69 #ifndef __SCIP_READER_DEC_H__
70 #define __SCIP_READER_DEC_H__
71 
72 #include "scip/def.h"
73 #include "scip/type_retcode.h"
74 #include "scip/type_scip.h"
75 
76 #ifdef __cplusplus
77 extern "C" {
78 #endif
79 
80 /** includes the decomposition file reader into SCIP
81  *
82  * @ingroup FileReaderIncludes
83  */
86  SCIP* scip /**< SCIP data structure */
87  );
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif
#define SCIP_EXPORT
Definition: def.h:100
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_RETCODE SCIPincludeReaderDec(SCIP *scip)
Definition: reader_dec.c:361
type definitions for SCIP&#39;s main datastructure
common defines and data types used in all packages of SCIP