L-shaped solvers
Documentation for StochasticPrograms.jl
's quasi-gradient solvers.
Index
StochasticPrograms.QuasiGradient.AbstractQuasiGradientAttribute
StochasticPrograms.QuasiGradient.AfterMaximumIterations
StochasticPrograms.QuasiGradient.AndersonAcceleratedProximal
StochasticPrograms.QuasiGradient.AndersonAcceleration
StochasticPrograms.QuasiGradient.AtGradientThreshold
StochasticPrograms.QuasiGradient.AtObjectiveThreshold
StochasticPrograms.QuasiGradient.BB
StochasticPrograms.QuasiGradient.BBStep
StochasticPrograms.QuasiGradient.Constant
StochasticPrograms.QuasiGradient.ConstantStep
StochasticPrograms.QuasiGradient.Diminishing
StochasticPrograms.QuasiGradient.DiminishingStep
StochasticPrograms.QuasiGradient.DryFriction
StochasticPrograms.QuasiGradient.DryFrictionProximal
StochasticPrograms.QuasiGradient.GradientThreshold
StochasticPrograms.QuasiGradient.MaximumIterations
StochasticPrograms.QuasiGradient.Nesterov
StochasticPrograms.QuasiGradient.NesterovProximal
StochasticPrograms.QuasiGradient.NoProx
StochasticPrograms.QuasiGradient.NoProximal
StochasticPrograms.QuasiGradient.ObjectiveThreshold
StochasticPrograms.QuasiGradient.Optimizer
StochasticPrograms.QuasiGradient.Polyak
StochasticPrograms.QuasiGradient.PolyakStep
StochasticPrograms.QuasiGradient.Polyhedron
StochasticPrograms.QuasiGradient.PolyhedronProjection
StochasticPrograms.QuasiGradient.Prox
StochasticPrograms.QuasiGradient.ProxParameter
StochasticPrograms.QuasiGradient.ProxPenaltyTerm
StochasticPrograms.QuasiGradient.QuasiGradientAlgorithm
StochasticPrograms.QuasiGradient.RawProxParameter
StochasticPrograms.QuasiGradient.RawStepParameter
StochasticPrograms.QuasiGradient.RawTerminationParameter
StochasticPrograms.QuasiGradient.SerialExecution
StochasticPrograms.QuasiGradient.SmoothSubProblem
StochasticPrograms.QuasiGradient.Smoothed
StochasticPrograms.QuasiGradient.StepParameter
StochasticPrograms.QuasiGradient.StepSize
StochasticPrograms.QuasiGradient.SubProblem
StochasticPrograms.QuasiGradient.SubProblems
StochasticPrograms.QuasiGradient.SynchronousExecution
StochasticPrograms.QuasiGradient.Termination
StochasticPrograms.QuasiGradient.TerminationParameter
StochasticPrograms.QuasiGradient.Unaltered
StochasticPrograms.QuasiGradient.get_prox_attribute
StochasticPrograms.QuasiGradient.get_step_attribute
StochasticPrograms.QuasiGradient.get_termination_attribute
StochasticPrograms.QuasiGradient.set_prox_attribute
StochasticPrograms.QuasiGradient.set_prox_attribute
StochasticPrograms.QuasiGradient.set_prox_attributes
StochasticPrograms.QuasiGradient.set_prox_attributes
StochasticPrograms.QuasiGradient.set_step_attribute
StochasticPrograms.QuasiGradient.set_step_attribute
StochasticPrograms.QuasiGradient.set_step_attributes
StochasticPrograms.QuasiGradient.set_step_attributes
StochasticPrograms.QuasiGradient.set_termination_attribute
StochasticPrograms.QuasiGradient.set_termination_attribute
StochasticPrograms.QuasiGradient.set_termination_attributes
StochasticPrograms.QuasiGradient.set_termination_attributes
API
StochasticPrograms.QuasiGradient.QuasiGradientAlgorithm
— TypeQuasiGradientAlgorithm
Functor object for the quasi-gradient algorithm.
...
Algorithm parameters
log::Bool = true
: Specifices if quasi-gradient procedure should be logged on standard output or not.
...
StochasticPrograms.QuasiGradient.AbstractQuasiGradientAttribute
— TypeAbstractQuasiGradientAttribute
Abstract supertype for attribute objects specific to the L-shaped algorithm.
StochasticPrograms.QuasiGradient.Prox
— TypeProx
An optimizer attribute for specifying a prox policy to be used in the quasi-gradient algorithm. Options are:
NoProx
: Unconstrained.Polyhedron
: QP projection on polyhedral space ?PolyhedronProjection for parameter descriptions. (default)AndersonAcceleration
: Anderson acceleration of inner prox step ?AndersonAcceleratedProximal for parameter descriptions.Nesterov
: Nesterov acceleration of inner prox step ?NesterovProximal for parameter descriptions.DryFriction
: Dry-friction acceleration of inner prox step ?DryFrictionProximal for parameter descriptions.
StochasticPrograms.QuasiGradient.ProxParameter
— TypeProxParameter
Abstract supertype for prox-specific attributes.
StochasticPrograms.QuasiGradient.StepParameter
— TypeStepParameter
Abstract supertype for step-specific attributes.
StochasticPrograms.QuasiGradient.StepSize
— TypeStepSize
An optimizer attribute for specifying an aggregation procedure to be used in the quasi-gradient algorithm. Options are:
Constant
: Constant step size ?ConstantStep for parameter descriptions (default)Diminishing
: Diminishing step size ?DiminishingStep for parameter descriptions.Polyak
: Polyak step size ?PolyakStep for parameter descriptions.BB
: Barzilai-Borwein step size ?BBStep for parameter descriptions.
StochasticPrograms.QuasiGradient.SubProblems
— TypeSubProblems
An optimizer attribute for specifying if subproblems should be smoothed. Options are:
StochasticPrograms.QuasiGradient.Termination
— TypeTermination
An optimizer attribute for specifying a termination criterion to be used in the quasi-gradient algorithm. Options are:
AfterMaximumIterations
: Terminate after set number of iterations ?MaximumIterations for parameter descriptions (default)AtObjectiveThreshold
: Terminate after reaching reference objective ?ObjectiveThreshold for parameter descriptions.AtGradientThreshold
: Terminate after reaching zero gradient ?GradientThreshold for parameter descriptions.
StochasticPrograms.QuasiGradient.TerminationParameter
— TypeTerminationParameter
Abstract supertype for termination-specific attributes.
StochasticPrograms.QuasiGradient.Optimizer
— TypeOptimizer(; <keyword arguments>)
Return a quasi-gradient optimizer. ...
Arguments
master_optimizer::AbstractOptimizer
: MathOptInterface solver capable of solving linear (and possibly quadratic) programs.subproblem_optimizer::AbstractOptimizer
: Optionally specify a different solver for the subproblems.execution::Execution = Serial
: Specify how algorithm should be executed (Serial, Synchronous, Asynchronous). Distributed variants requires worker cores.subproblems::AbstractSubProblemState = Unaltered()
: Specify if a smoothing procedure should be applied.prox::AbstractProx = Polyhedron()
: Specify proximal step.step::AbstractStep = Constant()
: Specify step-sizetermination::AbstractTermination = AfterMaximumIterations()
: Specify termination criterion<keyword arguments>: Algorithm specific parameters, See
?LShaped
for list of possible arguments and default values.
...
StochasticPrograms.QuasiGradient.get_prox_attribute
— Methodget_prox_attribute(stochasticprogram::StochasticProgram, name::String)
Return the value associated with the prox-specific attribute named name
in stochasticprogram
.
See also: set_prox_attribute
, set_prox_attributes
.
StochasticPrograms.QuasiGradient.get_step_attribute
— Methodget_step_attribute(stochasticprogram::StochasticProgram, name::String)
Return the value associated with the step-specific attribute named name
in stochasticprogram
.
See also: set_step_attribute
, set_step_attributes
.
StochasticPrograms.QuasiGradient.get_termination_attribute
— Methodget_termination_attribute(stochasticprogram::StochasticProgram, name::String)
Return the value associated with the termination-specific attribute named name
in stochasticprogram
.
See also: set_termination_attribute
, set_termination_attributes
.
StochasticPrograms.QuasiGradient.set_prox_attribute
— Methodset_prox_attribute(stochasticprogram::StochasticProgram, name::Union{Symbol, String}, value)
Sets the prox-specific attribute identified by name
to value
.
StochasticPrograms.QuasiGradient.set_prox_attributes
— Methodset_prox_attributes(stochasticprogram::StochasticProgram, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_prox_attribute(stochasticprogram, attribute, value)
for each pair.
StochasticPrograms.QuasiGradient.set_step_attribute
— Methodset_step_attribute(stochasticprogram::StochasticProgram, name::Union{Symbol, String}, value)
Sets the step-specific attribute identified by name
to value
.
StochasticPrograms.QuasiGradient.set_step_attributes
— Methodset_step_attributes(stochasticprogram::StochasticProgram, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_step_attribute(stochasticprogram, attribute, value)
for each pair.
StochasticPrograms.QuasiGradient.set_termination_attribute
— Methodset_termination_attribute(stochasticprogram::StochasticProgram, name::Union{Symbol, String}, value)
Sets the termination-specific attribute identified by name
to value
.
StochasticPrograms.QuasiGradient.set_termination_attributes
— Methodset_termination_attributes(stochasticprogram::StochasticProgram, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_termination_attribute(stochasticprogram, attribute, value)
for each pair.
Execution
StochasticPrograms.QuasiGradient.SerialExecution
— TypeSerialExecution
Functor object for using serial execution in a quasi-gradient algorithm. Create by supplying a Serial
object through execution
in QuasiGradient.Optimizer
or by setting the Execution
attribute.
StochasticPrograms.QuasiGradient.SynchronousExecution
— TypeSynchronousExecution
Functor object for using synchronous execution in an quasi-gradient algorithm (assuming multiple Julia cores are available). Create by supplying a Synchronous
object through execution
in QuasiGradient.Optimizer
or by setting the Execution
attribute.
Step
StochasticPrograms.QuasiGradient.set_step_attribute
— Functionset_step_attribute(stochasticprogram::StochasticProgram, name::Union{Symbol, String}, value)
Sets the step-specific attribute identified by name
to value
.
StochasticPrograms.QuasiGradient.set_step_attributes
— Functionset_step_attributes(stochasticprogram::StochasticProgram, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_step_attribute(stochasticprogram, attribute, value)
for each pair.
StochasticPrograms.QuasiGradient.RawStepParameter
— TypeRawStepParameter
An optimizer attribute used for raw parameters of the step. Defers to RawOptimizerAttribute
.
StochasticPrograms.QuasiGradient.Constant
— TypeConstant
Factory object for ConstantStep
. Pass to step
in Quasigradient.Optimizer
or set the StepSize
attribute. See ?ConstantStep for parameter descriptions.
StochasticPrograms.QuasiGradient.ConstantStep
— TypeConstantStep
Functor object for using a constant step size in a quasigradient algorithm. Create by supplying a Constant
object through step
to QuasiGradient.Optimizer
or by setting the StepSize
attribute.
...
Parameters
γ::AbstractFloat = 0.01
: Step length
...
StochasticPrograms.QuasiGradient.Diminishing
— TypeDiminishing
Factory object for DiminishingStep
. Pass to step
in Quasigradient.Optimizer
or set the StepSize
attribute. See ?DiminishingStep for parameter descriptions.
StochasticPrograms.QuasiGradient.DiminishingStep
— TypeDiminishingStep
Functor object for using a constant step size in a quasigradient algorithm. Create by supplying a Constant
object through step
to QuasiGradient.Optimizer
or by setting the StepSize
attribute.
...
Parameters
γ₀::AbstractFloat = 0.1
: Nominal stepη::AbstractFloat = 1.0
: Diminishing factor
...
StochasticPrograms.QuasiGradient.Polyak
— TypePolyak
Factory object for PolyakStep
. Pass to step
in Quasigradient.Optimizer
or set the StepSize
attribute. See ?PolyakStep for parameter descriptions.
StochasticPrograms.QuasiGradient.PolyakStep
— TypePolyakStep
Functor object for using the Polyak step size in a quasigradient algorithm. Create by supplying a Polyak
object through step
to QuasiGradient.Optimizer
or by setting the Prox
attribute.
...
Parameters
γ₀::AbstractFloat = 0.1
: Nominal stepη::AbstractFloat = 1.0
: Diminishing factor
...
StochasticPrograms.QuasiGradient.BB
— TypeBB
Factory object for BBStep
. Pass to step
in Quasigradient.Optimizer
or set the StepSize
attribute. See ?BBStep for parameter descriptions.
StochasticPrograms.QuasiGradient.BBStep
— TypeBBStep
Functor object for using the Barzilai-Borwein step size in a quasigradient algorithm. Create by supplying a BB
object through step
to QuasiGradient.Optimizer
or by setting the StepSize
attribute.
...
Parameters
γ₀::AbstractFloat = 0.1
: Initial step-size and fallback if BB is numerically unstable
...
Prox
StochasticPrograms.QuasiGradient.set_prox_attribute
— Functionset_prox_attribute(stochasticprogram::StochasticProgram, name::Union{Symbol, String}, value)
Sets the prox-specific attribute identified by name
to value
.
StochasticPrograms.QuasiGradient.set_prox_attributes
— Functionset_prox_attributes(stochasticprogram::StochasticProgram, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_prox_attribute(stochasticprogram, attribute, value)
for each pair.
StochasticPrograms.QuasiGradient.NoProx
— TypeNoProx
Factory object for NoProximal
. Passed by default to prox
in QuasiGradient.Optimizer
.
StochasticPrograms.QuasiGradient.NoProximal
— TypeNoProximal
Empty functor object for running a quasi-gradient algorithm without a prox step.
StochasticPrograms.QuasiGradient.ProxPenaltyTerm
— TypeProxPenaltyTerm
An optimizer attribute used to set the proximal term in the prox step. Options are:
Quadratic
(default)InfNorm
ManhattanNorm
StochasticPrograms.QuasiGradient.RawProxParameter
— TypeRawProxParameter
An optimizer attribute used for raw parameters of the proximal step. Defers to RawOptimizerAttribute
.
StochasticPrograms.QuasiGradient.Polyhedron
— TypePolyhedron
Factory object for PolyhedronProjection
. Pass to prox
in Quasigradient.Optimizer
or set the Prox
attribute. See ?PolyhedronProjection for parameter descriptions.
StochasticPrograms.QuasiGradient.PolyhedronProjection
— TypePolyhedronProjection
Functor object for using polyhedral projection in the prox step of a quasigradient algorithm. Create by supplying a Polyhedron
object through prox
to QuasiGradient.Optimizer
or by setting the Prox
attribute.
...
Parameters
penaltyterm::PenaltyTerm = Quadratic
: Specify penaltyterm variant (Quadratic
,InfNorm
, [ManhattanNorm
][@ref])
...
StochasticPrograms.QuasiGradient.AndersonAcceleratedProximal
— TypeAndersonAcceleratedProximal
Functor object for using anderson accleration in the prox step of a quasigradient algorithm. Create by supplying an AndersonAcceleration
object through prox
to QuasiGradient.Optimizer
or by setting the Prox
attribute.
...
Parameters
prox::AbstractProx = Polyhedron
: Inner prox stepm::Integer = 10
: Anderson memory
...
StochasticPrograms.QuasiGradient.AndersonAcceleration
— TypeAndersonAcceleration
Factory object for AndersonAcceleratedProximal
. Pass to prox
in Quasigradient.Optimizer
or set the Prox
attribute. See ?AndersonAcceleratedProximal for parameter descriptions.
StochasticPrograms.QuasiGradient.Nesterov
— TypeNesterov
Factory object for NesterovProximal
. Pass to prox
in Quasigradient.Optimizer
or set the Prox
attribute. See ?NesterovProximal for parameter descriptions.
StochasticPrograms.QuasiGradient.NesterovProximal
— TypeNesterovProximal
Functor object for using nesterov accleration, with FISTA updates, in the prox step of a quasigradient algorithm. Create by supplying a Nesterov
object through prox
to QuasiGradient.Optimizer
or by setting the Prox
attribute.
...
Parameters
prox::AbstractProx = Polyhedron
: Inner prox stepstabilizing_projection::Bool = false
: Specify if an extra guarding projection should be performed to ensure first-stage feasibility
...
StochasticPrograms.QuasiGradient.DryFriction
— TypeDryFriction
Factory object for DryFrictionProximal
. Pass to prox
in Quasigradient.Optimizer
or set the Prox
attribute. See ?DryFrictionProximal for parameter descriptions.
StochasticPrograms.QuasiGradient.DryFrictionProximal
— TypeDryFrictionProximal
Functor object for using dry-friction acceleration in the prox step of a quasigradient algorithm. Create by supplying a DryFriction
object through prox
to QuasiGradient.Optimizer
or by setting the Prox
attribute.
...
Parameters
prox::AbstractProx = Polyhedron
: Inner prox stepγ::AbstractFloat = 0.9
: Heavy-ball parameterr::AbstractFloat = 1e-3
: Dry-friction parameter
...
Termination
StochasticPrograms.QuasiGradient.set_termination_attribute
— Functionset_termination_attribute(stochasticprogram::StochasticProgram, name::Union{Symbol, String}, value)
Sets the termination-specific attribute identified by name
to value
.
StochasticPrograms.QuasiGradient.set_termination_attributes
— Functionset_termination_attributes(stochasticprogram::StochasticProgram, pairs::Pair...)
Given a list of attribute => value
pairs or a collection of keyword arguments, calls set_termination_attribute(stochasticprogram, attribute, value)
for each pair.
StochasticPrograms.QuasiGradient.RawTerminationParameter
— TypeRawTerminationParameter
An optimizer attribute used for raw parameters of the termination criterion. Defers to RawOptimizerAttribute
.
StochasticPrograms.QuasiGradient.AfterMaximumIterations
— TypeAfterMaximumIterations
Factory object for MaximumIterations
. Pass to terminate
in Quasigradient.Optimizer
or set the Termination
attribute. See ?MaximumIterations for parameter descriptions.
StochasticPrograms.QuasiGradient.MaximumIterations
— TypeMaximumIterations
Functor object for using maximum number of iterations as termination criterion in a quasigradient algorithm. Create by supplying a AfterMaximumIterations
object through terminate
to QuasiGradient.Optimizer
or by setting the Termination
attribute.
...
Parameters
maximum::Integer = 1000
: Maximum number of iterations
...
StochasticPrograms.QuasiGradient.AtObjectiveThreshold
— TypeAtObjectiveThreshold
Factory object for ObjectiveThreshold
. Pass to terminate
in Quasigradient.Optimizer
or set the Termination
attribute. See ?ObjectiveThreshold for parameter descriptions.
StochasticPrograms.QuasiGradient.ObjectiveThreshold
— TypeObjectiveThreshold
Functor object for using an objective threshold as termination criterion in a quasigradient algorithm. Create by supplying a AtObjectiveThreshold
object through terminate
to QuasiGradient.Optimizer
or by setting the Termination
attribute.
...
Parameters
reference::AbstractFloat = 0.0
: Reference objective valueτ::AbstractFloat = 1e-6
: Relative tolerance
...
StochasticPrograms.QuasiGradient.AtGradientThreshold
— TypeAtGradientThreshold
Factory object for GradientThreshold
. Pass to terminate
in Quasigradient.Optimizer
or set the Termination
attribute. See ?GradientThreshold for parameter descriptions.
StochasticPrograms.QuasiGradient.GradientThreshold
— TypeObjectiveThreshold
Functor object for using a zero gradient threshold as termination criterion in a quasigradient algorithm. Create by supplying a AtGradientThreshold
object through terminate
to QuasiGradient.Optimizer
or by setting the Termination
attribute.
...
Parameters
τ::AbstractFloat = 1e-6
: Numerical tolerance for zero gradient
...
Smoothing
StochasticPrograms.QuasiGradient.Unaltered
— TypeUnaltered
Factory object for using regular SubProblem
in the quasi-gradient algorithm. Passed by default to subproblems
to QuasiGradient.Optimizer
.
StochasticPrograms.QuasiGradient.Smoothed
— TypeSmoothed
Factory object for using SmoothSubProblem
through Moreau envelopes in the quasi-gradient algorithm. Pass to subproblems
in QuasiGradient.Optimizer
or by setting the SubProblems
attribute. See SmoothSubProblem
for parameter descriptions.
StochasticPrograms.QuasiGradient.SubProblem
— TypeSubProblem
Quasi-gradient subproblem.
StochasticPrograms.QuasiGradient.SmoothSubProblem
— TypeSmoothSubProblem
Subproblem smoothed using a Moreau envelope.
...
Parameters
μ::AbstractFloat = 1.0
: Moreau smoothing parameter. Controls the smoothing approximation accuracy.
...