-
Notifications
You must be signed in to change notification settings - Fork 20
Description
What's needed?
Every call to microgrid.*pool() returns a new instance, with a unique source_id. Actors are supposed to hold a reference to their pools and reuse them, instead of creating a new one each time they want to send a command.
Ideally an actor should make only a single call to a *pool() method, so that the bounds it streams correspond with the requests, etc.
But if someone does it the WRONG way microgrid.battery_pool().set_power(), they are currently not informed about it by any of the checks.
Proposed solution
There needs to be a runtime check that starts printing warning logs when more than 1 call has been made to the microgrid.battery_pool() method, with the same priority and with the same set of batteries.
The log message could say that if they are made by different actors, they should explicitly set different priority values, and if they are made by the same actor, they should stop that and instead reuse the same instance.
Use cases
No response
Alternatives and workarounds
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status