Skip to content

Commit

Permalink
check roundtrip efficiency
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
  • Loading branch information
victorgarcia98 committed Dec 19, 2023
1 parent 5bd5d98 commit c09baff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions flexmeasures/data/models/planning/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,9 @@ def _prepare(self, skip_validation: bool = False) -> tuple: # noqa: C901
"roundtrip_efficiency", self.sensor.get_attribute("roundtrip_efficiency", 1)
)

# if dis/charging efficiency pair is not defined then the roundtrip efficiency is used
if not (
"charging_efficiency" in self.flex_model
or self.sensor.has_attribute("charging-efficiency")
# if roundtrip efficiency is provided in the flex-model or defined as an asset attribute
if "roundtrip_efficiency" in self.flex_model or self.sensor.has_attribute(
"roundtrip-efficiency"
):
charging_efficiency = roundtrip_efficiency**0.5
discharging_efficiency = roundtrip_efficiency**0.5
Expand Down

0 comments on commit c09baff

Please sign in to comment.