A block-based time-domain system simulation framework in Python
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
Blockto 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
- Documentation — tutorials, examples, and API reference
- Homepage — overview and getting started
- Contributing — how to contribute
- Consulting & commercial support — integration, custom blocks, migration from closed tools
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.25.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pathsim-0.25.1.tar.gz | 7.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pathsim-0.25.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 MB
Release files / pathsim-0.25.1.tar.gz
| Download URL | pathsim-0.25.1.tar.gz |
|---|---|
| Size | 7.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e97e49b7d0012c07b61088f746722e6b4cd83e130c9731c4515882a522bd11f0
|
|
BLAKE2b-256 checksum How to use checksums |
5d76a448fa3f7bb24cd29346be7c07917d83d6c7cc471dba8183edc4c8363a59
|
| 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.25.1-py3-none-any.whl
| Download URL | pathsim-0.25.1-py3-none-any.whl |
|---|---|
| Size | 235.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71b6c98ef6cf7c4f8f910a74b0eda892881b10f57b9a3a3a69ff47cdea51f010
|
|
BLAKE2b-256 checksum How to use checksums |
5a4ac562b765684b105e9ce251f2d251cee3314ab0d2970016f8d22a76fc1b18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|