Adhoc MAC giving non-sense results

50 views
Skip to first unread message

Jiaming Wang

unread,
Mar 13, 2020, 6:47:01 PM3/13/20
to ns-3-users
Hello everyone,

Currently I'm working with NS3-3.30 on AdhocWifiMac, trying to test the capacity of a mesh network with one gateway.
That is, I wanna test how much traffic from a single source to each node that the network can hold.

Attached is my code and configuration files.
"simple-adhoc.cc" is the main file, and please put it in scratch folder.
"locaitionFile.txt" and "routingFile.txt" stores the location and static routing for this network, and please put it in NS3 home folder.

Please use the following command to run the code:
./waf --run "simple-adhoc --startTime=60 --totalTime=120 --dataMode=HeMcs1 --datarate=2e3 --clNum=20 --ratio=0.375"

For these settings, the simulation has a mesh network of 21 nodes, installed with AdhocWifiMac.
This is a tree mesh with 3 levels and each level with 4 children. UDP traffic is sent from root to each node.
The UDP applicaiton is OnOffApplication, with on and off time both exponential random variable.
The program will output the real time throughput for each node every 1 second from 60s to 120s after the simulation started.
For the first 60s, the traffic for each node is low enough to test connectivity, and it will change to required data rate from 60s, 
which is specified by "datarate" input in command.

So, here is the problem for the results:
./waf --run "simple-adhoc --startTime=60 --totalTime=120 --dataMode=HeMcs1 --datarate=2e3 --clNum=20 --ratio=0.375"
This command can give trustable results, i.e. it works properly both before 60s and after 120s.
But if the datarate is higher:
./waf --run "simple-adhoc --startTime=60 --totalTime=120 --dataMode=HeMcs1 --datarate=2e6 --clNum=20 --ratio=0.375"
It can give correct results before 60s, but after 60s throughput are all zeros.

Although the problem case has much more traffic than network capacity, I already add enough randomness in network.
Please help me with the points that I'm not noticing. Thank you very much!

Jiaming
simple-adhoc.cc
locationFile.txt
routingFile.txt
Reply all
Reply to author
Forward
0 new messages