Mobility with P2P links

28 views
Skip to first unread message

John Scott

unread,
Jan 10, 2018, 10:52:06 PM1/10/18
to ns-3-users
hi,

I know it sounds weird at first, but since this is a simulator I wonder if it might support this scenario.
I want to install several P2P links connecting to one node, setting the link parameters (bandwidth and latency). However, I want to make these nodes mobile (except the server). My scenario compiles and runs, but my computer runs out of memory.
Here's the snippet of the code:

PointToPointHelper p2ph;
NetDeviceContainer p2pDevices;
p2pDevices
= p2ph.Install (c);

MobilityHelper mobility;  
mobility
.SetPositionAllocator ("ns3::GridPositionAllocator",
                               
"MinX", DoubleValue (0.0),
                               
"MinY", DoubleValue (0.0),
                               
"DeltaX", DoubleValue (20.0),
                               
"DeltaY", DoubleValue (20.0),
                               
"GridWidth", UintegerValue (3),
                               
"LayoutType", StringValue ("RowFirst"));
 
mobility
.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
                           
"Mode", StringValue ("Time"),
                           
"Time", StringValue ("2s"),
                           
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"),
                           
"Bounds", StringValue ("0|100|0|100"));
mobility
.Install(c);

Thanks

Konstantinos

unread,
Jan 11, 2018, 4:52:40 AM1/11/18
to ns-3-users
Hi John,

Please provide more details regarding your scenario (e.g. number of nodes) and your system.
A test scenario would be helpful to potentially reproduce the error.

Adding a mobility model should not cause that excessive memory usage so that you would run out of memory.
It could be other parameters, e.g. number of nodes and packets (event) generated per second.

Just a final comment, adding a mobility model in a wired network simply adds complexity in your code without ANY benefit for your results/simulation.
There would be no change in the delay/throughput etc.
Reply all
Reply to author
Forward
0 new messages