Solver interface
Documentation for StochasticPrograms.jl
's interface for structured solvers and sample-based solvers.
Index
StochasticPrograms.AbstractSampledOptimizer
StochasticPrograms.AbstractSampledOptimizerAttribute
StochasticPrograms.AbstractStructuredOptimizer
StochasticPrograms.AbstractStructuredOptimizerAttribute
StochasticPrograms.Asynchronous
StochasticPrograms.Confidence
StochasticPrograms.Execution
StochasticPrograms.ExecutionParameter
StochasticPrograms.InfNorm
StochasticPrograms.InstanceCrash
StochasticPrograms.InstanceOptimizer
StochasticPrograms.InstanceOptimizerAttribute
StochasticPrograms.Linearized
StochasticPrograms.ManhattanNorm
StochasticPrograms.MasterOptimizer
StochasticPrograms.MasterOptimizerAttribute
StochasticPrograms.NumEEVSamples
StochasticPrograms.NumEWSSamples
StochasticPrograms.NumEvalSamples
StochasticPrograms.NumLowerTrials
StochasticPrograms.NumSamples
StochasticPrograms.NumUpperTrials
StochasticPrograms.Quadratic
StochasticPrograms.RawInstanceOptimizerParameter
StochasticPrograms.RawMasterOptimizerParameter
StochasticPrograms.RawSubProblemOptimizerParameter
StochasticPrograms.RelativeTolerance
StochasticPrograms.Serial
StochasticPrograms.SubProblemOptimizer
StochasticPrograms.Synchronous
JuMP.optimize!
StochasticPrograms.check_loadable
StochasticPrograms.get_instanceoptimizer_attribute
StochasticPrograms.get_instanceoptimizer_attribute
StochasticPrograms.get_masteroptimizer_attribute
StochasticPrograms.get_masteroptimizer_attribute
StochasticPrograms.get_suboptimizer_attribute
StochasticPrograms.get_suboptimizer_attribute
StochasticPrograms.load_model!
StochasticPrograms.load_structure!
StochasticPrograms.master_optimizer
StochasticPrograms.num_iterations
StochasticPrograms.optimal_instance
StochasticPrograms.optimizer_name
StochasticPrograms.optimizer_name
StochasticPrograms.restore_structure!
StochasticPrograms.set_instanceoptimizer_attribute
StochasticPrograms.set_instanceoptimizer_attribute
StochasticPrograms.set_instanceoptimizer_attributes
StochasticPrograms.set_masteroptimizer_attribute
StochasticPrograms.set_masteroptimizer_attribute
StochasticPrograms.set_masteroptimizer_attributes
StochasticPrograms.set_suboptimizer_attribute
StochasticPrograms.set_suboptimizer_attribute
StochasticPrograms.set_suboptimizer_attributes
StochasticPrograms.subproblem_optimizer
StochasticPrograms.supports_structure
Interface
StochasticPrograms.AbstractStructuredOptimizer
— TypeAbstractStructuredOptimizer
Abstract supertype for structure-exploiting optimizers.
StochasticPrograms.AbstractSampledOptimizer
— TypeAbstractSampledOptimizer
Abstract supertype for sample-based optimizers.
JuMP.optimize!
— Functionoptimize!(optimizer::AbstractStructuredOptimizer)
Start the solution procedure for optimizer
after a call to load_structure!
.
See also: load_structure!
StochasticPrograms.check_loadable
— Functioncheck_loadable(optimizer::AbstractStructuredOptimizer, structure::AbstractStochasticStructure)
Throws an UnloadableStructure
exception if structure
is not loadable by optimizer
.
See also: [`load_structure!`](@ref)
StochasticPrograms.load_model!
— Functionload_model!(optimizer::AbstractSampledOptimizer, model::StochasticModel, x₀::AbstractVector)
Instantiate the optimizer
with the stochastic model and initial decision x₀
.
See also: optimize!
StochasticPrograms.load_structure!
— Functionload_structure!(optimizer::AbstractStructuredOptimizer, structure::AbstractStochasticStructure, x₀::AbstractVector)
Instantiate the optimizer
with the stochastic program represented in memory by the given structure
and initial decision x₀
.
See also: optimize!
StochasticPrograms.master_optimizer
— Functionmaster_optimizer(optimizer::AbstractStructuredOptimizer)
Return a MOI optimizer constructor
StochasticPrograms.num_iterations
— Functionnum_iterations(optimizer::AbstractStructuredOptimizer)
Return the number of iterations ran by the structured optimizer
See also: optimize!
StochasticPrograms.optimal_instance
— Functionoptimal_instance(optimizer::AbstractSampledOptimizer)
Return a stochastic programming instance of the stochastic model after a call to optimize!
.
StochasticPrograms.optimizer_name
— Methodoptimizer_name(optimizer::AbstractSampledOptimizer)
Optionally, return a string identifier of AbstractSampledOptimizer
.
StochasticPrograms.optimizer_name
— Methodoptimizer_name(optimizer::AbstractStructuredOptimizer)
Optionally, return a string identifier of AbstractStructuredOptimizer
.
StochasticPrograms.restore_structure!
— Functionrestore_structure!(optimizer::AbstractStructuredOptimizer)
Restore the stochastic program to the state it was in before a call to optimize!
See also: load_structure!
StochasticPrograms.subproblem_optimizer
— Functionsubproblem_optimizer(optimizer::AbstractStructuredOptimizer)
Return a MOI optimizer constructor for solving subproblems
StochasticPrograms.supports_structure
— Methodsupports_structure(optimizer::StochasticProgramOptimizerType, structure::AbstractStochasticStructure)
Return a Bool
indicating whether optimizer
supports the stochastic structure
. That is, load_structure!(optimizer, structure)
will not throw UnsupportedStructure
Attributes
StochasticPrograms.AbstractStructuredOptimizerAttribute
— TypeAbstractStructuredOptimizerAttribute
Abstract supertype for attribute objects that can be used to set or get attributes (properties) of the structure-exploiting optimizer.
StochasticPrograms.AbstractSampledOptimizerAttribute
— TypeAbstractSampledOptimizerAttribute
Abstract supertype for attribute objects that can be used to set or get attributes (properties) of the sample-based optimizer.
StochasticPrograms.Confidence
— TypeConfidence
An optimizer attribute for specifying the confidence level of sample-based procedures.
StochasticPrograms.Execution
— TypeExecution
An optimizer attribute for specifying an execution policy for a structure-exploiting algorithm. Options are:
Serial
: Classical L-shaped (default)Synchronous
: Classical L-shaped run in parallelAsynchronous
: Asynchronous L-shaped ?Asynchronous for parameter descriptions.
StochasticPrograms.ExecutionParameter
— TypeExecutionParameter
Abstract supertype for execution-specific attributes.
StochasticPrograms.InstanceCrash
— TypeInstanceCrash
An optimizer attribute for specifying a crash start to be used when solving sampled instances.
StochasticPrograms.InstanceOptimizer
— TypeInstanceOptimizer
An optimizer attribute for specifying the AbstractStructuredOptimizer/AbstractOptimizer used to solve sampled problems in sample-based procedures.
StochasticPrograms.InstanceOptimizerAttribute
— TypeInstanceOptimizerAttribute
An optimizer attribute used for setting attributes of the instance optimizer.
StochasticPrograms.MasterOptimizer
— TypeMasterOptimizer
An optimizer attribute for specifying the MathOptInterface optimizer used to solve master problems arising in a structure-exploiting procedure.
StochasticPrograms.MasterOptimizerAttribute
— TypeMasterOptimizerAttribute
An optimizer attribute used for setting attributes of the master optimizer.
StochasticPrograms.NumEEVSamples
— TypeNumEEVSamples
An optimizer attribute for specifying the sample size of expected-value evaluation instances in sample-based procedures.
StochasticPrograms.NumEWSSamples
— TypeNumEWSSamples
An optimizer attribute for specifying the sample size of wait-and-see instances in sample-based procedures.
StochasticPrograms.NumEvalSamples
— TypeNumEvalSamples
An optimizer attribute for specifying the sample size of evaluation instances of sample-based procedures.
StochasticPrograms.NumLowerTrials
— TypeNumLowerTrials
An optimizer attribute for specifying the number of trials used to compute lower bounds of confidence intervals in sample-based procedures.
StochasticPrograms.NumSamples
— TypeNumSamples
An optimizer attribute for specifying the sample size of sample-based procedures.
StochasticPrograms.NumUpperTrials
— TypeNumUpperTrials
An optimizer attribute for specifying the number of trials used to compute upper bounds of confidence intervals in sample-based procedures.
StochasticPrograms.RawInstanceOptimizerParameter
— TypeRawInstanceOptimizerParameter
An optimizer attribute used for raw parameters of the instance optimizer. Defers to RawOptimizerAttribute
.
StochasticPrograms.RawMasterOptimizerParameter
— TypeRawMasterOptimizerParameter
An optimizer attribute used for raw parameters of the master optimizer. Defers to RawOptimizerAttribute
.
StochasticPrograms.RawSubProblemOptimizerParameter
— TypeRawSubProblemOptimizerParameter
An optimizer attribute used for raw parameters of the subproblem optimizer. Defers to RawOptimizerAttribute
.
StochasticPrograms.RelativeTolerance
— TypeRelativeTolerance
An optimizer attribute for specifying the relative tolerance of a structure-exploiting algorithm.
StochasticPrograms.SubProblemOptimizer
— TypeSubProblemOptimizer
An optimizer attribute for specifying the MathOptInterface optimizer used to solve subproblems arising in a structure-exploiting procedure.
StochasticPrograms.get_instanceoptimizer_attribute
— Methodget_instanceoptimizer_attribute(stochasticmodel::StochasticModel, attr::MOI.AbstractOptimizerAttribute)
Return the value of the solver-specific attribute attr
of the instance optimizer in stochasticmodel
.
See also: set_instanceoptimizer_attribute
, set_instanceoptimizer_attributes
.
StochasticPrograms.get_instanceoptimizer_attribute
— Methodget_instanceoptimizer_attribute(stochasticprogram::StochasticProgram, name::String)
Return the value associated with the solver-specific attribute named name
of the instance optimizer in stochasticprogram
.
See also: set_instanceoptimizer_attribute
, set_instanceoptimizer_attributes
.
StochasticPrograms.get_masteroptimizer_attribute
— Methodget_masteroptimizer_attribute(stochasticprogram::StochasticProgram, attr::MOI.AbstractOptimizerAttribute)
Return the value of the solver-specific attribute attr
of the master optimizer in stochasticprogram
.
See also: set_masteroptimizer_attribute
, set_masteroptimizer_attributes
.
StochasticPrograms.get_masteroptimizer_attribute
— Methodget_masteroptimizer_attribute(stochasticprogram::StochasticProgram, name::String)
Return the value associated with the solver-specific attribute named name
of the master optimizer in stochasticprogram
.
See also: set_masteroptimizer_attribute
, set_masteroptimizer_attributes
.
StochasticPrograms.get_suboptimizer_attribute
— Methodget_suboptimizer_attribute(stochasticprogram::StochasticProgram, attr::MOI.AbstractOptimizerAttribute)
Return the value of the solver-specific attribute attr
of the subproblem optimizer in stochasticprogram
.
See also: set_suboptimizer_attribute
, set_suboptimizer_attributes
.
StochasticPrograms.get_suboptimizer_attribute
— Methodget_suboptimizer_attribute(stochasticprogram::StochasticProgram, name::String)
Return the value associated with the solver-specific attribute named name
of the subproblem optimizer in stochasticprogram
.
See also: set_suboptimizer_attribute
, set_suboptimizer_attributes
.
StochasticPrograms.set_instanceoptimizer_attribute
— Methodset_instanceoptimizer_attribute(stochasticmodel::StochasticModel, attr::MOI.AbstractOptimizerAttribute, value)
Sets solver-specific attribute attr
of the instance optimizer to value
in stochasticmodel
.
StochasticPrograms.set_instanceoptimizer_attribute
— Methodset_instanceoptimizer_attribute(stochasticmodel::StochasticModel, name::Union{Symbol, String}, value)
Sets solver-specific attribute of the instance optimizer identified by name
to value
in stochasticmodel
.
StochasticPrograms.set_instanceoptimizer_attributes
— Methodset_instanceoptimizer_attributes(stochasticmodel::StochasticModel, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_instanceoptimizer_attribute(stochasticmodel, attribute, value)
for each pair.
StochasticPrograms.set_masteroptimizer_attribute
— Methodset_masteroptimizer_attribute(stochasticprogram::StochasticProgram, attr::MOI.AbstractOptimizerAttribute, value)
Sets solver-specific attribute attr
of the master optimizer to value
.
StochasticPrograms.set_masteroptimizer_attribute
— Methodset_masteroptimizer_attribute(stochasticprogram::StochasticProgram, name::Union{Symbol, String}, value)
Sets solver-specific attribute of the master optimizer identified by name
to value
.
StochasticPrograms.set_masteroptimizer_attributes
— Methodset_masteroptimizer_attributes(stochasticprogram::StochasticProgram, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_masteroptimizer_attribute(stochasticprogram, attribute, value)
for each pair.
StochasticPrograms.set_suboptimizer_attribute
— Methodset_suboptimizer_attribute(stochasticprogram::StochasticProgram, attr::MOI.AbstractOptimizerAttribute, value)
Sets solver-specific attribute attr
of the subproblem optimizer to value
.
StochasticPrograms.set_suboptimizer_attribute
— Methodset_suboptimizer_attribute(stochasticprogram::StochasticProgram, name::Union{Symbol, String}, value)
Sets solver-specific attribute of the subproblem optimizer identified by name
to value
.
StochasticPrograms.set_suboptimizer_attributes
— Methodset_suboptimizer_attributes(stochasticprogram::StochasticProgram, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_suboptimizer_attribute(stochasticprogram, attribute, value)
for each pair.
Execution
StochasticPrograms.Serial
— TypeSerial
Factory object for LShaped.SerialExecution
/ProgressiveHedging.SerialExecution
. Pass through the Execution
attribute.
StochasticPrograms.Synchronous
— TypeSynchronous
Factory object for LShaped.SynchronousExecution
/ProgressiveHedging.SynchronousExecution
. Pass through the Execution
attribute.
StochasticPrograms.Asynchronous
— TypeAsynchronous
Factory object for LShaped.AsynchronousExecution
/ProgressiveHedging.AsynchronousExecution
. Pass through the Execution
attribute.
...
Parameters
max_active::Int = 3
: Maximum number of active iterations that run asynchronously.κ::T = 0.5
: Relative amount of finished subproblems required to start a new iterate. Governs the amount of asynchronicity.
...
Penalty terms
StochasticPrograms.Quadratic
— TypeQuadratic
Functor object for using a quadratic 2-norm penalty term. Requires an AbstractMathProgSolver
capable of solving QP problems. Passed by default through penalty
where applicable.
StochasticPrograms.Linearized
— TypeLinearized
Functor object for using an approximately quadratic penalty term, through linearization. Pass through penalty
where applicable.
...
Parameters
nbreakpoints::Int
: Number of cutting planes used to approximate quadratic term
...
StochasticPrograms.InfNorm
— TypeInfNorm
Functor object for using a linear ∞-norm penalty term. Pass through penalty
where applicable.
StochasticPrograms.ManhattanNorm
— TypeManhattanNorm
Functor object for using a linear 1-norm penalty term. Pass through penalty
where applicable.