The StructJuMP package provides a parallel algebraic modeling framework for block structured optimization models in Julia. StructJuMP, originally known as StochJuMP, is tailored to two-stage stochastic optimization problems and uses MPI to enable a parallel, distributed memory instantiation of the problem. StructJuMP.jl is an extension of the JuMP.jl package, which is as fast as AMPL and faster than any other modeling tools such as GAMS and Pyomo (see this).
using StructJuMP numScen = 2 m = StructuredModel(num_scenarios=numScen) @variable(m, x[1:2]) @NLconstraint(m, x + x == 100) @NLobjective(m, Min, x^2 + x^2 + x*x) for i in 1:numScen bl = StructuredModel(parent=m, id=i) @variable(bl, y[1:2]) @NLconstraint(bl, x + y + y ≥ 0) @NLconstraint(bl, x + y + y ≤ 50) @NLobjective(bl, Min, y^2 + y^2 + y*y) end
The above example builds a two level structured model
m with 2 scenarios.
Available Solvers for StructJuMP
Problems modeled in StructJuMP models can be solved in parallel using the PIPS-NLP parallel optimization solver. In addition, StructJuMP models can be solved (in serial only) using Ipopt. The SturctJuMP models interface with the solvers via StructJuMPSolverInterface.jl.
Stochastic Dual Dynamic Programming (SDDP)
StructDualDynProg can run the SDDP algorithm on multi-stage models from StructJuMP.
StructJuMP has been developed under the financial support of Department of Energy (DOE), Office of Advanced Scientific Computing Research, Office of Electricity Delivery and Energy Reliability, and Grid Modernization Laboratory Consortium (GMLC) (PIs: Cosmin G. Petra, Lawrence Livermore National Laboratory and Mihai Anitescu, Argonne National Laboratory).