Table 1
Nomenclature.
| Variable | Units | Definition |
|---|---|---|
| n, m | Bus labels | |
| r | Generator energy carrier labels (e.g. wind, solar, gas, etc.) | |
| s | Storage energy carrier labels (e.g. battery, hydrogen, etc.) | |
| κ, ℓ | Branch labels | |
| c | Cycle labels | |
| t | Snapshot/time point labels | |
| er/s | tCO2eq/MWhth | CO2-equivalent emissions of energy carrier r or s |
| wt | h | Weighting of snapshot in objective function |
| gn,r,t | MW | Dispatch of generator at bus n with carrier r at time t |
| Gn,r | MW | Power capacity of generator n, r |
| g̅n,r,t | MW/MW | Power availability per unit of generator capacity |
| ηn,r | MWel/MWth | Efficiency of generator |
| un,r,t | On/off binary status for generator unit commitment | |
| h | Generator minimum down time | |
| h | Generator minimum up time | |
| run,r | (MW/MW)/h | Generator ramp up limit per unit of capacity |
| rdn,r | (MW/MW)/h | Generator ramp down limit per unit of capacity |
| cn,r | €/MW | Generator capital (fixed) cost |
| on,r | €/MWh | Generator operating (variable) cost |
| sucn,r(,t) | € | Generator start up cost (in time t) |
| sdcn,r(,t) | € | Generator shut down cost (in time t) |
| hn,s,t | MW | Dispatch of storage at bus n with carrier s at time t |
| Hn,s | MW | Power capacity of storage n, s |
| en,s,t | MWh | Storage state of charge (energy level) |
| En,s | MWh | Storage energy capacity |
| cn,s | €/MW | Storage power capacity cost |
| ĉn,s | €/MWh | Storage energy capacity cost |
| on,s | €/MWh | Storage dispatch cost |
| dn,t | MW | Electrical load at bus n at time t |
| λn,t | €/MWh | Marginal price at bus n at time t |
| Vn | kV | Complex voltage at bus n |
| θn | rad | Voltage angle at bus n |
| In | kA | Complex current at bus n |
| Pn | MW | Total active power injection at bus n |
| Qn | MVAr | Total reactive power injection at bus n |
| Sn | MVA | Total apparent power injection at bus n |
| fℓ,t | MW | Branch active power flow |
| Fℓ | MW | Branch active power rating |
| cℓ | €/MW | Branch capital cost |
| xℓ | Ω | Branch series reactance |
| rℓ | Ω | Branch series resistance |
| Variable | Units | Definition |
| zℓ | Ω | Branch series impedance |
| yℓ | S | Branch shunt admittance |
| τℓ | Transformer tap ratio | |
| rad | Transformer phase shift | |
| ηℓ,t | MW/MW | Efficiency loss of a link |
| Knℓ | N × L incidence matrix | |
| Cℓc | L × (L – N + 1) cycle matrix | |
| Ynm | S | Bus admittance matrix |
| Bℓk | S | Diagonal L × L matrix of branch susceptances |
| BODFℓk | Branch Outage Distribution Factor |
Table 2
PyPSA components.
| Network | Container for all other network components. |
| Bus | Fundamental nodes to which all other components attach. |
| Carrier | Energy carrier (e.g. wind, solar, gas, etc.). |
| Load | A consumer of energy. |
| Generator | Generator whose feed-in can be flexible subject to minimum loading or minimum down and up times, or variable according to a given time series of power availability. |
| Storage Unit | A device which can shift energy from one time to another, subject to efficiency losses. |
| Store | A more fundamental storage object with no restrictions on charging or discharging power. |
| Shunt Impedance | An impedance in shunt to a bus. |
| Line | A branch which connects two buses of the same voltage. |
| Transformer | A branch which connects two buses of different voltages. |
| Link | A branch with a controllable power flow between two buses. |

Figure 1
Electrical property definitions for passive branches (lines and transformers).

Figure 2
Example of the coupling in PyPSA between electricity (at top) and other energy sectors: transport, hydrogen, natural gas and heating. There is a bus for each energy carrier, to which different loads, energy sources and converters are attached.

Figure 3
Calculation times for performing a full load flow on the MATPOWER [6] standard cases using MATPOWER versus PyPSA.
Table 3
A comparison of selected features of selected software tools that are similar to PyPSA.
| Power Flow | Continuation Power Flow | Dynamic Analysis | Transport Model | Linear OPF | SCLOPF | Nonlinear OPF | Multi-Period Optimisation | Unit Commitment | Investment Optimisation | Other Energy Sectors | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Power system tools | MATPOWER | 6.0 | [6] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| NEPLAN | 5.5.8 | [2] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| pandapower | 1.4.0 | [9] | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| PowerFactory | 2017 | [1] | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| PowerWorld | 19 | [3] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| PSAT | 2.1.10 | [7] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| PSS/E | 33.10 | [4] | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| PSS/SINCAL | 13.5 | [5] | ✓ | ✓ | ✓ | ✓ | |||||||||
| PYPOWER | 5.1.2 | [8] | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| PyPSA | 0.11.0 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| Energy system tools | calliope | 0.5.2 | [11] | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| minpower | 4.3.10 | [12] | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| MOST | 6.0 | [13] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| oemof | 0.1.4 | [14] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| OSeMOSYS | 2017 | [15] | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| PLEXOS | 7.400 | [16] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| PowerGAMA | 1.1 | [17] | ✓ | ✓ | ✓ | ✓ | |||||||||
| PRIMES | 2017 | [18] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| TIMES | 2017 | [19] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| urbs | 0.7 | [20] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |

Figure 4
Left: Locational marginal prices (λn,t from equation (12)) for Germany in an hour with high wind and low load; Middle: Line loading during this hour: highly loaded lines in the middle of Germany prevent the transport of cheap wind energy to consumers in the South; Right: Reactive power feed-in (positive in red, negative in blue) necessary to keep all buses at unit nominal voltage.

Figure 5
Results of optimisation of generation and storage capacities in Europe to reduce CO2 emissions in the European electricity sector by 95% compared to 1990 levels [32]. The grid topology is based on the GridKit network for Europe, clustered from 5000 buses to 256 buses.
