|
AntHocNet 2.6.1
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
|
The energy-aware metric (#145, the BeeAdHoc / EEABR line): a hop costs 1 / e, where e is the residual energy fraction of the node that forwards over it, floored so an almost-empty node costs a large but finite amount. More...
#include <anthocnet/core/link_metric.h>
Public Member Functions | |
| double | pheromone (const LinkObservation &o) const override |
| bool | usesLinkQuality () const override |
| True when the metric's per-hop cost is a link-quality cost (#181) rather than a time. | |
| double | hopCost (const HopSignals &s) const override |
| The cost of one of this node's own links, for a metric that usesLinkQuality(): the per-hop value a node writes into the hop a backward ant came over, and adds wherever it extends a path by one hop. | |
Public Member Functions inherited from anthocnet::core::ILinkMetric | |
| virtual | ~ILinkMetric ()=default |
The energy-aware metric (#145, the BeeAdHoc / EEABR line): a hop costs 1 / e, where e is the residual energy fraction of the node that forwards over it, floored so an almost-empty node costs a large but finite amount.
A route costs the sum over its relays, and the pheromone is the inverse, so traffic shifts away from drained nodes before they die. Each node prices only its own hop, from its own battery, so nothing new travels on the wire (the per-hop scalar of ADR-0009, as for SINR, ADR-0024). Unknown energy (NaN) costs 1: the metric then degrades to hop count, never to a wrong ranking.
Definition at line 105 of file link_metric.h.
|
inlineoverridevirtual |
Implements anthocnet::core::ILinkMetric.
Definition at line 106 of file link_metric.h.
References anthocnet::core::LinkObservation::hops, and anthocnet::core::LinkObservation::pathTime.
|
inlineoverridevirtual |
True when the metric's per-hop cost is a link-quality cost (#181) rather than a time.
The router then has each node put its own estimate of the link it received a backward ant over into that hop of the retraced path (thesis §4.2.2: "the reactive backward ant reads at each node i the local estimate c_i^n of the cost to go from i to the next hop n"), and uses the same link cost wherever it adds one hop to a path.
Reimplemented from anthocnet::core::ILinkMetric.
Definition at line 110 of file link_metric.h.
|
inlineoverridevirtual |
The cost of one of this node's own links, for a metric that usesLinkQuality(): the per-hop value a node writes into the hop a backward ant came over, and adds wherever it extends a path by one hop.
Never called for a metric that does not use link quality.
Reimplemented from anthocnet::core::ILinkMetric.
Definition at line 111 of file link_metric.h.
References anthocnet::core::HopSignals::energyFloor, and anthocnet::core::HopSignals::residualEnergy.