Skip to content

Add a force option in PowerDistributingActor Request #321

Closed
@leandro-lucarella-frequenz

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

Labels

part:power-managementAffects the management of battery power and distributionpriority:highAddress this as soon as possibletype:enhancementNew feature or enhancement visitble to users

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions