SCIP Doxygen Documentation
Loading...
Searching...
No Matches

Detailed Description

STO file reader - the stochastic information of an instance in SMPS format.

Author
Stephen J. Maher

Definition in file reader_sto.c.

#include "blockmemshell/memory.h"
#include "scip/benders_default.h"
#include "scip/cons_linear.h"
#include "scip/pub_cons.h"
#include "scip/pub_fileio.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_reader.h"
#include "scip/pub_var.h"
#include "scip/reader_cor.h"
#include "scip/reader_sto.h"
#include "scip/reader_tim.h"
#include "scip/scip_cons.h"
#include "scip/scip_debug.h"
#include "scip/scipdefplugins.h"
#include "scip/scip_general.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_reader.h"
#include "scip/scip_var.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  StoScenario
struct  StoInput

Macros

#define READER_NAME   "storeader"
#define READER_DESC   "file reader for stochastic information of stochastic programs in the SMPS file format"
#define READER_EXTENSION   "sto"
#define DEFAULT_USEBENDERS   FALSE
#define STO_MAX_LINELEN   1024
#define STO_MAX_NAMELEN   256
#define STO_DEFAULT_ARRAYSIZE   100
#define STO_DEFAULT_ENTRIESSIZE   20
#define STO_DEFAULT_BLOCKARRAYSIZE   5
#define STO_DEFAULT_CHILDRENSIZE   5
#define BLANK   ' '

Functions

static SCIP_RETCODE createScenarioData (SCIP *scip, STOSCENARIO **scenariodata)
static SCIP_RETCODE freeScenarioTree (SCIP *scip, STOSCENARIO **scenariotree)
static void setScenarioScip (STOSCENARIO *scenario, SCIP *scip)
static SCIPgetScenarioScip (STOSCENARIO *scenario)
static SCIP_RETCODE createScenarioSubproblemArray (SCIP *scip, STOSCENARIO *scenario)
static void addScenarioSubproblem (STOSCENARIO *scenario, SCIP *subproblem)
static SCIP ** getScenarioSubproblemArray (STOSCENARIO *scenario)
static int getScenarioNChildren (STOSCENARIO *scenario)
static STOSCENARIOgetScenarioChild (STOSCENARIO *scenario, int childnum)
static STOSCENARIOgetScenarioParent (STOSCENARIO *scenario)
static SCIP_RETCODE setScenarioStageName (SCIP *scip, STOSCENARIO *scenario, const char *stagename)
static const char * getScenarioStageName (SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE setScenarioStageNum (SCIP *scip, STOSCENARIO *scenario, int stagenum)
static int getScenarioStageNum (SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE setScenarioName (SCIP *scip, STOSCENARIO *scenario, const char *name)
static const char * getScenarioName (STOSCENARIO *scenario)
static SCIP_RETCODE setScenarioNum (SCIP *scip, STOSCENARIO *scenario, int scenarionum)
static int getScenarioNum (SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE setScenarioProbability (SCIP *scip, STOSCENARIO *scenario, SCIP_Real probability)
static SCIP_Real getScenarioProbability (SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE setScenarioLowerbound (SCIP *scip, STOSCENARIO *scenario, SCIP_Real lowerbound)
static SCIP_Real getScenarioLowerbound (SCIP *scip, STOSCENARIO *scenario)
static SCIP_RETCODE addScenarioEntry (SCIP *scip, STOSCENARIO *scenario, const char *rowname, const char *colname, SCIP_Real value)
static int getScenarioNEntries (STOSCENARIO *scenario)
static const char * getScenarioEntryRow (STOSCENARIO *scenario, int entry)
static const char * getScenarioEntryCol (STOSCENARIO *scenario, int entry)
static SCIP_Real getScenarioEntryValue (STOSCENARIO *scenario, int entry)
static SCIP_RETCODE copyScenario (SCIP *scip, STOSCENARIO *sourcescenario, STOSCENARIO **targetscenario, SCIP_Bool copyname)
static SCIP_RETCODE mergeScenarios (SCIP *scip, STOSCENARIO *scenario1, STOSCENARIO **mergedscenario)
static SCIP_RETCODE scenarioAddChild (SCIP *scip, STOSCENARIO **parent, STOSCENARIO *child)
static SCIP_RETCODE buildScenarioTree (SCIP *scip, STOSCENARIO **scenariotree, STOSCENARIO ***scenarios, int *numscenarios, int numstages, int stage)
static SCIP_RETCODE addScenariosToReaderdata (SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO ***scenarios, int *numscenarios, int numscenariostages)
static STOSCENARIOfindScenarioInTree (STOSCENARIO *scenariotree, const char *scenname)
static SCIP_RETCODE insertScenarioInReaderdata (SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO *scenario, char *parentname)
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 SCIP_RETCODE createScenariosFromBlocks (SCIP *scip, SCIP_READERDATA *readerdata, STOSCENARIO ***blocks, int numblocks, int *numblocksperblock, int numstages)
static SCIP_RETCODE createReaderdata (SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE freeReaderdata (SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE stoinputCreate (SCIP *scip, STOINPUT **stoi, SCIP_FILE *fp)
static void stoinputFree (SCIP *scip, STOINPUT **stoi)
static STOSECTION stoinputSection (const STOINPUT *stoi)
static STOSTOCHINFO stoinputStochInfoType (const STOINPUT *stoi)
static const char * stoinputField0 (const STOINPUT *stoi)
static const char * stoinputField1 (const STOINPUT *stoi)
static const char * stoinputField2 (const STOINPUT *stoi)
static const char * stoinputField3 (const STOINPUT *stoi)
static const char * stoinputField4 (const STOINPUT *stoi)
static const char * stoinputField5 (const STOINPUT *stoi)
static const char * stoinputField6 (const STOINPUT *stoi)
static SCIP_Bool stoinputHasError (const STOINPUT *stoi)
static void stoinputSetSection (STOINPUT *stoi, STOSECTION section)
static void stoinputSetStochInfoType (STOINPUT *stoi, STOSTOCHINFO stochinfotype)
static void stoinputSetProbname (STOINPUT *stoi, const char *probname)
static void stoinputSetStochtype (STOINPUT *stoi, const char *stochtype)
static void stoinputSyntaxerror (STOINPUT *stoi)
static void clearFrom (char *buf, unsigned int pos)
static SCIP_Bool stoinputReadLine (STOINPUT *stoi)
static SCIP_RETCODE readStoch (SCIP *scip, STOINPUT *stoi)
static SCIP_RETCODE readBlocks (STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE readScenarios (STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE readIndep (STOINPUT *stoi, SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_Real computeScenarioProbability (SCIP *scip, STOSCENARIO *scenario)
static void getScenarioEntityName (char *name, const char *varname, int stagenum, int scenarionum)
static SCIP_RETCODE addScenarioVarsToProb (SCIP *scip, STOSCENARIO *scenario, SCIP_HASHMAP *varmap, SCIP_VAR **vars, int nvars)
static SCIP_RETCODE findScenarioVar (SCIP *scip, STOSCENARIO *scenario, SCIP_VAR *consvar, SCIP_VAR **scenariovar)
static SCIP_RETCODE getScenarioDecompVar (SCIP *scip, STOSCENARIO *scenario, SCIP_VAR *consvar, SCIP_VAR **scenariovar, SCIP_Bool *varadded)
static SCIP_RETCODE addScenarioConsToProb (SCIP *scip, SCIP *scenarioscip, STOSCENARIO *scenario, SCIP_HASHMAP *varmap, SCIP_CONS **conss, int nconss, SCIP_Bool decomp)
static SCIP_RETCODE addScenarioVarsAndConsToProb (SCIP *scip, STOSCENARIO *scenario, SCIP_Bool decomp)
static SCIP_RETCODE removeCoreVariablesAndConstraints (SCIP *scip)
static SCIP_RETCODE buildFullProblem (SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE buildDecompProblem (SCIP *scip, SCIP_READERDATA *readerdata)
static SCIP_RETCODE readSto (SCIP *scip, const char *filename, SCIP_READERDATA *readerdata)
static SCIP_DECL_READERCOPY (readerCopySto)
static SCIP_DECL_READERFREE (readerFreeSto)
static SCIP_DECL_READERREAD (readerReadSto)
SCIP_RETCODE SCIPincludeReaderSto (SCIP *scip)
SCIP_RETCODE SCIPreadSto (SCIP *scip, const char *filename, SCIP_RESULT *result)
int SCIPstoGetNScenarios (SCIP *scip)
SCIP_RETCODE SCIPfreeReaderdataSto (SCIP *scip)

Macro Definition Documentation

◆ READER_NAME

#define READER_NAME   "storeader"

Definition at line 60 of file reader_sto.c.

◆ READER_DESC

#define READER_DESC   "file reader for stochastic information of stochastic programs in the SMPS file format"

Definition at line 61 of file reader_sto.c.

◆ READER_EXTENSION

#define READER_EXTENSION   "sto"

Definition at line 62 of file reader_sto.c.

◆ DEFAULT_USEBENDERS

#define DEFAULT_USEBENDERS   FALSE

should Benders' decomposition be used for the stochastic program?

Definition at line 64 of file reader_sto.c.

Referenced by SCIPincludeReaderScflp(), and SCIPincludeReaderSto().

◆ STO_MAX_LINELEN

#define STO_MAX_LINELEN   1024

Definition at line 70 of file reader_sto.c.

Referenced by stoinputReadLine().

◆ STO_MAX_NAMELEN

#define STO_MAX_NAMELEN   256

Definition at line 71 of file reader_sto.c.

Referenced by stoinputSetProbname(), and stoinputSetStochtype().

◆ STO_DEFAULT_ARRAYSIZE

#define STO_DEFAULT_ARRAYSIZE   100

Definition at line 73 of file reader_sto.c.

Referenced by readBlocks(), and readIndep().

◆ STO_DEFAULT_ENTRIESSIZE

#define STO_DEFAULT_ENTRIESSIZE   20

Definition at line 74 of file reader_sto.c.

Referenced by createScenarioData().

◆ STO_DEFAULT_BLOCKARRAYSIZE

#define STO_DEFAULT_BLOCKARRAYSIZE   5

Definition at line 75 of file reader_sto.c.

Referenced by createScenariosFromBlocks(), readBlocks(), and readIndep().

◆ STO_DEFAULT_CHILDRENSIZE

#define STO_DEFAULT_CHILDRENSIZE   5

Definition at line 76 of file reader_sto.c.

Referenced by createScenarioData().

◆ BLANK

#define BLANK   ' '

Definition at line 78 of file reader_sto.c.

Typedef Documentation

◆ STOSCENARIO

typedef struct StoScenario STOSCENARIO

Definition at line 80 of file reader_sto.c.

◆ STOSECTION

typedef enum StoSection STOSECTION

Definition at line 126 of file reader_sto.c.

◆ STOSTOCHINFO

typedef enum StoStochInfo STOSTOCHINFO

Definition at line 138 of file reader_sto.c.

◆ STOINPUT

typedef struct StoInput STOINPUT

Definition at line 159 of file reader_sto.c.

Enumeration Type Documentation

◆ StoSection

enum StoSection

enum containing all sto sections

Enumerator
STO_STOCH 
STO_SCENARIOS 
STO_BLOCKS 
STO_INDEP 
STO_ENDATA 

Definition at line 118 of file reader_sto.c.

◆ StoStochInfo

enum containing the types of stochastic information

Enumerator
STO_STOCHINFO_NONE 
STO_STOCHINFO_DISCRETE 
STO_STOCHINFO_UNIFORM 
STO_STOCHINFO_NORMAL 
STO_STOCHINFO_SUB 
STO_STOCHINFO_LINTR 

Definition at line 129 of file reader_sto.c.

Function Documentation

◆ createScenarioData()

SCIP_RETCODE createScenarioData ( SCIP * scip,
STOSCENARIO ** scenariodata )
static

creates a scenario structure

Parameters
scipSCIP data structure
scenariodatathe scenario to be created

Definition at line 163 of file reader_sto.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPdebugMessage, SCIPinfinity(), STO_DEFAULT_CHILDRENSIZE, and STO_DEFAULT_ENTRIESSIZE.

Referenced by buildScenariosFromBlocks(), createReaderdata(), readBlocks(), readIndep(), readScenarios(), and scenarioAddChild().

◆ freeScenarioTree()

SCIP_RETCODE freeScenarioTree ( SCIP * scip,
STOSCENARIO ** scenariotree )
static

frees the memory used for the scenario tree

Parameters
scipthe SCIP data structure
scenariotreethe scenario tree

Definition at line 199 of file reader_sto.c.

References assert(), freeScenarioTree(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPfree(), SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArray.

Referenced by createScenariosFromBlocks(), freeReaderdata(), freeScenarioTree(), readBlocks(), readIndep(), and readScenarios().

◆ setScenarioScip()

void setScenarioScip ( STOSCENARIO * scenario,
SCIP * scip )
static

sets the SCIP pointer to the scenario

Parameters
scenariothe scenario
scipthe SCIP data structure

Definition at line 252 of file reader_sto.c.

References assert(), NULL, and StoScenario::scip.

Referenced by addScenarioVarsAndConsToProb(), and buildDecompProblem().

◆ getScenarioScip()

SCIP * getScenarioScip ( STOSCENARIO * scenario)
static

returns the SCIP pointer to the scenario

Parameters
scenariothe scenario

Definition at line 265 of file reader_sto.c.

References assert(), NULL, and StoScenario::scip.

Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), and getScenarioDecompVar().

◆ createScenarioSubproblemArray()

SCIP_RETCODE createScenarioSubproblemArray ( SCIP * scip,
STOSCENARIO * scenario )
static

creates the subproblem array. This array will be the same size as the number of children

Parameters
scipthe SCIP data structure
scenariothe scenario

Definition at line 276 of file reader_sto.c.

References assert(), StoScenario::nchildren, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, and StoScenario::subproblems.

Referenced by addScenarioVarsAndConsToProb(), and buildDecompProblem().

◆ addScenarioSubproblem()

void addScenarioSubproblem ( STOSCENARIO * scenario,
SCIP * subproblem )
static

adds a scenario to the subproblem array

Parameters
scenariothe scenario
subproblemthe subproblems data structure

Definition at line 291 of file reader_sto.c.

References assert(), StoScenario::nchildren, StoScenario::nsubproblems, NULL, and StoScenario::subproblems.

Referenced by addScenarioVarsAndConsToProb(), and buildDecompProblem().

◆ getScenarioSubproblemArray()

SCIP ** getScenarioSubproblemArray ( STOSCENARIO * scenario)
static

returns the subproblem array for the scenario

Parameters
scenariothe scenario

Definition at line 307 of file reader_sto.c.

References assert(), NULL, and StoScenario::subproblems.

Referenced by addScenarioVarsAndConsToProb(), and buildDecompProblem().

◆ getScenarioNChildren()

int getScenarioNChildren ( STOSCENARIO * scenario)
static

returns the number of children for a given scenario

Parameters
scenariothe scenario

Definition at line 318 of file reader_sto.c.

References assert(), StoScenario::nchildren, and NULL.

Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), buildFullProblem(), buildScenarioTree(), and findScenarioInTree().

◆ getScenarioChild()

STOSCENARIO * getScenarioChild ( STOSCENARIO * scenario,
int childnum )
static

returns a given child for a given scenario

Parameters
scenariothe scenario
childnumthe number of the desired child

Definition at line 329 of file reader_sto.c.

References assert(), StoScenario::children, and NULL.

Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), buildFullProblem(), and buildScenarioTree().

◆ getScenarioParent()

STOSCENARIO * getScenarioParent ( STOSCENARIO * scenario)
static

returns the parent of a scenario

Parameters
scenariothe scenario

Definition at line 342 of file reader_sto.c.

References assert(), NULL, and StoScenario::parent.

Referenced by computeScenarioProbability(), findScenarioVar(), and getScenarioDecompVar().

◆ setScenarioStageName()

SCIP_RETCODE setScenarioStageName ( SCIP * scip,
STOSCENARIO * scenario,
const char * stagename )
static

sets the stage name

Parameters
scipthe SCIP data structure
scenariothe scenario
stagenamethe stage name

Definition at line 353 of file reader_sto.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPduplicateBlockMemoryArray, and StoScenario::stagename.

Referenced by buildScenariosFromBlocks(), copyScenario(), createReaderdata(), readBlocks(), readIndep(), and readScenarios().

◆ getScenarioStageName()

const char * getScenarioStageName ( SCIP * scip,
STOSCENARIO * scenario )
static

returns the stage name

Parameters
scipthe SCIP data structure
scenariothe scenario

Definition at line 369 of file reader_sto.c.

References assert(), NULL, and StoScenario::stagename.

Referenced by addScenarioVarsAndConsToProb(), buildScenariosFromBlocks(), buildScenarioTree(), and createScenariosFromBlocks().

◆ setScenarioStageNum()

SCIP_RETCODE setScenarioStageNum ( SCIP * scip,
STOSCENARIO * scenario,
int stagenum )
static

sets the stage num

Parameters
scipthe SCIP data structure
scenariothe scenario
stagenumthe stage num

Definition at line 382 of file reader_sto.c.

References assert(), NULL, SCIP_OKAY, and StoScenario::stagenum.

Referenced by buildScenariosFromBlocks(), copyScenario(), createScenariosFromBlocks(), and readScenarios().

◆ getScenarioStageNum()

int getScenarioStageNum ( SCIP * scip,
STOSCENARIO * scenario )
static

returns the stage num

Parameters
scipthe SCIP data structure
scenariothe scenario

Definition at line 398 of file reader_sto.c.

References assert(), NULL, and StoScenario::stagenum.

Referenced by addScenarioConsToProb(), addScenarioVarsAndConsToProb(), addScenarioVarsToProb(), findScenarioVar(), and getScenarioDecompVar().

◆ setScenarioName()

SCIP_RETCODE setScenarioName ( SCIP * scip,
STOSCENARIO * scenario,
const char * name )
static

sets the scenario name

Parameters
scipthe SCIP data structure
scenariothe scenario
namethe scenario name

Definition at line 411 of file reader_sto.c.

References assert(), StoScenario::name, NULL, SCIP_CALL, SCIP_OKAY, and SCIPduplicateBlockMemoryArray.

Referenced by buildScenariosFromBlocks(), copyScenario(), createReaderdata(), readBlocks(), readIndep(), and readScenarios().

◆ getScenarioName()

const char * getScenarioName ( STOSCENARIO * scenario)
static

returns the scenario name

Parameters
scenariothe scenario

Definition at line 427 of file reader_sto.c.

References assert(), StoScenario::name, and NULL.

Referenced by findScenarioInTree(), readBlocks(), and readIndep().

◆ setScenarioNum()

SCIP_RETCODE setScenarioNum ( SCIP * scip,
STOSCENARIO * scenario,
int scenarionum )
static

sets the scenario num

Parameters
scipthe SCIP data structure
scenariothe scenario
scenarionumthe scenario num

Definition at line 438 of file reader_sto.c.

References assert(), NULL, StoScenario::scenarionum, and SCIP_OKAY.

Referenced by buildScenariosFromBlocks(), copyScenario(), createScenariosFromBlocks(), and readScenarios().

◆ getScenarioNum()

int getScenarioNum ( SCIP * scip,
STOSCENARIO * scenario )
static

returns the scenario num

Parameters
scipthe SCIP data structure
scenariothe scenario

Definition at line 454 of file reader_sto.c.

References assert(), NULL, and StoScenario::scenarionum.

Referenced by addScenarioConsToProb(), addScenarioVarsAndConsToProb(), addScenarioVarsToProb(), findScenarioVar(), and getScenarioDecompVar().

◆ setScenarioProbability()

SCIP_RETCODE setScenarioProbability ( SCIP * scip,
STOSCENARIO * scenario,
SCIP_Real probability )
static

sets the scenario probability

Parameters
scipthe SCIP data structure
scenariothe scenario
probabilitythe scenario probability

Definition at line 467 of file reader_sto.c.

References assert(), NULL, StoScenario::probability, SCIP_OKAY, and SCIP_Real.

Referenced by copyScenario(), mergeScenarios(), readBlocks(), readIndep(), and readScenarios().

◆ getScenarioProbability()

SCIP_Real getScenarioProbability ( SCIP * scip,
STOSCENARIO * scenario )
static

returns the scenario probability

Parameters
scipthe SCIP data structure
scenariothe scenario

Definition at line 483 of file reader_sto.c.

References assert(), NULL, StoScenario::probability, and SCIP_Real.

Referenced by computeScenarioProbability(), copyScenario(), and mergeScenarios().

◆ setScenarioLowerbound()

SCIP_RETCODE setScenarioLowerbound ( SCIP * scip,
STOSCENARIO * scenario,
SCIP_Real lowerbound )
static

sets the scenario lowerbound

Parameters
scipthe SCIP data structure
scenariothe scenario
lowerboundthe scenario lowerbound

Definition at line 496 of file reader_sto.c.

References assert(), StoScenario::lowerbound, NULL, SCIP_OKAY, and SCIP_Real.

Referenced by copyScenario(), and readScenarios().

◆ getScenarioLowerbound()

SCIP_Real getScenarioLowerbound ( SCIP * scip,
STOSCENARIO * scenario )
static

returns the scenario lowerbound

Parameters
scipthe SCIP data structure
scenariothe scenario

Definition at line 512 of file reader_sto.c.

References assert(), StoScenario::lowerbound, NULL, and SCIP_Real.

Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), and copyScenario().

◆ addScenarioEntry()

SCIP_RETCODE addScenarioEntry ( SCIP * scip,
STOSCENARIO * scenario,
const char * rowname,
const char * colname,
SCIP_Real value )
static

add scenario entry

Parameters
scipthe SCIP data structure
scenariothe scenario
rownamethe row name for the entry
colnamethe col name for the entry
valuethe value for the entry

Definition at line 525 of file reader_sto.c.

References assert(), StoScenario::colnames, StoScenario::entriessize, StoScenario::nentries, NULL, StoScenario::rownames, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcalcMemGrowSize(), SCIPduplicateBlockMemoryArray, SCIPreallocBlockMemoryArray, and StoScenario::values.

Referenced by copyScenario(), mergeScenarios(), readBlocks(), readIndep(), and readScenarios().

◆ getScenarioNEntries()

int getScenarioNEntries ( STOSCENARIO * scenario)
static

returns the number of entries for a scenario

Parameters
scenariothe scenario

Definition at line 557 of file reader_sto.c.

References assert(), StoScenario::nentries, and NULL.

Referenced by addScenarioVarsAndConsToProb().

◆ getScenarioEntryRow()

const char * getScenarioEntryRow ( STOSCENARIO * scenario,
int entry )
static

returns an entry row for a scenario

Parameters
scenariothe scenario
entrythe entry number

Definition at line 568 of file reader_sto.c.

References assert(), NULL, and StoScenario::rownames.

Referenced by addScenarioVarsAndConsToProb().

◆ getScenarioEntryCol()

const char * getScenarioEntryCol ( STOSCENARIO * scenario,
int entry )
static

returns an entry column for a scenario

Parameters
scenariothe scenario
entrythe entry number

Definition at line 581 of file reader_sto.c.

References assert(), StoScenario::colnames, and NULL.

Referenced by addScenarioVarsAndConsToProb().

◆ getScenarioEntryValue()

SCIP_Real getScenarioEntryValue ( STOSCENARIO * scenario,
int entry )
static

returns an entry value for a scenario

Parameters
scenariothe scenario
entrythe entry number

Definition at line 594 of file reader_sto.c.

References assert(), NULL, SCIP_Real, and StoScenario::values.

Referenced by addScenarioVarsAndConsToProb().

◆ copyScenario()

SCIP_RETCODE copyScenario ( SCIP * scip,
STOSCENARIO * sourcescenario,
STOSCENARIO ** targetscenario,
SCIP_Bool copyname )
static

copies a scenario. In the case of blocks, the scenarios must be combined

Parameters
scipthe SCIP data structure
sourcescenariothe source scenario
targetscenariothe target scenario
copynameshould the name be copied?

Definition at line 609 of file reader_sto.c.

References addScenarioEntry(), assert(), StoScenario::colnames, getScenarioLowerbound(), getScenarioProbability(), i, StoScenario::name, StoScenario::nentries, NULL, StoScenario::rownames, StoScenario::scenarionum, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, setScenarioLowerbound(), setScenarioName(), setScenarioNum(), setScenarioProbability(), setScenarioStageName(), setScenarioStageNum(), StoScenario::stagename, StoScenario::stagenum, and StoScenario::values.

Referenced by buildScenariosFromBlocks(), and scenarioAddChild().

◆ mergeScenarios()

SCIP_RETCODE mergeScenarios ( SCIP * scip,
STOSCENARIO * scenario1,
STOSCENARIO ** mergedscenario )
static

merge scenarios. In the case of blocks, the scenarios must be combined

Parameters
scipthe SCIP data structure
scenario1the first scenario
mergedscenariothe merged scenario

Definition at line 652 of file reader_sto.c.

References addScenarioEntry(), assert(), StoScenario::colnames, getScenarioProbability(), i, StoScenario::nentries, NULL, StoScenario::rownames, SCIP_CALL, SCIP_OKAY, SCIP_Real, setScenarioProbability(), and StoScenario::values.

Referenced by buildScenariosFromBlocks().

◆ scenarioAddChild()

SCIP_RETCODE scenarioAddChild ( SCIP * scip,
STOSCENARIO ** parent,
STOSCENARIO * child )
static

adds a child to a given scenario

Parameters
scipthe SCIP data structure
parentthe parent scenario
childthe child scenario

Definition at line 679 of file reader_sto.c.

References assert(), StoScenario::children, copyScenario(), createScenarioData(), StoScenario::nchildren, NULL, StoScenario::parent, SCIP_CALL, SCIP_OKAY, SCIPensureBlockMemoryArray, and TRUE.

Referenced by buildScenarioTree(), and insertScenarioInReaderdata().

◆ buildScenarioTree()

SCIP_RETCODE buildScenarioTree ( SCIP * scip,
STOSCENARIO ** scenariotree,
STOSCENARIO *** scenarios,
int * numscenarios,
int numstages,
int stage )
static

recursively adds the scenarios to the reader data

Parameters
scipthe SCIP data structure
scenariotreethe scenario tree
scenariosthe array of scenarios
numscenariosthe number of scenarios per stage
numstagesthe number of stages
stagethe number of the stage. Also the depth of the tree

Definition at line 707 of file reader_sto.c.

References assert(), buildScenarioTree(), getScenarioChild(), getScenarioNChildren(), getScenarioStageName(), i, NULL, scenarioAddChild(), SCIP_CALL, SCIP_OKAY, and SCIPtimGetStageName().

Referenced by addScenariosToReaderdata(), and buildScenarioTree().

◆ addScenariosToReaderdata()

SCIP_RETCODE addScenariosToReaderdata ( SCIP * scip,
SCIP_READERDATA * readerdata,
STOSCENARIO *** scenarios,
int * numscenarios,
int numscenariostages )
static
Parameters
scipthe SCIP data structure
readerdatathe reader data
scenariosthe array of scenarios
numscenariosthe number of scenarios per stage
numscenariostagesthe number of stages for which scenarios were collected

Definition at line 753 of file reader_sto.c.

References assert(), buildScenarioTree(), i, NULL, SCIP_CALL, SCIP_OKAY, and SCIPtimGetNStages().

Referenced by createScenariosFromBlocks().

◆ findScenarioInTree()

STOSCENARIO * findScenarioInTree ( STOSCENARIO * scenariotree,
const char * scenname )
static

finds a scenario with a given name

Parameters
scenariotreethe scenario tree to search
scennamethe name of the scenario to search

Definition at line 780 of file reader_sto.c.

References StoScenario::children, findScenarioInTree(), getScenarioName(), getScenarioNChildren(), i, and NULL.

Referenced by findScenarioInTree(), and insertScenarioInReaderdata().

◆ insertScenarioInReaderdata()

SCIP_RETCODE insertScenarioInReaderdata ( SCIP * scip,
SCIP_READERDATA * readerdata,
STOSCENARIO * scenario,
char * parentname )
static

inserts a scenario into the reader data scenario tree

Parameters
scipthe SCIP data structure
readerdatathe reader data
scenariothe scenario to insert in the scenario tree
parentnamethe parent scenario for the inserting scenario

Definition at line 807 of file reader_sto.c.

References assert(), findScenarioInTree(), NULL, scenarioAddChild(), SCIP_CALL, and SCIP_OKAY.

Referenced by readScenarios().

◆ buildScenariosFromBlocks()

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
Parameters
scipthe SCIP data structure
blocksthe block that form the scenarios
scenariosthe array to store the scenarios
blocksforscenthe blocks that will form the scenario
numblocksforscenthe number of blocks that form the scenario
numblocksthe number of blocks
numblocksperblockthe number of blocks for a given block
numscenariosthe number of scenarios
scenariossizethe size of scenarios array
stagethe stage for this scenario
stagenumthe number of the stage
blocknumthe block number

Definition at line 834 of file reader_sto.c.

References assert(), buildScenariosFromBlocks(), copyScenario(), createScenarioData(), FALSE, getScenarioStageName(), i, mergeScenarios(), NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPreallocBlockMemoryArray, SCIPsnprintf(), setScenarioName(), setScenarioNum(), setScenarioStageName(), setScenarioStageNum(), and TRUE.

Referenced by buildScenariosFromBlocks(), and createScenariosFromBlocks().

◆ createScenariosFromBlocks()

SCIP_RETCODE createScenariosFromBlocks ( SCIP * scip,
SCIP_READERDATA * readerdata,
STOSCENARIO *** blocks,
int numblocks,
int * numblocksperblock,
int numstages )
static
Parameters
scipthe SCIP data structure
readerdatathe reader data
blocksthe block that form the scenarios
numblocksthe number of blocks
numblocksperblockthe number of blocks for each block type
numstagesthe number of stages

Definition at line 931 of file reader_sto.c.

References addScenariosToReaderdata(), assert(), buildScenariosFromBlocks(), freeScenarioTree(), getScenarioStageName(), i, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPfreeBlockMemoryArray, SCIPfreeBufferArray, SCIPsnprintf(), setScenarioNum(), setScenarioStageNum(), and STO_DEFAULT_BLOCKARRAYSIZE.

Referenced by readBlocks(), and readIndep().

◆ createReaderdata()

SCIP_RETCODE createReaderdata ( SCIP * scip,
SCIP_READERDATA * readerdata )
static

creates the reader data

Parameters
scipSCIP data structure
readerdatathe reader data

Definition at line 1007 of file reader_sto.c.

References assert(), createScenarioData(), NULL, SCIP_CALL, SCIP_OKAY, SCIPtimGetStageName(), setScenarioName(), setScenarioStageName(), and TRUE.

Referenced by readSto().

◆ freeReaderdata()

SCIP_RETCODE freeReaderdata ( SCIP * scip,
SCIP_READERDATA * readerdata )
static

frees the reader data

Parameters
scipthe SCIP data structure
readerdatathe reader data

Definition at line 1032 of file reader_sto.c.

References assert(), FALSE, freeScenarioTree(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by SCIP_DECL_READERFREE(), SCIPfreeReaderdataSto(), and SCIPreadSto().

◆ stoinputCreate()

SCIP_RETCODE stoinputCreate ( SCIP * scip,
STOINPUT ** stoi,
SCIP_FILE * fp )
static

creates the sto input structure

Parameters
scipSCIP data structure
stoisto input structure
fpfile object for the input file

Definition at line 1054 of file reader_sto.c.

References assert(), FALSE, StoInput::fp, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, STO_STOCH, and STO_STOCHINFO_NONE.

Referenced by readSto().

◆ stoinputFree()

void stoinputFree ( SCIP * scip,
STOINPUT ** stoi )
static

free the sto input structure

Parameters
scipSCIP data structure
stoisto input structure

Definition at line 1086 of file reader_sto.c.

References SCIPfreeBlockMemory.

Referenced by readSto().

◆ stoinputSection()

STOSECTION stoinputSection ( const STOINPUT * stoi)
static

returns the current section

Parameters
stoisto input structure

Definition at line 1096 of file reader_sto.c.

References assert(), NULL, and StoInput::section.

Referenced by readSto().

◆ stoinputStochInfoType()

STOSTOCHINFO stoinputStochInfoType ( const STOINPUT * stoi)
static

returns the stochastic information type

Parameters
stoisto input structure

Definition at line 1107 of file reader_sto.c.

References assert(), NULL, and StoInput::stochinfotype.

Referenced by readSto().

◆ stoinputField0()

const char * stoinputField0 ( const STOINPUT * stoi)
static

return the current value of field 0

Parameters
stoisto input structure

Definition at line 1118 of file reader_sto.c.

References assert(), StoInput::f0, and NULL.

Referenced by readBlocks(), readIndep(), readScenarios(), and readStoch().

◆ stoinputField1()

const char * stoinputField1 ( const STOINPUT * stoi)
static

return the current value of field 1

Parameters
stoisto input structure

Definition at line 1129 of file reader_sto.c.

References assert(), StoInput::f1, and NULL.

Referenced by readBlocks(), readIndep(), readScenarios(), and readStoch().

◆ stoinputField2()

const char * stoinputField2 ( const STOINPUT * stoi)
static

return the current value of field 2

Parameters
stoisto input structure

Definition at line 1140 of file reader_sto.c.

References assert(), StoInput::f2, and NULL.

Referenced by readBlocks(), readIndep(), and readScenarios().

◆ stoinputField3()

const char * stoinputField3 ( const STOINPUT * stoi)
static

return the current value of field 3

Parameters
stoisto input structure

Definition at line 1151 of file reader_sto.c.

References assert(), StoInput::f3, and NULL.

Referenced by readBlocks(), readIndep(), and readScenarios().

◆ stoinputField4()

const char * stoinputField4 ( const STOINPUT * stoi)
static

return the current value of field 4

Parameters
stoisto input structure

Definition at line 1162 of file reader_sto.c.

References assert(), StoInput::f4, and NULL.

Referenced by readBlocks(), readIndep(), and readScenarios().

◆ stoinputField5()

const char * stoinputField5 ( const STOINPUT * stoi)
static

return the current value of field 5

Parameters
stoisto input structure

Definition at line 1173 of file reader_sto.c.

References assert(), StoInput::f5, and NULL.

Referenced by readIndep(), and readScenarios().

◆ stoinputField6()

const char * stoinputField6 ( const STOINPUT * stoi)
static

return the current value of field 6

Parameters
stoisto input structure

Definition at line 1184 of file reader_sto.c.

References assert(), StoInput::f6, and NULL.

Referenced by readScenarios().

◆ stoinputHasError()

SCIP_Bool stoinputHasError ( const STOINPUT * stoi)
static

returns if an error was detected

Parameters
stoisto input structure

Definition at line 1195 of file reader_sto.c.

References assert(), StoInput::haserror, NULL, and SCIP_Bool.

Referenced by readSto().

◆ stoinputSetSection()

void stoinputSetSection ( STOINPUT * stoi,
STOSECTION section )
static

set the section in the sto input structure to given section

Parameters
stoisto input structure
sectionsection that is set

Definition at line 1206 of file reader_sto.c.

References assert(), NULL, and StoInput::section.

Referenced by readBlocks(), readIndep(), readScenarios(), and readStoch().

◆ stoinputSetStochInfoType()

void stoinputSetStochInfoType ( STOINPUT * stoi,
STOSTOCHINFO stochinfotype )
static

set the stochastic info type in the sto input structure

Parameters
stoisto input structure
stochinfotypethe stochastic infomation type

Definition at line 1218 of file reader_sto.c.

References assert(), NULL, and StoInput::stochinfotype.

Referenced by readStoch().

◆ stoinputSetProbname()

void stoinputSetProbname ( STOINPUT * stoi,
const char * probname )
static

set the problem name in the sto input structure to given problem name

Parameters
stoisto input structure
probnamename of the problem to set

Definition at line 1230 of file reader_sto.c.

References assert(), NULL, StoInput::probname, SCIPmemccpy(), and STO_MAX_NAMELEN.

Referenced by readStoch().

◆ stoinputSetStochtype()

void stoinputSetStochtype ( STOINPUT * stoi,
const char * stochtype )
static

set the type name in the sto input structure to given objective name

Parameters
stoisto input structure
stochtypename of the scenario type

Definition at line 1244 of file reader_sto.c.

References assert(), NULL, SCIPmemccpy(), STO_MAX_NAMELEN, and StoInput::stochtype.

Referenced by readBlocks(), readIndep(), and readScenarios().

◆ stoinputSyntaxerror()

void stoinputSyntaxerror ( STOINPUT * stoi)
static
Parameters
stoisto input structure

Definition at line 1257 of file reader_sto.c.

References assert(), StoInput::haserror, StoInput::lineno, NULL, SCIPerrorMessage, StoInput::section, STO_ENDATA, and TRUE.

Referenced by readBlocks(), readIndep(), readScenarios(), readSto(), and readStoch().

◆ clearFrom()

void clearFrom ( char * buf,
unsigned int pos )
static

fill the line from pos up to column 80 with blanks.

Parameters
bufbuffer to clear
posposition to start the clearing process

Definition at line 1270 of file reader_sto.c.

References BLANK, StoInput::buf, and i.

Referenced by stoinputReadLine().

◆ stoinputReadLine()

SCIP_Bool stoinputReadLine ( STOINPUT * stoi)
static

read a sto format data line and parse the fields.

Parameters
stoisto input structure

Definition at line 1284 of file reader_sto.c.

References assert(), BLANK, StoInput::buf, clearFrom(), StoInput::f0, StoInput::f1, StoInput::f2, StoInput::f3, StoInput::f4, StoInput::f5, StoInput::f6, FALSE, StoInput::fp, i, StoInput::lineno, NULL, SCIP_Bool, SCIPdebugMessage, SCIPfgets(), SCIPstrtok(), STO_MAX_LINELEN, and TRUE.

Referenced by readBlocks(), readIndep(), readScenarios(), and readStoch().

◆ readStoch()

◆ readBlocks()

◆ readScenarios()

◆ readIndep()

◆ computeScenarioProbability()

SCIP_Real computeScenarioProbability ( SCIP * scip,
STOSCENARIO * scenario )
static

computes the probability of a scenario

Parameters
scipthe SCIP data structure
scenariothe current scenario

Definition at line 1932 of file reader_sto.c.

References assert(), getScenarioParent(), getScenarioProbability(), NULL, and SCIP_Real.

Referenced by addScenarioVarsAndConsToProb(), and addScenarioVarsToProb().

◆ getScenarioEntityName()

void getScenarioEntityName ( char * name,
const char * varname,
int stagenum,
int scenarionum )
static

gets the variable name

Parameters
namethe name to be returned
varnamethe root of the variable name
stagenumthe stage number
scenarionumthe scenario number

Definition at line 1957 of file reader_sto.c.

References SCIP_MAXSTRLEN, and SCIPsnprintf().

Referenced by addScenarioConsToProb(), addScenarioVarsAndConsToProb(), addScenarioVarsToProb(), findScenarioVar(), and getScenarioDecompVar().

◆ addScenarioVarsToProb()

SCIP_RETCODE addScenarioVarsToProb ( SCIP * scip,
STOSCENARIO * scenario,
SCIP_HASHMAP * varmap,
SCIP_VAR ** vars,
int nvars )
static

add variables to the scenario

Parameters
scipthe SCIP data structure
scenariothe current scenario
varmapthe variable map from the original to the subproblem variables
varsthe variables of the core problem associated with this scenario
nvarsthe number of variables for this scenario

Definition at line 1973 of file reader_sto.c.

References assert(), computeScenarioProbability(), getScenarioEntityName(), getScenarioNum(), getScenarioStageNum(), i, NULL, nvars, obj, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddVar(), SCIPcreateVarImpl(), SCIPdebugMessage, SCIPhashmapInsert(), SCIPreleaseVar(), SCIPvarGetImplType(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetType(), SCIPvarGetUbOriginal(), SCIPvarIsDeleted(), SCIPvarIsInitial(), SCIPvarIsRemovable(), var, and vars.

Referenced by addScenarioVarsAndConsToProb().

◆ findScenarioVar()

SCIP_RETCODE findScenarioVar ( SCIP * scip,
STOSCENARIO * scenario,
SCIP_VAR * consvar,
SCIP_VAR ** scenariovar )
static

finds the scenario variable to add to a constraint

Parameters
scipthe SCIP data structure
scenariothe current scenario
consvarthe variable in the constraint that is being searched for
scenariovarpointer to return the variable to be added to the constraint

Definition at line 2027 of file reader_sto.c.

References assert(), getScenarioEntityName(), getScenarioNum(), getScenarioParent(), getScenarioStageNum(), NULL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIPerrorMessage, SCIPfindVar(), SCIPsnprintf(), and SCIPvarGetName().

Referenced by addScenarioConsToProb().

◆ getScenarioDecompVar()

SCIP_RETCODE getScenarioDecompVar ( SCIP * scip,
STOSCENARIO * scenario,
SCIP_VAR * consvar,
SCIP_VAR ** scenariovar,
SCIP_Bool * varadded )
static

create variable for the decomposed scenario

Parameters
scipthe SCIP data structure
scenariothe current scenario
consvarthe variable in the constraint that is being searched for
scenariovarpointer to return the variable to be added to the constraint
varaddedpointer to indicate whether a variable has been added

Definition at line 2075 of file reader_sto.c.

References assert(), FALSE, getScenarioEntityName(), getScenarioNum(), getScenarioParent(), getScenarioScip(), getScenarioStageNum(), NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddVar(), SCIPcreateVarImpl(), SCIPdebugMessage, SCIPfindVar(), SCIPsnprintf(), SCIPvarGetImplType(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbOriginal(), SCIPvarIsInitial(), SCIPvarIsRemovable(), TRUE, and var.

Referenced by addScenarioConsToProb().

◆ addScenarioConsToProb()

SCIP_RETCODE addScenarioConsToProb ( SCIP * scip,
SCIP * scenarioscip,
STOSCENARIO * scenario,
SCIP_HASHMAP * varmap,
SCIP_CONS ** conss,
int nconss,
SCIP_Bool decomp )
static

adds the constraint to the scenario problem

Parameters
scipthe SCIP data structure
scenarioscipthe scenario SCIP data structure
scenariothe current scenario
varmapthe variable map from the original to the subproblem variables
conssthe constraints of the core problem associated with this scenario
nconssthe number of constraints for this scenario
decompis the problem being decomposed

Definition at line 2144 of file reader_sto.c.

References assert(), FALSE, findScenarioVar(), getScenarioDecompVar(), getScenarioEntityName(), getScenarioNum(), getScenarioStageNum(), i, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIPaddCons(), SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsMarkedPropagate(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPerrorMessage, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetConsCopy(), SCIPgetConsNVars(), SCIPgetConsVars(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPreleaseCons(), SCIPreleaseVar(), and TRUE.

Referenced by addScenarioVarsAndConsToProb().

◆ addScenarioVarsAndConsToProb()

SCIP_RETCODE addScenarioVarsAndConsToProb ( SCIP * scip,
STOSCENARIO * scenario,
SCIP_Bool decomp )
static

add variables and constraint to problem

Parameters
scipthe SCIP data structure of master problem
scenariothe current scenario
decompis the problem being decomposed

Definition at line 2263 of file reader_sto.c.

References addScenarioConsToProb(), addScenarioSubproblem(), addScenarioVarsAndConsToProb(), addScenarioVarsToProb(), assert(), computeScenarioProbability(), createScenarioSubproblemArray(), getScenarioChild(), getScenarioEntityName(), getScenarioEntryCol(), getScenarioEntryRow(), getScenarioEntryValue(), getScenarioLowerbound(), getScenarioNChildren(), getScenarioNEntries(), getScenarioNum(), getScenarioScip(), getScenarioStageName(), getScenarioStageNum(), getScenarioSubproblemArray(), i, NULL, nvars, obj, RHS, RIGHT, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIP_Real, SCIPbendersUpdateSubproblemLowerbound(), SCIPblkmem(), SCIPchgCoefLinear(), SCIPchgLhsLinear(), SCIPchgRhsLinear(), SCIPchgVarObj(), SCIPcreate(), SCIPcreateBendersDefault(), SCIPcreateProbBasic(), SCIPdebugMessage, SCIPenableDebugSol(), SCIPerrorMessage, SCIPfindBenders(), SCIPfindCons(), SCIPfindVar(), SCIPgetLhsLinear(), SCIPgetNVars(), SCIPgetProbName(), SCIPgetRhsLinear(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPincludeDefaultPlugins(), SCIPinfinity(), SCIPisLT(), SCIPsetBoolParam(), SCIPsnprintf(), SCIPtimFindStage(), SCIPtimGetNStages(), SCIPtimGetStageConss(), SCIPtimGetStageNConss(), SCIPtimGetStageNVars(), SCIPtimGetStageVars(), setScenarioScip(), TRUE, var, and vars.

Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), and buildFullProblem().

◆ removeCoreVariablesAndConstraints()

SCIP_RETCODE removeCoreVariablesAndConstraints ( SCIP * scip)
static

removes the core variables and constriants for stage 2 and lower

Parameters
scipthe SCIP data structure

Definition at line 2472 of file reader_sto.c.

References assert(), i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsIsDeleted(), SCIPdelCons(), SCIPdelVar(), SCIPtimGetNStages(), SCIPtimGetStageConss(), SCIPtimGetStageNConss(), SCIPtimGetStageNVars(), SCIPtimGetStageVars(), SCIPvarIsDeleted(), and vars.

Referenced by buildDecompProblem(), and buildFullProblem().

◆ buildFullProblem()

SCIP_RETCODE buildFullProblem ( SCIP * scip,
SCIP_READERDATA * readerdata )
static
Parameters
scipthe SCIP data structure
readerdatathe reader data

Definition at line 2522 of file reader_sto.c.

References addScenarioVarsAndConsToProb(), assert(), FALSE, getScenarioChild(), getScenarioNChildren(), i, NULL, removeCoreVariablesAndConstraints(), SCIP_CALL, and SCIP_OKAY.

Referenced by readSto().

◆ buildDecompProblem()

◆ readSto()

◆ SCIP_DECL_READERCOPY()

SCIP_DECL_READERCOPY ( readerCopySto )
static

copy method for reader plugins (called when SCIP copies plugins)

Definition at line 2705 of file reader_sto.c.

References assert(), NULL, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderSto(), and SCIPreaderGetName().

◆ SCIP_DECL_READERFREE()

SCIP_DECL_READERFREE ( readerFreeSto )
static

destructor of reader to free user data (called when SCIP is exiting)

Definition at line 2719 of file reader_sto.c.

References assert(), freeReaderdata(), NULL, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPreaderGetData(), and SCIPreaderGetName().

◆ SCIP_DECL_READERREAD()

SCIP_DECL_READERREAD ( readerReadSto )
static