[Ns-bugs] [Bug 1073] New: Changing base station position in wimax-multicast has no effect
code at nsnam.ece.gatech.edu
Tue Mar 15 03:09:36 PDT 2011
Summary: Changing base station position in wimax-multicast has
AssignedTo: ns-bugs at isi.edu
ReportedBy: sk.anirudh at gmail.com
Estimated Hours: 0.0
I was trying out the wimax-multicast program from the examples/wimax directory
and changing the position of the base station seems to have no effect. I later
figured this was because a line in the file wimax-multicast.cc calls
mobility.Install on both the base station node and the service station nodes.
This overrides the mobility information set at the top of the file.
After commenting out the lines corresponding to mobility.Install the program
works fine ie it responds to changes in base station location.
After I remove the mobility.Install lines, when I set the base station's
position to 1000000 instead of 1000, no packets are received because it is out
of range which is the correct behaviour.
I have reproduced code snippets below to help isolate the bug:
This is the part where the mobility information is set for base station:
BSPosition = CreateObject<ConstantPositionMobilityModel> ();
BSPosition->SetPosition (Vector (1000000, 0, 0));
bsNodes.Get (0)->AggregateObject (BSPosition);
Here it is set for service stations:
for (int i = 0; i < nbSS; i++)
SSPosition[i] = CreateObject<RandomWaypointMobilityModel> ();
SSPosAllocator[i] = CreateObject<RandomRectanglePositionAllocator> ();
SSPosAllocator[i]->SetX (UniformVariable ((i / 40) * 2000, (i / 40 + 1) *
SSPosAllocator[i]->SetY (UniformVariable ((i / 40) * 2000, (i / 40 + 1) *
SSPosition[i]->SetAttribute ("PositionAllocator", PointerValue
SSPosition[i]->SetAttribute ("Speed", RandomVariableValue
(UniformVariable (10.3, 40.7)));
SSPosition[i]->SetAttribute ("Pause", RandomVariableValue
ss[i] = ssDevs.Get (i)->GetObject<SubscriberStationNetDevice> ();
ssNodes.Get (i)->AggregateObject (SSPosition[i]);
And both of these are overridden further down in the code with the lines:
which overrides base station location
which overrides service station information.
This overriding renders the initial location information irrelevant.
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs