| Simulation Engine & Math Logic (Backend) |
Python |
Core backend language for simulation logic, optimization algorithms, and statistical analysis |
Industry standard for mathematical modeling, discrete-event simulation, and transit operations research. |
python.org (v3.12+) |
| SimPy |
Process-based discrete-event simulation (DES) engine |
Handles priority event queues and clock progression cleanly; allows modeling train dispatching, platform queues, and knock-on delay propagation without polling. |
simpy.readthedocs.io (v4.1.1) |
| NumPy & SciPy |
Scientific computation, probability distributions, and parameter fitting |
Essential for sampling right-skewed walking and dwell times (Lognormal/Gamma), Maximum Likelihood Estimation, and isolating random substreams for Common Random Numbers (CRN) variance reduction. |
scipy.org / numpy.org
|
| Pandas |
Tabular data manipulation, time bucketing, and metric aggregation |
Efficiently groups passenger records into time buckets, computes median/95th percentiles, and handles helped-versus-harmed group classifications. |
pandas.pydata.org (v2.2+) |
| Backend API & Data Validation |
FastAPI |
Backend REST API server |
High-performance asynchronous framework in Python; handles scenario configuration, run execution triggers, and simulation result streaming with minimal latency. |
fastapi.tiangolo.com (v0.115+) |
| Pydantic |
Data validation, parameter clamping, and schema definition |
Automatically validates simulation input parameters (e.g., maximum hold caps, headway ranges) and returns structured errors before simulation execution. |
docs.pydantic.dev (v2.9+) |
| Frontend Framework & State |
React (with TypeScript) |
Frontend web application framework |
Component-driven architecture with compile-time type safety; prevents state mismatches across complex passenger records, station models, and playback data. |
react.dev (v18+) |
| Zustand |
Frontend state management for simulation playback and controls |
Provides lightweight, boilerplate-free state management to synchronize the shared simulation clock, scrubbing, rewinding, and variable playback speeds (0.5x, 2x, 10x) across side-by-side views. |
zustand-demo.pmnd.rs (v4.5+) |
| Visualization & Reporting |
PixiJS |
Hardware-accelerated 2D WebGL rendering engine |
Renders and animates thousands of individual passenger sprites and train positions smoothly across station transfer corridors without browser DOM slowdowns. |
pixijs.com (v8+) |
| D3.js |
Data-driven visualization library |
Offers custom SVG/Canvas rendering for dual-series comparison charts, confidence intervals, percentile markers (median and 95th), and sensitivity curves. |
d3js.org (v7+) |
| PapaParse |
Client-side CSV generation and parsing |
Converts simulation output datasets into formatted CSV downloads in the browser for user data exports without adding server load. |
papaparse.com (v5.4+) |
| html2canvas |
Client-side visual chart export |
Captures rendered comparison charts and distribution graphs into high-resolution image downloads directly from the user interface. |
html2canvas.hertzen.com (v1.4+) |
| Database & Persistence |
PostgreSQL |
Primary relational database |
Provides reliable ACID storage for user-saved scenarios, parameter presets (peak/off-peak), and historical run manifests (seeds, code version, active operating rules). |
postgresql.org (v16+) |
| SQLAlchemy |
Object-Relational Mapper (ORM) |
Integrates PostgreSQL with FastAPI models cleanly, allowing typed queries and straightforward schema migrations. |
sqlalchemy.org (v2.0+) |
| Testing & Verification |
Pytest & Hypothesis |
Backend unit and property-based testing framework |
Hypothesis enables automated generation of edge-case scenarios to guarantee that safety limits (e.g., minimum headway gap, maximum hold length) are never breached. |
pytest.org / hypothesis.readthedocs.io
|
| Playwright |
End-to-end (E2E) and blackbox UI testing |
Automates browser workflows to verify playback controls, parameter inputs, scenario comparisons, and error state handling. |
playwright.dev (v1.47+) |
| DevOps & CI/CD |
Docker & Docker Compose |
Containerization and local environment orchestration |
Packages the backend engine, API, database, and frontend to guarantee consistent runtime environments and cross-platform seed determinism. |
docker.com (v27+) |
| GitHub Actions |
Continuous Integration and Continuous Deployment (CI/CD) |
Automatically executes the test suite and runs determinism verification on every push, ensuring identical seeds produce identical output hashes. |
github.com/features/actions |