skip to navigation
skip to content


Solves power flow and optimal power flow problems

Latest Version: 5.1.3

PYPOWER is a power flow and Optimal Power Flow (OPF) solver. Current features include:

  • DC and AC (Newton’s method & Fast Decoupled) power flow and
  • DC and AC optimal power flow (OPF)

PYPOWER is a port of MATPOWER to the Python programming language.


PYPOWER depends upon:

It can be installed using setuptools:

$ easy_install PYPOWER

Alternatively, download and unpack the tarball and install:

$ tar zxf PYPOWER-4.0.X.tar.gz
$ python install


Installing PYPOWER creates pf and opf commands. To list the command options:

$ pf -h

PYPOWER includes a selection of test cases. For example, to run a power flow on the IEEE 14 bus test case:

$ pf -c case14

Alternatively, the path to a PYPOWER case data file can be specified:

$ pf /path/to/

The opf command has the same calling syntax. For example, to solve an OPF for the IEEE Reliability Test System and write the solved case to file:

$ opf -c case24_ieee_rts

For further information please refer to and the API documentation.


Questions and comments regarding PYPOWER should be directed to the mailing list:
File Type Py Version Uploaded on Size
PYPOWER-4.0.1-py2.5.egg (md5) Python Egg 2.5 2011-07-14 628KB
PYPOWER-4.0.1-py2.6.egg (md5) Python Egg 2.6 2011-07-14 628KB
PYPOWER-4.0.1.tar.gz (md5) Source 2011-07-14 239KB
PYPOWER-4.0.1.win32.exe (md5) MS Windows installer 2.7 2011-07-14 529KB
PYPOWER-4.0.1.win32.msi (md5) MS Windows MSI installer 2.7 2011-07-14 352KB