[ndnSIM] Waypoint Mobility Model
Junxiao Shi
shijunxiao at email.arizona.edu
Wed May 31 10:50:11 PDT 2017
Hi Anthony
While I haven't used waypoint mobility model myself, I see an obvious
problem in your snippet:
The variable 'path1' isn't associated with 'walk' or 'walker' at all. It's
initialized but never used.
Yours, Junxiao
On May 31, 2017 10:40, "Anthony Dowling" <dowlinah at clarkson.edu> wrote:
Hello All,
In my research, I am working with ndnSIM, and need to use the Waypoint
Mobility Model, and after reading the documentation, I believe my code is
close, because it compiles, however, when I run it, the node doesn't move
at all. How can I make the Waypoint Mobility Model work correctly? Code is
below.
//#############################################
MobilityHelper walk;
// sets up the initial position of the walker
walk.SetPositionAllocator ("ns3::GridPositionAllocator",
"MinX", DoubleValue (50.0),
"MinY", DoubleValue (20.0),
"DeltaX", DoubleValue (20.0),
"DeltaY", DoubleValue (20.0),
"GridWidth", UintegerValue (3),
"LayoutType", StringValue ("RowFirst"));
ns3::WaypointMobilityModel path1;
path1.AddWaypoint( Waypoint( Seconds(5.0) , Vector3D( 0.0, 0.0, 0.0) ));
path1.AddWaypoint( Waypoint( Seconds(10.0) , Vector3D( 40.0, 20.0, 0.0)
));
walk.SetMobilityModel("ns3::WaypointMobilityModel");
walk.Install(walker);
//###################################################################
Thanks for your time,
Anthony Dowling
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170531/d829c367/attachment.html>
More information about the ndnSIM
mailing list