Function GMP::Instance::GenerateStochasticProgram(MP, StochasticParameters, StochasticVariables, Scenarios, ScenarioProbability, ScenarioTreeMap, RootScenarioName, GenerationMode, Name)

GMP::Instance::GenerateStochasticProgram

The function GMP::Instance::GenerateStochasticProgram generates the deterministic equivalent of a stochastic mathematical program.

GMP::Instance::GenerateStochasticProgram(
     MP,                    ! (input) a symbolic mathematical program
     StochasticParameters,  ! (input) a set of stochastic parameters
     StochasticVariables,   ! (input) a set of stochastic variables
     Scenarios,             ! (input) a set of stochastic scenarios
     ScenarioProbability,   ! (input) a double parameter
     ScenarioTreeMap,       ! (input) an element parameter
     RootScenarioName,      ! (input) a string expression
     [GenerationMode],      ! (optional) a stochatic generation mode
     [Name]                 ! (optional) a string expression
)

Arguments

MP
A symbolic mathematical program in the set AllMathematicalPrograms. The mathematical program should have model type LP or MIP.
StochasticParameters
A subset of AllStochasticParameters.
StochasticVariables
A subset of AllStochasticVariables.
Scenarios
A subset of AllStochasticScenarios.
ScenarioProbability
A double parameter over Scenarios representing the objective probabilities of the scenarios.
ScenarioTreeMap
An element parameter that defines the scenario-and-stage to scenario mapping. The range of this parameter should be the set Scenarios.
RootScenarioName
A string that holds the name of the artificial element that will be added to the set AllStochasticScenarios. This element will be used to store the solution of non-stochastic variables in their respective .Stochastic suffixes.
GenerationMode
An element in the predefined set AllStochasticGenerationModes. The default is ‘SubstituteStochasticVariables’.
Name
A string that holds the name for the generated stochastic mathematical program.

Return Value

A new element in the set AllGeneratedMathematicalPrograms with the name as specified by the name argument.

Note

  • If the Name argument is not specified, or if it is the empty string, then the name of the symbolic mathematical program preceded by ‘Stochastic’ is used to create a new element in the set AllGeneratedMathematicalPrograms.
  • The objective of the symbolic mathematical program must be a defined variable.

See also

  • Stochastic programming is discussed in Chapter 19 of the Language Reference.
  • The procedure GMP::Instance::Solve.