57 NS_LOG_INFO(
"creating LenaTestFdTbfqFfMacSchedulerSuite");
59 bool errorModel =
false;
85 TestCase::Duration::EXTENSIVE);
87 TestCase::Duration::EXTENSIVE);
89 TestCase::Duration::EXTENSIVE);
111 TestCase::Duration::EXTENSIVE);
113 TestCase::Duration::EXTENSIVE);
115 TestCase::Duration::EXTENSIVE);
138 TestCase::Duration::EXTENSIVE);
140 TestCase::Duration::EXTENSIVE);
142 TestCase::Duration::EXTENSIVE);
164 TestCase::Duration::EXTENSIVE);
166 TestCase::Duration::EXTENSIVE);
168 TestCase::Duration::EXTENSIVE);
176 TestCase::Duration::QUICK);
185 std::vector<double> dist1;
187 dist1.push_back(4800);
188 dist1.push_back(6000);
189 dist1.push_back(10000);
190 std::vector<uint16_t> packetSize1;
191 packetSize1.push_back(100);
192 packetSize1.push_back(100);
193 packetSize1.push_back(100);
194 packetSize1.push_back(100);
195 std::vector<uint32_t> estThrFdTbfqDl1;
196 estThrFdTbfqDl1.push_back(132000);
197 estThrFdTbfqDl1.push_back(132000);
198 estThrFdTbfqDl1.push_back(132000);
199 estThrFdTbfqDl1.push_back(132000);
202 TestCase::Duration::EXTENSIVE);
211 std::vector<double> dist2;
213 dist2.push_back(4800);
214 dist2.push_back(6000);
215 dist2.push_back(10000);
216 std::vector<uint16_t> packetSize2;
217 packetSize2.push_back(300);
218 packetSize2.push_back(300);
219 packetSize2.push_back(300);
220 packetSize2.push_back(300);
221 std::vector<uint32_t> estThrFdTbfqDl2;
222 estThrFdTbfqDl2.push_back(302266);
223 estThrFdTbfqDl2.push_back(302266);
224 estThrFdTbfqDl2.push_back(302266);
225 estThrFdTbfqDl2.push_back(302266);
228 TestCase::Duration::EXTENSIVE);
237 std::vector<double> dist3;
239 dist3.push_back(4800);
240 dist3.push_back(6000);
241 std::vector<uint16_t> packetSize3;
242 packetSize3.push_back(100);
243 packetSize3.push_back(200);
244 packetSize3.push_back(300);
245 std::vector<uint32_t> estThrFdTbfqDl3;
246 estThrFdTbfqDl3.push_back(132000);
247 estThrFdTbfqDl3.push_back(232000);
248 estThrFdTbfqDl3.push_back(332000);
251 TestCase::Duration::QUICK);
315 lteHelper->SetEpcHelper(epcHelper);
323 remoteHostContainer.
Create(1);
326 internet.Install(remoteHostContainer);
335 ipv4h.
SetBase(
"1.0.0.0",
"255.0.0.0");
343 remoteHostStaticRouting->AddNetworkRouteTo(
Ipv4Address(
"7.0.0.0"),
Ipv4Mask(
"255.0.0.0"), 1);
356 lteHelper->SetAttribute(
"PathlossModel",
StringValue(
"ns3::FriisSpectrumPropagationLossModel"));
366 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
367 mobility.Install(enbNodes);
368 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
369 mobility.Install(ueNodes);
374 lteHelper->SetSchedulerType(
"ns3::FdTbfqFfMacScheduler");
376 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
377 ueDevs = lteHelper->InstallUeDevice(ueNodes);
381 enbPhy->SetAttribute(
"TxPower",
DoubleValue(30.0));
382 enbPhy->SetAttribute(
"NoiseFigure",
DoubleValue(5.0));
385 for (
int i = 0; i <
m_nUser; i++)
389 mm->SetPosition(Vector(
m_dist, 0.0, 0.0));
393 uePhy->SetAttribute(
"NoiseFigure",
DoubleValue(9.0));
397 internet.Install(ueNodes);
408 ueStaticRouting->SetDefaultRoute(epcHelper->GetUeDefaultGatewayAddress(), 1);
412 lteHelper->Attach(ueDevs, enbDevs.
Get(0));
427 lteHelper->ActivateDedicatedEpsBearer(ueDevice, bearer,
EpcTft::Default());
431 uint16_t dlPort = 1234;
432 uint16_t ulPort = 2000;
443 serverApps.Add(ulPacketSinkHelper.
Install(remoteHost));
458 clientApps.Add(dlClient.
Install(remoteHost));
459 clientApps.Add(ulClient.
Install(ueNodes.
Get(u)));
462 serverApps.Start(
Seconds(0.001));
463 clientApps.Start(
Seconds(0.04));
465 double statsStartTime = 0.04;
466 double statsDuration = 1;
467 double tolerance = 0.1;
470 lteHelper->EnableRlcTraces();
471 lteHelper->EnableMacTraces();
483 std::vector<uint64_t> dlDataRxed;
484 for (
int i = 0; i <
m_nUser; i++)
490 uint64_t
data = rlcStats->GetDlRxData(imsi, lcId);
491 dlDataRxed.push_back(
data);
492 NS_LOG_INFO(
"\tUser " << i <<
" imsi " << imsi <<
" bytes rxed " << (
double)dlDataRxed.at(i)
493 <<
" thr " << (
double)dlDataRxed.at(i) / statsDuration <<
" ref "
497 for (
int i = 0; i <
m_nUser; i++)
502 " Unfair Throughput!");
510 std::vector<uint64_t> ulDataRxed;
511 for (
int i = 0; i <
m_nUser; i++)
517 ulDataRxed.push_back(rlcStats->GetUlRxData(imsi, lcId));
518 NS_LOG_INFO(
"\tUser " << i <<
" imsi " << imsi <<
" bytes rxed " << (
double)ulDataRxed.at(i)
519 <<
" thr " << (
double)ulDataRxed.at(i) / statsDuration <<
" ref "
523 for (
int i = 0; i <
m_nUser; i++)
528 " Unfair Throughput!");
589 lteHelper->SetEpcHelper(epcHelper);
595 remoteHostContainer.
Create(1);
598 internet.Install(remoteHostContainer);
607 ipv4h.
SetBase(
"1.0.0.0",
"255.0.0.0");
615 remoteHostStaticRouting->AddNetworkRouteTo(
Ipv4Address(
"7.0.0.0"),
Ipv4Mask(
"255.0.0.0"), 1);
620 lteHelper->SetAttribute(
"PathlossModel",
StringValue(
"ns3::FriisSpectrumPropagationLossModel"));
630 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
631 mobility.Install(enbNodes);
632 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
633 mobility.Install(ueNodes);
638 lteHelper->SetSchedulerType(
"ns3::FdTbfqFfMacScheduler");
640 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
641 ueDevs = lteHelper->InstallUeDevice(ueNodes);
645 enbPhy->SetAttribute(
"TxPower",
DoubleValue(30.0));
646 enbPhy->SetAttribute(
"NoiseFigure",
DoubleValue(5.0));
649 for (
int i = 0; i <
m_nUser; i++)
653 mm->SetPosition(Vector(
m_dist.at(i), 0.0, 0.0));
657 uePhy->SetAttribute(
"NoiseFigure",
DoubleValue(9.0));
661 internet.Install(ueNodes);
672 ueStaticRouting->SetDefaultRoute(epcHelper->GetUeDefaultGatewayAddress(), 1);
676 lteHelper->Attach(ueDevs, enbDevs.
Get(0));
685 mbrDl = mbrDl / ueNodes.
GetN();
699 lteHelper->ActivateDedicatedEpsBearer(ueDevice, bearer,
EpcTft::Default());
703 uint16_t dlPort = 1234;
704 uint16_t ulPort = 2000;
715 serverApps.Add(ulPacketSinkHelper.
Install(remoteHost));
729 clientApps.Add(dlClient.
Install(remoteHost));
730 clientApps.Add(ulClient.
Install(ueNodes.
Get(u)));
733 serverApps.Start(
Seconds(0.001));
734 clientApps.Start(
Seconds(0.001));
736 double statsStartTime = 0.001;
737 double statsDuration = 1.0;
738 double tolerance = 0.1;
741 lteHelper->EnableRlcTraces();
753 std::vector<uint64_t> dlDataRxed;
754 for (
int i = 0; i <
m_nUser; i++)
760 dlDataRxed.push_back(rlcStats->GetDlRxData(imsi, lcId));
761 NS_LOG_INFO(
"\tUser " << i <<
" dist " <<
m_dist.at(i) <<
" imsi " << imsi <<
" bytes rxed "
762 << (
double)dlDataRxed.at(i) <<
" thr "
763 << (
double)dlDataRxed.at(i) / statsDuration <<
" ref " <<
m_nUser);
766 for (
int i = 0; i <
m_nUser; i++)
771 " Unfair Throughput!");