What's needed?
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).
Use cases
No response
Alternatives and workarounds
No response
Additional context
No response