Hi everyone,
I’m working with the data from the BZR by ENTSO-E and would like to use PyPSA for my analysis. Over the past few days, I’ve been attempting to import the grid data for Germany into PyPSA. Initially, I thought I could use the Pandapower import functionality and convert the network to PyPSA. While importing the data into Pandapower worked, the conversion to PyPSA has not been successful. I looked at the conversion code and am not really convinced that I’m able to batch it in a way that I would trust the results of the conversion.
So yesterday, I looked into Pandapower’s code for CIM imports and am now considering developing my own import structure to bring the data into PyPSA. It will require some data transformation, as elements like three-winding transformers, switches etc. are missing. However, before I spend a lot of time on this, I wanted to ask the community for advice.
Here are my questions:
- Is there an existing method to import data in CGMES format (as provided by ENTSO-E) into PyPSA? It seems like I might be overlooking something.
- Should I focus on using Pandapower and recreate the BZR study there? This approach would also yield usable results, though it’s not as direct as importing into PyPSA, and considering that things like three-winding transformers are already part of it, I would not need to transform them in the import process.
For context, I know PyPSA-Eu, and my supervisor wants to work with the BZR data. While I could convert the data to CSV files (as used in PyPSA-Eu), I’m considering developing a direct import method for PyPSA. This might not only save time but also contribute a useful feature to PyPSA in the future (especially considering the previous attempt to implement this is a bit dated).
Any guidance, suggestions, or recommendations would be much appreciated!
2 Likes
I worked on fixing the pandapower importer in the past. I certainly still need updates and better test coverage in PyPSA. If switches and three-winding transformers are important, I would recommend you to add those components to PyPSA incl. tests. This would probably make a pandapower importer easier to design and generally useful - we could then easily access pandapowers IEEE test networks and CIM importer.
Check out those threads:
Having the BZR done with PyPSA would be cool!
Six months after my initial post, I’m happy to report that I’ve completed my Master’s thesis and developed a working prototype for importing ENTSO-E’s Bidding Zone Review (BZR) data into PyPSA. The main challenge was the BZR dataset’s inconsistent use of the CIM/CGMES standard, which required custom import code—little things like they represent DC Lines as AC Lines. The final implementation was more of an “academic research prototype” than the elegant solution I initially envisioned. While I can’t share the whole network due to NDA restrictions, I can share the visualisation of the grid. Attached is the topology, load, and generation of the BZR model.
I’ve submitted a lightning talk proposal to share my methodology and lessons learned. I’m currently at a crossroad, and actively figuring out how and where to continue my journey in power engineering and energy economics. Having worked through the grid import and seeing results and the modelling possibilities it unlocks, I’m motivated to pursue further research in this space, whether through continued academic research, industry collaboration, or open-source development.
Thanks for the initial answer, Max; it motivated me at times to keep pushing. I’m currently looking at how much time I have in the following months, but I am considering giving Three-Winding Transformers · Issue #643 · PyPSA/PyPSA · GitHub a go. This would be a proper first step, in my opinion.
PS: Fun fact, ENTSO-E writes that the Input data for the grid they used for the study is outdated. I solved my model for every day of 2024 with the data provided on the transparency platform.
3 Likes
Very nice! Great story!
Another great issue is this one: Add pressure driven gas transfer for modelling gas networks · Issue #577 · PyPSA/PyPSA · GitHub I am sure @lkstrp, one of the maintainers of PyPSA would be happy to help/guide you. Happy coding! 
For PyPSA-focused PhD positions, I can recommend reaching out to Tom Brown at TU Berlin, to Martha Victoria at DTU Denmark or Davide Fioriti at the University of Pisa – there are probably some others people suitable that I am not aware of. Doing a PhD is one of the best ways to learn and build unique skills if you are capable, focused, and hardworking.
In case you want to join industry right away, we might need to hire soon at Open Energy Transition, as we expect to grow again. Adding a proactive application at https://openenergytransition.org/ will put you on our radar!
2 Likes