Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when calling solution_summary() #110

Closed
ketch opened this issue Dec 16, 2021 · 3 comments · Fixed by #111
Closed

Error when calling solution_summary() #110

ketch opened this issue Dec 16, 2021 · 3 comments · Fixed by #111

Comments

@ketch
Copy link

ketch commented Dec 16, 2021

I'm using Tulip via JuMP. I'm able to set up and solve a model, but I'm not sure how to see the solution. When I call

solution_summary(model)

I get the following:

ArgumentError: ModelLike of type Tulip.Optimizer{Float64} does not support accessing the attribute MathOptInterface.RawStatusString()

Stacktrace:
  [1] get_fallback(::Tulip.Optimizer{Float64}, ::MathOptInterface.RawStatusString)
    @ MathOptInterface ~/.julia/packages/MathOptInterface/YDdD3/src/attributes.jl:296
  [2] get(::Tulip.Optimizer{Float64}, ::MathOptInterface.RawStatusString)
    @ MathOptInterface ~/.julia/packages/MathOptInterface/YDdD3/src/attributes.jl:293
  [3] get(b::MathOptInterface.Bridges.LazyBridgeOptimizer{Tulip.Optimizer{Float64}}, attr::MathOptInterface.RawStatusString)
    @ MathOptInterface.Bridges ~/.julia/packages/MathOptInterface/YDdD3/src/Bridges/bridge_optimizer.jl:804
  [4] get(model::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ModelFunctionConstraints{Float64}}}}, attr::MathOptInterface.RawStatusString)
    @ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/YDdD3/src/Utilities/cachingoptimizer.jl:716
  [5] _moi_get_result(model::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ModelFunctionConstraints{Float64}}}}, args::MathOptInterface.RawStatusString)
    @ JuMP ~/.julia/packages/JuMP/klrjG/src/JuMP.jl:1199
  [6] get(model::Model, attr::MathOptInterface.RawStatusString)
    @ JuMP ~/.julia/packages/JuMP/klrjG/src/JuMP.jl:1212
  [7] raw_status
    @ ~/.julia/packages/JuMP/klrjG/src/JuMP.jl:765 [inlined]
  [8] solution_summary(model::Model; verbose::Bool)
    @ JuMP ~/.julia/packages/JuMP/klrjG/src/print.jl:463
  [9] solution_summary(model::Model)
    @ JuMP ~/.julia/packages/JuMP/klrjG/src/print.jl:463
 [10] top-level scope
    @ In[99]:1
 [11] eval
    @ ./boot.jl:360 [inlined]
 [12] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:1116
@mtanneau
Copy link
Member

Hi! Thanks for reporting this.

The error you observe is cause by Tulip not supporting one of the attributes that JuMP tries to query within solution_summary. I'll get that fixed.

In the meantime, you should still be able to query the solution through JuMP.value (see, e.g., here). I can also point you to this page of the docs, which has more details.

@mtanneau mtanneau linked a pull request Dec 16, 2021 that will close this issue
@mtanneau
Copy link
Member

@ketch #111 should fix the issue. I'll a new release when this gets merged, and you should be good to go!

@ketch
Copy link
Author

ketch commented Dec 16, 2021

That was fast. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants