22 #include <ns3/simulator.h> 24 #include <ns3/callback.h> 25 #include <ns3/config.h> 26 #include <ns3/string.h> 27 #include <ns3/double.h> 29 #include <ns3/boolean.h> 30 #include <ns3/pointer.h> 32 #include "ns3/mobility-helper.h" 33 #include "ns3/lte-helper.h" 34 #include "ns3/point-to-point-epc-helper.h" 35 #include "ns3/internet-module.h" 36 #include "ns3/point-to-point-module.h" 37 #include "ns3/applications-module.h" 39 #include <ns3/ff-mac-scheduler.h> 40 #include <ns3/lte-enb-net-device.h> 41 #include <ns3/lte-enb-phy.h> 42 #include <ns3/lte-enb-rrc.h> 43 #include <ns3/lte-ue-net-device.h> 44 #include <ns3/lte-ue-phy.h> 45 #include <ns3/lte-ue-rrc.h> 49 #include <ns3/lte-common.h> 63 :
TestSuite (
"lte-frequency-reuse", SYSTEM)
68 std::vector<bool> availableDlRb;
69 std::vector<bool> availableUlRb;
70 for (uint32_t i = 0; i < 12; i++)
72 availableDlRb.push_back (
true);
73 availableUlRb.push_back (
true);
75 for (uint32_t i = 12; i < 25; i++)
77 availableDlRb.push_back (
false);
78 availableUlRb.push_back (
false);
81 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrPf1", 1,
"ns3::PfFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
82 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrPf2", 5,
"ns3::PfFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
83 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrPss1", 1,
"ns3::PssFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
84 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrPss2", 5,
"ns3::PssFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
85 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrCqa1", 1,
"ns3::CqaFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
86 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrCqa2", 5,
"ns3::CqaFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
87 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrFdTbfq1", 1,
"ns3::FdTbfqFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
88 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrFdTbfq2", 5,
"ns3::FdTbfqFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
89 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrTdTbfq1", 1,
"ns3::TdTbfqFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
90 AddTestCase (
new LteHardFrTestCase (
"DownlinkHardFrTdTbfq2", 5,
"ns3::TdTbfqFfMacScheduler", 25, 25, 0, 12, 0, 12, availableDlRb, availableUlRb), TestCase::QUICK);
92 availableDlRb.clear ();
93 availableUlRb.clear ();
94 for (uint32_t i = 0; i < 6; i++)
96 availableDlRb.push_back (
true);
97 availableUlRb.push_back (
true);
99 for (uint32_t i = 6; i < 12; i++)
101 availableDlRb.push_back (
false);
102 availableUlRb.push_back (
false);
104 for (uint32_t i = 12; i < 18; i++)
106 availableDlRb.push_back (
true);
107 availableUlRb.push_back (
true);
109 for (uint32_t i = 18; i < 25; i++)
111 availableDlRb.push_back (
false);
112 availableUlRb.push_back (
false);
115 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrPf1", 1,
"ns3::PfFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
116 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrPf2", 5,
"ns3::PfFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
117 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrPss1", 1,
"ns3::PssFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
118 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrPss2", 5,
"ns3::PssFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
119 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrCqa1", 1,
"ns3::CqaFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
120 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrCqa2", 5,
"ns3::CqaFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
121 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrCqaFdTbfq1", 1,
"ns3::FdTbfqFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
122 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrCqaFdTbfq2", 5,
"ns3::FdTbfqFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
123 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrCqaTdTbfq1", 1,
"ns3::TdTbfqFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
124 AddTestCase (
new LteStrictFrTestCase (
"DownlinkStrictFrCqaTdTbfq2", 5,
"ns3::TdTbfqFfMacScheduler", 25, 25, 6, 6, 6, 6, 6, 6, availableDlRb, availableUlRb), TestCase::QUICK);
178 uint32_t userNum,uint16_t dlBandwidth,uint16_t ulBandwidth,
179 std::vector<bool> availableDlRb, std::vector<bool> availableUlRb)
182 m_dlBandwidth (dlBandwidth),
183 m_ulBandwidth (ulBandwidth),
184 m_availableDlRb (availableDlRb),
185 m_usedMutedDlRbg (false),
186 m_availableUlRb (availableUlRb),
187 m_usedMutedUlRbg (false)
201 Values::const_iterator it;
220 Values::const_iterator it;
244 std::string schedulerType,
245 uint16_t dlBandwidth, uint16_t ulBandwidth,
246 uint8_t dlSubBandOffset, uint16_t dlSubBandwidth,
247 uint8_t ulSubBandOffset, uint16_t ulSubBandwidth,
248 std::vector<bool> availableDlRb, std::vector<bool> availableUlRb)
249 :
LteFrTestCase (name, userNum, dlBandwidth, ulBandwidth, availableDlRb, availableUlRb),
250 m_schedulerType (schedulerType),
251 m_dlSubBandOffset (dlSubBandOffset),
252 m_dlSubBandwidth (dlSubBandwidth),
253 m_ulSubBandOffset (ulSubBandOffset),
254 m_ulSubBandwidth (ulSubBandwidth)
294 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
305 lteHelper->
Attach (ueDevs, enbDevs.
Get (0));
328 dlChannel->AddRx (testDlSpectrumPhy);
339 ulChannel->AddRx (testUlSpectrumPhy);
344 Simulator::Stop (
Seconds (0.500));
348 "Scheduler used DL RBG muted by FFR Algorithm");
351 "Scheduler used UL RBG muted by FFR Algorithm");
353 Simulator::Destroy ();
359 std::string schedulerType,
360 uint16_t dlBandwidth, uint16_t ulBandwidth,
361 uint16_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint16_t dlEdgeSubBandwidth,
362 uint16_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint16_t ulEdgeSubBandwidth,
363 std::vector<bool> availableDlRb, std::vector<bool> availableUlRb)
364 :
LteFrTestCase (name, userNum, dlBandwidth, ulBandwidth, availableDlRb, availableUlRb),
365 m_schedulerType (schedulerType),
366 m_dlCommonSubBandwidth (dlCommonSubBandwidth),
367 m_dlEdgeSubBandOffset (dlEdgeSubBandOffset),
368 m_dlEdgeSubBandwidth (dlEdgeSubBandwidth),
369 m_ulCommonSubBandwidth (ulCommonSubBandwidth),
370 m_ulEdgeSubBandOffset (ulEdgeSubBandOffset),
371 m_ulEdgeSubBandwidth (ulEdgeSubBandwidth)
412 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
423 lteHelper->
Attach (ueDevs, enbDevs.
Get (0));
447 dlChannel->AddRx (testDlSpectrumPhy);
458 ulChannel->AddRx (testUlSpectrumPhy);
463 Simulator::Stop (
Seconds (0.500));
467 "Scheduler used DL RBG muted by FFR Algorithm");
470 "Scheduler used UL RBG muted by FFR Algorithm");
472 Simulator::Destroy ();
491 m_schedulerType (schedulerType)
512 Values::const_iterator it;
517 NS_LOG_DEBUG (
"RB " << i <<
" POWER: " <<
" " << power);
528 "Wrong Data Channel DL Power level");
544 Values::const_iterator it;
546 uint32_t numActiveRbs = 0;
561 NS_LOG_DEBUG (
"Total number of active RBs = " << numActiveRbs);
567 double power = (*it) * (numActiveRbs * 180000);
576 "Wrong Data Channel UL Power level" <<
Simulator::Now ().GetSeconds ());
586 NS_LOG_DEBUG (
"Teleport UE to : (" <<
x <<
", " << y <<
", 0)");
593 std::vector<bool> expectedDlRb)
596 NS_LOG_DEBUG (
"Teleport UE to : (" <<
x <<
", " << y <<
", 0)");
605 std::vector<bool> expectedDlRb)
608 NS_LOG_DEBUG (
"Teleport UE to : (" <<
x <<
", " << y <<
", 0)");
658 double eNbTxPower = 30;
688 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
689 positionAlloc->
Add (Vector (1000, 0.0, 0.0));
690 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
691 positionAlloc->
Add (Vector (1020, 0.0, 0.0));
693 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
694 mobility.SetPositionAllocator (positionAlloc);
733 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
734 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
759 dlChannel->AddRx (testDlSpectrumPhy);
772 ulChannel->AddRx (testUlSpectrumPhy);
779 std::vector<bool> expectedDlRbCenterArea;
781 std::vector<bool> expectedUlRbCenterArea;
783 for (uint32_t i = 0; i < 6; i++)
785 expectedDlRbCenterArea[i] =
true;
786 expectedUlRbCenterArea[i] =
true;
789 std::vector<bool> expectedDlRbEdgeArea;
791 std::vector<bool> expectedUlRbEdgeArea;
793 for (uint32_t i = 12; i < 18; i++)
795 expectedDlRbEdgeArea[i] =
true;
796 expectedUlRbEdgeArea[i] =
true;
814 Simulator::Stop (
Seconds (1.500));
818 "Scheduler used DL RB muted by FFR Algorithm");
820 "Scheduler used UL RB muted by FFR Algorithm");
822 Simulator::Destroy ();
845 double eNbTxPower = 30;
875 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
876 positionAlloc->
Add (Vector (1000, 0.0, 0.0));
877 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
878 positionAlloc->
Add (Vector (1020, 0.0, 0.0));
880 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
881 mobility.SetPositionAllocator (positionAlloc);
918 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
919 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
943 dlChannel->AddRx (testDlSpectrumPhy);
956 ulChannel->AddRx (testUlSpectrumPhy);
964 std::vector<bool> expectedDlRbCenterArea;
966 std::vector<bool> expectedUlRbCenterArea;
968 for (uint32_t i = 0; i < 8; i++)
970 expectedDlRbCenterArea[i] =
true;
971 expectedUlRbCenterArea[i] =
true;
973 for (uint32_t i = 16; i < 25; i++)
975 expectedDlRbCenterArea[i] =
true;
978 std::vector<bool> expectedDlRbEdgeArea;
980 std::vector<bool> expectedUlRbEdgeArea;
982 for (uint32_t i = 8; i < 16; i++)
984 expectedDlRbEdgeArea[i] =
true;
985 expectedUlRbEdgeArea[i] =
true;
1003 Simulator::Stop (
Seconds (1.500));
1008 "Scheduler used DL RBG muted by FFR Algorithm");
1012 "Scheduler used UL RB muted by FFR Algorithm");
1014 Simulator::Destroy ();
1037 double eNbTxPower = 30;
1067 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1068 positionAlloc->
Add (Vector (1000, 0.0, 0.0));
1069 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1070 positionAlloc->
Add (Vector (1020, 0.0, 0.0));
1072 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1073 mobility.SetPositionAllocator (positionAlloc);
1115 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
1116 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
1140 dlChannel->AddRx (testDlSpectrumPhy);
1153 ulChannel->AddRx (testUlSpectrumPhy);
1160 double expectedDlPowerCenterArea = 0.5;
1161 std::vector<bool> expectedDlRbCenterArea;
1163 std::vector<bool> expectedUlRbCenterArea;
1165 for (uint32_t i = 6; i < 12; i++)
1167 expectedDlRbCenterArea[i] =
true;
1168 expectedUlRbCenterArea[i] =
true;
1170 for (uint32_t i = 18; i < 25; i++)
1172 expectedDlRbCenterArea[i] =
true;
1173 expectedUlRbCenterArea[i] =
true;
1176 double expectedDlPowerMiddleArea = 1.0;
1177 std::vector<bool> expectedDlRbMiddleArea;
1179 std::vector<bool> expectedUlRbMiddleArea;
1181 for (uint32_t i = 0; i < 6; i++)
1183 expectedDlRbMiddleArea[i] =
true;
1184 expectedUlRbMiddleArea[i] =
true;
1187 double expectedDlPowerEdgeArea = 2.0;
1188 std::vector<bool> expectedDlRbEdgeArea;
1190 std::vector<bool> expectedUlRbEdgeArea;
1192 for (uint32_t i = 12; i < 18; i++)
1194 expectedDlRbEdgeArea[i] =
true;
1195 expectedUlRbEdgeArea[i] =
true;
1200 expectedDlPowerCenterArea, expectedDlRbCenterArea );
1206 expectedDlPowerMiddleArea, expectedDlRbMiddleArea );
1212 expectedDlPowerEdgeArea, expectedDlRbEdgeArea );
1218 expectedDlPowerMiddleArea, expectedDlRbMiddleArea );
1224 expectedDlPowerCenterArea, expectedDlRbCenterArea );
1228 Simulator::Stop (
Seconds (2.500));
1232 "Scheduler used DL RBG muted by FFR Algorithm");
1235 "Scheduler used UL RB muted by FFR Algorithm");
1237 Simulator::Destroy ();
1244 NS_LOG_INFO (
"Creating LteEnhancedFfrAreaTestCase");
1262 double eNbTxPower = 30;
1293 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1294 positionAlloc->
Add (Vector (1000, 0.0, 0.0));
1295 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1296 positionAlloc->
Add (Vector (1020, 0.0, 0.0));
1298 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1299 mobility.SetPositionAllocator (positionAlloc);
1345 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
1346 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
1370 dlChannel->AddRx (testDlSpectrumPhy);
1383 ulChannel->AddRx (testUlSpectrumPhy);
1390 double expectedDlPowerCenterArea = 0.251189;
1391 std::vector<bool> expectedDlRbCenterArea;
1393 std::vector<bool> expectedUlRbCenterArea;
1395 for (uint32_t i = 0; i < 8; i++)
1397 expectedDlRbCenterArea[i] =
true;
1398 expectedUlRbCenterArea[i] =
true;
1400 for (uint32_t i = 12; i < 16; i++)
1402 expectedDlRbCenterArea[i] =
true;
1403 expectedUlRbCenterArea[i] =
true;
1405 for (uint32_t i = 20; i < 24; i++)
1407 expectedDlRbCenterArea[i] =
true;
1408 expectedUlRbCenterArea[i] =
true;
1411 double expectedDlPowerMiddleArea = 0.251189;
1412 std::vector<bool> expectedDlRbMiddleArea;
1414 std::vector<bool> expectedUlRbMiddleArea;
1416 for (uint32_t i = 4; i < 8; i++)
1418 expectedDlRbMiddleArea[i] =
true;
1419 expectedUlRbMiddleArea[i] =
true;
1422 double expectedDlPowerEdgeArea = 1.0;
1423 std::vector<bool> expectedDlRbEdgeArea;
1425 std::vector<bool> expectedUlRbEdgeArea;
1427 for (uint32_t i = 0; i < 4; i++)
1429 expectedDlRbEdgeArea[i] =
true;
1430 expectedUlRbEdgeArea[i] =
true;
1435 expectedDlPowerCenterArea, expectedDlRbCenterArea );
1441 expectedDlPowerMiddleArea, expectedDlRbMiddleArea );
1447 expectedDlPowerEdgeArea, expectedDlRbEdgeArea );
1453 expectedDlPowerCenterArea, expectedDlRbCenterArea );
1459 expectedDlPowerMiddleArea, expectedDlRbMiddleArea );
1463 Simulator::Stop (
Seconds (2.500));
1467 "Scheduler used DL RBG muted by FFR Algorithm");
1470 "Scheduler used UL RB muted by FFR Algorithm");
1472 Simulator::Destroy ();
1479 NS_LOG_INFO (
"Creating LteDistributedFfrAreaTestCase");
1497 double eNbTxPower = 30;
1511 uint16_t bandwidth = 25;
1518 Ptr<Node> pgw = epcHelper->GetPgwNode ();
1522 remoteHostContainer.
Create (1);
1525 internet.
Install (remoteHostContainer);
1534 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
1566 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1567 positionAlloc->
Add (Vector (1000, 0.0, 0.0));
1569 positionAlloc->
Add (Vector (200, 0.0, 0.0));
1570 positionAlloc->
Add (Vector (200, 0.0, 0.0));
1571 positionAlloc->
Add (Vector (800, 0.0, 0.0));
1574 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1575 mobility.SetPositionAllocator (positionAlloc);
1603 ueLteDevs.
Add (ueDevs1);
1604 ueLteDevs.
Add (ueDevs2);
1614 for (uint32_t u = 0; u < ueNodes.
GetN (); ++u)
1619 ueStaticRouting->
SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
1623 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
1624 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
1628 uint16_t dlPort = 10000;
1629 uint16_t ulPort = 20000;
1638 for (uint32_t u = 0; u < ueNodes.
GetN (); ++u)
1643 ueStaticRouting->
SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
1645 for (uint32_t b = 0; b < 1; ++b)
1657 clientApps.Add (dlClientHelper.Install (remoteHost));
1674 dlpf.localPortEnd = dlPort;
1706 dlChannel->AddRx (testDlSpectrumPhy);
1719 ulChannel->AddRx (testUlSpectrumPhy);
1726 double expectedDlPowerCenterArea = 1.0;
1727 std::vector<bool> expectedDlRbCenterArea;
1729 std::vector<bool> expectedUlRbCenterArea;
1733 expectedDlRbCenterArea[i] =
true;
1734 expectedUlRbCenterArea[i] =
true;
1737 double expectedDlPowerEdgeArea = 2.0;
1738 std::vector<bool> expectedDlRbEdgeArea;
1740 std::vector<bool> expectedUlRbEdgeArea;
1742 for (uint32_t i = 0; i < 6; i++)
1744 expectedDlRbEdgeArea[i] =
true;
1745 expectedUlRbEdgeArea[i] =
true;
1748 std::vector<bool> expectedDlRbEdgeArea2;
1750 std::vector<bool> expectedUlRbEdgeArea2;
1752 for (uint32_t i = 6; i < 12; i++)
1754 expectedDlRbEdgeArea2[i] =
true;
1755 expectedUlRbEdgeArea2[i] =
true;
1761 expectedDlPowerCenterArea, expectedDlRbCenterArea );
1767 expectedDlPowerEdgeArea, expectedDlRbEdgeArea );
1773 expectedDlPowerEdgeArea, expectedDlRbEdgeArea2 );
1779 expectedDlPowerEdgeArea, expectedDlRbEdgeArea );
1785 expectedDlPowerCenterArea, expectedDlRbCenterArea );
1789 Simulator::Stop (
Seconds (2.500));
1794 "Scheduler used DL RBG muted by FFR Algorithm");
1798 "Scheduler used UL RB muted by FFR Algorithm");
1800 Simulator::Destroy ();
LteStrictFrTestCase(std::string name, uint32_t userNum, std::string schedulerType, uint16_t dlBandwidth, uint16_t ulBandwidth, uint16_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint16_t dlEdgeSubBandwidth, uint16_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint16_t ulEdgeSubBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
holds a vector of ns3::Application pointers.
Test hard frequency reuse algorithm.
uint8_t Add(PacketFilter f)
add a PacketFilter to the Traffic Flow Template
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
void SetCellId(uint16_t cellId)
Set cell ID.
Simulation virtual time values and global simulation resolution.
std::string m_schedulerType
scheduler type
Test the fractional frequency reuse algorithms.
bool m_usedWrongUlRbg
used wrong UL RBG?
virtual void DoRun(void)
Implementation to actually run this TestCase.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
std::vector< bool > m_expectedDlRb
the expected DL per RB
AttributeValue implementation for Boolean.
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
std::string m_schedulerType
the scheduler type
holds a vector of std::pair of Ptr<Ipv4> and interface index.
void SetDefaultRoute(Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a default route to the static routing table.
uint16_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
void UlDataRxStartNofitication(LteFrTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
NetDeviceContainer Install(NodeContainer c)
a class to represent an Ipv4 address mask
void SetRxSpectrumModel(Ptr< const SpectrumModel > model)
Set receive spectrum model.
Lte Enhanced Ffr Area Test Case.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
void UlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
UL data receive start function.
bool m_usedMutedUlRbg
used muted UL RBG?
uint8_t m_dlSubBandOffset
the DL subband offset
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
std::vector< bool > m_expectedUlRb
expected UL per RB
LteFrTestCase(std::string name, uint32_t userNum, uint16_t dlBandwidth, uint16_t ulBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
aggregate IP/TCP/UDP functionality to existing Nodes.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes...
Build a set of PointToPointNetDevice objects.
void DlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
DL data receive start function.
Lte Distributed Ffr Area Test Case.
Ptr< SpectrumChannel > GetChannel()
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
std::string m_schedulerType
the scheduler type
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
Values::const_iterator ConstValuesBegin() const
void SetHandoverAlgorithmType(std::string type)
Set the type of handover algorithm to be used by eNodeB devices.
LteFrequencyReuseTestSuite()
TestSuite.
ApplicationContainer Install(NodeContainer c)
void SetFfrAlgorithmType(std::string type)
Set the type of FFR algorithm to be used by eNodeB devices.
virtual ~LteSoftFrAreaTestCase()
uint16_t m_dlBandwidth
the DL bandwidth
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
void TeleportUe(uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb)
Teleport UE function.
Class for representing data rates.
Keep track of the current position and velocity of an object.
void DlDataRxStartNofitication(LteFrTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
TestCase Data.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
LteStrictFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
AttributeValue implementation for Time.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Hold an unsigned integer type.
uint8_t m_ulSubBandOffset
UL subband offset.
virtual ~LteSoftFfrAreaTestCase()
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
holds a vector of ns3::NetDevice pointers
LteDistributedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Lte Soft Fr Area Test Case.
bool m_usedWrongDlRbg
used wrong DL RBG?
LteSoftFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
LteFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
virtual ~LteStrictFrTestCase()
Test stric frequency reuse algorithm.
virtual void DoRun(void)
Implementation to actually run this TestCase.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
virtual ~LteFrAreaTestCase()
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.
double m_expectedDlPower
the expected DL power
uint8_t m_dlSubBandwidth
the DL subband width
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
std::vector< bool > m_availableDlRb
the available DL for each RB
Access to the IPv4 forwarding table, interfaces, and configuration.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
Ptr< MobilityModel > m_ueMobility
the UE mobility model
bool m_usedMutedDlRbg
used muted DL RBG?
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
uint16_t remotePortEnd
end of the port number range of the remote host
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
virtual ~LteStrictFrAreaTestCase()
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
Values::const_iterator ConstValuesEnd() const
uint16_t m_ulBandwidth
the UL bandwidth
This class contains the specification of EPS Bearers.
void SetDlExpectedValues(double expectedPower, std::vector< bool > expectedDlRb)
Set DL expected values function.
void SetPosition(const Vector &position)
void UlDataRxStartNofiticationArea(LteFrAreaTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
void Reset(void)
Reset the initial value of every attribute as well as the value of every global to what they were bef...
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Helper class used to assign positions and mobility models to nodes.
void AddNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a network route to the static routing table.
uint16_t m_dlBandwidth
the DL bandwidth
virtual void DoRun(void)
Implementation to actually run this TestCase.
Time m_teleportTime
the telport time
Ipv4 addresses are stored in host order in this class.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
uint8_t m_ulSubBandwidth
UL subband offset.
double m_expectedUlPower
expected UL power
Helper class that adds ns3::Ipv4StaticRouting objects.
AttributeValue implementation for DataRate.
LteSoftFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
Lte Soft Ffr Area Test Case.
LteEnhancedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
uint32_t m_userNum
the number of UE nodes
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
static LteFrequencyReuseTestSuite lteFrequencyReuseTestSuite
Time Seconds(double value)
Construct a Time in the indicated unit.
void SetDefault(std::string name, const AttributeValue &value)
void TeleportUe2(Ptr< Node > ueNode, uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb)
Teleport UE 2 function.
void Add(Vector v)
Add a position to the list of positions.
virtual ~LteDistributedFfrAreaTestCase()
uint16_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
uint16_t m_dlCommonSubBandwidth
DL common subbandwidth.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
virtual ~LteHardFrTestCase()
void DlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
DL data receive start function.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
LteHardFrTestCase(std::string name, uint32_t userNum, std::string schedulerType, uint16_t dlBandwidth, uint16_t ulBandwidth, uint8_t dlSubBandOffset, uint16_t dlSubBandwidth, uint8_t ulSubBandOffset, uint16_t ulSubBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
uint16_t m_ulBandwidth
the UL bandwidth
std::vector< bool > m_availableUlRb
the available UL for each RB
This class can be used to hold variables of floating point type such as 'double' or 'float'...
void DlDataRxStartNofiticationArea(LteFrAreaTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
The eNodeB device implementation.
void UlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
UL data receive start function.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual ~LteEnhancedFfrAreaTestCase()
void SetFfrAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the FFR algorithm to be created.
void SetUlExpectedValues(double expectedPower, std::vector< bool > expectedDlRb)
Set UL expected values function.
Test frequency reuse algorithm by teleporing UEs to different parts of area and checking if the frequ...
Test frequency reuse algorithm.
uint16_t remotePortStart
start of the port number range of the remote host
uint16_t m_ulCommonSubBandwidth
UL common subbandwidth.
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
void SimpleTeleportUe(uint32_t x, uint32_t y)
Simple teleport UE function.
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created.
uint16_t localPortStart
start of the port number range of the UE
The LteSpectrumPhy models the physical layer of LTE.
The LteUeNetDevice class implements the UE net device.
virtual void DoRun(void)
Implementation to actually run this TestCase.