optiVLSI is a Python package that implements a collection of classic graph and circuit algorithms, including:
- Bellman‑Ford
- Dijkstra
- Prim
- Kruskal
- Lee (maze solver)
- BDD (binary decision diagrams)
- Simulation engines (compiled‑code and event‑driven)
The project has been refactored into a proper Python package with a modern pyproject.toml, type hints, comprehensive tests, documentation, and CI/CD pipelines.
# Install the package
pip install optivlsi
# Run a quick demo
python -m optivlsi.lee.algorithms.lee_algorithmSee the CONTRIBUTING.md file for guidelines.
| Algorithm | Package | Variants |
|---|---|---|
| Bellman-Ford Shortest Path | optivlsi.bellman_ford |
Pythonic, NetworkX, Numba |
| Dijkstra Shortest Path | optivlsi.dijkstra |
Pythonic, NetworkX, Numba |
| Kruskal Minimum Spanning Tree | optivlsi.kruskal |
Pythonic (DSU), NetworkX, Numba |
| Prim Minimum Spanning Tree | optivlsi.prim |
Pythonic, NetworkX, Numba |
| Algorithm | Package | Variants |
|---|---|---|
| Lee Maze Routing | optivlsi.lee |
Pythonic BFS, NetworkX, Numba |
| Algorithm | Package | Variants |
|---|---|---|
| Compiled-Code Simulator | optivlsi.simulation.compiled_code |
Gate classes, Numba |
| Event-Driven Simulator | optivlsi.simulation.event_driven |
Event propagation, Numba |
| Algorithm | Package | Variants |
|---|---|---|
| ROBDD | optivlsi.bdd |
Python, Numba |
# Run all tests
pytest
# Run with coverage
pytest --cov=optivlsi --cov-report=term
# Run benchmarks
pytest tests/test_benchmarks.py --benchmark-onlyFull documentation is available in the docs/ directory:
Detailed research paper: OptiVLSI.pdf
Each algorithm module includes an automate.py file for automan-based benchmarking across various problem sizes. The package also provides pytest-benchmark integration for performance regression detection.
A live benchmark comparison report is automatically generated on every push:
👉 View Benchmark Report
- Numba: All algorithms have Numba-accelerated variants with JIT compilation
- Automan: Automated simulation and benchmarking infrastructure
- NetworkX: Reference implementations using standard graph library
optivlsi/ # Main package
├── bellman_ford/ # Bellman-Ford algorithm
├── dijkstra/ # Dijkstra's algorithm
├── kruskal/ # Kruskal's MST
├── prim/ # Prim's MST
├── lee/ # Lee maze routing
├── simulation/
│ ├── compiled_code/ # Compiled-code simulator
│ ├── compiled_code_numba/# Numba-accelerated variant
│ └── event_driven/ # Event-driven simulator
├── bdd/ # ROBDD
└── utils/ # Shared utilities
bellman-ford/ # Original standalone modules
dijkstra/ # (preserved for reproducibility)
kruskal/ #
prim/ #
lee-algorithm/ #
compiled-code-simulator/ #
event-driven-sim/ #
ROBDD/ #
This open-source codebase started as a course project for AE6102 - Parallel Scientific Computing and Visualization at IIT Bombay. The original standalone research modules are preserved in their respective directories.
- Rohan Rajesh Kalbag
- Neeraj Prabhu
MIT