PathSim¶
A flexible block-based time-domain system simulation framework in Python with automatic differentiation capabilities and event handling!
PathSim provides a variety of classes that enable modeling and simulating complex interconnected dynamical systems through intuitive Python scripting.
Minimal dependencies: only numpy, scipy and matplotlib!
Key Features¶
Switch blocks and solvers during simulation for flexible experimentation and analysis.
Blocks are inherently Multiple Input, Multiple Output capable for complex systems.
Wide range of solvers: implicit, explicit, high-order, and adaptive time-stepping.
Detect and resolve discrete events with zero-crossing detection (example).
Fully differentiable system simulations for optimization and analysis (example).
Subclass the base Block class and implement just a handful of methods.
MIT licensed on GitHub - star to support development!
Quickstart¶
Get started with PathSim in three simple steps:
Install PathSim with pip:
pip install pathsim
Create a system using blocks and connections
Execute the simulation and visualize results
Example: Integrating a Cosine¶
Here’s a simple interactive example that demonstrates PathSim basics. Click to view the full notebook with live code execution:
Explore the Documentation¶
Explore practical examples demonstrating PathSim’s capabilities, from simple oscillators to complex hybrid systems with event handling and automatic differentiation.
Complete API documentation for all PathSim classes, methods, and modules.
See what’s planned for future releases and contribute your ideas.
Learn how to contribute to PathSim development and join the community.
Alphabetical index of all functions, classes, and terms.