Skip to content

Commit

Permalink
Added velocity and set error to logger info to avoid stopping of the run
Browse files Browse the repository at this point in the history
  • Loading branch information
samvanderzwan committed Dec 13, 2024
1 parent a1a9708 commit eefd3c9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/simulator_worker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,15 @@ def get_profileQuantityAndUnit(property_name: str) -> esdl.esdl.QuantityAndUnitT
unit=esdl.UnitEnum.WATT,
multiplier=esdl.MultiplierEnum.NONE,
)
elif property_name.startswith("velocity"):
return esdl.esdl.QuantityAndUnitType(
physicalQuantity=esdl.PhysicalQuantityEnum.SPEED,
unit=esdl.UnitEnum.METRE,
perTimeUnit=esdl.TimeUnitEnum.SECOND,
multiplier=esdl.MultiplierEnum.NONE,
)
else:
raise ValueError(f"Unknown property name: {property_name}")
logger.info(f"Unknown property name: {property_name}")


def create_output_esdl(input_esdl: str, simulation_result: pd.DataFrame) -> str:
Expand Down

0 comments on commit eefd3c9

Please sign in to comment.