Describe the bug
During testing for #904, we discovered that the PV Smoothing algorithm assumes power is always available for charging, and so sometimes this can lead to discrepancies between PV Smoothing state of charge and battery state of charge. Add the system and grid charging constraints so that the algorithm is aware of the maximum power at any given timestep.
To Reproduce
Steps to reproduce the behavior:
- Set up a PV smoothing case
- Leave system charging on and grid charging off
- Run a simulation and plot pv smoothing state of charge and battery state of charge
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Desktop (please complete the following information):
- Version: develop, likely the 2022 release
Describe the bug
During testing for #904, we discovered that the PV Smoothing algorithm assumes power is always available for charging, and so sometimes this can lead to discrepancies between PV Smoothing state of charge and battery state of charge. Add the system and grid charging constraints so that the algorithm is aware of the maximum power at any given timestep.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Desktop (please complete the following information):