jump-dev / ECOS.jl

A Julia interface to the ECOS conic optimization solver
https://github.com/embotech/ecos
Other
41 stars 17 forks source link

Example throws error #110

Closed shadiakiki1986 closed 3 years ago

shadiakiki1986 commented 3 years ago

Maybe related to #97. I installed JuMP v0.21.5 and ECOS and ran the example in the readme, but I get an error at the last println step:

julia> println(value(take))
ERROR: `JuMP.value` is not defined for collections of JuMP types. Use Julia's broadcast syntax instead: `JuMP.value.(x)`.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] value(::JuMP.Containers.DenseAxisArray{VariableRef,1,Tuple{Array{Symbol,1}},Tuple{Dict{Symbol,Int64}}}) at /home/ubuntu/.julia/packages/JuMP/qhoVb/src/variables.jl:1001
 [3] top-level scope at REPL[68]:1
shadiakiki1986 commented 3 years ago

Btw, julia 1.5.2

blegat commented 3 years ago

Thanks for reporting it value(take) should be replaced by value.(take)