Types

Exported types in ProgressiveHedging.jl.

Callbacks

ProgressiveHedging.CallbackType

Struct for user callbacks.

Fields

  • name::String : User's name for the callback. Defaults to string(h).
  • h::Function : Callback function. See notes below for calling signature.
  • initialize::Function : Function to initialize ext 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).

source
ProgressiveHedging.SubproblemCallbackType

Struct for user supbroblem callbacks.

Fields

  • name::String : User's name for the callback. Defaults to string(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).

source

Exceptions

ID Types

ProgressiveHedging.VariableIDType

Unique, type-safe identifier for any variable in a (multi-stage) stochastic programming problem. Composed of a ScenarioID, a StageID and an Index.

source
ProgressiveHedging.XhatIDType

Unique identifier for consensus variables. The scenario variables being driven to consensus with this variable is given by convert_to_variable_ids.

source

Penalty Parameters

ProgressiveHedging.ProportionalPenaltyParameterType

Variable 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.

Warning

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.

source
ProgressiveHedging.SEPPenaltyParameterType

Penalty parameter set with Watson-Woodruff SEP method. See (Watson and Woodruff 2011) for more details.

Warning

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.

source

Subproblems

User Facing

ProgressiveHedging.PHDataType

Data structure used to store information and results for a stochastic programming problem.

See the following functions make use of this object:

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:

source
ProgressiveHedging.ScenarioTreeType

Struct 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.

source