Skip to content
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

MPC optim status infeasible when SOC lower than min SOC #390

Open
martinarva opened this issue Dec 3, 2024 · 3 comments
Open

MPC optim status infeasible when SOC lower than min SOC #390

martinarva opened this issue Dec 3, 2024 · 3 comments

Comments

@martinarva
Copy link

Describe the bug
When SOC init is lower than min SOC, MPC run optim status will be infeasible.

This night my automations did not work because of infeasible optim status. I checked the logs and i'm pretty sure it's because my min SOC is 15%, but whatever reason my real SOC went to 14%.

For now I made a workaround like this:
"soc_init": {{ [((states('sensor.ss_battery_soc') | int(0)) / 100), 0.15] | max }},
To Reproduce
Set min SOC higher than your real SOC that you use as SOC init in MPC run

Expected behavior
I would expect optim status won't be infeasible in this scenario.

Screenshots
If applicable, add screenshots to help explain your problem.

Home Assistant installation type

  • Home Assistant Core

Your hardware

  • OS: Linux
  • Architecture: amd64

EMHASS installation type

  • Docker Standalone,
@twids
Copy link

twids commented Dec 13, 2024

I have seen this aswell, same thing happens if SOC is above the maximum battery charge percentage

@davidusb-geek
Copy link
Owner

Expected behavior
I would expect optim status won't be infeasible in this scenario.

I don't understand this issue.
If you pass a SOC init that is lower than the SOC min then I do expect that the outcome is infeasible.
How would you expect this to not be infeasible?

@RudolfRendier
Copy link

Maybe the constraint could be less strict; can it be adjusted to only prevent discharges below the soc_min instead of treating it as an invalid value in general?

That way EMHASS could recover by charging the battery first, after a deep discharge, beyond the usual levels.
(i.e. in winter, when the battery is not charged with solar and simple loses charge over time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants