Lead acid batteries using the voltage table can export to grid, since the dispatch current can be greater than the load. The root cause of the issue is that voltage_table_t::calculate_max_discharge_w specifies unreasonably high output currents, and this is the last constraint that is enforced.
Unclear whether this is a units issue with qmax, or something else. A brute force solution would be to enforce dod is >0 and <100 in the function.
To Reproduce
Steps to reproduce the behavior:
- Create a PV-Battery residential case with a lead acid battery that uses the voltage table
- Run the model with any dispatch
- Note that (a) the SOC goes well below the SOC limits specified on the dispatch page, and (b) the electricity from the battery is greater than the load, meaning this constraint is violating other constraints.
Expected behavior
voltage_table_t::calculate_max_discharge_w should respect charge limits specified in the dispatch functions.
Screenshots
Peak shaving:

Specified limits:

Desktop (please complete the following information):
- Version 2020.11.29 r1 - problem exists on patch, and the code is the same on develop.
Lead acid batteries using the voltage table can export to grid, since the dispatch current can be greater than the load. The root cause of the issue is that voltage_table_t::calculate_max_discharge_w specifies unreasonably high output currents, and this is the last constraint that is enforced.
Unclear whether this is a units issue with qmax, or something else. A brute force solution would be to enforce dod is >0 and <100 in the function.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
voltage_table_t::calculate_max_discharge_w should respect charge limits specified in the dispatch functions.
Screenshots
Peak shaving:
Specified limits:
Desktop (please complete the following information):