Skip to content

MOI.FileFormats.MPS fails to read "dsbmip" from MIPLIB #2006

@iSoron

Description

@iSoron

MOI.FileFormats.MPS is currently unable to load instance dsbmip.mps.gz from MIPLIB 2017, with the error "Column name ZGB10007 not found." Below is a Julia session reproducing this bug. I've tested it on MOI 1.8.2.

shell> wget https://miplib.zib.de/WebData/instances/dsbmip.mps.gz
--2022-09-20 12:00:36--  https://miplib.zib.de/WebData/instances/dsbmip.mps.gz
Resolving miplib.zib.de (miplib.zib.de)... 130.73.108.67
Connecting to miplib.zib.de (miplib.zib.de)|130.73.108.67|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48408 (47K) [application/x-gzip]
Saving to: ‘dsbmip.mps.gz’

dsbmip.mps.gz                 100%[===============================================>]  47.27K   149KB/s    in 0.3s    

2022-09-20 12:00:37 (149 KB/s) - ‘dsbmip.mps.gz’ saved [48408/48408]


julia> using MathOptInterface; const MOI=MathOptInterface
MathOptInterface

julia> model = MOI.FileFormats.Model(filename="model.mps.gz")
A Mathematical Programming System (MPS) model

julia> MOI.read_from_file(model, "dsbmip.mps.gz")
ERROR: Column name ZGB10007 not found.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] _parse_single_bound(data::MathOptInterface.FileFormats.MPS.TempMPSModel, column_name::String, bound_type::String, value::Float64)
    @ MathOptInterface.FileFormats.MPS ~/Developer/MathOptInterface.jl/src/FileFormats/MPS/MPS.jl:1575
  [3] parse_bounds_line(data::MathOptInterface.FileFormats.MPS.TempMPSModel, items::Vector{String})
    @ MathOptInterface.FileFormats.MPS ~/Developer/MathOptInterface.jl/src/FileFormats/MPS/MPS.jl:1614
  [4] read!(io::TranscodingStreams.TranscodingStream{CodecZlib.GzipDecompressor, IOStream}, model::MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.MPS.ModelFunctionConstraints{Float64}})
    @ MathOptInterface.FileFormats.MPS ~/Developer/MathOptInterface.jl/src/FileFormats/MPS/MPS.jl:1129
  [5] #11
    @ ~/Developer/MathOptInterface.jl/src/FileFormats/FileFormats.jl:121 [inlined]
  [6] open(::MathOptInterface.FileFormats.var"#11#12"{MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.MPS.ModelFunctionConstraints{Float64}}}, ::Type{TranscodingStreams.TranscodingStream{CodecZlib.GzipDecompressor}}, ::String, ::String)
    @ TranscodingStreams ~/.julia/packages/TranscodingStreams/DYpJd/src/stream.jl:164
  [7] compressed_open(f::Function, filename::String, mode::String, #unused#::MathOptInterface.FileFormats.Gzip)
    @ MathOptInterface.FileFormats ~/Developer/MathOptInterface.jl/src/FileFormats/utils.jl:224
  [8] compressed_open(f::Function, filename::String, mode::String, #unused#::MathOptInterface.FileFormats.AutomaticCompression)
    @ MathOptInterface.FileFormats ~/Developer/MathOptInterface.jl/src/FileFormats/utils.jl:251
  [9] read_from_file(model::MathOptInterface.Utilities.GenericModel{Float64, MathOptInterface.Utilities.ObjectiveContainer{Float64}, MathOptInterface.Utilities.VariablesContainer{Float64}, MathOptInterface.FileFormats.MPS.ModelFunctionConstraints{Float64}}, filename::String)
    @ MathOptInterface.FileFormats ~/Developer/MathOptInterface.jl/src/FileFormats/FileFormats.jl:120
 [10] top-level scope
    @ REPL[7]:1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions