-
Notifications
You must be signed in to change notification settings - Fork 19
Make battery power manager algorithm configurable #1323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This makes it easier to expose publicly. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
With this, `SHIFTING_MATRYOSHKA` remains the default algorithm for batteries, but can now be changed to the original `MATRYOSHKA` algorithm when calling `microgrid.initialize()`. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
|
This means we need to adjust the docs slightly as well, but will pick that up separately later. |
llucax
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not too urgent, I would add a power_manager_config: PowerManagerConfig instead from the start, otherwise I'm fine with merge as is for now.
| *, | ||
| api_power_request_timeout: timedelta = timedelta(seconds=5.0), | ||
| # pylint: disable-next: line-too-long | ||
| battery_power_manager_algorithm: PowerManagerAlgorithm = PowerManagerAlgorithm.SHIFTING_MATRYOSHKA, # noqa: E501 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is needed somehow soon, but in the future I think it might make more sense to have copy what we have with the resampler_config and add a power_manager_config: PowerManagerConfig, and in there it can have something like power_manager_config.battery.algorithm` for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this,
SHIFTING_MATRYOSHKAremains the default algorithm forbatteries, but can now be changed to the original
MATRYOSHKAalgorithm when calling
microgrid.initialize().