diff --git a/src/FileFormats/MPS/MPS.jl b/src/FileFormats/MPS/MPS.jl index 12a0fea13d..d173558d34 100644 --- a/src/FileFormats/MPS/MPS.jl +++ b/src/FileFormats/MPS/MPS.jl @@ -1444,14 +1444,15 @@ end function parse_rows_line(data::TempMPSModel{T}, items::Vector{String}) where {T} if length(items) < 2 error("Malformed ROWS line: $(join(items, " "))") - elseif length(items) > 2 - # We could throw an error here, but it seems like other solvers just - # happily ignore the extra fields. - # - # See https://github.com/jump-dev/MathOptInterface.jl/issues/2792 - # - # Oscar dislikes the poorly standardized nature of MPS. end + # if length(items) > 2 + # We could throw an error here, but it seems like other solvers just + # happily ignore the extra fields. + # + # See https://github.com/jump-dev/MathOptInterface.jl/issues/2792 + # + # Oscar dislikes the poorly standardized nature of MPS. + # end sense, name = Sense(items[1]), items[2] if haskey(data.name_to_row, name) error("Duplicate row encountered: $(join(items, " ")).") diff --git a/test/Bridges/Constraint/IntervalToHyperRectangleBridge.jl b/test/Bridges/Constraint/IntervalToHyperRectangleBridge.jl index 80c36c624e..63a992bc62 100644 --- a/test/Bridges/Constraint/IntervalToHyperRectangleBridge.jl +++ b/test/Bridges/Constraint/IntervalToHyperRectangleBridge.jl @@ -116,6 +116,17 @@ function test_runtests(T) return end +function test_modify_ScalarCoefficientChange(T) + inner = MOI.Utilities.Model{T}() + model = MOI.Bridges.Constraint.IntervalToHyperRectangle{T}(inner) + x = MOI.add_variable(model) + c = MOI.add_constraint(model, T(1) * x, MOI.Interval(T(0), T(1))) + @test ≈(MOI.get(model, MOI.ConstraintFunction(), c), T(1) * x) + MOI.modify(model, c, MOI.ScalarCoefficientChange(x, T(2))) + @test ≈(MOI.get(model, MOI.ConstraintFunction(), c), T(2) * x) + return +end + end # module TestConstraintIntervalToHyperRectangle.runtests()