Hi all,
Following up on MR
!407, I've opened the next merge request for this GSoC project.
MR
!421 - End-to-end example driving the NR scheduler over the ns3-ai message interface
This is the example scenario I held back from MR
!407, and it completes the bridge: MR
!387 introduced the shared-memory structs, MR
!395 wired them into the live scheduling loop, MR
!407 added the Python access layer, and this MR puts the whole path to work in a runnable example. It reproduces the gsoc-nr-rl-based-sched.cc scenario (GSoC 2024, Hyerin Kim) with a single change: when the scheduler algorithm is "Ai", the observation/action exchange goes through the ns3-ai shared memory instead of OpenGym (ZMQ + Protobuf). The main additions are:
1. nr-ai-sched.cc - the scenario, binding NrMacSchedulerAiNs3MsgInterfaceEnv to the scheduler's NotifyCbDlMsg attribute. The AI path is behind HAVE_NS3_AI, so without the ai module the Qos/PF/RR baselines still build and run standalone. Knobs, seed handling and the per-flow FlowMonitor output match gsoc-nr-rl-based-sched.cc, so the two transports are comparable flow by flow.
2. nr-ai-sched.py - the driver. It creates the shared memory, launches the simulation, and answers each handshake with one weight per UE through the MR
!407 bindings. It is a smoke test rather than an RL agent: the default heuristic weights each UE by its total bearer backlog, --constant weights all UEs equally, and --verbose N dumps the first N exchanges as JSON for checking the shared-memory layout.
3. CMake integration - built only when the ai module is enabled, with the example depending on the binding target so one build produces both halves. The setup documentation covers the build steps and the failure modes worth knowing about.
With this merged, the message-interface path is complete end to end and can be compared against the OpenGym baseline on identical scenarios. I'd welcome feedback on the example structure and the knobs exposed to the Python side.
Regards,
Anuka Hettiarachchi
University of Peradeniya