Skip to content

Commit

Permalink
Added test to create nested time indexed SS flowsheet in dynamic parent
Browse files Browse the repository at this point in the history
  • Loading branch information
NishantGiridhar committed Oct 5, 2024
1 parent 8ecc4c7 commit 7855199
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions idaes/core/base/tests/test_flowsheet_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,16 @@ def test_dynamic_nested_time_from_time_set(self):
assert isinstance(m.fs.sub.time, ContinuousSet)
assert m.fs.sub.time_units is units.s

@pytest.mark.unit
def test_dynamic_parent_time_indexed_ss_child(self):
m = ConcreteModel()
m.fs = FlowsheetBlock(dynamic=True, time_set = [1,2,3], time_units=units.s)
m.fs.sub = FlowsheetBlock(dynamic=False, time_set = [0, 1], time_units=units.dimensionless)

assert m.fs.sub.config.dynamic is False
assert isinstance(m.fs.sub.time, Set)
assert m.fs.sub.time_units == units.dimensionless


@pytest.mark.unit
def test_dynamic_external_time_invalid(self):
Expand Down

0 comments on commit 7855199

Please sign in to comment.