Skip to content

Commit cb99d5b

Browse files
add both abs and rel tolerance to unit test
1 parent 25d4535 commit cb99d5b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/test_highspy.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,13 +2072,14 @@ def test_lexicographic_optimization(self):
20722072
model.addVars(num_vars, np.array([0.0, 0.0]), np.array([2.0, 4.0]))
20732073
obj1 = highspy.HighsLinearObjective()
20742074
obj1.offset = 0
2075-
obj1.coefficients = [-1, 0]
2076-
obj1.priority = 1
2077-
obj1.abs_tolerance = 1
2075+
obj1.coefficients = [1, 0]
2076+
obj1.priority = 2
2077+
obj1.rel_tolerance = 0.1
2078+
obj1.abs_tolerance = 0.2
20782079
obj2 = highspy.HighsLinearObjective()
20792080
obj2.offset=0
2080-
obj2.coefficients=[-3, -4]
2081-
obj2.priority=2
2081+
obj2.coefficients=[3, 4]
2082+
obj2.priority=1
20822083
model.addLinearObjective(obj1)
20832084
model.addLinearObjective(obj2)
20842085
model.addRow(0.0, 20.0, num_vars, np.arange(num_vars), np.array([5.0, 4.0]))

0 commit comments

Comments
 (0)