Skip to content
Example · AI / MARL

Multi-BSS Wi-Fi with a learning agent

Dense 802.11ax residential deployment with overlapping BSSs; with drl=true a Python agent tunes the CCA sensitivity. Measure throughput and overlapping transmissions.

ns3ai_multibss about 60 s on the server

Parameters (26)

Defaults are the values the browser run form starts from. Pass any of them on the command line as --name=value.

ParameterDefaultUnitDescription
Packet size
--pktSize
1500bytesPacket size (bytes)
RNG run number
--rng
2-RNG run number (set for the paired Python agent; binary default 1)
The type of application to set
--app
setup-done-The type of application to set. (constant,bursty,bursty-trace,setup-setup-done) (set for the paired Python agent; binary default constant)
Propagation loss model
--prop
tgax-Propagation loss model (empty = example default) (set for the paired Python agent; binary default empty)
Use a ring topology
--ring
0-Use a ring topology
CCA sensitivity threshold
--ccaSensitivity
-82dBmCCA sensitivity threshold (dBm)
Duration of each trial
--duration
5sDuration of each trial (s) (set for the paired Python agent; binary default 100.0)
Enable/disable PCAP tracing
--pcap
false-Enable/disable PCAP tracing
Allowed: true, false
Enable/disable automatic choice of MCS
--autoMCS
true-Enable/disable automatic choice of MCS (set for the paired Python agent; binary default false)
Allowed: true, false
Folder of the bursty traffic traces
--traceFolder
src/vr-app/model/BurstGeneratorTraces/-Folder of the bursty traffic traces
Bursty traffic trace file name
--traceFile
ge_cities_20mbps_30fps.csv-Bursty traffic trace file name
Number of stations per BSS
--networkSize
4-Number of stations per BSS (set for the paired Python agent; binary default 0.0)
Wi-Fi standard
--standard
11ax-Wi-Fi standard: 11a, 11b, 11g, 11n, 11ac or 11ax
Number of access points
--apNodes
4-Number of access points (set for the paired Python agent; binary default 0)
Constant PHY mode used to transmit frames
--phyMode
OfdmRate54Mbps-Constant PHY mode used to transmit frames
Operating band
--frequency
5GHzOperating band (GHz): 2.4, 5 or 6
Enable the calculation of overlapping packets and their source
--overlapStats
false-Enable the calculation of overlapping packets and their source
Allowed: true, false
Channel width
--channelWidth
20MHzChannel width (MHz), 802.11n/ac/ax only
Guard interval
--gi
800nsGuard interval (ns): 800 or 400 for 11n/ac; 800, 1600 or 3200 for 11ax (set for the paired Python agent; binary default 3200)
Maximum MPDUs per A-MPDU
--maxMpdus
5-Maximum MPDUs per A-MPDU (0 = no aggregation) (set for the paired Python agent; binary default 0)
AP to station distance
--distance
0.001mAP to station distance (m)
Transmit power of all nodes
--txPower
16dBmTransmit power of all nodes (dBm)
Packet interval per socket
--pktInterval
5000usPacket interval per socket (us) (set for the paired Python agent; binary default 1000)
Side of the deployment box
--boxsize
25mSide of the deployment box (m) (set for the paired Python agent; binary default 10)
Let the Python DRL agent set the CCA sensitivity
--drl
true-Let the Python DRL agent set the CCA sensitivity (set for the paired Python agent; binary default false)
Allowed: true, false
Multi-BSS configuration file
--configFile
contrib/ns3-ai-ntn/examples/multi-bss/config.txt-Multi-BSS configuration file (set for the paired Python agent; binary default foo.config.txt)

Reproduce it locally

With the example's built-in defaults, in the public Docker image:

shell
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "ns3ai_multibss"

With the same parameters the browser run form starts from:

shell
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "ns3ai_multibss --pktSize=1500 --rng=2 --app=setup-done --prop=tgax --ring=0 --ccaSensitivity=-82 --duration=5 --pcap=false --autoMCS=true --traceFolder=src/vr-app/model/BurstGeneratorTraces/ --traceFile=ge_cities_20mbps_30fps.csv --networkSize=4 --standard=11ax --apNodes=4 --phyMode=OfdmRate54Mbps --frequency=5 --overlapStats=false --channelWidth=20 --gi=800 --maxMpdus=5 --distance=0.001 --txPower=16 --pktInterval=5000 --boxsize=25 --drl=true --configFile=contrib/ns3-ai-ntn/examples/multi-bss/config.txt"

List every argument with ./ns3 run "ns3ai_multibss --PrintHelp".

More AI / MARL examples

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.

BibTeX
@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}
}