PFPy - PowerFactory with Python
PFPy provides a wrapper around PowerFactory's Python API with additional features in pfpy.pf.
Furthermore, pfpy.models provides a high-level access to PowerFactory models, e.g. via:
model.simulate()model.linearize()model.set_params()
It has been developed at the Division of Electric Power and Energy Systems, KTH Royal Institute of Technology.
The code has been tested with PowerFactory 2019 and PowerFactory 2020. Note that $PYTHONPATH needs to point to the PowerFactory Python API.
Examples
The PowerFactory model used in all of the examples is located in ./examples/data/models/PFPY_DEMO.pfd
Simulation Example
The simulation of the aforementioned model is demonstrated in the simulation example. The model contains a controllable voltage source at the PCC. CSV files are generated that are replayed at the PCC, simulation is executed and the results are plotted.
Linearization Examples
The same model is linearized as seen from the PCC in the following Jupyter notebook. When compared to the linearization in PowerFacory, this code, in addition to the A matrix, provides also B,C, and D matrices.
Documentation
Automatically generated documentation from docstrings can be found here.
Acknowledgments
Parts of this code were inspired by the following book: Francisco Gonzalez-Longatt, José Luis Rueda Torres, Advanced Smart Grid Functionalities Based on PowerFactory, Springer, 2017
Metadata
Release files for pfpy 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pfpy-0.0.2.tar.gz | 13.5 kB | Without provenance | Details for pfpy-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pfpy-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for pfpy-0.0.2-py3-none-any.whl |
Total release size: 32.7 kB
Release files / pfpy-0.0.2.tar.gz
| Download URL | pfpy-0.0.2.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fab7cf9954ff0d3743a72a10006d6fc5359358d15079b5b1697a95a2c712842d
|
|
BLAKE2b-256 checksum How to use checksums |
4d2e048c8ce10c0f6f3f872f717deeb37d09a3b22ea03461a687f7cf3651644a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9
|
Release files / pfpy-0.0.2-py3-none-any.whl
| Download URL | pfpy-0.0.2-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82bf38490e87a7315d97c9db4ff9c157208f12591981ca1f67511321e35d6104
|
|
BLAKE2b-256 checksum How to use checksums |
69ef6f93495162dc2218e20feef58e7d01602c3f6c3f2dc22f82217fd9291e4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9
|
Security for pfpy 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.