8000 GitHub - egbutter/PyPSA: PyPSA: Python for Power System Analysis
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

egbutter/PyPSA

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python for Power System Analysis

PyPSA stands for "Python for Power System Analysis". It is pronounced "pipes-ah".

PyPSA is a free software toolbox for simulating and optimising modern electric power systems that include features such as variable wind and solar generation, storage units and mixed alternating and direct current networks. PyPSA is designed to scale well with large networks and long time series.

As of 2016 PyPSA is under heavy development and therefore it is recommended to use caution when using it in a production environment. Some APIs may change - those liable to be updated are listed in the doc/todo.rst.

PyPSA was initially developed by the Renewable Energy Group at FIAS to carry out simulations for the CoNDyNet project, financed by the German Federal Ministry for Education and Research (BMBF) as part of the Stromnetze Research Initiative.

Documentation

Documentation as a website

Documentation as a PDF

Quick start

Documentation is in sphinx reStructuredText format in doc/.

What PyPSA does and does not do (yet)

PyPSA can calculate:

  • static power flow (using both the full non-linear network equations and the linearised network equations)
  • linear optimal power flow (optimisation of power plant and storage dispatch within network constraints, using the linear network equations, over several snapshots)
  • security-constrained linear optimal power flow
  • total electricity system investment optimisation (using linear network equations, over several snapshots simultaneously for optimisation of generation and storage dispatch and investment in the capacities of generation, storage and transmission)

It has models for:

  • meshed multiply-connected AC and DC networks, with controllable converters between AC and DC networks
  • conventional dispatchable generators
  • generators with time-varying power availability, such as wind and solar generators
  • storage units with efficiency losses
  • simple hydroelectricity with inflow and spillage

Functionality that will definitely be added soon (see also doc/todo.rst):

  • Graphical plotting of networks with power flow
  • Integration of heating and gas sectors (CHPs, heat pumps, P2H, P2G, etc.)
  • Simple RMS simulations with the swing equation
  • Distributed active power slack
  • Non-linear power flow solution using analytic continuation in the complex plane

Functionality that may be added in the future:

  • Unit Commitment using MILP
  • Short-circuit current calculations
  • Dynamic RMS simulations
  • Small signal stability analysis
  • Interactive web-based GUI
  • OPF with the full non-linear network equations
  • Dynamic EMT simulations
  • Unbalanced load flow
  • Port to Julia

Screenshots and example Jupyter/iPython notebooks

There are extensive examples available as Jupyter/iPython notebooks. They are also described in the doc/examples.rst and are available as Python scripts in examples/.

Some screenshots:

http://www.pypsa.org/img/line-loading.png

http://www.pypsa.org/img/lmp.png

http://www.pypsa.org/img/reactive-power.png

http://www.pypsa.org/img/stacked-gen.png

http://www.pypsa.org/img/storage-scigrid.png

http://www.pypsa.org/img/scigrid-curtailment.png

http://www.pypsa.org/img/meshed-ac-dc.png

http://www.pypsa.org/img/europe-map.png

What PyPSA uses under the hood

PyPSA is written and tested to be compatible with both Python 2.7 and Python 3.4.

It leans heavily on the following Python packages:

  • pandas for storing data about components and time series
  • numpy and scipy for calculations, such as linear algebra and sparse matrix calculations
  • pyomo for preparing optimisation problems (currently only linear)
  • networkx for some network calculations (such as discovering connected networks)
  • py.test for unit testing

The optimisation uses pyomo so that it is independent of the preferred solver (you can use e.g. the free software GLPK or the commercial software Gurobi).

The time-expensive calculations, such as solving sparse linear equations, are carried out using the scipy.sparse libraries.

Mailing list

PyPSA has a Google Group forum / mailing list.

Licence

PyPSA is released as free software under the GPLv3, see LICENSE.txt.

About

PyPSA: Python for Power System Analysis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%
0