pypower

Port of MATPOWER to Python

https://github.com/rwl/pypower

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 21 committers (19.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords from Contributors

powerflow loadflow energy-system power system power-system interface interaction short-circuit state-estimation
Last synced: 6 months ago · JSON representation ·

Repository

Port of MATPOWER to Python

Basic Info
Statistics
  • Stars: 374
  • Watchers: 25
  • Forks: 125
  • Open Issues: 37
  • Releases: 13
Created almost 17 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License Citation Authors

README.rst

**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)

Status
======

.. |nbsp| unicode:: 0xa0
   :trim:

|libraries|_ |nbsp| |pyversions|_ |nbsp| |license|_ |nbsp| |downloads|_ |nbsp| |travis|_ |nbsp| |pypi_version|_

.. |libraries| image:: https://img.shields.io/librariesio/release/pypi/PYPOWER
.. _libraries: https://libraries.io/pypi/PYPOWER

.. |pyversions| image:: https://img.shields.io/pypi/pyversions/PYPOWER
.. _pyversions: https://img.shields.io/librariesio/release/pypi/PYPOWER

.. |license| image:: https://img.shields.io/pypi/l/PYPOWER
.. _license: https://github.com/rwl/PYPOWER/blob/master/LICENSE

.. |downloads| image:: https://img.shields.io/pypi/dm/PYPOWER.svg
.. _downloads: https://pypistats.org/packages/pypower

.. |travis| image:: https://img.shields.io/travis/rwl/pypower/master?label=Travis%20CI
.. _travis: https://travis-ci.org/rwl/PYPOWER

.. |pypi_version| image:: https://badge.fury.io/py/PYPOWER.svg
.. _pypi_version: https://badge.fury.io/py/PYPOWER

Prerequisites
=============

PYPOWER depends upon these prerequisites on the level of the operating system:

* Python_ >= 3.5

Virtual Environment
===================

PYPOWER is recommended to be installed into a virtual environment::

  $ python3.8 -m venv venv  # Or any supported Python version

Dependencies
============

PYPOWER depends upon NumPy, SciPy and PyRLU which can be installed as follows::

  $ venv/bin/python -m pip install -r requirements.txt

Installation
============

The recommended way of installing PYPOWER is using pip_::

  $ venv/bin/python -m pip install PYPOWER

Alternatively, `download `_ and
unpack the tarball and install::

  $ tar zxf PYPOWER-5.x.y.tar.gz
  $ venv/bin/python setup.py install

Testing
=======

PYPOWER can be tested locally using the same tooling as on Travis CI::

  $ venv/bin/python -m tox -e py27,py38  # Or any supported Python version

Using PYPOWER
=============

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

  $ venv/bin/pf -h

or::

  $ venv/bin/opf -h

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

  $ venv/bin/pf -c case14

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

  $ venv/bin/pf /path/to/case14.py

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::

  $ venv/bin/opf -c case24_ieee_rts --solvedcase=rtsout.py

For further information please refer to https://rwl.github.io/PYPOWER/ and the
`API documentation`_.

Support
=======

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

    pypower@googlegroups.com

License & Copyright
===================

Copyright (c) 1996-2015, Power System Engineering Research Center (PSERC)  
Copyright (c) 2010-2025 Richard Lincoln

The code in PYPOWER is distributed under the 3-clause BSD license
below. The PYPOWER case files distributed with PYPOWER are not covered
by the BSD license. In most cases, the data has either been included
with permission or has been converted from data available from a
public source.

While not required by the terms of the license, we do request that
publications derived from the use of MATPOWER explicitly acknowledge
that fact by citing:

    R. D. Zimmerman, C. E. Murillo-Sanchez, and R. J. Thomas, "MATPOWER:
    Steady-State Operations, Planning and Analysis Tools for Power Systems
    Research and Education," Power Systems, IEEE Transactions on, vol. 26,
    no. 1, pp. 12–19, Feb. 2011.

Links
=====

* MATPOWER_ from PSERC (Cornell)
* matpower.app_ MATPOWER web application based on GNU Octave in WebAssembly
* Oct2PYPOWER_ Python bridge to MATPOWER using Oct2Py
* pandapower_ from Fraunhofer IWES and University of Kassel
* TESP_ from PNNL
* MatDyn_ by Stijn Cole
* PSAT_ by Federico Milano
* OpenDSS_ from EPRI
* GridLAB-D_ from PNNL
* PyCIM_

.. _Python: http://www.python.org
.. _pip: https://pip.pypa.io
.. _SciPy: http://www.scipy.org
.. _MATPOWER: http://www.pserc.cornell.edu/matpower/
.. _Git: http://git-scm.com/
.. _GitHub: http://github.com/rwl/PYPOWER
.. _`API documentation`: https://rwl.github.io/PYPOWER/api
.. _PyCIM: http://www.pycim.org
.. _MatDyn: http://www.esat.kuleuven.be/electa/teaching/matdyn/
.. _PSAT: http://www.uclm.es/area/gsee/web/Federico/psat.htm
.. _OpenDSS: http://sourceforge.net/projects/electricdss/
.. _GridLAB-D: http://sourceforge.net/projects/gridlab-d/
.. _pandapower: http://www.uni-kassel.de/go/pandapower
.. _TESP: https://tesp.readthedocs.io
.. _Oct2PYPOWER: https://github.com/rwl/oct2pypower
.. _matpower.app: https://matpower.app

Owner

  • Name: Richard Lincoln
  • Login: rwl
  • Kind: user
  • Location: Berlin

Power Engineer

Citation (CITATION.bib)

@misc{PYPOWER,
  author = {Lincoln, Richard},
  title = {PYPOWER},
  year = {2023},
  publisher = {GitHub},
  howpublished = {\url{https://github.com/rwl/PYPOWER}},
}

GitHub Events

Total
  • Issues event: 3
  • Watch event: 30
  • Issue comment event: 14
  • Push event: 3
  • Pull request event: 5
  • Fork event: 9
  • Create event: 1
Last Year
  • Issues event: 3
  • Watch event: 30
  • Issue comment event: 14
  • Push event: 3
  • Pull request event: 5
  • Fork event: 9
  • Create event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 322
  • Total Committers: 21
  • Avg Commits per committer: 15.333
  • Development Distribution Score (DDS): 0.314
Past Year
  • Commits: 7
  • Committers: 2
  • Avg Commits per committer: 3.5
  • Development Distribution Score (DDS): 0.286
Top Committers
Name Email Commits
Richard Lincoln r****n@g****m 221
Bengt Lüers B****s@g****m 49
Stefan Scherfke s****n@s****g 11
jdedecca j****a 8
nickpowersys n****l@g****m 5
temcdrm T****t@p****v 4
wyzdwdz w****z@g****m 4
dependabot[bot] 4****] 3
friederikemeier f****r@u****e 3
Lyle Collins L****s@u****u 2
Raoul Kalkman r****n@o****m 2
Bart Wiegmans b****s@g****m 1
Behrouz Sohrabi s****h@g****m 1
Bryan T. Richardson b****r@d****m 1
Dheepak Krishnamurthy k****9@g****m 1
Julius Susanto j****o@g****m 1
Muhammad Yasirroni 4****i 1
Samuel Perkin s****n@g****m 1
Richard Lincoln r****l@t****t 1
Heiner92 h****h@i****e 1
Tianshi Cheng c****5@1****m 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 45
  • Total pull requests: 50
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 29 days
  • Total issue authors: 30
  • Total pull request authors: 22
  • Average comments per issue: 1.56
  • Average comments per pull request: 0.4
  • Merged pull requests: 35
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 4
  • Pull requests: 6
  • Average time to close issues: 3 days
  • Average time to close pull requests: 13 days
  • Issue authors: 3
  • Pull request authors: 2
  • Average comments per issue: 0.75
  • Average comments per pull request: 1.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • rwl (8)
  • sscherfke (4)
  • luistrebejo (3)
  • dchassin (3)
  • kdheepak (2)
  • priyald17 (1)
  • jesseholzerpnnl (1)
  • rockg (1)
  • hoangluong (1)
  • RichriD (1)
  • Learwzr (1)
  • murilo-ma (1)
  • lzq-zbc (1)
  • rabi01 (1)
  • viktor-ktorvi (1)
Pull Request Authors
  • Bengt (5)
  • friederikemeier (5)
  • dchassin (4)
  • dependabot[bot] (4)
  • nickpowersys (3)
  • wyzdwdz (3)
  • kdheepak (2)
  • sns-ikeda (2)
  • charlie0389 (2)
  • raoul-k (2)
  • sscherfke (2)
  • chengts95 (2)
  • susantoj (2)
  • jdedecca (2)
  • temcdrm (2)
Top Labels
Issue Labels
Pull Request Labels
dependencies (4)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 20,081 last-month
  • Total dependent packages: 3
  • Total dependent repositories: 11
  • Total versions: 20
  • Total maintainers: 2
pypi.org: pypower

Solves power flow and optimal power flow problems

  • Versions: 20
  • Dependent Packages: 3
  • Dependent Repositories: 11
  • Downloads: 20,081 Last month
Rankings
Dependent packages count: 3.1%
Stargazers count: 3.7%
Average: 4.1%
Dependent repos count: 4.4%
Forks count: 4.6%
Downloads: 4.8%
Maintainers (2)
Last synced: 7 months ago

Dependencies

requirements.txt pypi
  • PYPOWER ==5.1.13
  • appdirs ==1.4.4
  • distlib ==0.3.1
  • filelock ==3.0.12
  • numpy ==1.22.0
  • packaging ==20.9
  • pip ==21.1
  • pluggy ==0.13.1
  • py ==1.10.0
  • pyparsing ==2.4.7
  • scipy ==1.6.1
  • setuptools ==54.2.0
  • six ==1.15.0
  • toml ==0.10.2
  • tox ==3.23.0
  • virtualenv ==20.4.3
requirements_py27.txt pypi
  • PYPOWER ==5.1.13
  • appdirs ==1.4.4
  • distlib ==0.3.1
  • filelock ==3.0.12
  • numpy ==1.22.0
  • packaging ==20.9
  • pip ==21.1
  • pluggy ==0.13.1
  • py ==1.10.0
  • pyparsing ==2.4.7
  • scipy ==1.2.3
  • setuptools ==44.0.0
  • six ==1.15.0
  • toml ==0.10.2
  • tox ==3.23.0
  • virtualenv ==20.4.3
setup.py pypi
  • Deactivated *
  • Manual *
  • numpy >=1.6
  • scipy >=0.9
.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite