49 NS_LOG_INFO(
"creating LenaTestPfFfMacSchedulerSuite");
51 bool errorModel =
false;
69 TestCase::Duration::EXTENSIVE);
71 TestCase::Duration::EXTENSIVE);
73 TestCase::Duration::EXTENSIVE);
75 TestCase::Duration::EXTENSIVE);
77 TestCase::Duration::EXTENSIVE);
93 TestCase::Duration::EXTENSIVE);
95 TestCase::Duration::EXTENSIVE);
97 TestCase::Duration::EXTENSIVE);
99 TestCase::Duration::EXTENSIVE);
101 TestCase::Duration::EXTENSIVE);
117 TestCase::Duration::EXTENSIVE);
119 TestCase::Duration::EXTENSIVE);
121 TestCase::Duration::EXTENSIVE);
123 TestCase::Duration::EXTENSIVE);
125 TestCase::Duration::EXTENSIVE);
141 TestCase::Duration::EXTENSIVE);
143 TestCase::Duration::EXTENSIVE);
145 TestCase::Duration::EXTENSIVE);
147 TestCase::Duration::EXTENSIVE);
149 TestCase::Duration::EXTENSIVE);
165 TestCase::Duration::EXTENSIVE);
167 TestCase::Duration::EXTENSIVE);
169 TestCase::Duration::EXTENSIVE);
171 TestCase::Duration::EXTENSIVE);
173 TestCase::Duration::EXTENSIVE);
178 TestCase::Duration::QUICK);
182 std::vector<double> dist;
184 dist.push_back(4800);
185 dist.push_back(6000);
186 dist.push_back(10000);
187 dist.push_back(20000);
188 std::vector<uint32_t> estThrPfDl;
189 estThrPfDl.push_back(90000);
190 estThrPfDl.push_back(37000);
191 estThrPfDl.push_back(37000);
192 estThrPfDl.push_back(17400);
193 estThrPfDl.push_back(17400);
194 std::vector<uint32_t> estThrPfUl;
195 estThrPfUl.push_back(469000);
196 estThrPfUl.push_back(157000);
197 estThrPfUl.push_back(125000);
198 estThrPfUl.push_back(85000);
199 estThrPfUl.push_back(26000);
201 TestCase::Duration::QUICK);
263 lteHelper->SetAttribute(
"PathlossModel",
StringValue(
"ns3::FriisSpectrumPropagationLossModel"));
273 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
274 mobility.Install(enbNodes);
275 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
276 mobility.Install(ueNodes);
281 lteHelper->SetSchedulerType(
"ns3::PfFfMacScheduler");
283 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
284 ueDevs = lteHelper->InstallUeDevice(ueNodes);
287 lteHelper->Attach(ueDevs, enbDevs.
Get(0));
292 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
296 enbPhy->SetAttribute(
"TxPower",
DoubleValue(30.0));
297 enbPhy->SetAttribute(
"NoiseFigure",
DoubleValue(5.0));
300 for (
int i = 0; i <
m_nUser; i++)
304 mm->SetPosition(Vector(
m_dist, 0.0, 0.0));
308 uePhy->SetAttribute(
"NoiseFigure",
DoubleValue(9.0));
311 double statsStartTime = 0.300;
312 double statsDuration = 0.6;
313 double tolerance = 0.1;
316 lteHelper->EnableMacTraces();
317 lteHelper->EnableRlcTraces();
328 std::vector<uint64_t> dlDataRxed;
329 for (
int i = 0; i <
m_nUser; i++)
334 dlDataRxed.push_back(rlcStats->GetDlRxData(imsi, lcId));
335 NS_LOG_INFO(
"\tUser " << i <<
" imsi " << imsi <<
" bytes rxed " << (
double)dlDataRxed.at(i)
336 <<
" thr " << (
double)dlDataRxed.at(i) / statsDuration <<
" ref "
345 for (
int i = 0; i <
m_nUser; i++)
350 " Unfair Throughput!");
357 std::vector<uint64_t> ulDataRxed;
358 for (
int i = 0; i <
m_nUser; i++)
364 ulDataRxed.push_back(rlcStats->GetUlRxData(imsi, lcId));
365 NS_LOG_INFO(
"\tUser " << i <<
" imsi " << imsi <<
" bytes rxed " << (
double)ulDataRxed.at(i)
366 <<
" thr " << (
double)ulDataRxed.at(i) / statsDuration <<
" ref "
375 for (
int i = 0; i <
m_nUser; i++)
380 " Unfair Throughput!");
442 lteHelper->SetAttribute(
"PathlossModel",
StringValue(
"ns3::FriisSpectrumPropagationLossModel"));
452 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
453 mobility.Install(enbNodes);
454 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
455 mobility.Install(ueNodes);
460 lteHelper->SetSchedulerType(
"ns3::PfFfMacScheduler");
462 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
463 ueDevs = lteHelper->InstallUeDevice(ueNodes);
466 lteHelper->Attach(ueDevs, enbDevs.
Get(0));
471 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
475 enbPhy->SetAttribute(
"TxPower",
DoubleValue(30.0));
476 enbPhy->SetAttribute(
"NoiseFigure",
DoubleValue(5.0));
479 for (
int i = 0; i <
m_nUser; i++)
483 mm->SetPosition(Vector(
m_dist.at(i), 0.0, 0.0));
487 uePhy->SetAttribute(
"NoiseFigure",
DoubleValue(9.0));
490 double statsStartTime = 0.300;
491 double statsDuration = 0.4;
492 double tolerance = 0.1;
495 lteHelper->EnableRlcTraces();
503 std::vector<uint64_t> dlDataRxed;
504 double totalData = 0;
505 double totalEstThrPf = 0;
506 for (
int i = 0; i <
m_nUser; i++)
512 dlDataRxed.push_back(rlcStats->GetDlRxData(imsi, lcId));
513 totalData += (
double)dlDataRxed.at(i);
514 NS_LOG_INFO(
"\tUser " << i <<
" dist " <<
m_dist.at(i) <<
" imsi " << imsi <<
" bytes rxed "
515 << (
double)dlDataRxed.at(i) <<
" thr "
516 << (
double)dlDataRxed.at(i) / statsDuration);
525 for (
int i = 0; i <
m_nUser; i++)
527 double thrRatio = (
double)dlDataRxed.at(i) / totalData;
529 NS_LOG_INFO(
"\tUser " << i <<
" thrRatio " << thrRatio <<
" estThrRatio " << estThrRatio);
538 std::vector<uint64_t> ulDataRxed;
539 for (
int i = 0; i <
m_nUser; i++)
545 ulDataRxed.push_back(rlcStats->GetUlRxData(imsi, lcId));
547 << (
double)ulDataRxed.at(i) <<
" thr "
548 << (
double)ulDataRxed.at(i) / statsDuration <<
" ref "
553 " Unfair Throughput!");