Skip to content

Commit

Permalink
More improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Feb 4, 2024
1 parent e61510a commit 9d5580a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/FileFormats/MPS/MPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ _value(set::MOI.GreaterThan) = set.lower
_value(set::MOI.EqualTo) = set.value
_value(set::MOI.Indicator) = _value(set.set)

function _write_rhs(io, model, F, S)
function _write_rhs(io, model, ::Type{F}, ::Type{S}) where {F,S}
for index in MOI.get(model, MOI.ListOfConstraintIndices{F,S}())
row_name = MOI.get(model, MOI.ConstraintName(), index)
set = MOI.get(model, MOI.ConstraintSet(), index)
Expand All @@ -508,7 +508,12 @@ function _write_rhs(io, model, F, S)
return
end

function _write_rhs(io, model, F, S::Type{MOI.Interval{Float64}})
function _write_rhs(
io,
model,
::Type{F},
::Type{S},
) where {F,S<:MOI.Interval{Float64}}
for index in MOI.get(model, MOI.ListOfConstraintIndices{F,S}())
row_name = MOI.get(model, MOI.ConstraintName(), index)
set = MOI.get(model, MOI.ConstraintSet(), index)
Expand Down

0 comments on commit 9d5580a

Please sign in to comment.