reader_dec.c
Go to the documentation of this file.
29 * This reader allows to read a file containing decompositions for constraints of the current original problem. The
30 * standard line ending for this format is '.dec'. The content of the file should obey the following format
46 * A block in a problem decomposition is a set of constraints that are independent from all other blocks after removing
50 * and the five constraints from the file above. The asterisks (*) indicate that the variable affects the feasibility
51 * of the constraint. In the special case of a linear optimization problem, the asterisks correspond to the
61 * The nonzero pattern has been chosen in a way that after the removal of the last constraint 'linkingcons', the remaining problem
64 * The corresponding variable labels are inferred from the constraint labels. A variable is assigned the label
66 * - of its unique block, if it only occurs in exactly 1 named block, and probably in MASTERCONSS.
67 * - the special label of a linking variable if it occurs only in the master constraints or in 2 or even more named blocks.
71 * @note The number of blocks is the number of named blocks: a trivial decomposition should have 0 blocks
74/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
110};
201 /* count number of block manually. If it is different from the number of specified blocks, throw an error */
260 /* check if buffer storage capacity has been reached, which means that there is a duplicate constraint entry */
263 SCIPerrorMessage("Error: Too many constraints in decomposition file: Is there a double entry?\n");
280 SCIPerrorMessage("Error: Block number specification is wrong: Specified %d blocks, counted %d.\n",
309 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Added decomposition <%s> with %d blocks to SCIP\n", filename, nblocks);
312 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Decomposition statistics:\n%s\n", SCIPdecompPrintStats(decomp, strbuf));
366 SCIPerrorMessage("reading of decomposition file is only possible after a problem was created\n");
389 SCIP_CALL( SCIPincludeReaderBasic(scip, &reader, READER_NAME, READER_DESC, READER_EXTENSION, NULL) );
SCIP_RETCODE SCIPcomputeDecompVarsLabels(SCIP *scip, SCIP_DECOMP *decomp, SCIP_CONS **conss, int nconss)
Definition: scip_dcmp.c:455
SCIP_RETCODE SCIPdecompSetConsLabels(SCIP_DECOMP *decomp, SCIP_CONS **conss, int *labels, int nconss)
Definition: dcmp.c:173
SCIP_RETCODE SCIPcomputeDecompStats(SCIP *scip, SCIP_DECOMP *decomp, SCIP_Bool uselimits)
Definition: scip_dcmp.c:1136
char * SCIPdecompPrintStats(SCIP_DECOMP *decomp, char *strbuf)
Definition: dcmp.c:455
SCIP_RETCODE SCIPcreateDecomp(SCIP *scip, SCIP_DECOMP **decomp, int nblocks, SCIP_Bool original, SCIP_Bool benderslabels)
Definition: scip_dcmp.c:218
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip_message.c:225
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
Definition: scip_message.c:120
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
Definition: scip_param.c:250
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
Definition: scip_reader.c:109
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
Definition: scip_reader.c:147
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
Definition: scip_reader.c:195
Definition: objbenders.h:44
public methods for decompositions
wrapper functions to map file i/o to standard or zlib file i/o
public methods for message output
public data structures and miscellaneous methods
public methods for input file readers
public methods for problem variables
static SCIP_RETCODE readDecomposition(SCIP *scip, const char *filename)
Definition: reader_dec.c:115
file reader for decompositions in the constraint based dec-file format.
public methods for decompositions
general public methods
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for reader plugins
public solving methods
public methods for SCIP variables
Definition: struct_cons.h:47
Definition: struct_dcmp.h:45
Definition: struct_reader.h:46
Definition: struct_scip.h:70
type definitions for decompositions and the decomposition store