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-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file reader_dec.h
26 * @ingroup FILEREADERS
27 * @brief file reader for decompositions in the constraint based dec-file format.
28 * @author Gregor Hendel
29 *
30 *
31 * This reader allows to read a file containing decompositions for constraints of the current original problem. The
32 * standard line ending for this format is '.dec'. The content of the file should obey the following format
33 *
34 * \\ place for comments and statistics
35 * NBLOCKS
36 * 2
37 * BLOCK 0
38 * consA
39 * consB
40 * [...]
41 * BLOCK 1
42 * consC
43 * consD
44 * [...]
45 * MASTERCONSS
46 * linkingcons
47 *
48 * A block in a problem decomposition is a set of constraints that are independent from all other blocks after removing
49 * the special blocks of linking constraints denoted as MASTERCONSS.
50 *
51 * Imagine the following example, which involves seven variables
52 * and the five constraints from the file above. The asterisks (*) indicate that the variable affects the feasibility
53 * of the constraint. In the special case of a linear optimization problem, the asterisks correspond to the
54 * nonzero entries of the constraint matrix.
55 *
56 * x1 x2 x3 x4 x5 x6 x7
57 * consA * * \ BLOCK 0
58 * consB * * /
59 * consC * * \ BLOCK 1
60 * consD * * /
61 * linkingconss * * * * * * * > MASTERCONSS
62 *
63 * The nonzero pattern has been chosen in a way that after the removal of the last constraint 'linkingcons', the remaining problem
64 * consists of two independent parts, namely the blocks '0' and '1'.
65 *
66 * The corresponding variable labels are inferred from the constraint labels. A variable is assigned the label
67 *
68 * - of its unique block, if it only occurs in exactly 1 named block, and probably in MASTERCONSS.
69 * - the special label of a linking variable if it occurs only in the master constraints or in 2 or even more named blocks.
70 *
71 * @note A trivial decomposition is to assign all constraints of a problem to the MASTERCONSS.
72 *
73 * @note The number of blocks is the number of named blocks: a trivial decomposition should have 0 blocks
74 */
75
76/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
77
78#ifndef __SCIP_READER_DEC_H__
79#define __SCIP_READER_DEC_H__
80
81#include "scip/def.h"
82#include "scip/type_retcode.h"
83#include "scip/type_scip.h"
84
85#ifdef __cplusplus
86extern "C" {
87#endif
88
89/** includes the decomposition file reader into SCIP
90 *
91 * @ingroup FileReaderIncludes
92 */
93SCIP_EXPORT
95 SCIP* scip /**< SCIP data structure */
96 );
97
98#ifdef __cplusplus
99}
100#endif
101
102#endif
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPincludeReaderDec(SCIP *scip)
Definition: reader_dec.c:382
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for SCIP's main datastructure