77 NS_ASSERT(m_rows > 0);
78 NS_ASSERT(m_columns > 0);
87 MobilityHelper mobility;
88 Ptr<ListPositionAllocator> bsPos = CreateObject<ListPositionAllocator>();
89 Ptr<ListPositionAllocator> utPos = CreateObject<ListPositionAllocator>();
94 uint32_t bsN =
m_bs.GetN();
95 for (uint32_t i = 0; i < m_rows; ++i)
97 for (uint32_t j = 0; j < m_columns; ++j)
104 Vector pos(m_initialPos);
107 pos.x = m_initialPos.x + (j * m_horizontalBsDistance);
108 pos.y = m_initialPos.y + (i * m_verticalBsDistance);
110 NS_LOG_DEBUG(
"GNB Position: " << pos);
118 m_x->SetAttribute(
"Min", DoubleValue(0.0));
119 m_x->SetAttribute(
"Max", DoubleValue(m_length));
120 m_y->SetAttribute(
"Min", DoubleValue(0.0));
121 m_y->SetAttribute(
"Max", DoubleValue(m_height));
125 uint32_t utN =
m_ut.GetN();
127 for (uint32_t i = 0; i < utN; ++i)
129 Vector pos = bsPos->GetNext();
131 pos.x += m_x->GetValue();
132 pos.y += m_y->GetValue();
135 NS_LOG_DEBUG(
"UE Position: " << pos);
141 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
142 mobility.SetPositionAllocator(bsPos);
143 mobility.Install(
m_bs);
145 mobility.SetPositionAllocator(utPos);
146 mobility.Install(
m_ut);