Skip to content

Commit

Permalink
Update pyomo/contrib/doe/tests/test_doe_build.py
Browse files Browse the repository at this point in the history
Co-authored-by: Bethany Nicholson <blnicho@users.noreply.github.com>
  • Loading branch information
djlaky and blnicho authored Aug 12, 2024
1 parent cb7d925 commit e0226b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyomo/contrib/doe/tests/test_doe_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,14 @@ def test_reactor_fd_central_design_fixing(self):
continue

con_name = con_name_base + str(ind)
assert hasattr(model, con_name)
self.assertTrue(hasattr(model, con_name))

# Ensure that each set of constraints has all blocks pairs with scenario 0
# i.e., (0, 1), (0, 2), ..., (0, N) --> N - 1 constraints
assert len(getattr(model, con_name)) == (len(model.scenarios) - 1)
self.assertEqual(len(getattr(model, con_name)), (len(model.scenarios) - 1))

# Should not have any constraints sets beyond the length of design_vars - 1 (started with index 0)
assert not hasattr(model, con_name_base + str(len(design_vars)))
self.assertFalse(hasattr(model, con_name_base + str(len(design_vars))))

def test_reactor_fd_backward_design_fixing(self):
fd_method = "backward"
Expand Down

0 comments on commit e0226b0

Please sign in to comment.