Types
Exported types in ProgressiveHedging.jl.
ProgressiveHedging.Callback
ProgressiveHedging.HatVariable
ProgressiveHedging.Index
ProgressiveHedging.JuMPSubproblem
ProgressiveHedging.NodeID
ProgressiveHedging.PHData
ProgressiveHedging.ProportionalPenaltyParameter
ProgressiveHedging.SEPPenaltyParameter
ProgressiveHedging.ScalarPenaltyParameter
ProgressiveHedging.ScenarioID
ProgressiveHedging.ScenarioNode
ProgressiveHedging.ScenarioTree
ProgressiveHedging.StageID
ProgressiveHedging.SubproblemCallback
ProgressiveHedging.UnimplementedError
ProgressiveHedging.VariableID
ProgressiveHedging.XhatID
Callbacks
ProgressiveHedging.Callback
— TypeStruct for user callbacks.
Fields
name::String
: User's name for the callback. Defaults tostring(h)
.h::Function
: Callback function. See notes below for calling signature.initialize::Function
: Function to initializeext
after subproblem creation has occurred.ext::Dict{Symbol,Any}
: Dictionary to store data between callback calls or needed parameters.
The callback function h
must have the signature h(ext::Dict{Symbol,Any}, phd::PHData, winf::WorkerInf, niter::Int)::Bool
where ext
is the same dictionary given to the Callback
constructor, phd
is the standard PH data structure (see PHData
), winf
is used for communicating with subproblems (see apply_to_subproblem
) and niter
is the current iteration. The callback may return false
to stop PH.
The initialize
function must have the signature initialize(ext::Dict{Symbol,Any}, phd::PHData)
where ext
is the same dictionary given to the Callback
constructor and phd
is the standard PH data structure (see PHData
).
ProgressiveHedging.SubproblemCallback
— TypeStruct for user supbroblem callbacks.
Fields
name::String
: User's name for the callback. Defaults tostring(h)
.h::Function
: Callback function. See notes below for calling signature.ext::Dict{Symbol,Any}
: Dictionary to store data between callback calls or needed parameters.
The callback function h
must have the signature h(ext::Dict{Symbol,Any}, sp::T, niter::Int, scenario_id::ScenarioID) where T <: AbstractSubproblem
where ext
is the same dictionary given to the Callback
constructor, sp
is a concrete type of AbstractSubproblem
(see AbstractSubproblem
), niter
is the current iteration and scenario_id
is a scenario identifier (see ScenarioID
).
Exceptions
ProgressiveHedging.UnimplementedError
— TypeException indicating that the specified method is not implemented for an interface.
ID Types
ProgressiveHedging.Index
— TypeUnique, type-safe identifier for variables associated with the same scenario tree node.
ProgressiveHedging.NodeID
— TypeUnique identifier for a ScenarioNode
in a ScenarioTree
.
ProgressiveHedging.ScenarioID
— TypeUnique, type-safe identifier for a scenario.
ProgressiveHedging.StageID
— TypeUnique, type-safe identifier for a stage.
ProgressiveHedging.VariableID
— TypeUnique, type-safe identifier for any variable in a (multi-stage) stochastic programming problem. Composed of a ScenarioID
, a StageID
and an Index
.
ProgressiveHedging.XhatID
— TypeUnique identifier for consensus variables. The scenario variables being driven to consensus with this variable is given by convert_to_variable_ids
.
Penalty Parameters
ProgressiveHedging.ProportionalPenaltyParameter
— TypeVariable dependent penalty parameter given by k * c_i
where c_i
is the linear coefficient of variable i
in the objective function. If c_i == 0
(that is, the variable has no linear coefficient in the objective function), then the penalty value is taken to be k
.
The coefficients in the objective function must match across scenarios. An error will result if they do not.
Requires subproblem type to have implemented report_penalty_info
for this type. This implementation should return the linear coefficient in the objective function for each variable.
ProgressiveHedging.ScalarPenaltyParameter
— TypeConstant scalar penalty parameter.
ProgressiveHedging.SEPPenaltyParameter
— TypePenalty parameter set with Watson-Woodruff SEP method. See (Watson and Woodruff 2011) for more details.
The coefficients in the objective function must match across scenarios. An error will result if they do not.
Requires subproblem type to have implemented report_penalty_info
for this type. This implementation should return the linear coefficient in the objective function for each variable.
Subproblems
ProgressiveHedging.JuMPSubproblem
— TypeImplementation of the AbstractSubproblem
interface using JuMP.
User Facing
ProgressiveHedging.HatVariable
— TypeType representing a consensus variable.
The following functions are available to the user to interact with consensus variables
ProgressiveHedging.PHData
— TypeData structure used to store information and results for a stochastic programming problem.
See the following functions make use of this object:
apply_to_subproblem
branch_value
consensus_variables
convert_to_variable_ids
convert_to_xhat_id
get_callback
get_callback_ext
is_leaf
name
probability
scenario_bundle
scenarios
stage_id
value
w_value
xhat_value
The following post solution functions are also available:
If the corresponding save options are enabled, the saved terms may be accessed with one of the following:
ProgressiveHedging.ScenarioNode
— TypeStruct representing a node in a scenario tree.
ProgressiveHedging.ScenarioTree
— TypeStruct representing the scenario structure of a stochastic program.
Can be built up by the user using the functions add_node
and add_leaf
.
Constructor
ScenarioTree()
Default constructor generates the root node of the tree. Can get the root node with root
.