Hello every one, I am using the following code:-
MobilityHelper mobility;
/*uniform disc position allocator*/
/*ObjectFactory pos;
pos.SetTypeId ("ns3::UniformDiscPositionAllocator");
pos.Set ("rho", DoubleValue (50.0));
pos.Set ("X", DoubleValue (0.0));
pos.Set ("Y", DoubleValue (0.0));
std::ostringstream speedConstantRandomVariableStream;
speedConstantRandomVariableStream << "ns3::ConstantRandomVariable[Constant="
<< m_nodeSpeed
<< "]";
Ptr <PositionAllocator> taPositionAlloc = pos.Create ()->GetObject <PositionAllocator> ();
mobility.SetPositionAllocator (taPositionAlloc);
mobility.SetMobilityModel ("ns3::RandomWaypointMobilityModel", "Speed", StringValue (speedConstantRandomVariableStream.str ()),
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=2.0]"), "PositionAllocator", PointerValue (taPositionAlloc));*/
mobility.SetPositionAllocator ("ns3::UniformDiscPositionAllocator",
"rho", DoubleValue (50.0),
"X", DoubleValue (0.0),
"Y",DoubleValue (0.0));
mobility.SetMobilityModel ("ns3::RandomWaypointMobilityModel",
"Speed",StringValue ("ns3::UniformRandomVariable[Min=0.4|Max=10.0]"),
"Pause",StringValue ("ns3::ConstantRandomVariable[Constant=2.0]"),
"PositionAllocator", StringValue ("ns3::UniformDiscPositionAllocator"));
mobility.Install (nodes);
my question is that at first part I am using pointer value in random way point mobility model and analyzing the result at pyviz its working.
But in the later part when I am passing the string value in random way point mobility model and analyzing the result using pyviz then it is found that all nodes gets collected at position (0,0) and their is no movement in nodes.