[Ns-bugs] [Bug 1073] New: Changing base station position in wimax-multicast has no effect
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Tue Mar 15 03:09:36 PDT 2011
http://www.nsnam.org/bugzilla/show_bug.cgi?id=1073
Summary: Changing base station position in wimax-multicast has
no effect
Product: ns-3
Version: ns-3.10
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P5
Component: examples
AssignedTo: ns-bugs at isi.edu
ReportedBy: sk.anirudh at gmail.com
Estimated Hours: 0.0
Hi
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) *
2000));
SSPosAllocator[i]->SetY (UniformVariable ((i / 40) * 2000, (i / 40 + 1) *
2000));
SSPosition[i]->SetAttribute ("PositionAllocator", PointerValue
(SSPosAllocator[i]));
SSPosition[i]->SetAttribute ("Speed", RandomVariableValue
(UniformVariable (10.3, 40.7)));
SSPosition[i]->SetAttribute ("Pause", RandomVariableValue
(ConstantVariable (0.01)));
ss[i] = ssDevs.Get (i)->GetObject<SubscriberStationNetDevice> ();
ss[i]->SetModulationType (WimaxPhy::MODULATION_TYPE_QAM16_12);
ssNodes.Get (i)->AggregateObject (SSPosition[i]);
}
And both of these are overridden further down in the code with the lines:
mobility.Install (bsNodes);
which overrides base station location
and
mobility.Install (ssNodes);
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
mailing list