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
JinsongLiu6
changed the title
Error 'Unsupported constrains' appears when using MOI to load and solve CBF files
Error 'Unsupported constraints' appears when using MOI to load and solve CBF files
Nov 12, 2022
Uh oh!
There was an error while loading. Please reload this page.
The software version is:
COSMO v0.8.6
MathOptInterface v1.9.0
I try to load .cbf files form CBLIB and solve them by COSMO, but errors appear.
My code and the error information is:
using COSMO
using MathOptInterface
const MOI = MathOptInterface
file_name = "db-joint-soerensen.cbf"
dest = MOI.FileFormats.Model(format = MOI.FileFormats.FORMAT_CBF)
MOI.read_from_file(dest, file_name)
optimizer = COSMO.Optimizer()
MOI.optimize!(optimizer, dest)
ERROR: LoadError: MathOptInterface.UnsupportedConstraint{MathOptInterface.VectorAffineFunction{Float64}, MathOptInterface.Nonpositives}
Stacktrace:
[1] MathOptInterface.Utilities.IndexMap(dest::COSMO.Optimizer{Float64}, src::MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.CBF.ModelFunctionConstraints{Float64}})
@ COSMO ~/.julia/packages/COSMO/74ztU/src/MOI_wrapper.jl:170
[2] copy_to(dest::COSMO.Optimizer{Float64}, src::MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.CBF.ModelFunctionConstraints{Float64}}; copy_names::Bool)
@ COSMO ~/.julia/packages/COSMO/74ztU/src/MOI_wrapper.jl:134
[3] copy_to
@ ~/.julia/packages/COSMO/74ztU/src/MOI_wrapper.jl:131 [inlined]
[4] optimize!(dest::COSMO.Optimizer{Float64}, src::MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.CBF.ModelFunctionConstraints{Float64}})
@ MathOptInterface ~/.julia/packages/MathOptInterface/a4tKm/src/MathOptInterface.jl:86
[5] top-level scope
@ ~/Desktop/julia/try.jl:28
The text was updated successfully, but these errors were encountered: