96#define READER_NAME "decreader"
97#define READER_DESC "file reader for constraint decompositions"
98#define READER_EXTENSION "dec"
185 if( strncmp(buffer,
"NBLOCKS", 7) == 0 )
190 else if( strncmp(buffer,
"BLOCK", 5) == 0 )
195 nread = sscanf(buffer,
"BLOCK %1018d\n", &currblock);
202 else if( ++nblockscounted > nblocks )
211 else if( strncmp(buffer,
"MASTERCONSS", 11) == 0 )
230 nread = sscanf(buffer,
"%1024d\n", &nblocks);
240 nread = sscanf(buffer,
"%1023s\n", consname);
261 if( consptr == nconss )
263 SCIPerrorMessage(
"Error: Too many constraints in decomposition file: Is there a double entry?\n");
269 conss[consptr] = cons;
270 labels[consptr] = currblock;
278 if( nblockscounted != nblocks )
280 SCIPerrorMessage(
"Error: Block number specification is wrong: Specified %d blocks, counted %d.\n",
281 nblocks, nblockscounted);
289 SCIP_Bool benderslabels;
301 SCIPdebugMsg(
scip,
"Using %d SCIP constraints for labeling variables.\n", nconss);
316 SCIPerrorMessage(
"Errors parsing decomposition <%s>. No decomposition added\n.", filename);
366 SCIPerrorMessage(
"reading of decomposition file is only possible after a problem was created\n");
#define SCIP_CALL_TERMINATE(retcode, x, TERM)
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
int SCIPfeof(SCIP_FILE *stream)
int SCIPfclose(SCIP_FILE *fp)
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
SCIP_RETCODE SCIPcomputeDecompVarsLabels(SCIP *scip, SCIP_DECOMP *decomp, SCIP_CONS **conss, int nconss)
SCIP_RETCODE SCIPdecompSetConsLabels(SCIP_DECOMP *decomp, SCIP_CONS **conss, int *labels, int nconss)
SCIP_RETCODE SCIPcomputeDecompStats(SCIP *scip, SCIP_DECOMP *decomp, SCIP_Bool uselimits)
char * SCIPdecompPrintStats(SCIP_DECOMP *decomp, char *strbuf)
SCIP_RETCODE SCIPaddDecomp(SCIP *scip, SCIP_DECOMP *decomp)
SCIP_RETCODE SCIPcreateDecomp(SCIP *scip, SCIP_DECOMP **decomp, int nblocks, SCIP_Bool original, SCIP_Bool benderslabels)
SCIP_RETCODE SCIPincludeReaderDec(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
int SCIPgetNConss(SCIP *scip)
SCIP_CONS * SCIPfindCons(SCIP *scip, const char *name)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader,)
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader,)
const char * SCIPreaderGetName(SCIP_READER *reader)
void SCIPprintSysError(const char *message)
assert(minobj< SCIPgetCutoffbound(scip))
public methods for decompositions
wrapper functions to map file i/o to standard or zlib file i/o
struct SCIP_File SCIP_FILE
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)
enum Dec_Section DEC_SECTION
file reader for decompositions in the constraint based dec-file format.
public methods for decompositions
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 methods for SCIP variables
type definitions for decompositions and the decomposition store
#define SCIP_DECOMP_LINKCONS
#define SCIP_DECL_READERREAD(x)
#define SCIP_DECL_READERCOPY(x)
enum SCIP_Retcode SCIP_RETCODE