👉 https://leo-flood-demo.streamlit.app/
An interactive, bilingual (English / Traditional Chinese) Streamlit web application for teaching and exploring routing algorithms in Low Earth Orbit satellite constellations.
Built as an open educational tool — students can tune weights, watch the cost curve explode, and see routing paths move across a 3-D globe, all without leaving the browser.
| Feature | Description |
|---|---|
| 3 Constellation Presets | Starlink-like (dense), Kuiper-like (gateway-aware), Sparse / TinyLEO-like |
| 4 Routing Algorithms | Static Dijkstra, Load-aware Dijkstra, Multi-constraint Dijkstra, Directed Flood |
| Monte Carlo CDF | Randomised traffic trials → latency distribution charts for all 4 algorithms |
| Interactive 3-D Globe | Orthographic Scattergeo globe with routing paths, satellite topology overlay, and orbital ground tracks |
| Cost Analyzer | Live M/M/1 queueing cost calculator — watch the queue term blow up as ρ → 1 |
| Bilingual UI | Full English / 繁體中文 toggle in the sidebar |
| Teacher Resources | Curated academic papers, open-source labs, and teaching videos |
Run the app locally and explore the five tabs: Global Routing Map · Constellation Info · Tutorial & Guide · Cost Analyzer · Teacher Resources
Python >= 3.9# 1. Clone the repository
git clone https://github.com/<your-username>/Leo_Flood_Demo.git
cd Leo_Flood_Demo
# 2. Install dependencies
pip install streamlit numpy pandas plotly
# 3. Launch the app
streamlit run app.pyThe app will open at http://localhost:8501 in your browser.
Leo_Flood_Demo/
├── app.py # Streamlit front-end (bilingual UI, all tabs)
├── leo_flood_demo_v3i.py # Simulation engine (constellation, routing, Monte Carlo)
└── README.md
| Symbol | Role |
|---|---|
WalkerConstellation |
Walker-like LEO constellation model (ECI coordinates, ISL graph) |
RoutingConfig |
Dataclass holding all weights and normalisation factors |
dijkstra_static |
Classic propagation-delay Dijkstra |
dijkstra_load_aware |
Usage-weighted Dijkstra (λ × usage_count penalty) |
dijkstra_multi |
Multi-constraint Dijkstra with M/M/1 queueing proxy |
monte_carlo |
Monte Carlo engine — samples random util_map, runs all 4 algorithms per trial |
build_sparse_active_set |
Removes even-index satellites to create TinyLEO-like sparse topology |
Edge weight = propagation delay (distance ÷ speed of light) + fixed processing delay (1.5 ms/hop). Fast and stable; ignores real-time link load.
Edge weight = static delay + λ × usage_count.
Avoids historically heavy links; cannot respond to sudden traffic bursts.
Five-term normalised cost function (identical to multi_constraint_cost() in the engine):
cost = w_delay × (base_delay / 10.0)
+ w_queue × (ρ / (1−ρ) / 5.0) ← M/M/1 queueing, service_rate = 1
+ w_usage × (usage_count / 10.0)
+ w_contact × (ISL_dist / 10000.0)
+ w_gateway × (dist_to_GW / 10000.0) ← Kuiper only
Weights are tunable in real time via the sidebar sliders.
Flood routing from Source toward Destination pruned by a direction-cosine threshold.
Uses the actual per-trial util_map — finds the current-optimal path each trial.
May fail (∞) under strict thresholds or sparse topologies.
| Preset | Planes (M) | Sats/plane (N) | Altitude | Inclination | Cross-seam ISL |
|---|---|---|---|---|---|
| Starlink-like | 24 | 22 | 550 km | 53.0° | ✅ |
| Kuiper-like | 6 | 11 | 630 km | 51.9° | ❌ |
| Sparse (TinyLEO-like) | 24 | 22 (even-index active) | 550 km | 53.0° | ✅ |
- Select a constellation preset from the sidebar.
- Adjust traffic & hotspot settings — or click 🔥 Max Congestion Mode for an extreme scenario.
- Tune routing weights (
w_delay,w_queue,w_usage,w_contact). - Select source / destination satellites by plane index and satellite index.
- Click "▶ Run Simulation" to execute Monte Carlo and view the latency CDF.
- Switch to the Globe tab — enable "Satellite Topology" or "Orbital Planes", then rotate the globe to trace routing paths.
- Open the Cost Analyzer tab to interactively explore the M/M/1 cost formula.
| Resource | Link |
|---|---|
| ETH Zurich Hypatia simulator | github.com/snkas/hypatia |
| SatCom-TELMA MA-DRL Routing | github.com/SatCom-TELMA/MA-DRL_Routing_Simulator |
| Starlink Performance (Purdue 2024) | stygianet.cs.purdue.edu |
| Mark Handley — LEO Routing talk (UCL) | youtube.com/watch?v=m05abdGSOxY |
| Real Engineering — How Starlink Works | youtube.com/watch?v=giQ8xEWjnLs |
- Theory — Watch Mark Handley's UCL talk to understand why LEO routing is a "moving maze".
- Exploration — Open the Cost Analyzer tab; raise
w_queueand observe the exponential blow-up. - Experiment — Run Monte Carlo in Max Congestion mode; compare Static vs Multi-constraint CDFs.
- Challenge — Reference the Purdue/STyGIANet white-paper data and try to reproduce Starlink's ~15-second periodic handover latency spikes.
- Extension — Explore SatCom-TELMA MA-DRL to see how deep RL can replace hand-tuned weight sliders.
MIT License — free to use, modify, and distribute with attribution.