Running Simulations
This guide walks you through the complete workflow of running a bank queue simulation in SimulationBank.Prerequisites
Before starting:Simulation Workflow
Step 1: Configure Parameters
The configuration panel provides sliders and inputs for all simulation parameters.- Basic Configuration
- Advanced Configuration
Number of Tellers
- Slider range: 1-20
- Default: 3
- Recommendation: Start with 3-5 for first runs
- Slider range: 0.1-5.0 customers/second
- Default: 1.0
- Recommendation: Start with 0.5-1.0
- Slider range: 1-60 seconds
- Default: 5.0
- Recommendation: Start with 5-10 seconds
- Slider range: 300-28800 seconds (5 min - 8 hours)
- Default: 3600 (1 hour)
- Recommendation: Start with 1800-3600 seconds
Step 2: Validate Configuration
Before starting, check the stability indicator:✓ Stable (ρ < 0.8)
✓ Stable (ρ < 0.8)
Good to go!System will reach steady state with manageable queues.
⚠️ Warning (0.8 ≤ ρ < 1.0)
⚠️ Warning (0.8 ≤ ρ < 1.0)
Proceed with cautionSystem is stable but will experience:
- Long queues
- High wait times
- Tellers constantly busy
num_tellers or decreasing arrival_rate.❌ Unstable (ρ ≥ 1.0)
❌ Unstable (ρ ≥ 1.0)
Will not work!Queue will grow unbounded. Simulation will fill
max_queue_capacity and continue growing.Fix: Increase num_tellers or decrease arrival_rate.Step 3: Start the Simulation
Click the “Start Simulation” button. What happens:
UI updates:
Step 4: Monitor Real-Time Updates
Queue Visualizer
Watch customers appear and disappear:- New customers fade in from the right
- Customers are ordered by priority (red first)
- When assigned to teller, they fade out
Teller Status
Metrics Dashboard
Step 5: Control Simulation
- Pause
- Resume
- Stop
- Reset
Action: Click “Pause” buttonEffect:State preserved:
- Current clock time
- All queued events
- Customer positions
- Teller states
Step 6: Analyze Results
Once simulation completes (clock reachesmax_simulation_time or manually stopped):
Final Metrics Summary
Export Options
- CSV Export
- JSON Export
Common Workflows
Quick Test Run
Stress Test
High load config
arrival_rate = 3.0service_mean = 8.0num_tellers = 10(intentionally insufficient)
Optimization Experiment
Troubleshooting
Simulation won't start
Simulation won't start
Possible causes:
- Backend not running → Check
http://localhost:5000 - Invalid configuration → Check browser console for errors
- Previous simulation still running → Stop it first
No customers appearing
No customers appearing
Cause:
arrival_rate too lowFix: Increase arrival_rate to 1.0 or higherWith arrival_rate = 0.1, customers arrive every ~10 seconds on average.Queue growing indefinitely
Queue growing indefinitely
Cause: ρ ≥ 1 (unstable configuration)Fix:
Metrics not updating
Metrics not updating
Possible causes:
- Polling stopped → Refresh page
- Simulation finished → Check status
- Backend crashed → Check terminal logs
Tellers always idle
Tellers always idle
Cause:
arrival_rate too low for number of tellersFix: Reduce num_tellers or increase arrival_rateWith 10 tellers and λ=0.5, tellers will be mostly idle.Best Practices
Start Simple
Begin with default configuration and short durations (10-30 minutes simulated time)
Validate First
Always check stability (ρ < 1) before starting long simulations
Monitor Actively
Watch metrics during first few minutes to catch issues early
Export Results
Save metrics after each run for comparison and analysis
Next Steps
Configuring Parameters
Learn how to tune simulation parameters effectively
Interpreting Metrics
Understand what the metrics tell you
Advanced Scenarios
Explore complex simulation patterns
Metrics Dashboard
Deep dive into available metrics