-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
Submodule: TestsAbout the Tests submoduleAbout the Tests submodule
Milestone
Description
Test that edge cases such as
MOI.LessThan(Inf)MOI.GreaterThan(-Inf)MOI.Interval(l, Inf),MOI.Interval(-Inf, u),MOI.Interval(-Inf, Inf)
are properly handled.
A typical edge case:
m = XXX.Optimizer()
x = MOI.add_variable(m)
# Even though the line below will be interpreted as `x >= 0`,
# it should return an `MOI.ConstraintIndex{MOI.SingleVariable, MOI.Interval{Float64}}`
c = MOI.add_constraint(m, MOI.SingleVariable(x), MOI.Interval(0,0, Inf))
@test isa(c, MOI.ConstraintIndex{MOI.SingleVariable, MOI.Interval{Float64}})
# The constraint index should be valid
@test MOI.is_valid(m, c)The goal of testing such edge cases would be to ensure that
- The MOI wrapper handles infinite values (as per the docs)
- Constraint indices are properly tracked
Metadata
Metadata
Assignees
Labels
Submodule: TestsAbout the Tests submoduleAbout the Tests submodule