How satcom-telma/ma-drl_routing_simulator works
Project Type & Purpose
• This is a research‐grade, full-stack simulation and post-processing pipeline, not a web or mobile app.
• Core purpose: simulate block transmissions through dynamic satellite constellations (non-RL and RL modes) and then analyze results (latency, throughput, model performance).
Main Components
A. Configuration & Input Loader
• Files: Gateways.csv, input.csv, inputRL.csv, Population Map TIFFs/PDFs
• Function: parse gateway locations, simulation parameters, population data
B. Simulation Engine
• Non-RL core: Simulation.py
• RL core: SimulationRL.py (loads Q-Learning & Deep-Q networks/tables from pre_trained_NNs/)
• Underlying framework: Simpy event scheduler
C. Network Model
• Gateway objects (with transmit queues)
• Satellite objects (with inter-satellite link queues)
• Constellation updater (discrete movement, link re-builds)
D. Routing Logic
• Non-RL: Dijkstra shortest-path (uses metrics: latency, dataRate, slant_range, hop)
• RL: Q-Learning / Deep Q-Learning agents decide next hop at runtime
E. Data Generation & Propagation
• Blocks per gateway → placed into Simpy queues → propagate via link processes → arrival events
F. Telemetry Output & Storage
• Results folders (.csv, .npy): per-simulation logs (latency, DataRate, Q-values, epsilons)
• Population Map outputs (PDFs/TIFFs)
G. Post-Processing Pipeline
• Post-Processing/Post-Results.ipynb (Jupyter)
• Python scripts under Post-Processing/* generate CDFs, performance (CKA), throughput, rotation tests, figures
H. Visualization & Video
• Video scripts (Video/MA-DRL_Movement.mp4, change_name.py) for demo animations
I. Dependencies & External Libraries
• Python 3.9, Simpy, NumPy, Pandas, NetworkX (shortest path), Keras/TensorFlow (Deep Q-Networks), Matplotlib, Jupyter
Component Interactions & Data Flow
• Input Loader → populates Simulation Engine parameters
• Simulation Engine (Simpy) invokes Network Model & Routing Logic
• Blocks flow through queues → Telemetry Writer writes to file system
• RL mode loads pre_trained_NNs from disk → agents interact with Simpy events
• Post-Processing scripts read telemetry files (.csv, .npy) → compute metrics → store analysis results
• Visualization: notebook or scripts read post-processed data → generate plots, animations
Architectural Patterns & Principles
• Modular separation: Simulation core decoupled from post-processing
• Plugin-style routing: switch easily between non-RL (Dijkstra) and RL agents
• Data-driven configuration: all parameters externalized in CSV files
• Event-driven simulation (Simpy)
• Pipeline pattern: raw simulation → telemetry → analysis → visualization