This file format was introduced with GCG 4.0 and is still in an experimental state. It may be extended in the future.
This page will give a short introduction to the .jdec file format by means of an example and an overview of the structure of the file format.
Features
This file format was introduced with GCG 4.0. Currently it supports the following features:
- JSON compatible file format (i.e., all general JSON file format rules apply)
- complete and partial decompositions
- decompositions of presolved problems
- block constraints and master constraints
- symmetry information used to aggregate pricing problems
- nested decompositions (decompositions for blocks can be specified, utilized by the GCG pricing solver)
The reading and writing process works as for the .dec file format. As it is based on JSON, you can read and write it with JSON libraries.
Example
Do define a decomposition, you need a given problem instance, whose constraints and variables are referred to by name:
Using the names defined in the model, you can specify a decomposition like that:
.jdec file structure
The root object of a .jdec file contains meta information about the decomposition and the decomposition itself. The following data fields are supported:
| Name | Mandatory | Type | Default | Description |
|---|---|---|---|---|
version | X | integer | version of the file format | |
problem_name | string | name of the problem the decomposition belongs to | ||
description | string | description of the decomposition | ||
decomposition | X | object | the decomposition (see below) | |
decomposition_id | integer | internal ID of the decomposition, only written by GCG |
A decomposition object supports the following data fields:
| Name | Mandatory | Type | Default | Description |
|---|---|---|---|---|
n_blocks | integer | number of blocks of the decomposition, ignored by GCG | ||
presolved | boolean | false | indicates whether the decomposition refers to a presolved problem (must be false for a decomposition of a block) | |
master_constraints | X | list | list of master constraints | |
blocks | X | list | list of block objects (see below) | |
symmetry_var_mapping | object | a mapping that maps all variables to their representatives |
A block object supports the following data fields:
| Name | Mandatory | Type | Default | Description |
|---|---|---|---|---|
index | integer | index (starting at 0) of the block (note: if set, it has to be set for all blocks of a decomposition) | ||
constraints | X | list | list of constraints assigned to the block | |
decomposition | object | decomposition (object) of the block | ||
symmetry_representative_block | integer | index of the representative block this block should be mapped to |
Note: The provided symmetry information has to be consistent. GCG does not validate the mappings in detail. Representative blocks must be the blocks with the lowest indices of the blocks that should be aggregated (and are symmetrical). Variable mappings have to map the block variables of the blocks to the corresponding representative variable of the representative block. The mappings of the representative blocks/variables to themself can be omitted.