|
AntHocNet 2.0.0
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
|
Built-in teaching scenarios: one per network family, shaped like the repo's presets but scaled down to what reads well on a screen. More...
Classes | |
| struct | Flow |
| A constant-bit-rate data flow and its running totals. More... | |
| struct | Leg |
| One straight leg of a node's trajectory: p0 at t0 to p1 at t1. More... | |
| struct | LogEvent |
| One entry of the event log (see Ev for what each field means per kind). More... | |
| struct | Mobility |
| A node's mobility model and its parameters. More... | |
| class | Node |
| One AntHocNet node: the core logic plus the adapter state around it. More... | |
| class | SplitMix64 |
| SplitMix64: tiny, portable, and bit-identical on every platform (integer arithmetic only; the double is an exact 53-bit scaling). More... | |
| struct | Vec3 |
| A position in metres (z = altitude; 0 on planar worlds). More... | |
| class | World |
| The whole simulation: nodes, radio, mobility, traffic and the event queue. More... | |
Enumerations | |
| enum class | MobilityKind { Static , RandomWaypoint , GaussMarkov , Manhattan , Orbit } |
How a node moves. Values are part of the JS API (setMobility's kind). More... | |
| enum class | ChannelKind { Disk , Urban , Isl } |
| Which link rule the teaching radio uses. More... | |
| enum class | Ev : int { TxAnt = 1 , RxAnt = 2 , TxData = 3 , Deliver = 4 , Drop = 5 , RouteAdd = 6 , RouteDel = 7 , Queue = 8 , TxFail = 9 , NodeDown = 10 , NodeUp = 11 } |
| Event kinds of the log the front end animates and the parity test diffs. More... | |
| enum class | DropReason : int { Ttl = 1 , QueueTimeout = 2 , HoldCap = 3 , RepairDiscard = 4 , NodeOff = 5 } |
Why a data packet was lost (the peer field of an Ev::Drop event). More... | |
Functions | |
| std::vector< std::string > | scenarioNames () |
| Names accepted by buildScenario(), in display order. | |
| bool | buildScenario (World &w, const std::string &name) |
| Populate an empty World with the named scenario. Returns false if unknown. | |
| double | detSin (double x) |
| sin / cos from arithmetic only (range reduction + Taylor series), so the native and WASM builds compute bit-identical orbits: libm's transcendental functions are not guaranteed to round the same on both. | |
| double | detCos (double x) |
| Vec3 | orbitPosition (const Mobility &m, const Vec3 ¢re, double t) |
| Where an Orbit puts a node at time t (centre = the field's centre, z = 0). | |
Built-in teaching scenarios: one per network family, shaped like the repo's presets but scaled down to what reads well on a screen.
The browser adapter (#544, ADR-0021): an adapter for the shared AntHocNet core, next to the ns-3 one (and NS-2's, through v1.9.0).
They change the scenario only – mobility, channel, size, traffic – never the protocol Config (ADR-0019). The parity test runs every one of them.
It owns what an adapter owns – the clock, the RNGs, the timers, the pending-packet queue, a radio – and carries out the RouteDecisions the core returns. It never decides a route.
The radio is a teaching model: unit disk (optionally cut by buildings, or a fixed ISL adjacency), a FIFO transmitter per node with a fixed bit rate, and a MAC transmit-failure report when a unicast's receiver is out of range. It is not ns-3 and nothing measured on it is a benchmark number.
Everything here is plain C++14 on top of core/, so the same sources build natively and with Emscripten; the native-vs-WASM decision-trace parity test (web/test/parity.sh) holds the two builds byte-identical.
|
strong |
How a node moves. Values are part of the JS API (setMobility's kind).
|
strong |
|
strong |
Event kinds of the log the front end animates and the parity test diffs.
Append only: the JS front end and the trace format index these numerically.
|
strong |
Why a data packet was lost (the peer field of an Ev::Drop event).
| std::vector< std::string > ahn_web::scenarioNames | ( | ) |
Names accepted by buildScenario(), in display order.
| bool ahn_web::buildScenario | ( | World & | w, |
| const std::string & | name | ||
| ) |
Populate an empty World with the named scenario. Returns false if unknown.
| double ahn_web::detSin | ( | double | x | ) |
sin / cos from arithmetic only (range reduction + Taylor series), so the native and WASM builds compute bit-identical orbits: libm's transcendental functions are not guaranteed to round the same on both.
| double ahn_web::detCos | ( | double | x | ) |