Hello ,
I have a couple of issues with netanim
1) I'm using a Steady state random waypoint mobility model and trying to allocate an area of 1500x300 for simulation. I have enabled netanim in the code and when I open the .xml file using netanim, the boundaries it show are 1457x298.9. 298.9 is close enough to 300 but I'm not quite sure why I have the grid boundary at 1457. I have gone through the posts in the user group and tried to hard code the simulation boundaries as mentioned there but it didn't reflect in the netanim. The code I used to change the simulationBoundaries is below
void
AnimatorScene::setSimulationBoundaries (QPointF minPoint, QPointF maxPoint)
{
....
m_sceneMinPoint = QPointF(0, 0);
m_sceneMaxPoint = QPointF(1500, 300);
setSceneRect (QRectF (m_sceneMinPoint, m_sceneMaxPoint));
}
The Steady State Random Waypoint mobility code I used is
xPos="ns3::UniformRandomVariable[Min=0|Max=1500];
yPos="ns3::UniformRandomVariable[Min=0|Max=300];
xLength =1500; yLength =300;
case STEADYSTATERANDOMWAYPOINT:
{
NS_LOG_INFO ("Mobility model is STEADY-STATE-RANDOMWAYPOINT with Rectangle Position allocator.\nNode speed = "
<< speed <<"\nNode pause time = " << pause <<"\n");
pos.SetTypeId ("ns3::RandomRectanglePositionAllocator");
pos.Set ("X", StringValue (xPos));
pos.Set ("Y", StringValue (yPos));
//Ptr<PositionAllocator> taPositionAlloc1 = pos.Create ()->GetObject<PositionAllocator> ();
adhocMobility.SetMobilityModel ("ns3::SteadyStateRandomWaypointMobilityModel",
"MinSpeed", DoubleValue (double(0.01)),
"MaxSpeed", DoubleValue (double(nodeSpeed)),
//"MinPause", DoubleValue (pauseTime),
//"MaxPause", DoubleValue (pauseTime),
"MinPause", DoubleValue (double(pauseTime)),
"MaxPause", DoubleValue (double(pauseTime)),
"MinX", DoubleValue (double(0)),
"MaxX", DoubleValue (double(xLength)),
"MinY", DoubleValue (double(0.0)),
"MaxY", DoubleValue (double(yLength)));
//"PositionAllocator", PointerValue (taPositionAlloc1));
}
break;
2) The other issue I was facing was with the time slider and timing. I ran the simulation for 1000 seconds and made sure that the simulation was actually running for 1000 seconds but the netanim doesn't show animation beyond 69 seconds. Then I checked the group for similar issues and found that disabling packet trace could make it work. So I disabled packet trace and then rerun it but this time the animation was only until 112 seconds.
I used "void SkipPacketTracing ();" to skip packet tracing.
Also, I found out that the .xml file size is around 5.5 mb no matter the length of the simulation be 100 seconds or 1000 seconds. Is there any limit to the size of the .xml file that is being generated? Also if I'm making changes in the netanim source files the changes are not being reflected in the scenario. Am I missing something? By the way I'm using netanim 3.105 but I tried with 3.107 too but these issues persist.
Thank you for any help