Units parser
- units.parser.qau_to_string(qau)
Converts a QuantityAndUnit instance to a string, for example “POWER in MW”.
- Parameters:
qau – an esdl.QuantityAndUnit instance
- Result:
string representation of the QuanityAndUnit instance
- units.parser.unit_to_string(qau)
Converts the unit of a QuantityAndUnit instance to a string, for example “MW”.
- Parameters:
qau – an esdl.QuantityAndUnit instance
- Result:
string representation of the unit only of the QuanityAndUnit instance
- units.parser.build_qau_from_unit_string(unit_string)
Build an esdl.QuantityAndUnit instance from a string representing only the unit (and not the physical quantity), for example from “kWh/yr”.
- Parameters:
unit_string – string representation of the QuanityAndUnit unit (without the physical quantity)
- Result:
an esdl.QuantityAndUnit instance