reader_dec.h File Reference

Detailed Description

DEC file reader for structure information.

Author
Martin Bergner
Lukas Kirchhart

This reader reads in a dec-file that defines the structur to be used for the decomposition. The structure is defined constraint-wise, i.e., the number of blocks and the constraints belonging to each block are defined. If needed, constraints can also be forced into the master, even if they could be transferred to one block.

The keywords are:

  • Presolved: to be followed by either 0 or 1 indicating that the decomposition is for the unpresolved or presolved problem
  • NBlocks: to be followed by a line giving the number of blocks
  • Block i with 1 <= i <= nblocks: to be followed by the names of the constraints belonging to block i, one per line.
  • Masterconss: to be followed by names of constraints, one per line, that should go into the master, even if they only contain variables of one block and could thus be added to this block.

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 1085 of file reader_dec.c.

References DECdecompGetNBlocks(), and writeData().

Referenced by SCIP_DECL_DIALOGEXEC(), and SCIP_DECL_READERWRITE().

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 934 of file reader_dec.c.

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 951 of file reader_dec.c.

References DecInput::blocknr, DEC_MAX_LINELEN, DEC_MAX_PUSHEDTOKENS, DEC_START, DecInput::file, DecInput::haserror, DecInput::haspresolvesection, 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().