Pypsa introductory usage

262 views
Skip to first unread message

Rafu Nongrum

unread,
Jan 29, 2022, 3:35:20 AM1/29/22
to pypsa
Hi all,
I hope you're keeping well and safe. I'm just very new here to PyPsa and just wanted to come on here to ask.....how exactly can we use the software? is there like a download and we code there or is it basically just a library and we just code using jupyter notebooks and built our models accordingly?how do we see our outputs? I'm so lost . Would some one be kind enough to let me know please? Thankyou in advance.

Kind Regards,
Rafu.

Fabian Neumann

unread,
Jan 29, 2022, 5:41:08 AM1/29/22
to Rafu Nongrum, pypsa
Hi Rafu,

the documentation is a good place to start, which has getting started
instructions, examples and a user guide.

https://pypsa.readthedocs.io

Yes, PyPSA is a Python library you can use in Jupyter Notebooks to build
your energy system models.

In PyPSA, you create a "Network" instance which stores both inputs and
outputs of the components.

Best wishes,

Fabian
> --
> You received this message because you are subscribed to the Google
> Groups "pypsa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pypsa+un...@googlegroups.com
> <mailto:pypsa+un...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pypsa/67a1d399-46e7-4182-8723-cb0a89d02a46n%40googlegroups.com
> <https://groups.google.com/d/msgid/pypsa/67a1d399-46e7-4182-8723-cb0a89d02a46n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Dr.-Ing.
Fabian Neumann (he/him)
Postdoctoral Researcher

Department of Digital Transformation in Energy Systems
Institute of Energy Technology
Technische Universität Berlin

Group website: https://tub-ensys.github.io
Personal website: https://neumann.fyi

Zoom: https://tu-berlin.zoom.us/my/fneum
Schedule Meeting: https://calendly.com/fneum

Visitor Address:
Einsteinufer 25 (TA 8)
10587 Berlin

My working hours may not be your working hours. Do not feel pressure to
reply to this email outside your working hours.

Matthew Dumlao

unread,
Jan 29, 2022, 7:34:53 PM1/29/22
to pypsa
Hi Rafu,

A couple of years back, I was in a similar situation. I still cannot use the full extent of PyPSA's potential, but here are some tips on where to start.

[familiarization]
1. Learn Jupyter notebook. Although you can use python scripts later on, in the beginning, Jupyter notebook is your go-to GUI.
2. Learn Pandas and Matplotlib. PyPSA heavily uses these two libraries for data manipulation and visualization.
3. Install an optimizer. I think GLPK is the easiest one to install. You can see some guide here: https://pypsa.readthedocs.io/en/latest/installation.html

[tutorial]
4. Be familiar with the PyPSA components. Since it is a framework, we add information into the model through the components. https://pypsa.readthedocs.io/en/latest/components.html
5. Try examples. I suggest trying the Battery Electric Vehicle Charging since it will force you to do the four things above. https://pypsa.readthedocs.io/en/latest/examples/battery-electric-vehicle-charging.html

[next steps]
6. Use the import function. In the example in 5, the parameters are manually encoded, but you can save the file through a csv file or other format and just import it. Using example 5, you can try to export the network to the `network.export_to_csv_folder()` function and then create another notebook and use the `network.import_from_csv_folder()` function instead of inputting the parameters manually. https://pypsa.readthedocs.io/en/latest/import_export.html
7. Try to make your own components. You might not need it, but this tutorial is also an excellent way to understand the components and gives you an idea of how you could use the basic component to model other real-world infrastructure beyond the standard components offered by the framework. https://pypsa.readthedocs.io/en/latest/examples/replace-generator-storage-units-with-store.html

I hope these tips help!

Matthew

Max Parzen

unread,
Jan 31, 2022, 9:03:08 AM1/31/22
to pypsa
In case PyPSA-Eur/ Africa/ Earth is of interest, we have recently shared our hackathon material:
https://github.com/pypsa-meets-africa/pypsa-africa-hackathon
This also explains how to extend the model to other regions, how to use github, etc.

Good luck,

Max
Reply all
Reply to author
Forward
0 new messages