Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed Mar 7, 2024
1 parent 56a8380 commit 6a9a694
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pyomo/contrib/appsi/tests/test_fbbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,16 @@ def test_named_exprs(self):
for x in m.x.values():
self.assertAlmostEqual(x.lb, 0)
self.assertAlmostEqual(x.ub, 0)

def test_named_exprs_nest(self):
# test for issue #3184
m = pe.ConcreteModel()
m.x = pe.Var()
m.e = pe.Expression(expr=m.x+1)
m.f = pe.Expression(expr=m.e)
m.c = pe.Constraint(expr=(0, m.f, 0))
it = appsi.fbbt.IntervalTightener()
it.perform_fbbt(m)
for x in m.x.values():
self.assertAlmostEqual(x.lb, -1)
self.assertAlmostEqual(x.ub, -1)

0 comments on commit 6a9a694

Please sign in to comment.