Skip to main content

TOPS (Tiny Open Power System Simulator)

Docs Tests

Note: This repository was previously called DynPSSimPy.

This is a package for performing dynamic power system simulations in Python. The aim is to provide a simple and lightweight tool which is easy to install, run and modify, to be used by researchers and in education. Performance is not the main priority. The only dependencies are numpy, scipy, pandas and matplotlib (the core functionality only uses numpy and scipy).

The package is being developed as part of ongoing research, and thus contains experimental features. Use at your own risk!

Some features:

  • Newton-Rhapson power flow
  • Dynamic time domain simulation (RMS/phasor approximation)
  • Linearization, eigenvalue analysis/modal analysis

Installation

The package can be installed using pip, as follows:

pip install tops

Documentation

The documentation, with a quickstart, user guide and API reference, is at https://hallvar-h.github.io/TOPS/.

Contributing and releases

Pull request titles must follow the Conventional Commits format. Use fix: ... for bug fixes, feat: ... for features, and a ! such as feat!: ... for breaking changes. Pull requests should be squash-merged using the pull request title as the commit message.

Release Please maintains a release pull request on main. That pull request updates CHANGELOG.md and the package version in pyproject.toml. Because Release Please uses the repository GITHUB_TOKEN, run the Tests workflow manually against the generated release branch before merging it. Merging the release pull request creates a version tag and GitHub release, builds and validates the distributions, and starts the protected pypi environment deployment.

Development

The project uses uv. To set up an environment and run the tests:

uv sync
uv run pytest            # fast tests
uv run pytest -m slow    # full-length validation against PowerFactory
uv run pytest -m ""      # everything (as in CI)

To build and preview the documentation locally:

uv sync --group docs
uv run mkdocs serve

Citing

If you use this code for your research, please cite this paper.

Example notebooks

Binder

Contact

Hallvar Haugdal

Metadata

Release files for tops 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tops 0.10.0
File Size Uploaded Provenance Actions
tops-0.10.0.tar.gz 62.4 kB With provenance Details for tops-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tops 0.10.0
File Interpreter ABI Platform Actions
tops-0.10.0-py3-none-any.whl Python 3 none any Details for tops-0.10.0-py3-none-any.whl

Total release size: 140.0 kB

Release files / tops-0.10.0.tar.gz

Download URL tops-0.10.0.tar.gz
Size 62.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e3dae89631d6e985067adafa29b7e96e65f1f9399cb5fbab438e0df047c0372d
BLAKE2b-256 checksum
How to use checksums
88d5f80d3cd6764083b3556e2e2600f589943f7f0f54b2394af0e6c2d0f1cffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / tops-0.10.0-py3-none-any.whl

Download URL tops-0.10.0-py3-none-any.whl
Size 77.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ad24df3cdc97a981007becd82d3cc500c3418d5ca069abb09924249d474c9e3
BLAKE2b-256 checksum
How to use checksums
9b5a7cad5eedf4e82867b042f01a25298231ae818bcbd4b0e7fb2c1f26612ba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for tops 0.10.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tops-0.10.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page