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

JuMP v0.21 Support #97

Closed ccoffrin closed 4 years ago

ccoffrin commented 4 years ago

The following example,

using JuMP; using ECOS
solver = with_optimizer(ECOS.Optimizer, verbose=0)
m = Model(solver)

seems to result in the following error,

ERROR: MethodError: Cannot `convert` an object of type String to an object of type Symbol
Closest candidates are:
  convert(::Type{T}, ::GenericAffExpr{T,VarType} where VarType) where T at ~/.julia/packages/JuMP/Sp4sR/src/aff_expr.jl:318
  convert(::Type{T}, ::GenericQuadExpr{T,VarType} where VarType) where T at ~/.julia/packages/JuMP/Sp4sR/src/quad_expr.jl:329
  convert(::Type{T}, ::T) where T at essentials.jl:168
  ...
Stacktrace:
 [1] setindex!(::Dict{Symbol,Any}, ::Int64, ::String) at ./dict.jl:372
 [2] set(::ECOS.Optimizer, ::MathOptInterface.RawParameter, ::Int64) at ~/.julia/packages/ECOS/moZme/src/MOI_wrapper.jl:77
 [3] _instantiate_and_check(::MathOptInterface.OptimizerWithAttributes) at ~/.julia/packages/MathOptInterface/DmQBj/src/instantiate.jl:77
 [4] #instantiate#35(::Type{Float64}, ::Bool, ::typeof(MathOptInterface.instantiate), ::MathOptInterface.OptimizerWithAttributes) at ~/.julia/packages/MathOptInterface/DmQBj/src/instantiate.jl:107
 [5] (::MathOptInterface.var"#kw##instantiate")(::NamedTuple{(:with_bridge_type, :with_names),Tuple{DataType,Bool}}, ::typeof(MathOptInterface.instantiate), ::MathOptInterface.OptimizerWithAttributes) at ./none:0
 [6] #set_optimizer#96(::Bool, ::typeof(set_optimizer), ::Model, ::MathOptInterface.OptimizerWithAttributes) at ~/.julia/packages/JuMP/Sp4sR/src/optimizer_interface.jl:66
 [7] #Model#16 at ./none:0 [inlined]
 [8] Model(::MathOptInterface.OptimizerWithAttributes) at ~/.julia/packages/JuMP/Sp4sR/src/JuMP.jl:231
 [9] top-level scope at REPL[7]:1

Seems to be an issue similar to https://github.com/JuliaOpt/SCS.jl/issues/173 CC @odow @blegat @mlubin