Frøg
Radio Network SimulationFrog is a radio network simulation tool that can be used for comparing routing algorithms or network protocols. Frog has a CLI and GUI interface. Users create 'scenarios' which are a specific layout of radio nodes and set of simulation parameters. Scenarios can either be hand created or automatically generated from a set of scenario generators. The intention is that a user can either test the algorithms of interest in specific situations, or en-masse using generated scenarios to get a broad understanding of the algorithm performance. Individual simulation results can be viewed in detail showing the state of each radio and what messages are being broadcast at any time, and many results can be aggregated to produce useful statistics that describe overall performance.
Frog started as part of a University group project with 5 other people. The overall project was looking at the performance of various routing algorithms for ad-hoc mesh networks using LoRa radios for use in remote areas and how this could be used in combination with gateway nodes that could send messages from the LoRa network to HAM radio. I wrote a large majority of the simulator engine code while other group members focused on other parts of the project like writing routing algorithms, gateway code, doing data analysis, and physical testing.
Since the project finished I've worked more on Frog especially tidying up the UI for general use. I would like to extend it more though, I think with some more features it could be used for site planning and generally a wider range of uses cases.
Frog is created entirely with Rust, the simulation engine is created effectively from scratch, using just a few ubiquitous Rust crates. It's a discrete event simulator where events are queue (by other events) onto a binary heap, in time order, then executed.
The code that is conceptually running on the radio nodes in the simulation is a called a 'node model'. Nodes models are also written within the Rust code but they are somewhat separated out such that the code can be written as if writing real code for a single radio on top of some abstractions. This means is relatively simple for a developer to create a node model without knowing anything about the workings of the simulator or even much Rust specific coding knowledge.
The GUI is also Rust and uses macroquad (basic rendering, window and inputs) and egui (immediate mode GUI).