Description
What's needed?
Sometimes a power request needs to be forced to implement safety mechanisms, even when some components might be seemingly failing (for example, gap discharge when doing peak shaving, i.e. when we don't have proper consumption information, we want to slowly discharge batteries to prevent potential peak breaches).
Proposed solution
Add a force
boolean attribute to Request
, so a request for power could be forced even on failing/missing components.
To be able to implement this, we'll need to also cache the last values for the metrics of each battery, so we can build the microgrid API requests still trying to distribute power based on the last known state of the failing/missing batteries.
When force
is True
, then the PowerDistributingActor
should consider all the requested batteries as working, even if the current state says otherwise (for example when critical metrics are missing -have NaN value-, like capacity).
Use cases
The main use case is doing gap discharge when peak shaving.
Alternatives and workarounds
Just make the requests to the microgrid API directly, but that won't distribute the power evenly among the existing batteries.
Additional context
This issue is based on:
There might be some requirement missing, so please have a look at it if finding issues when implementing this.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status