Detailed Description
REF file reader for structure information.
This reader reads and writes a ref-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. The constraints are numbered by the appearance in the problem.
Constraints not mentioned in one of the blocks will remain in the master problem
The format is the following
- first line: #nblocks #ncons_block_1 ... #n_cons_block_n
- one line for each block with the indices of constraints to be put into that block separated by a comma
Definition in file reader_ref.h.
#include "scip/type_scip.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "type_decomp.h"
Go to the source code of this file.
Functions | |
SCIP_RETCODE | SCIPincludeReaderRef (SCIP *scip) |
SCIP_RETCODE | SCIPreadRef (SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result) |
Function Documentation
◆ SCIPincludeReaderRef()
SCIP_RETCODE SCIPincludeReaderRef | ( | SCIP * | scip | ) |
includes the ref file reader into SCIP
includes the ref file reader in SCIP
Definition at line 764 of file reader_ref.c.
References READER_DESC, READER_EXTENSION, READER_NAME, and readerFreeRef.
Referenced by SCIPincludeGcgPlugins().
◆ SCIPreadRef()
SCIP_RETCODE SCIPreadRef | ( | SCIP * | scip, |
SCIP_READER * | reader, | ||
const char * | filename, | ||
SCIP_RESULT * | result | ||
) |
reads problem from file
Definition at line 778 of file reader_ref.c.
References RefInput::blocknr, RefInput::blocksizes, RefInput::constoblock, DECdecompCreate(), DECdecompFree(), RefInput::file, GCGconshdlrDecompAddPreexistingDecomp(), GCGvarGetBlock(), RefInput::haserror, RefInput::linebuf, RefInput::linenumber, RefInput::linepos, RefInput::masterconss, RefInput::nassignedvars, RefInput::nblocks, RefInput::nmasterconss, RefInput::npushedtokens, RefInput::pushedtokens, readREFFile(), REF_MAX_LINELEN, REF_MAX_PUSHEDTOKENS, RefInput::token, RefInput::tokenbuf, RefInput::totalconss, RefInput::totalreadconss, and RefInput::vartoblock.
Referenced by SCIP_DECL_READERREAD().