Adding Action for publishing to PYPI.
[PYPOWER.git] / README.rst
blobaf19fe67367318e20e05450252f3275a16cd339c
1 **PYPOWER** is a power flow and Optimal Power Flow (OPF) solver. It is a port of
2 MATPOWER_ to the Python_ programming language. Current
3 features include:
5 * DC and AC (Newton's method & Fast Decoupled) power flow and
6 * DC and AC optimal power flow (OPF)
8 Status
9 ======
11 .. |nbsp| unicode:: 0xa0
12    :trim:
14 |libraries|_ |nbsp| |pyversions|_ |nbsp| |license|_ |nbsp| |downloads|_ |nbsp| |travis|_ |nbsp| |pypi_version|_
16 .. |libraries| image:: https://img.shields.io/librariesio/release/pypi/PYPOWER
17 .. _libraries: https://libraries.io/pypi/PYPOWER
19 .. |pyversions| image:: https://img.shields.io/pypi/pyversions/PYPOWER
20 .. _pyversions: https://img.shields.io/librariesio/release/pypi/PYPOWER
22 .. |license| image:: https://img.shields.io/pypi/l/PYPOWER
23 .. _license: https://github.com/rwl/PYPOWER/blob/master/LICENSE
25 .. |downloads| image:: https://img.shields.io/pypi/dm/PYPOWER.svg
26 .. _downloads: https://pypistats.org/packages/pypower
28 .. |travis| image:: https://img.shields.io/travis/rwl/pypower/master?label=Travis%20CI
29 .. _travis: https://travis-ci.org/rwl/PYPOWER
31 .. |pypi_version| image:: https://badge.fury.io/py/PYPOWER.svg
32 .. _pypi_version: https://badge.fury.io/py/PYPOWER
34 PYPOWER is no longer actively maintained. However, should improvements
35 to PYPOWER be required then the `original author <https://github.com/rwl>`_
36 may be available on contract. Please do not hesitate to get in
37 `contact <mailto:r.w.lincoln@gmail.com>`_ directly.
39 Prerequisites
40 =============
42 PYPOWER depends upon these prerequisites on the level of the operating system:
44 * Python_ 2.7 - 3.9
46 Virtual Environment
47 ===================
49 PYPOWER is recommended to be installed into a virtual environment::
51   $ python3.8 -m venv venv  # Or any supported Python version
53 Dependencies
54 ============
56 PYPOWER depends upon SciPy, which can be installed as follows::
58   $ venv/bin/python -m pip install -r requirements.txt
60 Installation
61 ============
63 The recommended way of installing PYPOWER is using pip_::
65   $ venv/bin/python -m pip install PYPOWER
67 Alternatively, `download <http://pypi.python.org/pypi/PYPOWER#downloads>`_ and
68 unpack the tarball and install::
70   $ tar zxf PYPOWER-5.x.y.tar.gz
71   $ venv/bin/python setup.py install
73 Testing
74 =======
76 PYPOWER can be tested locally using the same tooling as on Travis CI::
78   $ venv/bin/python -m tox -e py27,py38  # Or any supported Python version
80 Using PYPOWER
81 =============
83 Installing PYPOWER creates ``pf`` and ``opf`` commands. To list the command
84 options::
86   $ venv/bin/pf -h
88 or::
90   $ venv/bin/opf -h
92 PYPOWER includes a selection of test cases. For example, to run a power flow
93 on the IEEE 14 bus test case::
95   $ venv/bin/pf -c case14
97 Alternatively, the path to a PYPOWER case data file can be specified::
99   $ venv/bin/pf /path/to/case14.py
101 The ``opf`` command has the same calling syntax. For example, to solve an OPF
102 for the IEEE Reliability Test System and write the solved case to file::
104   $ venv/bin/opf -c case24_ieee_rts --solvedcase=rtsout.py
106 For further information please refer to https://rwl.github.io/PYPOWER/ and the
107 `API documentation`_.
109 Support
110 =======
112 Questions and comments regarding PYPOWER should be directed to the `mailing
113 list <http://groups.google.com/group/pypower>`_:
115     pypower@googlegroups.com
117 License & Copyright
118 ===================
120 Copyright (c) 1996-2015, Power System Engineering Research Center (PSERC)  
121 Copyright (c) 2010-2021 Richard Lincoln  
123 The code in PYPOWER is distributed under the 3-clause BSD license
124 below. The PYPOWER case files distributed with PYPOWER are not covered
125 by the BSD license. In most cases, the data has either been included
126 with permission or has been converted from data available from a
127 public source.
129 While not required by the terms of the license, we do request that
130 publications derived from the use of MATPOWER explicitly acknowledge
131 that fact by citing:
133     R. D. Zimmerman, C. E. Murillo-Sanchez, and R. J. Thomas, "MATPOWER:
134     Steady-State Operations, Planning and Analysis Tools for Power Systems
135     Research and Education," Power Systems, IEEE Transactions on, vol. 26,
136     no. 1, pp. 12–19, Feb. 2011.
138 Links
139 =====
141 * MATPOWER_ from PSERC (Cornell)
142 * matpower.app_ MATPOWER web application based on GNU Octave in WebAssembly
143 * Oct2PYPOWER_ Python bridge to MATPOWER using Oct2Py
144 * pandapower_ from Fraunhofer IWES and University of Kassel
145 * TESP_ from PNNL
146 * MatDyn_ by Stijn Cole
147 * PSAT_ by Federico Milano
148 * OpenDSS_ from EPRI
149 * GridLAB-D_ from PNNL
150 * PyCIM_
152 .. _Python: http://www.python.org
153 .. _pip: https://pip.pypa.io
154 .. _SciPy: http://www.scipy.org
155 .. _MATPOWER: http://www.pserc.cornell.edu/matpower/
156 .. _Git: http://git-scm.com/
157 .. _GitHub: http://github.com/rwl/PYPOWER
158 .. _`API documentation`: https://rwl.github.io/PYPOWER/api
159 .. _PyCIM: http://www.pycim.org
160 .. _MatDyn: http://www.esat.kuleuven.be/electa/teaching/matdyn/
161 .. _PSAT: http://www.uclm.es/area/gsee/web/Federico/psat.htm
162 .. _OpenDSS: http://sourceforge.net/projects/electricdss/
163 .. _GridLAB-D: http://sourceforge.net/projects/gridlab-d/
164 .. _pandapower: http://www.uni-kassel.de/go/pandapower
165 .. _TESP: https://tesp.readthedocs.io
166 .. _Oct2PYPOWER: https://github.com/rwl/oct2pypower
167 .. _matpower.app: https://matpower.app