Skip to content

Commit a77551c

Browse files
committed
add another test for node limit and termination condition for APPSI Highs
1 parent 47fcc04 commit a77551c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

pyomo/contrib/appsi/solvers/tests/test_highs_persistent.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
from pyomo.contrib.appsi.solvers.highs import Highs
2121
from pyomo.contrib.appsi.base import TerminationCondition
2222

23+
from pyomo.contrib.solver.tests.solvers import instances
24+
2325

2426
opt = Highs()
2527
if not opt.available():
@@ -183,3 +185,10 @@ def test_warm_start(self):
183185
pyo.SolverFactory("appsi_highs").solve(m, tee=True, warmstart=True)
184186
log = output.getvalue()
185187
self.assertIn("MIP start solution is feasible, objective value is 25", log)
188+
189+
def test_node_limit_term_cond(self):
190+
opt = Highs()
191+
opt.highs_options.update({"mip_max_nodes": 1})
192+
mod = instances.multi_knapsack()
193+
res = opt.solve(mod)
194+
assert res.termination_condition == TerminationCondition.maxIterations

0 commit comments

Comments
 (0)