Open GabrielKS opened 4 months ago
This has a fix by defining correct getter in the JSON template.
Update from synchronous discussion: there is a nuance here in that Source
doesn't have a base power, so it cannot report quantities in device base units. @rodrigomha will add a base power field to Source
.
Another sub-issue of https://github.com/NREL-Sienna/PowerSystems.jl/issues/1134 but this one is distinct enough to get its own issue: certain fields are units system-dependent in some structs but not in others. For instance, the result of
get_active_power
is units system-dependent inThermalStandard
: https://github.com/NREL-Sienna/PowerSystems.jl/blob/71b9bf406ef7001eb5d6b56cc780b73093c9eb54/src/models/generated/ThermalStandard.jl#L147 but not inSource
: https://github.com/NREL-Sienna/PowerSystems.jl/blob/71b9bf406ef7001eb5d6b56cc780b73093c9eb54/src/models/generated/Source.jl#L105 making it frustrating to try to write polymorphic code that does the right thing for both.As an incremental fix before the https://github.com/NREL-Sienna/PowerSystems.jl/issues/1134 overhaul, I propose we work towards the principle that each getter function (a) either performs conversion for all types or does not perform conversion for any types and (b) clearly states which of these it is in its docstrings.