Skip to content

Commit

Permalink
Change direct access of .lo and .hi fields to function calls to `…
Browse files Browse the repository at this point in the history
…inf` and `sup`.

This PR is expected to be a no-op.

## Motivation

This is necessary since the `.hi` field appears to be no longer available in `0.22`: #146 (comment)

## Testing

`inf` and `sup` have been available in the `IntervalArithmetic.jl` package since `0.15`, which is the earliest version of `IntervalArithmetic.jl` our package supports: https://github.com/JuliaIntervals/IntervalArithmetic.jl/blob/e19764302e41c1b619b2a50727586be4ff90b6c7/src/IntervalArithmetic.jl#L55.
  • Loading branch information
vtjeng committed Dec 16, 2023
1 parent b0ebe49 commit 28b73c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vendor/ConditionalJuMP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ lower_bound(x::JuMP.VariableRef) = JuMP.lower_bound(x)
upper_bound(x::JuMP.VariableRef) = JuMP.upper_bound(x)
lower_bound(e::JuMP.GenericAffExpr) = lower_bound(IntervalArithmetic.interval(e))
upper_bound(e::JuMP.GenericAffExpr) = upper_bound(IntervalArithmetic.interval(e))
lower_bound(i::Interval) = i.lo
upper_bound(i::Interval) = i.hi
lower_bound(i::Interval) = inf(i)
upper_bound(i::Interval) = sup(hi)

0 comments on commit 28b73c0

Please sign in to comment.