reader_dec.h File Reference

Detailed Description

DEC file reader for structure information.

Author
Martin Bergner
Lukas Kirchhart
Micahel Bastubbe

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 – everything behind a backslash (“\”) is a comment and is ignored – information is given section-wise – sections are started by key words (ignoring the case of the characters) and finished by starting a new section or reaching end of file – each line in a section provides one value – key words for sections are: – consdefaultmaster:

  • 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) – presolved:

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 – nblocks

  • mandatory; possible values: N; description: number of (possibly empty) blocks this decomposition file has information for – block (alternatives: blockconss or blockcons)

optional; directly followed by block index (starting with 1); each following line contains name of a constraint belonging to this block – masterconss (alternative: mastercons)

  • optional; each following line contains name of a constraint belonging to the master – blockvars
  • optional; directly followed by block index (starting with 1); each following line contains name of a variable belonging to this block – mastervars (alternative: mastervar)
  • optional; each following line contains name of a master variable; (belongs explicitly only to master constraints) – linkingvars (alternative: linkingvar)
  • optional; each following line contains name of a linking variable – decomposition is rejected if there are any inconsistencies – after reading (and and possibly assigning unassigned constraints because of consdefaultmaster, see above) implicit assignments are made: – unassigned constraints hitting at least two blocks -> assign to master; – unassigned variables hitting at least two blocks -> assign to linking ; – all constraints of an unassigned variable are master constraints -> variable is master variable;

Definition in file reader_dec.h.

#include "scip/scip.h"
#include "type_decomp.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeReaderDec (SCIP *scip)
 
SCIP_RETCODE SCIPreadDec (SCIP *scip, const char *filename, SCIP_RESULT *result)
 
SCIP_RETCODE GCGwriteDecomp (SCIP *scip, FILE *file, DEC_DECOMP *decdecomp)
 

Function Documentation

SCIP_RETCODE GCGwriteDecomp ( SCIP *  scip,
FILE *  file,
DEC_DECOMP decdecomp 
)

write a DEC file for a given decomposition

Parameters
scipSCIP data structure
fileFile pointer to write to
decdecompDecomposition pointer

Definition at line 1405 of file reader_dec.cpp.

References DECdecompGetNBlocks(), and writeData().

Referenced by SCIP_DECL_DIALOGEXEC().

SCIP_RETCODE SCIPincludeReaderDec ( SCIP *  scip)

includes the dec file reader into SCIP

includes the dec file reader in SCIP

Parameters
scipSCIP data structure

Definition at line 1237 of file reader_dec.cpp.

References READER_DESC, READER_EXTENSION, and READER_NAME.

Referenced by SCIPincludeGcgPlugins().

SCIP_RETCODE SCIPreadDec ( SCIP *  scip,
const char *  filename,
SCIP_RESULT *  result 
)
Parameters
scipSCIP data structure
filenamefull path and name of file to read, or NULL if stdin should be used
resultpointer to store the result of the file reading call

Definition at line 1254 of file reader_dec.cpp.

References DecInput::blocknr, DEC_MAX_LINELEN, DEC_MAX_PUSHEDTOKENS, DEC_START, DecInput::file, DecInput::haserror, DecInput::haspresolvesection, DecInput::incomplete, DecInput::linebuf, DecInput::linenumber, DecInput::linepos, DecInput::nblocks, NOVALUE, DecInput::npushedtokens, DecInput::presolved, DecInput::pushedtokens, readDECFile(), READER_NAME, DecInput::section, DecInput::token, and DecInput::tokenbuf.

Referenced by SCIP_DECL_READERREAD().