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*/
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) );
Definition: type_result.h:42
Definition: struct_dcmp.h:44
public methods for SCIP parameter handling
Definition: struct_reader.h:45
Definition: struct_scip.h:68
SCIP_RETCODE SCIPcomputeDecompVarsLabels(SCIP *scip, SCIP_DECOMP *decomp, SCIP_CONS **conss, int nconss)
Definition: scip_dcmp.c:454
public methods for memory management
Definition: reader_dec.c:108
Definition: type_result.h:58
SCIP_RETCODE SCIPcomputeDecompStats(SCIP *scip, SCIP_DECOMP *decomp, SCIP_Bool uselimits)
Definition: scip_dcmp.c:1135
public solving methods
Definition: reader_dec.c:106
Definition: reader_dec.c:109
public methods for problem variables
Definition: type_retcode.h:47
public methods for SCIP variables
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
Definition: scip_message.c:120
public methods for numerical tolerances
public methods for decompositions
Definition: type_retcode.h:45
Definition: struct_cons.h:46
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
Definition: scip_param.c:250
Definition: type_retcode.h:42
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip_message.c:225
wrapper functions to map file i/o to standard or zlib file i/o
Definition: type_message.h:53
public data structures and miscellaneous methods
SCIP_RETCODE SCIPdecompSetConsLabels(SCIP_DECOMP *decomp, SCIP_CONS **conss, int *labels, int nconss)
Definition: dcmp.c:172
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
Definition: reader_dec.c:107
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
Definition: scip_reader.c:147
Definition: type_set.h:45
general public methods
char * SCIPdecompPrintStats(SCIP_DECOMP *decomp, char *strbuf)
Definition: dcmp.c:454
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:217
type definitions for decompositions and the decomposition store
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
Definition: scip_reader.c:195
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
Definition: objbenders.h:43
public methods for reader plugins
public methods for global and local (sub)problems