Models were previously raising a RuntimeError if the existing capacity for a technology was zero for all years (based on a check in the factory method of the Subsector class). I have removed this check, and modified subsequent steps so it can handle this case.
Fixes #286
Type of change
Please add a line in the relevant section of
CHANGELOG.md to
document the change (include PR #) - note reverse order of PR #s.
[ ] New feature (non-breaking change which adds functionality)
[ ] Optimization (non-breaking, back-end change that speeds up the code)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Breaking change (whatever its nature)
Key checklist
[ ] All tests pass: $ python -m pytest
[ ] The documentation builds and looks OK: $ python -m sphinx -b html docs docs/build
Further checks
[ ] Code is commented, particularly in hard-to-understand areas
[ ] Tests added that prove fix is effective or that feature works
Description
Models were previously raising a
RuntimeError
if the existing capacity for a technology was zero for all years (based on a check in thefactory
method of theSubsector
class). I have removed this check, and modified subsequent steps so it can handle this case.Fixes #286
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s.
Key checklist
$ python -m pytest
$ python -m sphinx -b html docs docs/build
Further checks