Fix: power capacity does not need to be mandatory#2222
Conversation
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
| description="""Device-level power constraint on consumption. How much power can be drawn by this asset. | ||
| If ``power-capacity`` is omitted and ``production-capacity`` is also configured, this field contributes to the inferred symmetric device-level power limit. [#minimum_overlap]_""", |
There was a problem hiding this comment.
But this field also "contributes" if the production-capacity field is not configured, right? And that behaviour seems already described under power-capacity. I suggest reverting this change:
| description="""Device-level power constraint on consumption. How much power can be drawn by this asset. | |
| If ``power-capacity`` is omitted and ``production-capacity`` is also configured, this field contributes to the inferred symmetric device-level power limit. [#minimum_overlap]_""", | |
| description="""Device-level power constraint on consumption. How much power can be drawn by this asset. [#minimum_overlap]_""", |
There was a problem hiding this comment.
Actually, wouldn't you as a user expect that if you only define a consumption-capacity, that the production-capacity is automatically assumed to be zero? And vice versa.
(But if neither is set, they are not both assumed to be zero.)
I'm interested to hear your opinion.
There was a problem hiding this comment.
Good point. I reverted the extra sentence here and kept the fallback behavior described under power-capacity.
On the missing opposite direction: I agree that if consumption capacity is set, treating the production capacity as zero sounds intuitive. should this be implement this here?
| resolution: timedelta, | ||
| beliefs_before: datetime | None, | ||
| ) -> Sensor | SensorReference | list[dict] | ur.Quantity | pd.Series | None: | ||
| """Return the largest directional capacity when both directions are configured.""" |
There was a problem hiding this comment.
After some thought, I think “both” is too narrow here. Do you think we should infer the fallback power-capacity from the largest provided consumption-capacity or production-capacity when either one is set, and only fall back to site-power-capacity if neither is set?
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com> Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com> Signed-off-by: Mohamed Belhsan Hmida <149331360+BelhsanHmida@users.noreply.github.com>
Description
power-capacity.consumption-capacityandproduction-capacitywhen both directional capacities are configured.site-power-capacityfallback after the directional-capacity fallback.power-capacity,consumption-capacity, andproduction-capacity.Look & Feel
N/A. This is scheduler behavior and documentation only.
How to test
pytest -k "device_power_capacity_uses_greatest_directional_capacity_before_site_fallback"Manual check:
power-capacity,production_capacity = 300 kW, andconsumption_capacity = 700 kW,_get_device_power_capacityreturned a 96-step capacity series whose values are close to0.7 MW.power-capacitywarning instead of raising the previous error.Related Items
Closes SeitaBV/ems#210
Sign-off