10#ifndef ANTHOCNET_CORE_PHEROMONE_ENGINE_H
11#define ANTHOCNET_CORE_PHEROMONE_ENGINE_H
28 double reinforce(
double phValue,
double phUpdate)
const;
double reinforce(double phValue, double phUpdate) const
gamma * phValue + (1 - gamma) * phUpdate
void evaporateAll(PheromoneTable &table, double dtSeconds) const
Time-proportional aging of every regular AND virtual link by alpha^(dt/interval), pruning links below...
void updateRegular(PheromoneTable &table, NodeAddress dest, NodeAddress neighbor, double phUpdate) const
Reinforce the (dest, neighbor) regular link travelled by an ant.
double evaporate(double phValue) const
phValue - (1 - alpha) * phValue
void updateVirtual(PheromoneTable &table, const AntMessage &hello) const
Reinforce the virtual links advertised by a hello.
void cleanNeighbor(PheromoneTable &table, NodeAddress neighbor) const
Prune a vanished neighbour from both tables.
PheromoneEngine(const Config &config)
bool hasRegularDestination(const PheromoneTable &table, NodeAddress dest) const
True if any neighbour still holds usable pheromone for this dest.
std::int32_t NodeAddress
Network-layer node address.
AntHistoryTracker: (src, seqNum) duplicate detection.
Complete, copyable description of an ant packet.