reader_sto.c
Go to the documentation of this file.
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
52 #define READER_DESC "file reader for stochastic information of stochastic programs in the SMPS file format"
55 #define DEFAULT_USEBENDERS FALSE /**< should Benders' decomposition be used for the stochastic program? */
97 /* the following describes the modifications to the constraint matrix and rhs for each scenario. */
179 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(*scenariodata)->children, (*scenariodata)->childrensize) );
180 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(*scenariodata)->rownames, (*scenariodata)->entriessize) );
181 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(*scenariodata)->colnames, (*scenariodata)->entriessize) );
182 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(*scenariodata)->values, (*scenariodata)->entriessize) );
209 SCIP_CALL( freeScenarioTree(scip, &(*scenariotree)->children[(*scenariotree)->nchildren - 1]) );
215 SCIPfreeBlockMemoryArray(scip, &(*scenariotree)->colnames[i], strlen((*scenariotree)->colnames[i]) + 1);
216 SCIPfreeBlockMemoryArray(scip, &(*scenariotree)->rownames[i], strlen((*scenariotree)->rownames[i]) + 1);
225 SCIPfreeBlockMemoryArray(scip, &(*scenariotree)->stagename, strlen((*scenariotree)->stagename) + 1);
352 SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &scenario->stagename, stagename, strlen(stagename) + 1) );
530 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &scenario->rownames, scenario->entriessize, newsize) );
531 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &scenario->colnames, scenario->entriessize, newsize) );
532 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &scenario->values, scenario->entriessize, newsize) );
536 SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &scenario->rownames[scenario->nentries], rowname, strlen(rowname) + 1) ); /*lint !e866*/
537 SCIP_CALL( SCIPduplicateBlockMemoryArray(scip, &scenario->colnames[scenario->nentries], colname, strlen(colname) + 1) ); /*lint !e866*/
625 SCIP_CALL( addScenarioEntry(scip, (*targetscenario), sourcescenario->rownames[i], sourcescenario->colnames[i],
657 SCIP_CALL( addScenarioEntry(scip, (*mergedscenario), scenario1->rownames[i], scenario1->colnames[i],
661 probability = getScenarioProbability(scip, scenario1)*getScenarioProbability(scip, (*mergedscenario));
716 if( strcmp(getScenarioStageName(scip, scenarios[i][0]), SCIPtimGetStageName(scip, stage + 1)) == 0 )
732 STOSCENARIO* child = getScenarioChild((*scenariotree), getScenarioNChildren((*scenariotree)) - 1);
762 SCIP_CALL( buildScenarioTree(scip, &readerdata->scenariotree, scenarios, numscenarios, numscenariostages, 0) );
856 /* it is only necessary to process the next block in the list the belongs to the given stage. */
866 SCIP_CALL( buildScenariosFromBlocks(scip, blocks, scenarios, blocksforscen, numblocksforscen, numblocks,
875 /* the index is only incremented if no block is processed. This is necessary because the value of i is used in
970 (void) SCIPsnprintf(periods, SCIP_MAXSTRLEN, "%s_%s", periods, getScenarioStageName(scip, blocks[i][0]));
972 SCIP_CALL( buildScenariosFromBlocks(scip, blocks, &scenarios[stagenum], &blocksforscen, &numblocksforscen,
1014 SCIP_CALL( setScenarioStageName(scip, readerdata->scenariotree, SCIPtimGetStageName(scip, 0)) );
1389 if( !stoinputReadLine(stoi) || stoinputField0(stoi) == NULL || strcmp(stoinputField0(stoi), "STOCH") )
1493 SCIPerrorMessage("Sorry, %s blocks stucture is not currently supported.\n", stoinputField1(stoi));
1500 SCIP_CALL( createScenariosFromBlocks(scip, readerdata, blocks, numblocks, numblocksperblock, numstages) );
1540 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &blocks[blocknum], blocksperblocksize[blocknum], newsize) ); /*lint !e866*/
1569 SCIP_CALL( setScenarioProbability(scip, blocks[blocknum][blockindex], atof(stoinputField4(stoi))) );
1577 SCIP_CALL( addScenarioEntry(scip, blocks[blocknum][blockindex], stoinputField2(stoi), stoinputField1(stoi),
1702 SCIPerrorMessage("Scenario <%s> needs to be read before scenario <%s>\n", parentname, stoinputField2(stoi));
1707 /* the "common" scenario has been added before, so a child can be added to the scenario tree */
1800 SCIP_CALL( createScenariosFromBlocks(scip, readerdata, blocks, numblocks, numblocksperblock, numstages) );
1809 /* if the 5th input is NULL, then the 4th input is the probability. Otherwise, the 4th input is the stage name and
1810 * the 5th input is the probability. The stage name is redundant information, but sometimes included for more
1816 (void) SCIPsnprintf(currstagename, SCIP_MAXSTRLEN, "%s", SCIPtimConsGetStageName(scip, stoinputField2(stoi)));
1854 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &blocks[blocknum], blocksperblocksize[blocknum], newsize) ); /*lint !e866*/
1889 SCIP_CALL( addScenarioEntry(scip, blocks[blocknum][blockindex], stoinputField2(stoi), stoinputField1(stoi),
1981 SCIPdebugMessage("Original problem variable <%s> is being duplicated for scenario %d\n", SCIPvarGetName(vars[i]),
1998 getScenarioEntityName(name, SCIPvarGetName(vars[i]), getScenarioStageNum(scip, scenario), getScenarioNum(scip, scenario));
1999 SCIP_CALL( SCIPcreateVar(scip, &var, name, SCIPvarGetLbOriginal(vars[i]), SCIPvarGetUbOriginal(vars[i]),
2038 /* NOTE: if the variable does not exist, then we need to search the preceding scenarios. In the case of
2039 * decomposition, then we only check the preceding scenario. As such, a check count is used to limit the number
2117 SCIP_CALL( SCIPcreateVar(scip, &var, varname, SCIPvarGetLbOriginal(searchvar), SCIPvarGetUbOriginal(searchvar),
2118 0.0, SCIPvarGetType(searchvar), SCIPvarIsInitial(searchvar), SCIPvarIsRemovable(searchvar), NULL, NULL,
2174 /* if the get variable callback is not implemented for the constraint, then the success flag will be returned as
2175 * FALSE. In this case, it is not possible to build the stochastic program, so an error will be returned
2179 SCIPerrorMessage("It is not possible to copy constraint <%s>. The stochastic program can not be built.\n",
2198 SCIP_CALL( getScenarioDecompVar(scenarioscip, scenario, consvars[j], &scenariovar, &varadded) );
2204 /* checking whether the variable is in the variable hashmap. If it doesn't exist, then it is added to the
2220 getScenarioEntityName(name, SCIPconsGetName(conss[i]), getScenarioStageNum(scip, scenario), getScenarioNum(scip, scenario));
2223 SCIP_CALL( SCIPgetConsCopy(scip, scenarioscip, conss[i], &cons, SCIPconsGetHdlr(conss[i]), varmap, NULL, name,
2235 SCIPerrorMessage("It is not possible to copy constraint <%s>. The stochastic program can not be built.\n",
2280 SCIPdebugMessage("Creating scenario at stage <%d>. Scenario: %d Stage: %d\n", stagenum, getScenarioNum(scip, scenario),
2295 getScenarioEntityName(name, SCIPgetProbName(scip), getScenarioStageNum(scip, scenario), getScenarioNum(scip, scenario));
2307 * TODO: consider whether the two-phase method should be activated by default in the scenario stages.
2328 SCIP_CALL( addScenarioConsToProb(scip, scenarioscip, scenario, varmap, conss, nconss, decomp) );
2336 /* the master SCIP is always passed to the recursive function. The scenario SCIP instances are generated in the
2346 SCIP_CALL( SCIPcreateBendersDefault(scenarioscip, getScenarioSubproblemArray(scenario), getScenarioNChildren(scenario)) );
2374 getScenarioEntityName(name, getScenarioEntryRow(scenario, i), getScenarioStageNum(scenarioscip, scenario),
2395 else if( SCIPisLT(scenarioscip, SCIPgetRhsLinear(scenarioscip, cons), SCIPinfinity(scenarioscip)) )
2397 else if( SCIPisLT(scenarioscip, SCIPgetLhsLinear(scenarioscip, cons), SCIPinfinity(scenarioscip)) )
2405 getScenarioEntityName(name, getScenarioEntryCol(scenario, i), getScenarioStageNum(scenarioscip, scenario),
2430 getScenarioEntityName(name, getScenarioEntryCol(scenario, i), getScenarioStageNum(scenarioscip, scenario),
2475 /* looping through all stages to remove the variables and constraints. The first stage is not removed as these are
2521 SCIP_CALL( addScenarioVarsAndConsToProb(scip, getScenarioChild(readerdata->scenariotree, i), FALSE) );
2545 /* activating the Benders' constraint handler. The two-phase method is activated by default. If the user desires not
2556 SCIP_CALL( addScenarioVarsAndConsToProb(scip, getScenarioChild(readerdata->scenariotree, i), TRUE) );
2557 addScenarioSubproblem(readerdata->scenariotree, getScenarioScip(getScenarioChild(readerdata->scenariotree, i)));
2561 SCIP_CALL( SCIPcreateBendersDefault(scip, getScenarioSubproblemArray(readerdata->scenariotree),
2583 /* disabling aggregation since it can affect the mapping between the master and subproblem variables */
2623 SCIPinfoMessage(scip, NULL, "\nSorry, currently only STO files with the stochastic information as DISCRETE are supported.\n\n");
2624 SCIPinfoMessage(scip, NULL, "NOTE: The problem provided by the COR file is loaded without stochastic information.\n\n");
2639 SCIPinfoMessage(scip, NULL, "\nThe scenarios for the stochastic programs are defined in <%s> as SCENARIOS\n", filename);
2640 SCIPinfoMessage(scip, NULL, "Sorry, currently only two-stage stochastic programs are supported when scenarios are defined as SCENARIOS.\n\n");
2641 SCIPinfoMessage(scip, NULL, "NOTE: The problem provided by the COR file is loaded without stochastic information.\n\n");
2748 SCIPwarningMessage(scip, "The core file must be read before the time and stochastic files.\n");
2784 SCIP_CALL( SCIPincludeReaderBasic(scip, &reader, READER_NAME, READER_DESC, READER_EXTENSION, readerdata) );
2804 const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
SCIP_EXPORT const char * SCIPreaderGetName(SCIP_READER *reader)
Definition: reader.c:548
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
Definition: scip_mem.h:86
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
Definition: misc.c:3095
Definition: type_result.h:33
TIM file reader - the stage information for a stochastic programming instance in SMPS format...
static SCIP_RETCODE findScenarioVar(SCIP *scip, STOSCENARIO *scenario, SCIP_VAR *consvar, SCIP_VAR **scenariovar)
Definition: reader_sto.c:2019
public methods for SCIP parameter handling
Definition: struct_reader.h:36
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_linear.c:18330
static SCIP_Real computeScenarioProbability(SCIP *scip, STOSCENARIO *scenario)
Definition: reader_sto.c:1915
static SCIP_RETCODE addScenariosToReaderdata(SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO ***scenarios, int *numscenarios, int numscenariostages)
Definition: reader_sto.c:743
Definition: reader_sto.c:123
Definition: struct_scip.h:59
public methods for memory management
static const char * getScenarioEntryRow(STOSCENARIO *scenario, int entry)
Definition: reader_sto.c:558
void SCIPbendersUpdateSubproblemLowerbound(SCIP_BENDERS *benders, int probnumber, SCIP_Real lowerbound)
Definition: benders.c:6685
SCIP_EXPORT SCIP_READERDATA * SCIPreaderGetData(SCIP_READER *reader)
Definition: reader.c:483
Definition: reader_sto.c:121
static STOSTOCHINFO stoinputStochInfoType(const STOINPUT *stoi)
Definition: reader_sto.c:1093
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
Definition: scip_message.c:123
Definition: type_result.h:49
static SCIP_RETCODE addScenarioVarsToProb(SCIP *scip, STOSCENARIO *scenario, SCIP_HASHMAP *varmap, SCIP_VAR **vars, int nvars)
Definition: reader_sto.c:1956
COR file reader (MPS format of the core problem for stochastic programs)
Definition: reader_sto.c:112
Definition: struct_var.h:198
static SCIP_RETCODE setScenarioLowerbound(SCIP *scip, STOSCENARIO *scenario, SCIP_Real lowerbound)
Definition: reader_sto.c:486
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)
Definition: scip_copy.c:1534
Definition: reader_sto.c:82
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
Definition: scip_reader.c:186
static void stoinputSetStochtype(STOINPUT *stoi, const char *stochtype)
Definition: reader_sto.c:1230
static SCIP_RETCODE addScenarioVarsAndConsToProb(SCIP *scip, STOSCENARIO *scenario, SCIP_Bool decomp)
Definition: reader_sto.c:2249
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
Definition: scip_reader.c:138
static SCIP_Real getScenarioLowerbound(SCIP *scip, STOSCENARIO *scenario)
Definition: reader_sto.c:502
static SCIP_RETCODE addScenarioEntry(SCIP *scip, STOSCENARIO *scenario, const char *rowname, const char *colname, SCIP_Real value)
Definition: reader_sto.c:515
static SCIP_RETCODE setScenarioProbability(SCIP *scip, STOSCENARIO *scenario, SCIP_Real probability)
Definition: reader_sto.c:457
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
Definition: cons_linear.c:18378
static SCIP_RETCODE setScenarioNum(SCIP *scip, STOSCENARIO *scenario, int scenarionum)
Definition: reader_sto.c:428
STO file reader - the stochastic information of an instance in SMPS format.
public methods for problem variables
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)
Definition: scip_param.c:48
Definition: reader_sto.c:124
static SCIP ** getScenarioSubproblemArray(STOSCENARIO *scenario)
Definition: reader_sto.c:297
const char * SCIPtimConsGetStageName(SCIP *scip, const char *consname)
Definition: reader_tim.c:965
static void stoinputSetProbname(STOINPUT *stoi, const char *probname)
Definition: reader_sto.c:1216
Definition: grphload.c:242
Definition: type_retcode.h:38
static const char * getScenarioName(STOSCENARIO *scenario)
Definition: reader_sto.c:417
public methods for SCIP variables
static SCIP_RETCODE getScenarioDecompVar(SCIP *scip, STOSCENARIO *scenario, SCIP_VAR *consvar, SCIP_VAR **scenariovar, SCIP_Bool *varadded)
Definition: reader_sto.c:2067
Definition: reader_sto.c:122
static void getScenarioEntityName(char *name, const char *varname, int stagenum, int scenarionum)
Definition: reader_sto.c:1940
static int getScenarioNEntries(STOSCENARIO *scenario)
Definition: reader_sto.c:547
static STOSCENARIO * getScenarioParent(STOSCENARIO *scenario)
Definition: reader_sto.c:332
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
Definition: scip_cons.c:2558
static SCIP_RETCODE copyScenario(SCIP *scip, STOSCENARIO *sourcescenario, STOSCENARIO **targetscenario, SCIP_Bool copyname)
Definition: reader_sto.c:599
public methods for numerical tolerances
Definition: struct_benders.h:48
SCIP_BENDERS * SCIPfindBenders(SCIP *scip, const char *name)
Definition: scip_benders.c:484
static void addScenarioSubproblem(STOSCENARIO *scenario, SCIP *subproblem)
Definition: reader_sto.c:281
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
Definition: misc.c:3362
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
Definition: scip_mem.h:92
Definition: struct_misc.h:128
public methods for managing constraints
static int getScenarioStageNum(SCIP *scip, STOSCENARIO *scenario)
Definition: reader_sto.c:388
static STOSCENARIO * findScenarioInTree(STOSCENARIO *scenariotree, const char *scenname)
Definition: reader_sto.c:774
static SCIP_RETCODE removeCoreVariablesAndConstraints(SCIP *scip)
Definition: reader_sto.c:2458
static SCIP_RETCODE createReaderdata(SCIP *scip, SCIP_READERDATA *readerdata)
Definition: reader_sto.c:1001
static SCIP_RETCODE readBlocks(STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
Definition: reader_sto.c:1440
static SCIP_Real getScenarioEntryValue(STOSCENARIO *scenario, int entry)
Definition: reader_sto.c:584
Definition: type_retcode.h:36
Definition: struct_cons.h:37
Definition: type_paramset.h:54
static SCIP_RETCODE createScenarioSubproblemArray(SCIP *scip, STOSCENARIO *scenario)
Definition: reader_sto.c:266
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
Definition: cons_linear.c:18354
static SCIP_Real getScenarioProbability(SCIP *scip, STOSCENARIO *scenario)
Definition: reader_sto.c:473
static SCIP_RETCODE setScenarioName(SCIP *scip, STOSCENARIO *scenario, const char *name)
Definition: reader_sto.c:401
static SCIP_RETCODE buildDecompProblem(SCIP *scip, SCIP_READERDATA *readerdata)
Definition: reader_sto.c:2532
SCIP_RETCODE SCIPsetReaderFree(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERFREE((*readerfree)))
Definition: scip_reader.c:162
static SCIP_RETCODE freeScenarioTree(SCIP *scip, STOSCENARIO **scenariotree)
Definition: reader_sto.c:189
Definition: type_retcode.h:33
Definition: reader_sto.c:126
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
Definition: scip_param.c:942
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
Definition: scip_mem.h:94
static SCIP_Bool stoinputHasError(const STOINPUT *stoi)
Definition: reader_sto.c:1181
public methods for constraint handler plugins and constraints
static SCIP_RETCODE setScenarioStageNum(SCIP *scip, STOSCENARIO *scenario, int stagenum)
Definition: reader_sto.c:372
wrapper functions to map file i/o to standard or zlib file i/o
SCIP_READER * SCIPfindReader(SCIP *scip, const char *name)
Definition: scip_reader.c:226
public data structures and miscellaneous methods
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
Definition: scipdefplugins.c:28
static const char * getScenarioEntryCol(STOSCENARIO *scenario, int entry)
Definition: reader_sto.c:571
static SCIP_RETCODE buildScenarioTree(SCIP *scip, STOSCENARIO **scenariotree, STOSCENARIO ***scenarios, int *numscenarios, int numstages, int stage)
Definition: reader_sto.c:697
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
Definition: misc.c:3013
static void stoinputSetSection(STOINPUT *stoi, STOSECTION section)
Definition: reader_sto.c:1192
SCIP_CONS ** SCIPtimGetStageConss(SCIP *scip, int stagenum)
Definition: reader_tim.c:1065
static SCIP_RETCODE mergeScenarios(SCIP *scip, STOSCENARIO *scenario1, STOSCENARIO **mergedscenario)
Definition: reader_sto.c:642
Definition: reader_sto.c:111
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, 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)
Definition: scip_var.c:105
static SCIP_RETCODE readScenarios(STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
Definition: reader_sto.c:1604
Definition: reader_sto.c:125
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
static const char * getScenarioStageName(SCIP *scip, STOSCENARIO *scenario)
Definition: reader_sto.c:359
Constraint handler for linear constraints in their most general form, .
SCIP_EXPORT SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
Definition: var.c:17608
Definition: sepa_convexproj.c:82
static SCIP_RETCODE createScenariosFromBlocks(SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO ***blocks, int numblocks, int *numblocksperblock, int numstages)
Definition: reader_sto.c:925
static SCIP_RETCODE setScenarioStageName(SCIP *scip, STOSCENARIO *scenario, const char *stagename)
Definition: reader_sto.c:343
Definition: reader_sto.c:114
SCIP_RETCODE SCIPchgCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
Definition: cons_linear.c:18246
static SCIP_RETCODE readIndep(STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
Definition: reader_sto.c:1746
static int getScenarioNChildren(STOSCENARIO *scenario)
Definition: reader_sto.c:308
static SCIP_RETCODE freeReaderdata(SCIP *scip, SCIP_READERDATA *readerdata)
Definition: reader_sto.c:1021
general public methods
public methods for debugging
static SCIP_RETCODE scenarioAddChild(SCIP *scip, STOSCENARIO **parent, STOSCENARIO *child)
Definition: reader_sto.c:669
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
Definition: scip_var.c:4514
public methods for message output
SCIP_RETCODE SCIPcreateBendersDefault(SCIP *scip, SCIP **subproblems, int nsubproblems)
Definition: benders_default.c:476
SCIP_RETCODE SCIPdelVar(SCIP *scip, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: scip_prob.c:1784
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)
Definition: reader_sto.c:828
static SCIP_RETCODE readSto(SCIP *scip, const char *filename, SCIP_READERDATA *readerdata)
Definition: reader_sto.c:2592
public methods for input file readers
default Benders' decomposition plugin
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:451
public methods for message handling
static int getScenarioNum(SCIP *scip, STOSCENARIO *scenario)
Definition: reader_sto.c:444
static SCIP_RETCODE stoinputCreate(SCIP *scip, STOINPUT **stoi, SCIP_FILE *fp)
Definition: reader_sto.c:1040
Definition: type_retcode.h:45
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
Definition: scip_param.c:439
static SCIP_RETCODE createScenarioData(SCIP *scip, STOSCENARIO **scenariodata)
Definition: reader_sto.c:153
static void stoinputSetStochInfoType(STOINPUT *stoi, STOSTOCHINFO stochinfotype)
Definition: reader_sto.c:1204
SCIP_RETCODE SCIPreadSto(SCIP *scip, const char *filename, SCIP_RESULT *result)
Definition: reader_sto.c:2802
static STOSCENARIO * getScenarioChild(STOSCENARIO *scenario, int childnum)
Definition: reader_sto.c:319
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
Definition: cons.c:8298
SCIP_EXPORT SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)
Definition: var.c:17628
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip_message.c:199
SCIP_VAR ** SCIPtimGetStageVars(SCIP *scip, int stagenum)
Definition: reader_tim.c:1044
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
Definition: cons_linear.c:18399
Definition: reader_sto.c:131
Definition: reader_sto.c:113
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
Definition: scip_cons.c:1110
static SCIP_RETCODE buildFullProblem(SCIP *scip, SCIP_READERDATA *readerdata)
Definition: reader_sto.c:2508
Definition: objbenders.h:33
int SCIPtimGetStageNConss(SCIP *scip, int stagenum)
Definition: reader_tim.c:1107
public methods for reader plugins
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
Definition: scip_cons.c:2514
public methods for global and local (sub)problems
Definition: reader_sto.c:110
default SCIP plugins
static void setScenarioScip(STOSCENARIO *scenario, SCIP *scip)
Definition: reader_sto.c:242
int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt)
Definition: misc.c:10474
const char * SCIPtimGetStageName(SCIP *scip, int stagenum)
Definition: reader_tim.c:944
static SCIP_RETCODE insertScenarioInReaderdata(SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO *scenario, char *parentname)
Definition: reader_sto.c:801
static SCIP_RETCODE addScenarioConsToProb(SCIP *scip, SCIP *scenarioscip, STOSCENARIO *scenario, SCIP_HASHMAP *varmap, SCIP_CONS **conss, int nconss, SCIP_Bool decomp)
Definition: reader_sto.c:2133
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
Definition: scip_param.c:497
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
Definition: scip_prob.c:170
memory allocation routines
Definition: type_var.h:58