How mehdibp/agenet works
AgeNet is a decentralized reinforcement-learning framework for transmission-power control in vehicular ad-hoc networks. The main workflow advances a traffic/network simulation, forms vehicle observations and neighbor connectivity, lets each agent choose a transmission-radius action, then evaluates connectivity, power, and learning outcomes. The repository also supports handcrafted and SUMO environments, alternative action policies, and OMNeT++ integration. Edges follow shown imports, calls, or README descriptions; some unsampled subsystem links are omitted rather than inferred.
Main entry points: agent.py Vehicle agent · AgeNetCoordinator.cc Cycle coordinator · core.py Python bridge client · exporters.py Result exporter
Components 31
Simulation environments
- Agent simulator
AgeNet/core/simulation.py - Environment interface
AgeNet/environments/base.py - Simple environment
AgeNet/environments/simple.py - SUMO environment
AgeNet/environments/sumo.py - OMNeT environment
AgeNet/environments/omnetpp.py - Mobility dynamics
AgeNet/environments/physics/mobility.py
Agent control
- Vehicle agent
AgeNet/core/agent.py - Neighbor discovery
AgeNet/communication/neighbor_finder.py - Action policies
AgeNet/core/action_policies/base.py - DQN brains
AgeNet/learning/brains/base_brain.py - State extraction
AgeNet/learning/state.py - Hamiltonian reward
AgeNet/learning/hamiltonian.py - Radius control
AgeNet/learning/radius_controller.py
OMNeT integration
- Python bridge client
omnet_bridge/core.py - Socket connection
omnet_bridge/connection.py - Cached state domains
omnet_bridge/domains.py - Wire protocol
omnet_bridge/protocol.py - Cycle coordinator
omnetpp/src/coordination/AgeNetCoordinator.cc - Vehicle application
omnetpp/src/applications/AgeNetApp.h - Vehicle state
omnetpp/src/applications/VehicleState.h - C++ protocol
omnetpp/src/bridge/AgentProtocol.h - Status message
omnetpp/src/messages/VehicleStatusMessage_m.h - Transmit power model
omnetpp/src/radio/TxPowerModel.h - Console logging
omnetpp/src/logging/ConsoleLog.h
Evaluation and results
- Network topology
AgeNet/analyses/topology.py - Network metrics
AgeNet/analyses/metrics.py - Network visualizer
AgeNet/analyses/visualization.py - Result exporter
AgeNet/experiments/exporters.py
Other components
- Experiment operator
- SUMO traffic simulator
- OMNeT++ simulator
Connections 32
- Experiment operator → Agent simulator: runs episodes
- Agent simulator → Vehicle agent: advances agents
AgeNet/core/simulation.py - Agent simulator → Environment interface: steps environment
AgeNet/core/simulation.py - Simple environment → Environment interface: extends
AgeNet/environments/simple.py - Simple environment → Mobility dynamics: moves entities
AgeNet/environments/simple.py - SUMO environment → SUMO traffic simulator: uses traffic
- OMNeT environment → Python bridge client: uses bridge
AgeNet/environments/omnetpp.py - OMNeT environment → OMNeT++ simulator: connects simulator
- Vehicle agent → Neighbor discovery: finds neighbors
AgeNet/core/agent.py - Vehicle agent → Action policies: selects policy
AgeNet/core/agent.py - Vehicle agent → DQN brains: creates brain
AgeNet/core/agent.py - Vehicle agent → State extraction: extracts state
AgeNet/core/agent.py - Vehicle agent → Hamiltonian reward: computes reward
AgeNet/core/agent.py - Vehicle agent → Radius control: updates radius
AgeNet/core/agent.py - Python bridge client → Socket connection: exchanges data
omnet_bridge/core.py - Python bridge client → Cached state domains: exposes snapshots
omnet_bridge/core.py - Python bridge client → Wire protocol: encodes messages
omnet_bridge/core.py - Socket connection → Wire protocol: uses framing
omnet_bridge/connection.py - Cycle coordinator → Vehicle application: collects vehicle data
omnetpp/src/coordination/AgeNetCoordinator.cc - Cycle coordinator → C++ protocol: builds observations
omnetpp/src/coordination/AgeNetCoordinator.cc - Cycle coordinator → Transmit power model: converts radius
omnetpp/src/coordination/AgeNetCoordinator.cc - Cycle coordinator → OMNeT++ simulator: runs cycles
- Cycle coordinator → Python bridge client: exchanges decisions
- Vehicle application → Vehicle state: uses state
omnetpp/src/applications/AgeNetApp.h - Vehicle application → Status message: uses messages
omnetpp/src/applications/AgeNetApp.cc - Vehicle application → Console logging: logs activity
omnetpp/src/applications/AgeNetApp.cc - C++ protocol → Vehicle state: encodes state
omnetpp/src/bridge/AgentProtocol.h - Result exporter → Network topology: builds adjacency
AgeNet/experiments/exporters.py - Result exporter → Network metrics: computes metrics
AgeNet/experiments/exporters.py - Result exporter → Vehicle agent: collects outcomes
AgeNet/experiments/exporters.py - Network visualizer → Network topology: draws network
AgeNet/analyses/visualization.py - Result exporter → Experiment operator: exports results