Skip to content

Examples

Retrieve PyPSA example networks.

pypsa.examples.ac_dc_meshed ¶

ac_dc_meshed() -> Network

Load the meshed AC-DC example network.

v0.18.0

Returns:

  • Network –

    AC-DC meshed network.

Examples:

>>> n = pypsa.examples.ac_dc_meshed()
>>> n
PyPSA Network 'AC-DC-Meshed'
----------------------------
Components:
 - Bus: 9
 - Carrier: 6
 - Generator: 6
 - GlobalConstraint: 1
 - Line: 7
 - Link: 4
 - Load: 6
Snapshots: 10

pypsa.examples.storage_hvdc ¶

storage_hvdc() -> Network

Load the storage network example of PyPSA.

v0.18.0

Returns:

  • Network –

    Storage network example network.

Examples:

>>> n = pypsa.examples.storage_hvdc()
>>> n
PyPSA Network 'Storage-HVDC'
----------------------------
Components:
 - Bus: 6
 - Carrier: 3
 - Generator: 12
 - GlobalConstraint: 1
 - Line: 6
 - Link: 2
 - Load: 6
 - StorageUnit: 6
Snapshots: 12

pypsa.examples.scigrid_de ¶

scigrid_de() -> Network

Load the SciGrid network example of PyPSA.

v0.18.0 | Scigrid Lopf Then Pf

Returns:

  • Network –

    SciGrid network example network.

Examples:

>>> n = pypsa.examples.scigrid_de()
>>> n
PyPSA Network 'SciGrid-DE'
--------------------------
Components:
 - Bus: 585
 - Carrier: 16
 - Generator: 1423
 - Line: 852
 - Load: 489
 - StorageUnit: 38
 - Transformer: 96
Snapshots: 24

pypsa.examples.model_energy ¶

model_energy() -> Network

Load the single-node capacity expansion model in style of model.energy.

v0.34.1

Check out the model.energy website for more information.

Returns:

  • Network –

    Single-node capacity expansion model in style of model.energy.

Examples:

>>> n = pypsa.examples.model_energy()
>>> n
PyPSA Network 'Model-Energy'
----------------------------
Components:
 - Bus: 2
 - Carrier: 9
 - Generator: 3
 - Link: 2
 - Load: 1
 - StorageUnit: 1
 - Store: 1
Snapshots: 2920
References

  1. See https://model.energy/ ↩

pypsa.examples.stochastic_network ¶

stochastic_network() -> Network

Load the stochastic network example.

v1.0.0 |

Returns:

  • Network –

    Stochastic network example network.

Examples:

>>> n = pypsa.examples.stochastic_network()
>>> n
Stochastic PyPSA Network 'Stochastic-Network'
---------------------------------------------
Components:
    - Bus: 3
    - Generator: 12
    - Load: 3
Snapshots: 2920
Scenarios: 3

pypsa.examples.carbon_management ¶

carbon_management() -> Network

Load the carbon management network example of PyPSA.

v1.0.0

The Carbon Management Network has 20 days of data on the hybrid case from a recently published paper on carbon management based on PyPSA-Eur. It is sector-coupled and currently the most complex example network within PyPSA, making it ideal for exploring the plotting and statistical functionality.

References

  1. Hofmann, F., Tries, C., Neumann, F. et al. H2 and CO2 network strategies for the European energy system. Nat Energy 10, 715–724 (2025). https://doi.org/10.1038/s41560-025-01752-6 ↩

Examples:

>>> n = pypsa.examples.carbon_management()
>>> n
PyPSA Network 'Hybrid Scenario from https://www.nature.com/articles/s41560-025-01752-6'
---------------------------------------------------------------------------------------
Components:
 - Bus: 2164
 - Carrier: 89
 - Generator: 1489
 - GlobalConstraint: 4
 - Line: 157
 - Link: 6830
 - Load: 1357
 - StorageUnit: 106
 - Store: 1263
Snapshots: 168