You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a force option in PowerDistributingActorRequest #259
As it was discussed, every component metric received from microgrid can be NaN. In that case metrics are independent from each: if one metric is NaN, then others can be correct float values.
PowerDistributingActor is ignoring components with NaN metrics, now.
But when we do gap_discharge it should replace those metrics with the latest not-NaN values and use them.
Proposed solution
Cache latest non-NaN value as use them if current metric is NaN and we do gap_discharge.
Create one more flag in the PowerDistributingActor request (src/frequenz/sdk/actor/power_distributing/request.py) : gap_discharge. Actor should set it to True, if he is doing gap_discharge. This should prevent from using cached values in the normal set_power operation. It should also simplify decision making process (less branches).
changed the title [-]Implement proper `gap_discharge` in PowerDistributingActor[/-][+]`gap_discharge` in PowerDistributingActor if components sending NaN[/+]on Mar 15, 2023
Shouldn't be whoever is doing the gap discharge responsible for doing this work (caching the last value, etc.)? Looks like out of the scope of the power distributing actor.
leandro-lucarella-frequenz commented on Mar 22, 2023
If what we need is a way to force the power distributor to apply some command to all batteries regardless of their working status, I would name that option just force. gap_discharge sounds too niche and only about one possible use case for this feature, but maybe I am mistaken.
changed the title [-]`gap_discharge` in PowerDistributingActor if components sending NaN[/-][+]Add a `force` option in `PowerDistributingActor` `Request`[/+]on Apr 11, 2023
Activity
[-]Implement proper `gap_discharge` in PowerDistributingActor[/-][+]`gap_discharge` in PowerDistributingActor if components sending NaN[/+]leandro-lucarella-frequenz commentedon Mar 20, 2023
Shouldn't be whoever is doing the gap discharge responsible for doing this work (caching the last value, etc.)? Looks like out of the scope of the power distributing actor.
leandro-lucarella-frequenz commentedon Mar 22, 2023
If what we need is a way to force the power distributor to apply some command to all batteries regardless of their working status, I would name that option just
force.gap_dischargesounds too niche and only about one possible use case for this feature, but maybe I am mistaken.shsms commentedon Mar 27, 2023
I agree,
gap_dischargeis a peak shaving concept. Ideally it should not be mentioned anywhere in the sdk codebase or docs.[-]`gap_discharge` in PowerDistributingActor if components sending NaN[/-][+]Add a `force` option in `PowerDistributingActor` `Request`[/+]