Closed odow closed 4 years ago
NLP works in the latest tagged version with JuMP v0.18 and MPB but it has not been implemented on the master branch for JuMP v0.19 and MOI.
The goal of StructJuMP is to extend JuMP/MOI for structured models. Three solvers could be used:
The key feature that is needed is that models can be created in parallel in a distributed environement. PIPS will for instance use one computer for each child and IIUC, with the currently tagged version, the models of the childs are also created in different computers. We can assume for instance that the complete model would not fit in the RAM of one single computer but we should still be able to do modeling with JuMP macros + solving.
Having JuMP models instead of StructuredModel would not work as JuMP models cannot contain variables from another models. It used to be possible in JuMP v0.18 as the constraints were not passed directly to the solver. This is kind of what is done with StructuredModel now, we keep the constraint in JuMP form.
I discussed with @michel2323 on how we could make PIPS work with the new StructJuMP at JuliaCon.
The plan was to:
1) Create https://github.com/michel2323/PIPS.jl that wrap PIPS and add pass MOI tests.
2) Define a MOI variable attribute VariableNode
and a MOI constraint attribute ConstraintNode
in StructJuMP. StructJuMP would then give to the PIPS instance of child i both the master variables/constraints and the child i variables/constraints but will set VariableNode
and ConstraintNode
to each variables and constraints so that PIPS can distinguish between the two.
4) Add support for NLP.
3) The current benders code could be rewritten as an MOI solver using this MOI API (that could be easier if ParameterJuMP was written as an MOI layer). This would allow to test the MOI API in this package with the benders code.
I plan on working on this again as need StructJuMP for DSP and Ipopt with NLP support. The first goal would be to get NLP support back in.
I confirm that DSP.jl
(using StructJuMP.jl#kibaekkim-patch-1
) is working with this PR too.
I found that our travis test runs on Julia 1.0 and 1.1 only. The test fails on Julia 1.4. The reason seems related to GLPK artifact..
ERROR: LoadError: LoadError: InitError: could not load library "/Users/kibaekkim/.julia/artifacts/3677b4b693751024a0923d9e7c6d56da89f15b8e/lib/libgmpxx.4.dylib"
dlopen(/Users/kibaekkim/.julia/artifacts/3677b4b693751024a0923d9e7c6d56da89f15b8e/lib/libgmpxx.4.dylib, 1): Library not loaded: @rpath/libgmp.10.dylib
Referenced from: /Users/kibaekkim/.julia/artifacts/3677b4b693751024a0923d9e7c6d56da89f15b8e/lib/libgmpxx.4.dylib
Reason: Incompatible library version: libgmpxx.4.dylib requires version 15.0.0 or later, but libgmp.dylib provides version 14.0.0
And I confirm that the error comes from GLPK.jl
, for which the test fails. https://github.com/JuliaOpt/GLPK.jl/issues/140
Test passed on linux with julia v1.4.
Thanks for checking. The GLPK error seems unrelated so I merge
This is my first time diving into StructJuMP. I have a number of questions:
Nonlinear support returns a method error for
_init_NLP(::StructuredModel)
. In the examples, every@NLxxx
was actually quadratic. Is nonlinear support required? If so, there are no tests. When did it stop working?Follow up: it seems like most of the code isn't tested.
What's up with the Benders code? Is StructJuMP a solver? Or a modeling framework? Or both?
What is
DLP
infarmer.jl
?Do we have a list of packages depending on StructJuMP that are actively used? What functionality do we actually need?
What is the advantage of making a StructuredModel as a JuMP extension as opposed to a collection of JuMP models with linking metadata, i.e., the approach taken in https://github.com/odow/SDDP.jl.