PathSim

📢 We've moved to a new documentation site!

This legacy documentation will remain available but is no longer updated. Visit docs.pathsim.org for the latest docs with interactive examples, and pathsim.org for the new homepage.

A scalable block-based time-domain system simulation framework in Python with hierarchical modeling 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

🔄 Hot-Swappable

Switch blocks and solvers during simulation for flexible experimentation and analysis.

🎯 MIMO Capable

Blocks are inherently Multiple Input, Multiple Output capable for complex systems.

🔢 Numerical Integrators

Wide range of solvers: implicit, explicit, high-order, and adaptive time-stepping.

🏗️ Modular & Hierarchical

Build complex systems with nested subsystems (Subsystem, example).

⚡ Event Handling

Detect and resolve discrete events with zero-crossing detection (example).

🔧 Extensible

Subclass the base Block class and implement just a handful of methods.

📖 Open Source

MIT licensed on GitHub - star to support development!

Quickstart

Get started with PathSim in three simple steps:

Install

Install PathSim with pip:

pip install pathsim

or conda:

conda install conda-forge::pathsim
Build

Create a system using blocks and connections

Run

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:

🚀 Quickstart Example

PathSim usage - integrating a cosine function to produce a sine wave.

_images/sin_cos_blockdiagram_g.png
Quickstart

Explore the Documentation

📚 Examples

Explore practical examples demonstrating PathSim’s capabilities, from simple oscillators to complex hybrid systems with event handling and hierarchical modeling.

Examples
📖 API Reference

Complete API documentation for all PathSim classes, methods, and modules.

API Reference
🛣️ Roadmap

See what’s planned for future releases and contribute your ideas.

Roadmap
🤝 Contributing

Learn how to contribute to PathSim development and join the community.

Contributing
🔍 Index

Alphabetical index of all functions, classes, and terms.

Index