flexops.costing.currency_units¶
- flexops.costing.currency_units(symbol: str = 'USD')¶
Return the Pyomo currency unit named
symbol, registering it on first use.Pyomo has no built-in currency dimension, so a currency unit has to be declared before it can be used. This is the public way to get one, for writing flat prices (
0.12 * currency_units("USD") / pyunits.kWh) and for FlexCosting’s currency basis when no tariff supplies one. Tariff-priced models get their basis from the sheet instead — seetariff_currency_units().- Parameters:
symbol – The currency unit name, e.g.
"USD".- Returns:
The Pyomo units object for
symbol.