reader_dec.c
Go to the documentation of this file.
20 * This reader allows to read a file containing decompositions for constraints of the current original problem. The
21 * standard line ending for this format is '.dec'. The content of the file should obey the following format
37 * A block in a problem decomposition is a set of constraints that are independent from all other blocks after removing
41 * and the five constraints from the file above. The asterisks (*) indicate that the variable affects the feasibility
42 * of the constraint. In the special case of a linear optimization problem, the asterisks correspond to the
52 * The nonzero pattern has been chosen in a way that after the removal of the last constraint 'linkingcons', the remaining problem
55 * The corresponding variable labels are inferred from the constraint labels. A variable is assigned the label
57 * - of its unique block, if it only occurs in exactly 1 named block, and probably in MASTERCONSS.
58 * - the special label of a linking variable if it occurs only in the master constraints or in 2 or even more named blocks.
62 * @note The number of blocks is the number of named blocks: a trivial decomposition should have 0 blocks
65 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
192 /* count number of block manually. If it is different from the number of specified blocks, throw an error */
251 /* check if buffer storage capacity has been reached, which means that there is a duplicate constraint entry */
254 SCIPerrorMessage("Error: Too many constraints in decomposition file: Is there a double entry?\n");
271 SCIPerrorMessage("Error: Block number specification is wrong: Specified %d blocks, counted %d.\n",
300 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Added decomposition <%s> with %d blocks to SCIP\n", filename, nblocks);
303 SCIPverbMessage(scip, SCIP_VERBLEVEL_NORMAL, NULL, "Decomposition statistics:\n%s\n", SCIPdecompPrintStats(decomp, strbuf));
357 SCIPerrorMessage("reading of decomposition file is only possible after a problem was created\n");
380 SCIP_CALL( SCIPincludeReaderBasic(scip, &reader, READER_NAME, READER_DESC, READER_EXTENSION, NULL) );
Definition: type_result.h:33
Definition: struct_dcmp.h:35
public methods for SCIP parameter handling
Definition: struct_reader.h:36
Definition: struct_scip.h:59
SCIP_RETCODE SCIPcomputeDecompVarsLabels(SCIP *scip, SCIP_DECOMP *decomp, SCIP_CONS **conss, int nconss)
Definition: scip_dcmp.c:444
public methods for memory management
Definition: reader_dec.c:99
Definition: type_result.h:49
SCIP_RETCODE SCIPcomputeDecompStats(SCIP *scip, SCIP_DECOMP *decomp, SCIP_Bool uselimits)
Definition: scip_dcmp.c:1125
public solving methods
Definition: reader_dec.c:97
Definition: reader_dec.c:100
public methods for problem variables
Definition: graph_load.c:261
Definition: type_retcode.h:38
public methods for SCIP variables
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
Definition: scip_message.c:111
public methods for numerical tolerances
public methods for decompositions
Definition: type_retcode.h:36
Definition: struct_cons.h:37
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
Definition: scip_param.c:241
Definition: type_retcode.h:33
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip_message.c:216
wrapper functions to map file i/o to standard or zlib file i/o
Definition: type_message.h:44
public data structures and miscellaneous methods
SCIP_RETCODE SCIPdecompSetConsLabels(SCIP_DECOMP *decomp, SCIP_CONS **conss, int *labels, int nconss)
Definition: dcmp.c:163
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
Definition: scip_reader.c:100
Definition: reader_dec.c:98
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
Definition: scip_reader.c:138
Definition: type_set.h:36
general public methods
char * SCIPdecompPrintStats(SCIP_DECOMP *decomp, char *strbuf)
Definition: dcmp.c:445
public methods for message output
public methods for input file readers
public methods for message handling
SCIP_RETCODE SCIPcreateDecomp(SCIP *scip, SCIP_DECOMP **decomp, int nblocks, SCIP_Bool original, SCIP_Bool benderslabels)
Definition: scip_dcmp.c:208
type definitions for decompositions and the decomposition store
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
Definition: scip_reader.c:186
static SCIP_RETCODE readDecomposition(SCIP *scip, const char *filename)
Definition: reader_dec.c:106
file reader for decompositions in the constraint based dec-file format.
public methods for decompositions
Definition: objbenders.h:33
public methods for reader plugins
public methods for global and local (sub)problems