RL handover environment (Gym)
RL handover environment on the measured NR stack: observations from measured KPM (RRC RSRP margin to the best neighbor, SINR, PRB use), a goodput reward, and handover actions actuated through the RIC. The dashboard runs it with gym=1 and a paired Python agent (greedy A3-margin policy); gym=0 steps an in-process policy instead.
Parameters (8)
| Parameter | Default | Unit | Description |
|---|---|---|---|
Simulation duration --duration | 60 | s | Simulation duration (s) (set for the paired Python agent; binary default 30.0) |
Number of ground UEs --numUes | 2 | - | Number of ground UEs |
Number of satellites --numSats | 3 | - | Number of satellites (serving plus candidates) |
Wait for a Python RL agent over ns3-ai --gym | true | - | Wait for a Python RL agent over ns3-ai (the dashboard starts the paired agent); 0 = step the in-process policy (set for the paired Python agent; binary default false) |
Kpm --kpm | measured | - | measured (KPM from the NR stack, default) or legacy (injected reports, derived candidates) |
In-process policy when gym=0 --policy | greedy | - | In-process policy when gym=0: stay, greedy (measured A3 margin) or forceHo |
Time of the single commanded handover --forceHoAt | 10 | s | forceHo: time of the single commanded handover (s) |
RSRP margin that triggers a handover --a3OffsetDb | 3 | dB | greedy policy: RSRP margin that triggers a handover (dB) |
Reproduce it locally
With the example's built-in defaults, in the public Docker image:
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "oran-ntn-gym-handover-example"With the same parameters the browser run form starts from:
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "oran-ntn-gym-handover-example --duration=60 --numUes=2 --numSats=3 --gym=true --kpm=measured --policy=greedy --forceHoAt=10 --a3OffsetDb=3"More O-RAN over NTN examples
- RIC, slicing and KPIs on one cell
- Latency by platform class
- Cross-domain closed loop
- E2 exchange over SCTP
- Post-disaster emergency slice
- Control over intermittent feeder links
- Constellation-scale RIC scenario
- Satellite payload options compared
- Near-RT RIC on a measured LEO cell
- mMIMO beam xApp closed loop
- RIC placement comparison
Cite this
If you use this module, please cite the article that describes the toolkit: doi:10.1109/OJCOMS.2026.3745010.
M. Uzair, B. G. Aldahlan, A. A. Albar, H. Althumali and A. Alghammas, "ns3-ntn-toolkit: An integrated ns-3 platform for 6G non-terrestrial networks," IEEE Open Journal of the Communications Society, vol. 7, pp. 13440-13467, 2026, doi: 10.1109/OJCOMS.2026.3745010.
@article{uzair2026ns3ntntoolkit,
author = {Uzair, Muhammad and Aldahlan, Bassma G. and Albar, Ali A. and
Althumali, Huda and Alghammas, Adnan},
title = {ns3-ntn-toolkit: An Integrated ns-3 Platform for 6G
Non-Terrestrial Networks},
journal = {IEEE Open Journal of the Communications Society},
volume = {7},
pages = {13440--13467},
year = {2026},
doi = {10.1109/OJCOMS.2026.3745010}
}