Warn when several calls to microgrid.battery_pool()
, ev_charger_pool()
, pv_pool()
are made
#902
Labels
part:data-pipeline
Affects the data pipeline
type:enhancement
New feature or enhancement visitble to users
Milestone
What's needed?
Every call to
microgrid.*pool()
returns a new instance, with a uniquesource_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
The text was updated successfully, but these errors were encountered: