# SCIP

Solving Constraint Integer Programs

## Detailed Description

file reader for decompositions in the constraint based dec-file format.

This reader allows to read a file containing decompositions for constraints of the current original problem. The standard line ending for this format is '.dec'. The content of the file should obey the following format

\\ place for comments and statistics
NBLOCKS
2
BLOCK 0
consA
consB
[...]
BLOCK 1
consC
consD
[...]
MASTERCONSS

A block in a problem decomposition is a set of constraints that are independent from all other blocks after removing the special blocks of linking constraints denoted as MASTERCONSS.

Imagine the following example, which involves seven variables and the five constraints from the file above. The asterisks (*) indicate that the variable affects the feasibility of the constraint. In the special case of a linear optimization problem, the asterisks correspond to the nonzero entries of the constraint matrix.

x1  x2  x3  x4  x5  x6  x7
consA     *       *                 \ BLOCK 0
consB     *   *                     /
consC                 *   *         \ BLOCK 1
consD                     *   *     /
linkingconss     *   *   *   *   *   *   * > MASTERCONSS

The nonzero pattern has been chosen in a way that after the removal of the last constraint 'linkingcons', the remaining problem consists of two independent parts, namely the blocks '0' and '1'.

The corresponding variable labels are inferred from the constraint labels. A variable is assigned the label

• of its unique block, if it only occurs in exactly 1 named block, and probably in MASTERCONSS.
• the special label of a linking variable if it occurs only in the master constraints or in 2 or even more named blocks.
Note
A trivial decomposition is to assign all constraints of a problem to the MASTERCONSS.
The number of blocks is the number of named blocks: a trivial decomposition should have 0 blocks

#include "scip/pub_dcmp.h"
#include "scip/pub_fileio.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_var.h"
#include "scip/scip_dcmp.h"
#include "scip/scip_general.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_solve.h"
#include "scip/scip_var.h"
#include "scip/scip_mem.h"
#include "scip/type_dcmp.h"
#include <string.h>

Go to the source code of this file.

## Typedefs

typedef enum Dec_Section DEC_SECTION

## Enumerations

enum  Dec_Section {
DEC_SECTION_INIT = 0,
DEC_SECTION_NBLOCKS = 1,
DEC_SECTION_BLOCK = 2,
DEC_SECTION_MASTER = 3
}

## Functions

static SCIP_RETCODE readDecomposition (SCIP *scip, const char *filename)

## Macro Definition Documentation

Definition at line 96 of file reader_dec.c.

Definition at line 97 of file reader_dec.c.

Definition at line 98 of file reader_dec.c.

## ◆ DEC_SECTION

 typedef enum Dec_Section DEC_SECTION

Definition at line 111 of file reader_dec.c.

## ◆ Dec_Section

 enum Dec_Section
Enumerator
DEC_SECTION_INIT

initial section before the number of blocks is specified

DEC_SECTION_NBLOCKS

section that contains the number of

DEC_SECTION_BLOCK
DEC_SECTION_MASTER

Definition at line 105 of file reader_dec.c.

## Function Documentation

 static SCIP_RETCODE readDecomposition ( SCIP * scip, const char * filename )
static

Parameters
 scip SCIP data structure filename name of the input file

Definition at line 115 of file reader_dec.c.

static

copy method for reader plugins (called when SCIP copies plugins)

Definition at line 342 of file reader_dec.c.