Skip to content

Commit 0c14380

Browse files
author
Clara Witte
committed
Modify fixed_binary-test
1 parent 547b301 commit 0c14380

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Diff for: pyomo/contrib/appsi/solvers/tests/test_persistent_solvers.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -1210,22 +1210,20 @@ def test_fixed_binaries(
12101210
m.obj = pe.Objective(expr=m.y)
12111211
m.c = pe.Constraint(expr=m.y >= m.x)
12121212
m.x.fix(0)
1213-
if type(opt) is MAiNGO:
1214-
opt.maingo_options["epsilonA"] = 1e-6
12151213
res = opt.solve(m)
1216-
self.assertAlmostEqual(res.best_feasible_objective, 0, 6)
1214+
self.assertAlmostEqual(res.best_feasible_objective, 0, 5)
12171215
m.x.fix(1)
12181216
res = opt.solve(m)
1219-
self.assertAlmostEqual(res.best_feasible_objective, 1, 6)
1217+
self.assertAlmostEqual(res.best_feasible_objective, 1, 5)
12201218

12211219
opt: PersistentSolver = opt_class(only_child_vars=only_child_vars)
12221220
opt.update_config.treat_fixed_vars_as_params = False
12231221
m.x.fix(0)
12241222
res = opt.solve(m)
1225-
self.assertAlmostEqual(res.best_feasible_objective, 0, 6)
1223+
self.assertAlmostEqual(res.best_feasible_objective, 0, 5)
12261224
m.x.fix(1)
12271225
res = opt.solve(m)
1228-
self.assertAlmostEqual(res.best_feasible_objective, 1, 6)
1226+
self.assertAlmostEqual(res.best_feasible_objective, 1, 5)
12291227

12301228
@parameterized.expand(input=_load_tests(mip_solvers, only_child_vars_options))
12311229
def test_with_gdp(

0 commit comments

Comments
 (0)