You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run the following code verbatim from the documentation:
using COSMO, JuMP, LinearAlgebra
C = [1 2; 0 2]
A = [1 0; 5 2]
b = 4;
m = Model(COSMO.Optimizer);
# replacing the previous line with
# m = JuMP.Model(SCS.Optimizer);
# works just fine
@variable(m, X[1:2, 1:2], PSD)
@objective(m, Min, tr(C * X));
@constraint(m, tr(A * X) == b);
JuMP.optimize!(m);
status = JuMP.termination_status(m)
X_sol = JuMP.value.(X)
obj_value = JuMP.objective_value(m)
And I am getting the error:
MethodError: no method matching _pass_attributes(::Optimizer{Float64}, ::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}, ::Bool, ::MathOptInterface.Utilities.IndexMap, ::Array{MathOptInterface.AbstractModelAttribute,1}, ::Tuple{}, ::Tuple{}, ::Tuple{}, ::typeof(MathOptInterface.Utilities.load))
Closest candidates are:
_pass_attributes(::MathOptInterface.ModelLike, ::MathOptInterface.ModelLike, !Matched::MathOptInterface.Utilities.IndexMap, ::Any, ::Any, ::Any, ::Any) at C:\Users\shuvo\.julia\packages\MathOptInterface\ZJFKw\src\Utilities\copy.jl:175
_pass_attributes(::MathOptInterface.ModelLike, ::MathOptInterface.ModelLike, !Matched::MathOptInterface.Utilities.IndexMap, ::Any, ::Any, ::Any, ::Any, !Matched::Function) at C:\Users\shuvo\.julia\packages\MathOptInterface\ZJFKw\src\Utilities\copy.jl:175
pass_attributes!(::Optimizer{Float64}, ::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}, ::MathOptInterface.Utilities.IndexMap, ::Function) at MOIWrapper.jl:615
pass_attributes!(::Optimizer{Float64}, ::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}, ::MathOptInterface.Utilities.IndexMap) at MOIWrapper.jl:611
copy_to(::Optimizer{Float64}, ::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}; copy_names::Bool) at MOIWrapper.jl:148
(::MathOptInterface.var"#copy_to##kw")(::NamedTuple{(:copy_names,),Tuple{Bool}}, ::typeof(MathOptInterface.copy_to), ::Optimizer{Float64}, ::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}) at MOIWrapper.jl:137
attach_optimizer(::MathOptInterface.Utilities.CachingOptimizer{Optimizer{Float64},MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}) at cachingoptimizer.jl:150
optimize!(::MathOptInterface.Utilities.CachingOptimizer{Optimizer{Float64},MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}) at cachingoptimizer.jl:211
optimize!(::MathOptInterface.Bridges.LazyBridgeOptimizer{MathOptInterface.Utilities.CachingOptimizer{Optimizer{Float64},MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}}) at bridge_optimizer.jl:264
optimize!(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}) at cachingoptimizer.jl:215
optimize!(::Model, ::Nothing; bridge_constraints::Bool, ignore_optimize_hook::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at optimizer_interface.jl:131
optimize! at optimizer_interface.jl:107 [inlined]
optimize!(::Model) at optimizer_interface.jl:107
top-level scope at all_files_test.jl:556
include_string(::Function, ::Module, ::String, ::String) at loading.jl:1088
I have tried the same problem with SCS and it works just fine. Any help on how to fix this will be appreciated.
The text was updated successfully, but these errors were encountered:
Dear All,
I am trying to run the following code verbatim from the documentation:
And I am getting the error:
I have tried the same problem with SCS and it works just fine. Any help on how to fix this will be appreciated.
The text was updated successfully, but these errors were encountered: