Software Open Access

Python for Power System Analysis (PyPSA) Version 0.13.0

Brown, Tom; Hörsch, Jonas; Schlachtberger, David

Python for Power System Analysis (PyPSA) is a free software toolbox for simulating and optimising modern power systems that include features such as conventional generators with unit commitment, variable wind and solar generation, storage units, sector coupling and mixed alternating and direct current networks. PyPSA is designed to scale well with large networks and long time series. Find out more at:


This is release 0.13.0 of PyPSA.

Hyperlinked release notes can be found here:

This release contains new features aimed at coupling power networks to
other energy sectors, fixes for library dependencies and some minor
internal API changes.

* If you want to define your own components and override the standard
  functionality of PyPSA, you can now override the standard components
  by passing pypsa.Network() the arguments override_components and
  override_component_attrs, see the section on Custom
  Components. There are examples for defining new components in the
  git repository in examples/new_components/, including an example of
  overriding network.lopf() for functionality for
  combined-heat-and-power (CHP) plants.

* The Link component can now be defined with multiple outputs in fixed
  ratio to the power in the single input by defining new columns bus2,
  bus3, etc. (bus followed by an integer) in network.links along with
  associated columns for the efficiencies efficiency2, efficiency3,
  etc. The different outputs are then proportional to the input
  according to the efficiency; see sections Link with multiple outputs
  or inputs and Controllable branch flows: links and the example of a
  CHP with a fixed power-heat ratio.

* Networks can now be exported to and imported from netCDF files with
  network.export_to_netcdf() and network.import_from_netcdf(). This is
  faster than using CSV files and the files take up less space. Import
  and export with HDF5 files, introduced in PyPSA 0.12.0, is now

* The export and import code has been refactored to be more general
  and abstract. This does not affect the API.

* The internally-used sets such as pypsa.components.all_components and
  pypsa.one_port_components have been moved from pypsa.components to
  network, i.e. network.all_components and
  network.one_port_components, since these sets may change from
  network to network.

* For linear power flow, PyPSA now pre-calculates the effective per
  unit reactance x_pu_eff for AC lines to take account of the
  transformer tap ratio, rather than doing it on the fly; this makes
  some code faster, particularly the kirchhoff formulation of the

* PyPSA is now compatible with networkx 2.0 and 2.1.

* PyPSA now requires Pyomo version greater than 5.3.

* PyPSA now uses the Travis CI continuous integration service to test
  every commit in the PyPSA GitHub repository. This will allow us to
  catch library dependency issues faster.

We thank Russell Smith of Edison Energy for the pull request for the
effective reactance that sped up the LOPF code and Tom Edwards for
pointing out the Pyomo version dependency issue.

For this release we also acknowledge funding to Tom Brown from the
RE-InVEST project.

Files (1.7 MB)
Name Size
1.7 MB Download


Cite as