Skip to content

Add a force option in PowerDistributingActor Request #259

Closed

Description

@ela-kotulska-frequenz

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

  1. Cache latest non-NaN value as use them if current metric is NaN and we do gap_discharge.
  2. 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

Activity

  1. added this to the v0.20.0 milestone on Mar 15, 2023
  2. changed the title [-]Implement proper `gap_discharge` in PowerDistributingActor[/-] [+]`gap_discharge` in PowerDistributingActor if components sending NaN[/+] on Mar 15, 2023
  3. added
    type:bugSomething isn't working
    priority:highAddress this as soon as possible
    type:enhancementNew feature or enhancement visitble to users
    and removed
    type:enhancementNew feature or enhancement visitble to users
    type:bugSomething isn't working
    on Mar 15, 2023
  4. leandro-lucarella-frequenz commented on Mar 20, 2023

    @leandro-lucarella-frequenz
    Contributor

    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.

  5. leandro-lucarella-frequenz commented on Mar 22, 2023

    @leandro-lucarella-frequenz
    Contributor

    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.

  6. shsms commented on Mar 27, 2023

    @shsms
    Contributor

    I agree, gap_discharge is a peak shaving concept. Ideally it should not be mentioned anywhere in the sdk codebase or docs.

  7. changed the title [-]`gap_discharge` in PowerDistributingActor if components sending NaN[/-] [+]Add a `force` option in `PowerDistributingActor` `Request`[/+] on Apr 11, 2023
  8. locked and limited conversation to collaborators on Apr 12, 2023
  9. converted this issue into a discussion #320 on Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

Fields

Priority

None yet

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions