-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
When I take bi-objective example from here and try to use JuMP.write_to_file, I get (with JuMP v1.28.0 MultiObjectiveAlgorithms v.1.6.0)
ERROR: MethodError: no method matching _write_function(::IOStream, ::MathOptInterface.Utilities.GenericModel{…}, ::MathOptInterface.VectorAffineFunction{…}, ::Dict{…})
The function `_write_function` exists, but no method is defined for this combination of argument types.
Closest candidates are:
_write_function(::IO, ::MathOptInterface.Utilities.GenericModel{T, MathOptInterface.Utilities.ObjectiveContainer{T}, MathOptInterface.Utilities.VariablesContainer{T}, MathOptInterface.FileFormats.LP.ModelFunctionConstraints{T}} where T, ::MathOptInterface.ScalarQuadraticFunction, ::Dict{MathOptInterface.VariableIndex, String}; print_half, kwargs...)
@ MathOptInterface C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\LP\LP.jl:167
_write_function(::IO, ::MathOptInterface.Utilities.GenericModel{T, MathOptInterface.Utilities.ObjectiveContainer{T}, MathOptInterface.Utilities.VariablesContainer{T}, MathOptInterface.FileFormats.LP.ModelFunctionConstraints{T}} where T, ::MathOptInterface.ScalarAffineFunction, ::Dict{MathOptInterface.VariableIndex, String}; print_one, kwargs...)
@ MathOptInterface C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\LP\LP.jl:137
_write_function(::IO, ::MathOptInterface.Utilities.GenericModel{T, MathOptInterface.Utilities.ObjectiveContainer{T}, MathOptInterface.Utilities.VariablesContainer{T}, MathOptInterface.FileFormats.LP.ModelFunctionConstraints{T}} where T, ::MathOptInterface.VariableIndex, ::Dict{MathOptInterface.VariableIndex, String}; kwargs...)
@ MathOptInterface C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\LP\LP.jl:126
Stacktrace:
[1] _write_objective(io::IOStream, model::MathOptInterface.Utilities.GenericModel{…}, variable_names::Dict{…})
@ MathOptInterface.FileFormats.LP C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\LP\LP.jl:301
[2] write(io::IOStream, model::MathOptInterface.Utilities.GenericModel{…})
@ MathOptInterface.FileFormats.LP C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\LP\LP.jl:456
[3] jump-dev/JuMP.jl#9
@ C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\FileFormats.jl:144 [inlined]
[4] open(::MathOptInterface.FileFormats.var"#9#10"{…}, ::String, ::Vararg{…}; kwargs::@Kwargs{})
@ Base .\io.jl:410
[5] open
@ .\io.jl:407 [inlined]
[6] compressed_open
@ C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\utils.jl:282 [inlined]
[7] compressed_open(f::MathOptInterface.FileFormats.var"#9#10"{…}, filename::String, mode::String, ::MathOptInterface.FileFormats.AutomaticCompression)
@ MathOptInterface.FileFormats C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\utils.jl:320
[8] write_to_file(model::MathOptInterface.Utilities.GenericModel{…}, filename::String)
@ MathOptInterface.FileFormats C:\ProgramData\DEVDrives\.julia\packages\MathOptInterface\vK6dk\src\FileFormats\FileFormats.jl:143
[9] write_to_file(model::Model, filename::String; format::MathOptInterface.FileFormats.FileFormat, kwargs::@Kwargs{})
@ JuMP C:\ProgramData\DEVDrives\.julia\packages\JuMP\Ue9wj\src\file_formats.jl:138
[10] write_to_file(model::Model, filename::String)
@ JuMP C:\ProgramData\DEVDrives\.julia\packages\JuMP\Ue9wj\src\file_formats.jl:125
[11] top-level scope
@ REPL[14]:1
i.e. there is no method of _write_function for MathOptInterface.VectorAffineFunction. Maybe this is a problem in MathOptInterface?
Metadata
Metadata
Assignees
Labels
No labels