Skip to main content

PathSim Logo

A block-based time-domain system simulation framework in Python

DOI PySimHub PyPI Conda License Release Downloads Coverage

Homepage • Documentation • PathView Editor • Sponsor


PathSim lets you model and simulate complex dynamical systems using an intuitive block diagram approach. Connect sources, integrators, functions, and scopes to build continuous-time, discrete-time, or hybrid systems.

Minimal dependencies: just numpy, scipy, and matplotlib.

Features

  • Hot-swappable — modify blocks and solvers during simulation
  • Stiff solvers — implicit methods (BDF, ESDIRK) for challenging systems
  • Event handling — zero-crossing detection for hybrid systems
  • Hierarchical — nest subsystems for modular designs
  • Extensible — subclass Block to create custom components

Install

pip install pathsim

or with conda:

conda install conda-forge::pathsim

Quick Example

from pathsim import Simulation, Connection
from pathsim.blocks import Integrator, Amplifier, Adder, Scope

# Damped harmonic oscillator: x'' + 0.5x' + 2x = 0
int_v = Integrator(5)       # velocity, v0=5
int_x = Integrator(2)       # position, x0=2
amp_c = Amplifier(-0.5)     # damping
amp_k = Amplifier(-2)       # spring
add = Adder()
scp = Scope()

sim = Simulation(
    blocks=[int_v, int_x, amp_c, amp_k, add, scp],
    connections=[
        Connection(int_v, int_x, amp_c),
        Connection(int_x, amp_k, scp),
        Connection(amp_c, add),
        Connection(amp_k, add[1]),
        Connection(add, int_v),
    ],
    dt=0.05
)

sim.run(30)
scp.plot()

PathView

PathView is the graphical editor for PathSim — design systems visually and export to Python.

Learn More

Citation

If you use PathSim in research, please cite:

@article{Rother2025,
  author = {Rother, Milan},
  title = {PathSim - A System Simulation Framework},
  journal = {Journal of Open Source Software},
  year = {2025},
  volume = {10},
  number = {109},
  pages = {8158},
  doi = {10.21105/joss.08158}
}

License

MIT

Metadata

Release files for pathsim 0.29.2

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

Source distribution (sdist)

Source distribution for pathsim 0.29.2
File Size Uploaded Provenance Actions
pathsim-0.29.2.tar.gz 7.4 MB Without provenance Details for pathsim-0.29.2.tar.gz

Built distribution (wheel)

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

Total release size: 7.7 MB

Release files / pathsim-0.29.2.tar.gz

Download URL pathsim-0.29.2.tar.gz
Size 7.4 MB
Tags Source
SHA-256 checksum
How to use checksums
892aaec8bff0dc3ca34e1fd54daae12c690f73d281252c79ce1d08d8d0763be4
BLAKE2b-256 checksum
How to use checksums
99413a6c4ff6c8e9e0e1af6cefca4774cb989246e3d63b8f2419b974e0579e91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / pathsim-0.29.2-py3-none-any.whl

Download URL pathsim-0.29.2-py3-none-any.whl
Size 250.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d74c587ab6073e83ea235a33163c06edc58f01487913f96476b506cf9ec51f7
BLAKE2b-256 checksum
How to use checksums
3237ecdf11c9265a01e17cf4605fc29767e1f9fa4c32145a52e6ecd38604d2b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for pathsim 0.29.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.

Release history Release notifications | RSS feed

This release

0.29.2 This release

2 release files No provenance

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