109#define READER_NAME "scflpreader"
110#define READER_DESC "file reader for CAP data format and creates a SCFLP instance"
111#define READER_EXTENSION "cap"
114#define DEFAULT_USEBENDERS TRUE
115#define DEFAULT_NUMSCENARIOS 250
116#define DEFAULT_RANDOMSEED 1
117#define DEFAULT_QUADCOSTS FALSE
122struct SCIP_ReaderData
124 SCIP_Bool usebenders;
159 while( (s >= 1.0) || (s == 0.0) );
179 (*readerdata)->usebenders =
TRUE;
236 SCIP_Real* fixedcost;
262 nscenarios = readerdata->nscenarios;
288 nread =
sscanf(buffer,
" %d %d\n", &nfacilities, &ncustomers);
295 SCIPdebugMsg(
scip,
"number of facilities = <%d> number of customers = <%d>\n", nfacilities, ncustomers);
305 for(
i = 0;
i < nfacilities;
i++ )
342 for(
i = 0;
i < ncustomers;
i++ )
347 for(
j = 0;
j < nfacilities;
j++ )
350 for(
j = 0;
j < nscenarios;
j++ )
422 for(
i = 0;
i < ncustomers;
i++ )
427 for(
j = 0;
j < nscenarios;
j++ )
437 nscenarios, readerdata->usebenders, readerdata->quadcosts) );
442 for(
i = ncustomers - 1;
i >= 0;
i-- )
495 "reading/" READER_NAME "/usebenders",
"Should Benders' decomposition be used to solve the problem?",
500 "the number of scenarios that will be randomly generated",
505 "the random seed used to generate the scenarios",
509 "reading/" READER_NAME "/quadcosts",
"should the problem be formulated with quadratic costs",
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)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
SCIP_READERDATA * SCIPreaderGetData(SCIP_READER *reader)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader,)
SCIP_RETCODE SCIPsetReaderFree(SCIP *scip, SCIP_READER *reader,)
SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
void SCIPprintSysError(const char *message)
SCIPfreeRandom(scip, &heurdata->randnumgen)
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_RETCODE SCIPprobdataCreate(SCIP *scip, const char *probname, int *demands, SCIP_Real *rints, SCIP_Real *rexts, int ntypes, SCIP_Real width, SCIP_Real height)
Problem data for Stochastic Capacitated Facility Location problem.
struct SCIP_File SCIP_FILE
#define DEFAULT_USEBENDERS
SCIP_RETCODE SCIPincludeReaderScflp(SCIP *scip)
static SCIP_Real generateGaussianNoise(SCIP_RANDNUMGEN *randomgen, SCIP_Real mean, SCIP_Real stdDev, SCIP_Real *spare, SCIP_Bool *hasspare)
#define DEFAULT_QUADCOSTS
static SCIP_RETCODE readerdataFree(SCIP *scip, SCIP_READERDATA **readerdata)
#define DEFAULT_NUMSCENARIOS
static SCIP_RETCODE readerdataCreate(SCIP *scip, SCIP_READERDATA **readerdata)
#define DEFAULT_RANDOMSEED
SCFLP problem reader file reader.
struct SCIP_ReaderData SCIP_READERDATA
#define SCIP_DECL_READERREAD(x)
#define SCIP_DECL_READERFREE(x)
enum SCIP_Retcode SCIP_RETCODE