Skip to content

Commit

Permalink
refactor: update import statement for PVSurrogate in watertap_reflo_c…
Browse files Browse the repository at this point in the history
…osting_package.py
  • Loading branch information
zacharybinger committed Nov 18, 2024
1 parent 4326da9 commit da51862
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
from watertap.costing.zero_order_costing import _load_case_study_definition

from watertap_contrib.reflo.core import PySAMWaterTAP
from watertap_contrib.reflo.solar_models.surrogate.pv.pv_surrogate import (
PVSurrogateData,
)

from watertap_contrib.reflo.costing.tests.dummy_costing_units import (
DummyElectricityUnit,
)
Expand Down Expand Up @@ -999,10 +997,11 @@ def _get_electricity_generation_unit(self):
"""
Get the electricity generating unit on the flowsheet, if present.
"""
from watertap_contrib.reflo.solar_models.surrogate.pv.pv_surrogate import PVSurrogate
elec_gen_unit = None
for b in self.model().component_objects(pyo.Block):
if isinstance(
b, PVSurrogateData
b, PVSurrogate
): # PV is only electricity generation model currently
elec_gen_unit = b
if isinstance(b, DummyElectricityUnit): # only used for testing
Expand Down

0 comments on commit da51862

Please sign in to comment.