Skip to content

Conversation

@EllieKallmier
Copy link
Member

Initial setup for storage handling implemented in this PR - focus on batteries at the moment, with pumped hydro to come in next steps.

Key features of this PR:

  • Templating basic ECAA and New Entrant battery properties including those required for capital cost calculation, region/subregion/rez identification, energy and power capacities, and charge/discharge efficiency implemented
  • Filtering the templated batteries according to regional/subregional filtering implemented (basically exactly the same as for generators)
  • Translation of both ECAA and New Entrant battery properties from the template output to PyPSA-friendly format implemented
  • Addition of the translated and filtered batteries to the Network and subsequent models
  • New tests written for new functionality (templater/translator/model building steps) and existing tests updated to accomodate batteries where necessary.

The new functionality introduced by this PR is still fairly basic and should be considered as a skeleton for the next steps of implementing storage in ISPyPSA!

@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

❌ Patch coverage is 96.22166% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ispypsa/templater/storage.py 94.27% 6 Missing and 5 partials ⚠️
src/ispypsa/translator/storage.py 97.53% 0 Missing and 2 partials ⚠️
src/ispypsa/iasr_table_caching/local_cache.py 0.00% 1 Missing ⚠️
...pypsa/templater/static_new_generator_properties.py 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/ispypsa/plotting/generation.py 97.85% <100.00%> (+0.25%) ⬆️
src/ispypsa/plotting/plot.py 90.32% <100.00%> (ø)
src/ispypsa/plotting/style.py 100.00% <100.00%> (ø)
src/ispypsa/plotting/transmission.py 96.03% <ø> (ø)
src/ispypsa/plotting/website.py 98.66% <ø> (ø)
src/ispypsa/pypsa_build/build.py 92.59% <100.00%> (+0.92%) ⬆️
src/ispypsa/pypsa_build/carriers.py 100.00% <100.00%> (ø)
src/ispypsa/pypsa_build/save.py 75.00% <ø> (ø)
src/ispypsa/pypsa_build/storage.py 100.00% <100.00%> (ø)
src/ispypsa/pypsa_build/update.py 100.00% <ø> (ø)
... and 12 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

}

_NEW_STORAGE_NEW_COLUMN_MAPPING = {
"maximum_capacity_mw": "storage_name",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this being used? I couldn't see if it got picked up in the translator? I actually disabled this and p_nom_max for new entrant generators, as it places a per investment period build limit which leads to unserved energy in my runs. Anyway good if its not being used, but just wanted to check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok yep I see - for the new entrant generators, there are a few that do have maximum plant sizes, but now that you've rightly made me think a bit harder about that I think using the maximum_capacity_mw (which becomes p_nom) to apply that limit is not correct (as more than one plant could be built per investment period).

Long winded way of me saying thank you for spotting and catching!! BOTN Cethana does have a set max. capacity but is phes and will need special handling anyway - but at the moment you're right, this doesn't get picked up in the translator for batteries so I'll clear this out from the templater too. Thanks!!

@nick-gorman nick-gorman merged commit ec89f11 into main Dec 1, 2025
15 checks passed
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

Successfully merging this pull request may close these issues.

3 participants