60#define READER_NAME "storeader"
61#define READER_DESC "file reader for stochastic information of stochastic programs in the SMPS file format"
62#define READER_EXTENSION "sto"
64#define DEFAULT_USEBENDERS FALSE
70#define STO_MAX_LINELEN 1024
71#define STO_MAX_NAMELEN 256
73#define STO_DEFAULT_ARRAYSIZE 100
74#define STO_DEFAULT_ENTRIESSIZE 20
75#define STO_DEFAULT_BLOCKARRAYSIZE 5
76#define STO_DEFAULT_CHILDRENSIZE 5
174 (*scenariodata)->scip =
NULL;
175 (*scenariodata)->subproblems =
NULL;
176 (*scenariodata)->parent =
NULL;
177 (*scenariodata)->nchildren = 0;
179 (*scenariodata)->nsubproblems = 0;
180 (*scenariodata)->stagenum = -1;
181 (*scenariodata)->scenarionum = -1;
182 (*scenariodata)->stagename =
NULL;
183 (*scenariodata)->name =
NULL;
184 (*scenariodata)->probability = 1.0;
186 (*scenariodata)->nentries = 0;
211 SCIPdebugMessage(
"Freeing scenario <%s> in stage <%s>\n", (*scenariotree)->name,
212 (*scenariotree)->stagename);
215 nchildren = (*scenariotree)->nchildren;
217 while( (*scenariotree)->nchildren > 0 )
220 (*scenariotree)->nchildren--;
223 for(
i = (*scenariotree)->nentries - 1;
i >= 0;
i-- )
238 for(
i = (*scenariotree)->nsubproblems - 1;
i >= 0;
i-- )
242 if( nchildren > 0 && (*scenariotree)->subproblems !=
NULL )
271 return scenario->
scip;
335 assert(childnum >= 0 && childnum < scenario->nchildren);
337 return scenario->
children[childnum];
356 const char* stagename
433 return scenario->
name;
574 assert(entry >= 0 && entry < scenario->nentries);
587 assert(entry >= 0 && entry < scenario->nentries);
600 assert(entry >= 0 && entry < scenario->nentries);
602 return scenario->
values[entry];
691 if( (*parent)->nchildren + 1 > (*parent)->childrensize )
693 (*parent)->nchildren + 1) );
697 scenario->
parent = (*parent);
699 (*parent)->
children[(*parent)->nchildren] = scenario;
721 assert(stage >= 0 && stage < numstages);
724 for(
i = 0;
i < numstages;
i++ )
734 for(
i = 0;
i < numscenarios[stageindex];
i++ )
740 if( stage < numstages - 1 )
758 int numscenariostages
771 for(
i = 0;
i < numscenariostages;
i++ )
772 readerdata->numscenarios += numscenarios[
i];
796 if( retscen !=
NULL )
826 readerdata->numscenarios++;
839 int* numblocksforscen,
841 int* numblocksperblock,
860 while( !processed &&
i < numblocks )
867 for( j = 0; j < numblocksperblock[
i]; j++ )
870 (*blocksforscen)[(*numblocksforscen)] = blocks[
i][j];
871 (*numblocksforscen)++;
873 numblocksperblock, numscenarios, scenariossize, stage, stagenum + 1,
i) );
876 (*numblocksforscen)--;
894 if( (*numscenarios) + 1 > (*scenariossize) )
899 (*scenariossize) = newsize;
913 if( (*numblocksforscen) == 1 )
918 for(
i = 1;
i < (*numblocksforscen);
i++ )
936 int* numblocksperblock,
944 int numblocksforscen;
957 for(
i = 0;
i < numstages;
i++ )
970 for(
i = 0;
i < numblocks;
i++ )
972 numblocksforscen = 0;
979 numblocks, numblocksperblock, &numscenarios[stagenum], &scenariossize[stagenum],
992 for(
i = numstages - 1;
i >= 0;
i-- )
994 for( j = numscenarios[
i] - 1; j >= 0; j-- )
1015 if( !readerdata->created )
1017 readerdata->created =
TRUE;
1040 if( readerdata->created )
1043 if( readerdata->scenariotree !=
NULL )
1046 readerdata->created =
FALSE;
1068 (*stoi)->lineno = 0;
1069 (*stoi)->haserror =
FALSE;
1070 (*stoi)->buf [0] =
'\0';
1071 (*stoi)->probname[0] =
'\0';
1072 (*stoi)->stochtype[0] =
'\0';
1277 for(
i = pos;
i < 80;
i++)
1297 stoi->
f0 = stoi->
f1 = stoi->
f2 = stoi->
f3 = stoi->
f4 = stoi->
f5 = stoi->
f6 = 0;
1308 while( *stoi->
buf ==
'*' );
1311 len = (
unsigned int) strlen(stoi->
buf);
1313 for(
i = 0;
i < len;
i++ )
1315 if( (stoi->
buf[
i] ==
'\t') || (stoi->
buf[
i] ==
'\n') || (stoi->
buf[
i] ==
'\r') )
1386 while( is_marker || is_empty );
1463 int* numblocksperblock;
1465 int* blocksperblocksize;
1538 for(
i = 0;
i < numblocks;
i++ )
1552 if( numblocksperblock[blocknum] + 1 > blocksperblocksize[blocknum] )
1557 blocksperblocksize[blocknum] = newsize;
1563 if( numblocks + 1 > blockssize )
1570 blockssize = newsize;
1574 numblocksperblock[blocknum] = 0;
1578 blockindex = numblocksperblock[blocknum];
1586 numblocksperblock[blocknum]++;
1602 for(
i = numblocks - 1;
i >= 0;
i-- )
1604 for( j = numblocksperblock[
i] - 1; j >= 0; j-- )
1608 for(
i = numblocks - 1;
i >= 0;
i-- )
1628 char wrongroot[] =
"\'ROOT\'";
1651 addscenario =
FALSE;
1717 if( strstr(scennames, parentname) ==
NULL )
1747 else if( addscenario )
1771 int* numblocksperblock;
1773 int* blocksperblocksize;
1842 if( strstr(stagenames, currstagename) ==
NULL )
1853 for(
i = 0;
i < numblocks;
i++ )
1867 if( numblocksperblock[blocknum] + 1 > blocksperblocksize[blocknum] )
1872 blocksperblocksize[blocknum] = newsize;
1878 if( numblocks + 1 > blockssize )
1885 blockssize = newsize;
1889 numblocksperblock[blocknum] = 0;
1893 blockindex = numblocksperblock[blocknum];
1901 numblocksperblock[blocknum]++;
1914 for(
i = numblocks - 1;
i >= 0;
i-- )
1916 for( j = numblocksperblock[
i] - 1; j >= 0; j-- )
1920 for(
i = numblocks - 1;
i >= 0;
i-- )
1944 checkscen = scenario;
1946 while( checkscen !=
NULL )
1959 const char* varname,
2042 (*scenariovar) =
NULL;
2044 checkscen = scenario;
2049 while( (*scenariovar) ==
NULL )
2063 if( (*scenariovar) ==
NULL )
2092 (*varadded) =
FALSE;
2095 checkscen = scenario;
2098 while( searchvar ==
NULL && checkcount < 2 )
2109 if( searchvar !=
NULL )
2111 (*scenariovar) = searchvar;
2121 if( searchvar !=
NULL )
2131 SCIPdebugMessage(
"Original problem variable <%s> is being duplicated for scenario %d\n",
2134 (*scenariovar) =
var;
2166 for(
i = 0;
i < nconss;
i++ )
2194 if( !success1 || !success2 )
2196 SCIPerrorMessage(
"It is not possible to copy constraint <%s>. The stochastic program can not be built.\n",
2203 for( j = 0; j < nconsvars; j++ )
2216 if( scenariovar !=
NULL )
2249 SCIPerrorMessage(
"It is not possible to copy constraint <%s>. The stochastic program can not be built.\n",
2289 SCIPerrorMessage(
"Unable to build stochastic program - stage <%s> was not found\n",
2330 scenarioscip =
scip;
2376 for(
i = 0;
i < nentries;
i++ )
2382 char RIGHT[] =
"RIGHT";
2383 char MINI[] =
"MINI";
2399 SCIPerrorMessage(
"There is no constraint <%s> in the current scenario.\n", name);
2426 SCIPerrorMessage(
"There is no variable <%s> in the current scenario.\n", name);
2439 SCIPerrorMessage(
"There is no constraint <%s> in the current scenario.\n", name);
2457 SCIPerrorMessage(
"There is no variable <%s> in the current scenario.\n", name);
2491 for(
i = 1;
i < numstages;
i++ )
2499 for( j = 0; j < nconss; j++ )
2506 for( j = 0; j <
nvars; j++ )
2608 const char* filename,
2637 SCIPinfoMessage(
scip,
NULL,
"\nSorry, currently only STO files with the stochastic information as DISCRETE are supported.\n\n");
2638 SCIPinfoMessage(
scip,
NULL,
"NOTE: The problem provided by the COR file is loaded without stochastic information.\n\n");
2654 SCIPinfoMessage(
scip,
NULL,
"\nThe scenarios for the stochastic programs are defined in <%s> as SCENARIOS\n", filename);
2655 SCIPinfoMessage(
scip,
NULL,
"Sorry, currently only two-stage stochastic programs are supported when scenarios are defined as SCENARIOS.\n\n");
2656 SCIPinfoMessage(
scip,
NULL,
"NOTE: The problem provided by the COR file is loaded without stochastic information.\n\n");
2676 if( !error && !unsupported )
2678 if( readerdata->usebenders )
2750 if( correader ==
NULL )
2757 if( timreader ==
NULL )
2799 readerdata->created =
FALSE;
2800 readerdata->scenariotree =
NULL;
2801 readerdata->numscenarios = 0;
2814 "should Benders' decomposition be used?",
2824 const char* filename,
2876 return readerdata->numscenarios;
default Benders' decomposition plugin
Constraint handler for linear constraints in their most general form, .
#define SCIP_CALL_TERMINATE(retcode, x, TERM)
#define SCIP_CALL_FINALLY(x, y)
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
int SCIPfclose(SCIP_FILE *fp)
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
SCIP_RETCODE SCIPcreateBendersDefault(SCIP *scip, SCIP **subproblems, int nsubproblems)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_RETCODE SCIPchgCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPgetConsCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *valid)
void SCIPenableDebugSol(SCIP *scip)
int SCIPstoGetNScenarios(SCIP *scip)
SCIP_Bool SCIPcorHasRead(SCIP_READER *reader)
SCIP_RETCODE SCIPfreeReaderdataSto(SCIP *scip)
SCIP_RETCODE SCIPreadSto(SCIP *scip, const char *filename, SCIP_RESULT *result)
SCIP_RETCODE SCIPincludeReaderSto(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
const char * SCIPgetProbName(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelVar(SCIP *scip, SCIP_VAR *var, SCIP_Bool *deleted)
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
SCIP_CONS * SCIPfindCons(SCIP *scip, const char *name)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
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)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_BENDERS * SCIPfindBenders(SCIP *scip, const char *name)
void SCIPbendersUpdateSubproblemLowerbound(SCIP_BENDERS *benders, int probnumber, SCIP_Real lowerbound)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
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_READERDATA * SCIPreaderGetData(SCIP_READER *reader)
SCIP_READER * SCIPfindReader(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader,)
const char * SCIPreaderGetName(SCIP_READER *reader)
SCIP_RETCODE SCIPsetReaderFree(SCIP *scip, SCIP_READER *reader,)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPvarIsInitial(SCIP_VAR *var)
SCIP_Bool SCIPvarIsDeleted(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVarImpl(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_IMPLINTTYPE impltype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsRemovable(SCIP_VAR *var)
SCIP_IMPLINTTYPE SCIPvarGetImplType(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPprintSysError(const char *message)
char * SCIPstrtok(char *s, const char *delim, char **ptrptr)
int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt)
assert(minobj< SCIPgetCutoffbound(scip))
memory allocation routines
public methods for managing constraints
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
COR file reader (MPS format of the core problem for stochastic programs).
#define DEFAULT_USEBENDERS
static SCIP_RETCODE readStoch(SCIP *scip, STOINPUT *stoi)
static SCIP_RETCODE readScenarios(STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE createScenarioData(SCIP *scip, STOSCENARIO **scenariodata)
static SCIP_RETCODE setScenarioProbability(SCIP *scip, STOSCENARIO *scenario, SCIP_Real probability)
static SCIP_Real getScenarioProbability(SCIP *scip, STOSCENARIO *scenario)
static void stoinputFree(SCIP *scip, STOINPUT **stoi)
static void stoinputSyntaxerror(STOINPUT *stoi)
static SCIP_Bool stoinputHasError(const STOINPUT *stoi)
static const char * getScenarioName(STOSCENARIO *scenario)
static SCIP_RETCODE removeCoreVariablesAndConstraints(SCIP *scip)
static void getScenarioEntityName(char *name, const char *varname, int stagenum, int scenarionum)
static SCIP_RETCODE readSto(SCIP *scip, const char *filename, SCIP_READERDATA *readerdata)
static void clearFrom(char *buf, unsigned int pos)
static void stoinputSetSection(STOINPUT *stoi, STOSECTION section)
static STOSTOCHINFO stoinputStochInfoType(const STOINPUT *stoi)
static SCIP ** getScenarioSubproblemArray(STOSCENARIO *scenario)
#define STO_DEFAULT_CHILDRENSIZE
static int getScenarioNChildren(STOSCENARIO *scenario)
static SCIP_RETCODE insertScenarioInReaderdata(SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO *scenario, char *parentname)
static SCIP_RETCODE readBlocks(STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE createReaderdata(SCIP *scip, SCIP_READERDATA *readerdata)
static const char * stoinputField5(const STOINPUT *stoi)
static SCIP_RETCODE addScenarioConsToProb(SCIP *scip, SCIP *scenarioscip, STOSCENARIO *scenario, SCIP_HASHMAP *varmap, SCIP_CONS **conss, int nconss, SCIP_Bool decomp)
static SCIP_Real getScenarioEntryValue(STOSCENARIO *scenario, int entry)
static SCIP_RETCODE buildScenariosFromBlocks(SCIP *scip, STOSCENARIO ***blocks, STOSCENARIO ***scenarios, STOSCENARIO ***blocksforscen, int *numblocksforscen, int numblocks, int *numblocksperblock, int *numscenarios, int *scenariossize, const char *stage, int stagenum, int blocknum)
static int getScenarioStageNum(SCIP *scip, STOSCENARIO *scenario)
enum StoSection STOSECTION
static SCIP_RETCODE createScenarioSubproblemArray(SCIP *scip, STOSCENARIO *scenario)
enum StoStochInfo STOSTOCHINFO
static void setScenarioScip(STOSCENARIO *scenario, SCIP *scip)
static int getScenarioNum(SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE setScenarioStageName(SCIP *scip, STOSCENARIO *scenario, const char *stagename)
#define STO_DEFAULT_ARRAYSIZE
static SCIP_Bool stoinputReadLine(STOINPUT *stoi)
static const char * getScenarioEntryCol(STOSCENARIO *scenario, int entry)
static SCIP_RETCODE addScenarioVarsToProb(SCIP *scip, STOSCENARIO *scenario, SCIP_HASHMAP *varmap, SCIP_VAR **vars, int nvars)
static SCIP_RETCODE addScenarioEntry(SCIP *scip, STOSCENARIO *scenario, const char *rowname, const char *colname, SCIP_Real value)
#define STO_DEFAULT_ENTRIESSIZE
#define STO_DEFAULT_BLOCKARRAYSIZE
static const char * stoinputField4(const STOINPUT *stoi)
static void stoinputSetStochtype(STOINPUT *stoi, const char *stochtype)
static SCIP_RETCODE setScenarioLowerbound(SCIP *scip, STOSCENARIO *scenario, SCIP_Real lowerbound)
static SCIP_RETCODE stoinputCreate(SCIP *scip, STOINPUT **stoi, SCIP_FILE *fp)
static SCIP_RETCODE scenarioAddChild(SCIP *scip, STOSCENARIO **parent, STOSCENARIO *child)
static void addScenarioSubproblem(STOSCENARIO *scenario, SCIP *subproblem)
static const char * stoinputField2(const STOINPUT *stoi)
static SCIP_RETCODE createScenariosFromBlocks(SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO ***blocks, int numblocks, int *numblocksperblock, int numstages)
static SCIP_RETCODE buildScenarioTree(SCIP *scip, STOSCENARIO **scenariotree, STOSCENARIO ***scenarios, int *numscenarios, int numstages, int stage)
static STOSECTION stoinputSection(const STOINPUT *stoi)
static void stoinputSetStochInfoType(STOINPUT *stoi, STOSTOCHINFO stochinfotype)
static SCIP_RETCODE buildDecompProblem(SCIP *scip, SCIP_READERDATA *readerdata)
static const char * stoinputField6(const STOINPUT *stoi)
static SCIP_RETCODE getScenarioDecompVar(SCIP *scip, STOSCENARIO *scenario, SCIP_VAR *consvar, SCIP_VAR **scenariovar, SCIP_Bool *varadded)
static SCIP_RETCODE addScenarioVarsAndConsToProb(SCIP *scip, STOSCENARIO *scenario, SCIP_Bool decomp)
static STOSCENARIO * findScenarioInTree(STOSCENARIO *scenariotree, const char *scenname)
static SCIP_RETCODE copyScenario(SCIP *scip, STOSCENARIO *sourcescenario, STOSCENARIO **targetscenario, SCIP_Bool copyname)
static SCIP_RETCODE freeReaderdata(SCIP *scip, SCIP_READERDATA *readerdata)
static const char * stoinputField0(const STOINPUT *stoi)
static SCIP_RETCODE setScenarioName(SCIP *scip, STOSCENARIO *scenario, const char *name)
static SCIP_RETCODE freeScenarioTree(SCIP *scip, STOSCENARIO **scenariotree)
static SCIP_RETCODE readIndep(STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
static void stoinputSetProbname(STOINPUT *stoi, const char *probname)
static SCIP_Real computeScenarioProbability(SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE setScenarioStageNum(SCIP *scip, STOSCENARIO *scenario, int stagenum)
static SCIP * getScenarioScip(STOSCENARIO *scenario)
struct StoScenario STOSCENARIO
static int getScenarioNEntries(STOSCENARIO *scenario)
static SCIP_Real getScenarioLowerbound(SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE findScenarioVar(SCIP *scip, STOSCENARIO *scenario, SCIP_VAR *consvar, SCIP_VAR **scenariovar)
static STOSCENARIO * getScenarioChild(STOSCENARIO *scenario, int childnum)
static const char * getScenarioStageName(SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE mergeScenarios(SCIP *scip, STOSCENARIO *scenario1, STOSCENARIO **mergedscenario)
static SCIP_RETCODE buildFullProblem(SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE addScenariosToReaderdata(SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO ***scenarios, int *numscenarios, int numscenariostages)
static const char * stoinputField1(const STOINPUT *stoi)
static SCIP_RETCODE setScenarioNum(SCIP *scip, STOSCENARIO *scenario, int scenarionum)
static const char * getScenarioEntryRow(STOSCENARIO *scenario, int entry)
static STOSCENARIO * getScenarioParent(STOSCENARIO *scenario)
static const char * stoinputField3(const STOINPUT *stoi)
STO file reader - the stochastic information of an instance in SMPS format.
int SCIPtimFindStage(SCIP *scip, const char *stage)
int SCIPtimGetStageNVars(SCIP *scip, int stagenum)
SCIP_VAR ** SCIPtimGetStageVars(SCIP *scip, int stagenum)
SCIP_Bool SCIPtimHasRead(SCIP_READER *reader)
int SCIPtimGetNStages(SCIP *scip)
const char * SCIPtimGetStageName(SCIP *scip, int stagenum)
SCIP_CONS ** SCIPtimGetStageConss(SCIP *scip, int stagenum)
int SCIPtimGetStageNConss(SCIP *scip, int stagenum)
const char * SCIPtimConsGetStageName(SCIP *scip, const char *consname)
TIM file reader - the stage information for a stochastic programming instance in SMPS format.
public methods for constraint handler plugins and constraints
public methods for debugging
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
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
struct SCIP_Benders SCIP_BENDERS
struct SCIP_Cons SCIP_CONS
struct SCIP_HashMap SCIP_HASHMAP
struct SCIP_ReaderData SCIP_READERDATA
struct SCIP_Reader SCIP_READER
#define SCIP_DECL_READERREAD(x)
#define SCIP_DECL_READERCOPY(x)
#define SCIP_DECL_READERFREE(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE