High-Level Functions

ProgressiveHedging.solveFunction
solve(tree::ScenarioTree,
      subproblem_constructor::Function,
      r<:Real,
      other_args...;
      max_iter::Int=1000,
      atol::Float64=1e-6,
      rtol::Float64=1e-6,
      gap_tol::Float64=-1.0,
      lower_bound::Int=0,
      report::Int=0,
      save_iterates::Int=0,
      save_residuals::Bool=false,
      timing::Bool=true,
      warm_start::Bool=false,
      callbacks::Vector{Callback}=Vector{Callback}(),
      worker_assignments::Dict{Int,Set{ScenarioID}}=Dict{Int,Set{ScenarioID}}(),
      args::Tuple=(),
      kwargs...)

Solve the stochastic programming problem described by tree and the models created by subproblem_constructor using Progressive Hedging.

Arguments

  • tree::ScenararioTree : Scenario tree describing the structure of the problem to be solved.
  • subproblem_constructor::Function : User created function to construct a subproblem. Should accept a ScenarioID (a unique identifier for each scenario subproblem) as an argument and returns a subtype of AbstractSubproblem.
  • r<:AbstractPenaltyParameter : PH penalty parameter
  • other_args : Other arguments that should be passed to subproblem_constructor. See also keyword arguments args and kwargs.

Keyword Arguments

  • max_iter::Int : Maximum number of iterations to perform before returning. Defaults to 1000.
  • atol::Float64 : Absolute error tolerance. Defaults to 1e-6.
  • rtol::Float64 : Relative error tolerance. Defaults to 1e-6.
  • gap_tol::Float64 : Relative gap tolerance. Terminate when the relative gap between the lower bound and objective are smaller than gap_tol. Any value < 0.0 disables this termination condition. Defaults to -1.0. See also the lower_bound keyword argument.
  • lower_bound::Int : Compute and save a lower-bound using (Gade, et. al. 2016) every lower_bound iterations. Any value <= 0 disables lower-bound computation. Defaults to 0.
  • report::Int : Print progress to screen every report iterations. Any value <= 0 disables printing. Defaults to 0.
  • save_iterates::Int : Save PH iterates every save_iterates steps. Any value <= 0 disables saving iterates. Defaults to 0.
  • save_residuals::Int : Save PH residuals every save_residuals steps. Any value <= 0 disables saving residuals. Defaults to 0.
  • timing::Bool : Print timing info after solving if true. Defaults to true.
  • warm_start::Bool : Flag indicating that solver should be "warm started" by using the previous solution as the starting point (not compatible with all solvers)
  • callbacks::Vector{Callback} : Collection of Callback structs to call after each PH iteration. Callbacks will be executed in the order they appear. See Callback struct for more info. Defaults to empty vector.
  • subproblem_callbacks::Vector{SubproblemCallback} : Collection of SubproblemCallback structs to call before solving each subproblem. Each callback is called on each subproblem but does not affect other subproblems. See SubproblemCallback struct for more info. Defaults to empty vector.
  • worker_assignments::Dict{Int,Set{ScenarioID}} : Dictionary specifying which scenario subproblems a worker will create and solve. The key values are worker ids as given by Distributed (see Distributed.workers()). The user is responsible for ensuring the specified workers exist and that every scenario is assigned to a worker. If no dictionary is given, scenarios are assigned to workers in round robin fashion. Defaults to empty dictionary.
  • args::Tuple : Tuple of arguments to pass to model_cosntructor. Defaults to (). See also other_args and kwargs.
  • kwargs : Any keyword arguments not specified here that need to be passed to subproblem_constructor. See also other_args and args.
source
ProgressiveHedging.solve_extensiveFunction
solve_extensive(tree::ScenarioTree,
      subproblem_constructor::Function,
      optimizer::Function,
      other_args...;
      opt_args::NamedTuple=NamedTuple(),
      subproblem_type::Type{S}=JuMPSubproblem,
      args::Tuple=(),
      kwargs...)

Solve given problem using Progressive Hedging.

Arguments

  • tree::ScenararioTree : Scenario tree describing the structure of the problem to be solved.
  • subproblem_constructor::Function : User created function to construct a subproblem. Should accept a ScenarioID (a unique identifier for each scenario subproblem) as an argument and returns a subtype of AbstractSubproblem specified by subproblem_type.
  • optimizer::Function : Function which works with JuMP.set_optimizer
  • other_args : Other arguments that should be passed to subproblem_constructor. See also keyword arguments args and kwargs

Keyword Arguments

  • subproblem_type<:JuMP.AbstractModel : Type of model to create or created by subproblem_constructor to represent the subproblems. Defaults to JuMPSubproblem
  • opt_args::NamedTuple : arguments passed to function given by optimizer
  • args::Tuple : Tuple of arguments to pass to model_cosntructor. Defaults to (). See also other_args and kwargs.
  • kwargs : Any keyword arguments not specified here that need to be passed to subproblem_constructor. See also other_args and args.
source