plasmo-dev / Plasmo.jl

A Platform for Scalable Modeling and Optimization
Other
152 stars 21 forks source link

Can't Seem to install Plasmo in Julia 1.1 #8

Closed dsigler1234 closed 4 years ago

dsigler1234 commented 5 years ago

Hi I am trying using Plasmo but can't seem to add it and use it. I get the following error below. Do you have any suggestions?

(v1.1) pkg> add Plasmo Resolving package versions... Updating ~/.julia/environments/v1.1/Project.toml [d3f7391f] + Plasmo v0.2.0 Updating ~/.julia/environments/v1.1/Manifest.toml [ec485272] + ArnoldiMethod v0.0.4 [00ebfdb7] + CSTParser v0.5.2 [d25df0c9] + Inflate v0.1.1 [093fc24a] + LightGraphs v1.2.0 [1914dd2f] + MacroTools v0.5.0 [d3f7391f] + Plasmo v0.2.0 [189a3867] + Reexport v0.2.0 [ae029012] + Requires v0.5.2 [699a6c99] + SimpleTraits v0.8.0 [0796e94c] + Tokenize v0.5.3

(v1.1) pkg> using Plasmo ERROR: could not determine command

julia> using Plasmo [ Info: Precompiling Plasmo [d3f7391f-f14a-50cc-bbe4-76a32d1bad3c] ERROR: LoadError: LoadError: LoadError: UndefVarError: LinearConstraint not defined Stacktrace: [1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13 [2] top-level scope at none:0 [3] include at ./boot.jl:326 [inlined] [4] include_relative(::Module, ::String) at ./loading.jl:1038 [5] include at ./sysimg.jl:29 [inlined] [6] include(::String) at /Users/dsigler/.julia/packages/Plasmo/gYt9r/src/ModelGraph/PlasmoModelGraph.jl:1 [7] top-level scope at none:0 [8] include at ./boot.jl:326 [inlined] [9] include_relative(::Module, ::String) at ./loading.jl:1038 [10] include at ./sysimg.jl:29 [inlined] [11] include(::String) at /Users/dsigler/.julia/packages/Plasmo/gYt9r/src/Plasmo.jl:8 [12] top-level scope at none:0 [13] include at ./boot.jl:326 [inlined] [14] include_relative(::Module, ::String) at ./loading.jl:1038 [15] include(::Module, ::String) at ./sysimg.jl:29 [16] top-level scope at none:2 [17] eval at ./boot.jl:328 [inlined] [18] eval(::Expr) at ./client.jl:404 [19] top-level scope at ./none:3 in expression starting at /Users/dsigler/.julia/packages/Plasmo/gYt9r/src/ModelGraph/linkmodel.jl:15 in expression starting at /Users/dsigler/.julia/packages/Plasmo/gYt9r/src/ModelGraph/PlasmoModelGraph.jl:58 in expression starting at /Users/dsigler/.julia/packages/Plasmo/gYt9r/src/Plasmo.jl:15 ERROR: Failed to precompile Plasmo [d3f7391f-f14a-50cc-bbe4-76a32d1bad3c] to /Users/dsigler/.julia/compiled/v1.1/Plasmo/7Vng3.ji. Stacktrace: [1] error(::String) at ./error.jl:33 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197 [3] _require(::Base.PkgId) at ./loading.jl:960 [4] require(::Base.PkgId) at ./loading.jl:858 [5] require(::Module, ::Symbol) at ./loading.jl:853

jalving commented 5 years ago

Hello,

Thanks for your interest in the package. Currently, I do not yet support JuMP 0.19, which is what is causing your issue. If you are ok using an older JuMP version, you can do:

using Pkg
Pkg.pin(PackageSpec(name = "JuMP", version = "0.18.5"))
using Plasmo

This will set your environment to the supported JuMP version. I am currently working on upgrading Plasmo to the new JuMP version. I'm hoping to have it ready next week.

dsigler1234 commented 5 years ago

Thanks for your prompt reply. That sounds good I will keep an eye out for that update. I am interested in using your package for scalable solutions to energy system problems.

dsigler1234 commented 5 years ago

Were you ever able to update this package to JuMP 0.19?

jalving commented 5 years ago

Take a look at ModelGraphs.jl. Plasmo.jl is going to be split into different sub-packages and this one will do the algebraic modeling. It currently works with JuMP v0.19 and some distributed solver interfaces are on the way. I don't have any documentation yet, but take a look at the examples folder. There have also been some new features added I just haven't documented yet.

jalving commented 4 years ago

The latest Plasmo version v0.3.0 now supports JuMP 0.19 and later. Adding Plasmo.jl to a project should also now pull v0.3.0 which should fix the issue you were having.