Skip to content

Model Writing Error Messages #1116

@ccoffrin

Description

@ccoffrin

Given this model,

m = Model()
@variable(m, x)
@objective(m, Min, x^2)

The command, write_to_file(m, "model.lp") yields,

ERROR: MethodError: no method matching write_function(::IOStream, ::MathOptInterface.FileFormats.LP.Model{Float64}, ::MathOptInterface.ScalarQuadraticFunction{Float64}, ::Dict{MathOptInterface.VariableIndex,String})

The command, write_to_file(m, "model.mps") yields,

ERROR: MethodError: no method matching extract_terms(::MathOptInterface.FileFormats.MPS.Model{Float64}, ::Dict{String,Array{Tuple{String,Float64},1}}, ::String, ::MathOptInterface.ScalarQuadraticFunction{Float64}, ::Set{String})

Could these messages be improved? Maybe something like, format X does not support constraint type Y?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions