-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Labels
Description
After updating to PowerModels 0.21 with the new NL backend. It seems that the mof export broke
I'll update this issue with a minimum example but in the mean time here is the stack trace in case is obvious.
MethodError: no method matching _convert_nonlinear_to_mof(::Type{OrderedDict{String, Any}}, ::MathOptInterface.ScalarQuadraticFunction{Float64}, ::Vector{Any}, ::Dict{MathOptInterface.VariableIndex, String})
│
│ Closest candidates are:
│ _convert_nonlinear_to_mof(::Type{T}, ::Complex, ::Vector{Any}, ::Dict{MathOptInterface.VariableIndex, String}) where T<:Union{Dict{String, Any}, OrderedDict{String, Any}}
│ @ MathOptInterface ~/.julia/packages/MathOptInterface/3JqTJ/src/FileFormats/MOF/write.jl:270
│ _convert_nonlinear_to_mof(::Type{T}, ::Real, ::Vector{Any}, ::Dict{MathOptInterface.VariableIndex, String}) where T<:Union{Dict{String, Any}, OrderedDict{String, Any}}
│ @ MathOptInterface ~/.julia/packages/MathOptInterface/3JqTJ/src/FileFormats/MOF/write.jl:261
│ _convert_nonlinear_to_mof(::Type{T}, ::MathOptInterface.VariableIndex, ::Vector{Any}, ::Dict{MathOptInterface.VariableIndex, String}) where T<:Union{Dict{String, Any}, OrderedDict{String, Any}}
│ @ MathOptInterface ~/.julia/packages/MathOptInterface/3JqTJ/src/FileFormats/MOF/write.jl:252
│ ...
│
│ Stacktrace:
│ [1] _convert_nonlinear_to_mof(::Type{OrderedDict{String, Any}}, f::MathOptInterface.ScalarNonlinearFunction, node_list::Vector{Any}, name_map::Dict{MathOptInterface.VariableIndex, String}) (repeats 2 times)
│ @ MathOptInterface.FileFormats.MOF ~/.julia/packages/MathOptInterface/3JqTJ/src/FileFormats/MOF/write.jl:243
│ [2] moi_to_object
│ @ MathOptInterface.FileFormats.MOF ~/.julia/packages/MathOptInterface/3JqTJ/src/FileFormats/MOF/write.jl:295 [inlined]
│ [3] moi_to_object(index::MathOptInterface.ConstraintIndex{MathOptInterface.ScalarNonlinearFunction, MathOptInterface.EqualTo{Float64}}, model::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.MOF.InnerModelFunctionConstraints{Float64}}}, name_map::Dict{MathOptInterface.VariableIndex, String})
│ @ MathOptInterface.FileFormats.MOF ~/.julia/packages/MathOptInterface/3JqTJ/src/FileFormats/MOF/write.jl:184
│ [4] write_constraints(object::OrderedDict{String, Any}, model::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.MOF.InnerModelFunctionConstraints{Float64}}}, name_map::Dict{MathOptInterface.VariableIndex, String})
│ @ MathOptInterface.FileFormats.MOF ~/.julia/packages/MathOptInterface/3JqTJ/src/FileFormats/MOF/write.jl:143
│ [5] write(io::IOStream, model::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.MOF.InnerModelFunctionConstraints{Float64}}})