Home

StructDualDynProg.jl Documentation

This packages aims at providing an implementation of SDDP that is both efficient and modular/flexible. It features the following:

The SDDP algorithm can be run from any node of the lattice of problems using the following function:

SDDP(sp, num_stages; K, stopcrit, verbose, pathsampler, ztol, stopatinf, mergepaths, forwardcuts, backwardcuts)

Runs the SDDP algorithms on the stochastic program given by sp. The algorithm will do iterations until stopcrit decides to stop or when the root node is infeasible. In each iterations, K paths will be explored up to num_stages stages. The paths will be selected according to pathsampler and equivalent paths might be merged if their difference is smaller than ztol and mergepaths is true. The parameter ztol is also used to check whether a new cut is useful. When a scenario is infeasible and stopatinf is true then no other scenario with the same ancestor is run. Note that since the order in which the different scenarios is run is not deterministic, this might introduce nondeterminism even if the sampling is deterministic. By default, the cuts are added backward. However, if forwardcuts is set to true and backwardcuts is set to false the cuts are added forward.

source

This lattice can be built from a StructJuMP model using the following function:

stochasticprogram(m::JuMP.Model, num_stages, solver,
                  pruningalgo::CutPruners.AbstractCutPruningAlgo,
                  cutgen::AbstractOptimalityCutGenerator=MultiCutGenerator(),
                  detectlb::Bool=true, newcut::Symbol=:InvalidateSolver)

Creates a StochasticProgram from a StructJuMP model. The former can then be used by the SDDP algorithm. The master problem is assumed to have model m and the scenarios are considered up to num_stages stages. The pruningalgo is as defined in CutPruners. If cutgen is MultiCutGenerator, one variable θ_i is created for each scenario. Otherwise, if cutgen is AveragedCutGenerator, only one variable θ is created and it represents the expected value of the objective value of the scenarios. If cutgen is NoOptimalityCut then no θ is created, only use this option if the objective of all models is zero except for the master model.

source

Contents