Skip to main content

Power flow and optimal power flow solver

Project description

PYPOWER is a power flow and Optimal Power Flow (OPF) solver. It is a port of MATPOWER to the Python programming language. Current features include:

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


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 and write the solved case to file:

$ opf -c case14

For further information please refer to and the API documentation.


Questions and comments regarding PYPOWER should be directed to the mailing list:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
PYPOWER-3.2.0b1-py2.5.egg (438.6 kB) Copy SHA256 hash SHA256 Egg 2.5
PYPOWER-3.2.0b1-py2.6.egg (438.4 kB) Copy SHA256 hash SHA256 Egg 2.6
PYPOWER-3.2.0b1-py2.7.egg (439.2 kB) Copy SHA256 hash SHA256 Egg 2.7
PYPOWER-3.2.0b1.tar.gz (153.9 kB) Copy SHA256 hash SHA256 Source None
PYPOWER-3.2.0b1.win32.exe (435.0 kB) Copy SHA256 hash SHA256 Windows Installer any

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page