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.27.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.27.1.tar.gz | 7.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pathsim-0.27.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 MB
Release files / pathsim-0.27.1.tar.gz
| Download URL | pathsim-0.27.1.tar.gz |
|---|---|
| Size | 7.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f20214ae80cdf661c9f89350de43df5fcff2f1cd2d23b9b2a7472bd23feec05b
|
|
BLAKE2b-256 checksum How to use checksums |
29809dba6a687d0746506d3f0518f991d514d415bb86106ea070c041a76b37b1
|
| 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.27.1-py3-none-any.whl
| Download URL | pathsim-0.27.1-py3-none-any.whl |
|---|---|
| Size | 237.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb00d482cf3db6f618ba79662336d02789472f90061e43cb97a0af363fbc3fc6
|
|
BLAKE2b-256 checksum How to use checksums |
97ec7f64e4796a056cf0cd7429fce23b88e5ac74697171ed18ea864ceb435554
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|