26 #include "ns3/internet-module.h"
27 #include "ns3/lte-helper.h"
28 #include "ns3/mobility-helper.h"
29 #include "ns3/packet-sink-helper.h"
30 #include "ns3/point-to-point-epc-helper.h"
31 #include "ns3/point-to-point-module.h"
32 #include "ns3/udp-client-server-helper.h"
33 #include <ns3/boolean.h>
34 #include <ns3/callback.h>
35 #include <ns3/config.h>
36 #include <ns3/double.h>
38 #include <ns3/ff-mac-scheduler.h>
40 #include <ns3/lte-common.h>
41 #include <ns3/lte-enb-net-device.h>
42 #include <ns3/lte-enb-phy.h>
43 #include <ns3/lte-enb-rrc.h>
44 #include <ns3/lte-ue-net-device.h>
45 #include <ns3/lte-ue-phy.h>
46 #include <ns3/lte-ue-rrc.h>
47 #include <ns3/pointer.h>
48 #include <ns3/simulator.h>
49 #include <ns3/string.h>
60 :
TestSuite(
"lte-frequency-reuse", SYSTEM)
65 std::vector<bool> availableDlRb;
66 std::vector<bool> availableUlRb;
67 for (uint32_t i = 0; i < 12; i++)
69 availableDlRb.push_back(
true);
70 availableUlRb.push_back(
true);
72 for (uint32_t i = 12; i < 25; i++)
74 availableDlRb.push_back(
false);
75 availableUlRb.push_back(
false);
80 "ns3::PfFfMacScheduler",
92 "ns3::PfFfMacScheduler",
104 "ns3::PssFfMacScheduler",
116 "ns3::PssFfMacScheduler",
128 "ns3::CqaFfMacScheduler",
140 "ns3::CqaFfMacScheduler",
152 "ns3::FdTbfqFfMacScheduler",
164 "ns3::FdTbfqFfMacScheduler",
176 "ns3::TdTbfqFfMacScheduler",
188 "ns3::TdTbfqFfMacScheduler",
199 availableDlRb.clear();
200 availableUlRb.clear();
201 for (uint32_t i = 0; i < 6; i++)
203 availableDlRb.push_back(
true);
204 availableUlRb.push_back(
true);
206 for (uint32_t i = 6; i < 12; i++)
208 availableDlRb.push_back(
false);
209 availableUlRb.push_back(
false);
211 for (uint32_t i = 12; i < 18; i++)
213 availableDlRb.push_back(
true);
214 availableUlRb.push_back(
true);
216 for (uint32_t i = 18; i < 25; i++)
218 availableDlRb.push_back(
false);
219 availableUlRb.push_back(
false);
224 "ns3::PfFfMacScheduler",
238 "ns3::PfFfMacScheduler",
252 "ns3::PssFfMacScheduler",
266 "ns3::PssFfMacScheduler",
280 "ns3::CqaFfMacScheduler",
294 "ns3::CqaFfMacScheduler",
308 "ns3::FdTbfqFfMacScheduler",
322 "ns3::FdTbfqFfMacScheduler",
336 "ns3::TdTbfqFfMacScheduler",
350 "ns3::TdTbfqFfMacScheduler",
414 "ns3::FdTbfqFfMacScheduler"),
417 "ns3::TdTbfqFfMacScheduler"),
421 "ns3::PfFfMacScheduler"),
424 "ns3::PssFfMacScheduler"),
427 "ns3::CqaFfMacScheduler"),
430 "ns3::FdTbfqFfMacScheduler"),
433 "ns3::TdTbfqFfMacScheduler"),
460 uint16_t dlBandwidth,
461 uint16_t ulBandwidth,
462 std::vector<bool> availableDlRb,
463 std::vector<bool> availableUlRb)
466 m_dlBandwidth(dlBandwidth),
467 m_ulBandwidth(ulBandwidth),
468 m_availableDlRb(availableDlRb),
469 m_usedMutedDlRbg(false),
470 m_availableUlRb(availableUlRb),
471 m_usedMutedUlRbg(false)
484 for (
auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
503 for (
auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
524 std::string schedulerType,
525 uint16_t dlBandwidth,
526 uint16_t ulBandwidth,
527 uint8_t dlSubBandOffset,
528 uint16_t dlSubBandwidth,
529 uint8_t ulSubBandOffset,
530 uint16_t ulSubBandwidth,
531 std::vector<bool> availableDlRb,
532 std::vector<bool> availableUlRb)
533 :
LteFrTestCase(name, userNum, dlBandwidth, ulBandwidth, availableDlRb, availableUlRb),
534 m_schedulerType(schedulerType),
535 m_dlSubBandOffset(dlSubBandOffset),
536 m_dlSubBandwidth(dlSubBandwidth),
537 m_ulSubBandOffset(ulSubBandOffset),
538 m_ulSubBandwidth(ulSubBandwidth)
577 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
588 lteHelper->
Attach(ueDevs, enbDevs.
Get(0));
608 ->GetDownlinkSpectrumPhy()
614 testDlSpectrumPhy->SetRxSpectrumModel(
616 dlChannel->AddRx(testDlSpectrumPhy);
618 testDlSpectrumPhy->TraceConnectWithoutContext(
626 ->GetUplinkSpectrumPhy()
631 testUlSpectrumPhy->SetRxSpectrumModel(
633 ulChannel->AddRx(testUlSpectrumPhy);
635 testUlSpectrumPhy->TraceConnectWithoutContext(
639 Simulator::Stop(
Seconds(0.500));
646 Simulator::Destroy();
651 std::string schedulerType,
652 uint16_t dlBandwidth,
653 uint16_t ulBandwidth,
654 uint16_t dlCommonSubBandwidth,
655 uint8_t dlEdgeSubBandOffset,
656 uint16_t dlEdgeSubBandwidth,
657 uint16_t ulCommonSubBandwidth,
658 uint8_t ulEdgeSubBandOffset,
659 uint16_t ulEdgeSubBandwidth,
660 std::vector<bool> availableDlRb,
661 std::vector<bool> availableUlRb)
662 :
LteFrTestCase(name, userNum, dlBandwidth, ulBandwidth, availableDlRb, availableUlRb),
663 m_schedulerType(schedulerType),
664 m_dlCommonSubBandwidth(dlCommonSubBandwidth),
665 m_dlEdgeSubBandOffset(dlEdgeSubBandOffset),
666 m_dlEdgeSubBandwidth(dlEdgeSubBandwidth),
667 m_ulCommonSubBandwidth(ulCommonSubBandwidth),
668 m_ulEdgeSubBandOffset(ulEdgeSubBandOffset),
669 m_ulEdgeSubBandwidth(ulEdgeSubBandwidth)
714 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
725 lteHelper->
Attach(ueDevs, enbDevs.
Get(0));
746 ->GetDownlinkSpectrumPhy()
752 testDlSpectrumPhy->SetRxSpectrumModel(
754 dlChannel->AddRx(testDlSpectrumPhy);
756 testDlSpectrumPhy->TraceConnectWithoutContext(
764 ->GetUplinkSpectrumPhy()
769 testUlSpectrumPhy->SetRxSpectrumModel(
771 ulChannel->AddRx(testUlSpectrumPhy);
773 testUlSpectrumPhy->TraceConnectWithoutContext(
777 Simulator::Stop(
Seconds(0.500));
784 Simulator::Destroy();
801 m_schedulerType(schedulerType)
824 for (
auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
842 "Wrong Data Channel DL Power level");
859 uint32_t numActiveRbs = 0;
865 for (
auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
874 NS_LOG_DEBUG(
"Total number of active RBs = " << numActiveRbs);
878 for (
auto it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
880 double power = (*it) * (numActiveRbs * 180000);
892 "Wrong Data Channel UL Power level"
903 NS_LOG_DEBUG(
"Teleport UE to : (" <<
x <<
", " << y <<
", 0)");
911 double expectedPower,
912 std::vector<bool> expectedDlRb)
915 NS_LOG_DEBUG(
"Teleport UE to : (" <<
x <<
", " << y <<
", 0)");
926 double expectedPower,
927 std::vector<bool> expectedDlRb)
930 NS_LOG_DEBUG(
"Teleport UE to : (" <<
x <<
", " << y <<
", 0)");
980 double eNbTxPower = 30;
1010 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1011 positionAlloc->Add(Vector(1000, 0.0, 0.0));
1012 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1013 positionAlloc->Add(Vector(1020, 0.0, 0.0));
1015 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1016 mobility.SetPositionAllocator(positionAlloc);
1053 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
1054 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
1076 ->GetDownlinkSpectrumPhy()
1082 testDlSpectrumPhy->SetRxSpectrumModel(
1084 dlChannel->AddRx(testDlSpectrumPhy);
1086 testDlSpectrumPhy->SetCellId(1);
1088 testDlSpectrumPhy->TraceConnectWithoutContext(
1096 ->GetUplinkSpectrumPhy()
1101 testUlSpectrumPhy->SetRxSpectrumModel(
1103 ulChannel->AddRx(testUlSpectrumPhy);
1105 testUlSpectrumPhy->SetCellId(1);
1107 testUlSpectrumPhy->TraceConnectWithoutContext(
1111 std::vector<bool> expectedDlRbCenterArea;
1113 std::vector<bool> expectedUlRbCenterArea;
1115 for (uint32_t i = 0; i < 6; i++)
1117 expectedDlRbCenterArea[i] =
true;
1118 expectedUlRbCenterArea[i] =
true;
1121 std::vector<bool> expectedDlRbEdgeArea;
1123 std::vector<bool> expectedUlRbEdgeArea;
1125 for (uint32_t i = 12; i < 18; i++)
1127 expectedDlRbEdgeArea[i] =
true;
1128 expectedUlRbEdgeArea[i] =
true;
1137 expectedDlRbCenterArea);
1142 expectedUlRbCenterArea);
1150 expectedDlRbEdgeArea);
1155 expectedUlRbEdgeArea);
1163 expectedDlRbCenterArea);
1168 expectedUlRbCenterArea);
1170 Simulator::Stop(
Seconds(1.500));
1176 Simulator::Destroy();
1199 double eNbTxPower = 30;
1229 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1230 positionAlloc->Add(Vector(1000, 0.0, 0.0));
1231 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1232 positionAlloc->Add(Vector(1020, 0.0, 0.0));
1234 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1235 mobility.SetPositionAllocator(positionAlloc);
1270 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
1271 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
1292 ->GetDownlinkSpectrumPhy()
1298 testDlSpectrumPhy->SetRxSpectrumModel(
1300 dlChannel->AddRx(testDlSpectrumPhy);
1302 testDlSpectrumPhy->SetCellId(1);
1304 testDlSpectrumPhy->TraceConnectWithoutContext(
1312 ->GetUplinkSpectrumPhy()
1317 testUlSpectrumPhy->SetRxSpectrumModel(
1319 ulChannel->AddRx(testUlSpectrumPhy);
1321 testUlSpectrumPhy->SetCellId(1);
1323 testUlSpectrumPhy->TraceConnectWithoutContext(
1327 std::vector<bool> expectedDlRbCenterArea;
1329 std::vector<bool> expectedUlRbCenterArea;
1331 for (uint32_t i = 0; i < 8; i++)
1333 expectedDlRbCenterArea[i] =
true;
1334 expectedUlRbCenterArea[i] =
true;
1336 for (uint32_t i = 16; i < 25; i++)
1338 expectedDlRbCenterArea[i] =
true;
1341 std::vector<bool> expectedDlRbEdgeArea;
1343 std::vector<bool> expectedUlRbEdgeArea;
1345 for (uint32_t i = 8; i < 16; i++)
1347 expectedDlRbEdgeArea[i] =
true;
1348 expectedUlRbEdgeArea[i] =
true;
1357 expectedDlRbCenterArea);
1362 expectedUlRbCenterArea);
1370 expectedDlRbEdgeArea);
1375 expectedUlRbEdgeArea);
1383 expectedDlRbCenterArea);
1388 expectedUlRbCenterArea);
1390 Simulator::Stop(
Seconds(1.500));
1395 "Scheduler used DL RBG muted by FFR Algorithm");
1400 Simulator::Destroy();
1423 double eNbTxPower = 30;
1453 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1454 positionAlloc->Add(Vector(1000, 0.0, 0.0));
1455 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1456 positionAlloc->Add(Vector(1020, 0.0, 0.0));
1458 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1459 mobility.SetPositionAllocator(positionAlloc);
1499 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
1500 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
1521 ->GetDownlinkSpectrumPhy()
1527 testDlSpectrumPhy->SetRxSpectrumModel(
1529 dlChannel->AddRx(testDlSpectrumPhy);
1531 testDlSpectrumPhy->SetCellId(1);
1533 testDlSpectrumPhy->TraceConnectWithoutContext(
1541 ->GetUplinkSpectrumPhy()
1546 testUlSpectrumPhy->SetRxSpectrumModel(
1548 ulChannel->AddRx(testUlSpectrumPhy);
1550 testUlSpectrumPhy->SetCellId(1);
1552 testUlSpectrumPhy->TraceConnectWithoutContext(
1556 double expectedDlPowerCenterArea = 0.5;
1557 std::vector<bool> expectedDlRbCenterArea;
1559 std::vector<bool> expectedUlRbCenterArea;
1561 for (uint32_t i = 6; i < 12; i++)
1563 expectedDlRbCenterArea[i] =
true;
1564 expectedUlRbCenterArea[i] =
true;
1566 for (uint32_t i = 18; i < 25; i++)
1568 expectedDlRbCenterArea[i] =
true;
1569 expectedUlRbCenterArea[i] =
true;
1572 double expectedDlPowerMiddleArea = 1.0;
1573 std::vector<bool> expectedDlRbMiddleArea;
1575 std::vector<bool> expectedUlRbMiddleArea;
1577 for (uint32_t i = 0; i < 6; i++)
1579 expectedDlRbMiddleArea[i] =
true;
1580 expectedUlRbMiddleArea[i] =
true;
1583 double expectedDlPowerEdgeArea = 2.0;
1584 std::vector<bool> expectedDlRbEdgeArea;
1586 std::vector<bool> expectedUlRbEdgeArea;
1588 for (uint32_t i = 12; i < 18; i++)
1590 expectedDlRbEdgeArea[i] =
true;
1591 expectedUlRbEdgeArea[i] =
true;
1599 expectedDlPowerCenterArea,
1600 expectedDlRbCenterArea);
1605 expectedUlRbCenterArea);
1612 expectedDlPowerMiddleArea,
1613 expectedDlRbMiddleArea);
1618 expectedUlRbMiddleArea);
1625 expectedDlPowerEdgeArea,
1626 expectedDlRbEdgeArea);
1631 expectedUlRbEdgeArea);
1638 expectedDlPowerMiddleArea,
1639 expectedDlRbMiddleArea);
1644 expectedUlRbMiddleArea);
1651 expectedDlPowerCenterArea,
1652 expectedDlRbCenterArea);
1657 expectedUlRbCenterArea);
1659 Simulator::Stop(
Seconds(2.500));
1666 Simulator::Destroy();
1672 NS_LOG_INFO(
"Creating LteEnhancedFfrAreaTestCase");
1690 double eNbTxPower = 30;
1720 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1721 positionAlloc->Add(Vector(1000, 0.0, 0.0));
1722 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1723 positionAlloc->Add(Vector(1020, 0.0, 0.0));
1725 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1726 mobility.SetPositionAllocator(positionAlloc);
1770 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
1771 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
1792 ->GetDownlinkSpectrumPhy()
1798 testDlSpectrumPhy->SetRxSpectrumModel(
1800 dlChannel->AddRx(testDlSpectrumPhy);
1802 testDlSpectrumPhy->SetCellId(1);
1804 testDlSpectrumPhy->TraceConnectWithoutContext(
1812 ->GetUplinkSpectrumPhy()
1817 testUlSpectrumPhy->SetRxSpectrumModel(
1819 ulChannel->AddRx(testUlSpectrumPhy);
1821 testUlSpectrumPhy->SetCellId(1);
1823 testUlSpectrumPhy->TraceConnectWithoutContext(
1827 double expectedDlPowerCenterArea = 0.251189;
1828 std::vector<bool> expectedDlRbCenterArea;
1830 std::vector<bool> expectedUlRbCenterArea;
1832 for (uint32_t i = 0; i < 8; i++)
1834 expectedDlRbCenterArea[i] =
true;
1835 expectedUlRbCenterArea[i] =
true;
1837 for (uint32_t i = 12; i < 16; i++)
1839 expectedDlRbCenterArea[i] =
true;
1840 expectedUlRbCenterArea[i] =
true;
1842 for (uint32_t i = 20; i < 24; i++)
1844 expectedDlRbCenterArea[i] =
true;
1845 expectedUlRbCenterArea[i] =
true;
1848 double expectedDlPowerMiddleArea = 0.251189;
1849 std::vector<bool> expectedDlRbMiddleArea;
1851 std::vector<bool> expectedUlRbMiddleArea;
1853 for (uint32_t i = 4; i < 8; i++)
1855 expectedDlRbMiddleArea[i] =
true;
1856 expectedUlRbMiddleArea[i] =
true;
1859 double expectedDlPowerEdgeArea = 1.0;
1860 std::vector<bool> expectedDlRbEdgeArea;
1862 std::vector<bool> expectedUlRbEdgeArea;
1864 for (uint32_t i = 0; i < 4; i++)
1866 expectedDlRbEdgeArea[i] =
true;
1867 expectedUlRbEdgeArea[i] =
true;
1875 expectedDlPowerCenterArea,
1876 expectedDlRbCenterArea);
1881 expectedUlRbCenterArea);
1888 expectedDlPowerMiddleArea,
1889 expectedDlRbMiddleArea);
1894 expectedUlRbMiddleArea);
1901 expectedDlPowerEdgeArea,
1902 expectedDlRbEdgeArea);
1907 expectedUlRbEdgeArea);
1914 expectedDlPowerCenterArea,
1915 expectedDlRbCenterArea);
1920 expectedUlRbCenterArea);
1927 expectedDlPowerMiddleArea,
1928 expectedDlRbMiddleArea);
1933 expectedUlRbCenterArea);
1935 Simulator::Stop(
Seconds(2.500));
1942 Simulator::Destroy();
1946 std::string schedulerType)
1949 NS_LOG_INFO(
"Creating LteDistributedFfrAreaTestCase");
1967 double eNbTxPower = 30;
1979 uint16_t bandwidth = 25;
1990 remoteHostContainer.
Create(1);
1993 internet.Install(remoteHostContainer);
2002 ipv4h.
SetBase(
"1.0.0.0",
"255.0.0.0");
2011 remoteHostStaticRouting->AddNetworkRouteTo(
Ipv4Address(
"7.0.0.0"),
Ipv4Mask(
"255.0.0.0"), 1);
2035 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
2036 positionAlloc->Add(Vector(1000, 0.0, 0.0));
2038 positionAlloc->Add(Vector(200, 0.0, 0.0));
2039 positionAlloc->Add(Vector(200, 0.0, 0.0));
2040 positionAlloc->Add(Vector(800, 0.0, 0.0));
2043 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
2044 mobility.SetPositionAllocator(positionAlloc);
2072 ueLteDevs.
Add(ueDevs1);
2073 ueLteDevs.
Add(ueDevs2);
2083 for (uint32_t u = 0; u < ueNodes.
GetN(); ++u)
2093 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
2094 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
2097 uint16_t dlPort = 10000;
2098 uint16_t ulPort = 20000;
2107 for (uint32_t u = 0; u < ueNodes.
GetN(); ++u)
2115 for (uint32_t b = 0; b < 1; ++b)
2173 ->GetDownlinkSpectrumPhy()
2179 testDlSpectrumPhy->SetRxSpectrumModel(
2181 dlChannel->AddRx(testDlSpectrumPhy);
2183 testDlSpectrumPhy->SetCellId(2);
2185 testDlSpectrumPhy->TraceConnectWithoutContext(
2193 ->GetUplinkSpectrumPhy()
2198 testUlSpectrumPhy->SetRxSpectrumModel(
2200 ulChannel->AddRx(testUlSpectrumPhy);
2202 testUlSpectrumPhy->SetCellId(2);
2204 testUlSpectrumPhy->TraceConnectWithoutContext(
2208 double expectedDlPowerCenterArea = 1.0;
2209 std::vector<bool> expectedDlRbCenterArea;
2211 std::vector<bool> expectedUlRbCenterArea;
2215 expectedDlRbCenterArea[i] =
true;
2216 expectedUlRbCenterArea[i] =
true;
2219 double expectedDlPowerEdgeArea = 2.0;
2220 std::vector<bool> expectedDlRbEdgeArea;
2222 std::vector<bool> expectedUlRbEdgeArea;
2224 for (uint32_t i = 0; i < 6; i++)
2226 expectedDlRbEdgeArea[i] =
true;
2227 expectedUlRbEdgeArea[i] =
true;
2230 std::vector<bool> expectedDlRbEdgeArea2;
2232 std::vector<bool> expectedUlRbEdgeArea2;
2234 for (uint32_t i = 6; i < 12; i++)
2236 expectedDlRbEdgeArea2[i] =
true;
2237 expectedUlRbEdgeArea2[i] =
true;
2245 expectedDlPowerCenterArea,
2246 expectedDlRbCenterArea);
2251 expectedUlRbCenterArea);
2258 expectedDlPowerEdgeArea,
2259 expectedDlRbEdgeArea);
2264 expectedUlRbEdgeArea);
2272 expectedDlPowerEdgeArea,
2273 expectedDlRbEdgeArea2);
2278 expectedUlRbEdgeArea2);
2286 expectedDlPowerEdgeArea,
2287 expectedDlRbEdgeArea);
2292 expectedUlRbEdgeArea);
2299 expectedDlPowerCenterArea,
2300 expectedDlRbCenterArea);
2305 expectedUlRbCenterArea);
2307 Simulator::Stop(
Seconds(2.500));
2312 "Scheduler used DL RBG muted by FFR Algorithm");
2317 Simulator::Destroy();
Lte Distributed Ffr Area Test Case.
~LteDistributedFfrAreaTestCase() override
LteDistributedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
void DoRun() override
Implementation to actually run this TestCase.
Lte Enhanced Ffr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
~LteEnhancedFfrAreaTestCase() override
LteEnhancedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Test frequency reuse algorithm by teleporting UEs to different parts of area and checking if the freq...
Time m_teleportTime
the teleport time
LteFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
bool m_usedWrongUlRbg
used wrong UL RBG?
std::vector< bool > m_expectedDlRb
the expected DL per RB
void SimpleTeleportUe(uint32_t x, uint32_t y)
Simple teleport UE function.
uint16_t m_ulBandwidth
the UL bandwidth
uint16_t m_dlBandwidth
the DL bandwidth
std::vector< bool > m_expectedUlRb
expected UL per RB
void UlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
UL data receive start function.
void TeleportUe2(Ptr< Node > ueNode, uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb)
Teleport UE 2 function.
void DlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
DL data receive start function.
double m_expectedUlPower
expected UL power
~LteFrAreaTestCase() override
std::string m_schedulerType
the scheduler type
void SetUlExpectedValues(double expectedPower, std::vector< bool > expectedDlRb)
Set UL expected values function.
double m_expectedDlPower
the expected DL power
void SetDlExpectedValues(double expectedPower, std::vector< bool > expectedDlRb)
Set DL expected values function.
bool m_usedWrongDlRbg
used wrong DL RBG?
void TeleportUe(uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb)
Teleport UE function.
Ptr< MobilityModel > m_ueMobility
the UE mobility model
void DoRun() override
Implementation to actually run this TestCase.
Test frequency reuse algorithm.
void DlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
DL data receive start function.
~LteFrTestCase() override
uint32_t m_userNum
the number of UE nodes
void UlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
UL data receive start function.
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_dlBandwidth
the DL bandwidth
LteFrTestCase(std::string name, uint32_t userNum, uint16_t dlBandwidth, uint16_t ulBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
uint16_t m_ulBandwidth
the UL bandwidth
bool m_usedMutedDlRbg
used muted DL RBG?
std::vector< bool > m_availableDlRb
the available DL for each RB
std::vector< bool > m_availableUlRb
the available UL for each RB
bool m_usedMutedUlRbg
used muted UL RBG?
Test the fractional frequency reuse algorithms.
LteFrequencyReuseTestSuite()
TestSuite.
Test hard frequency reuse algorithm.
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.
uint8_t m_dlSubBandOffset
the DL subband offset
uint8_t m_ulSubBandwidth
UL subband offset.
uint8_t m_ulSubBandOffset
UL subband offset.
void DoRun() override
Implementation to actually run this TestCase.
uint8_t m_dlSubBandwidth
the DL subband width
~LteHardFrTestCase() override
std::string m_schedulerType
the scheduler type
Lte Soft Ffr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
~LteSoftFfrAreaTestCase() override
LteSoftFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Lte Soft Fr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
LteSoftFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
~LteSoftFrAreaTestCase() override
void DoRun() override
Implementation to actually run this TestCase.
LteStrictFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
~LteStrictFrAreaTestCase() override
Test strict frequency reuse algorithm.
uint16_t m_ulCommonSubBandwidth
UL common subbandwidth.
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_dlCommonSubBandwidth
DL common subbandwidth.
~LteStrictFrTestCase() override
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
std::string m_schedulerType
scheduler type
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.
uint16_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
uint16_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
holds a vector of ns3::Application pointers.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
This class contains the specification of EPS Bearers.
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ipv4 addresses are stored in host order in this class.
Access to the IPv4 forwarding table, interfaces, and configuration.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
a class to represent an Ipv4 address mask
Helper class that adds ns3::Ipv4StaticRouting objects.
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...
The eNodeB device implementation.
uint32_t GetUlEarfcn() const
uint32_t GetDlEarfcn() const
void SetFfrAlgorithmType(std::string type)
Set the type of FFR algorithm to be used by eNodeB devices.
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 ...
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
void SetHandoverAlgorithmType(std::string type)
Set the type of handover algorithm to be used by eNodeB devices.
void SetFfrAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the FFR algorithm to be created.
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created.
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
The LteSpectrumPhy models the physical layer of LTE.
The LteUeNetDevice class implements the UE net device.
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
void SetPosition(const Vector &position)
holds a vector of ns3::NetDevice pointers
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Ptr< Node > GetPgwNode() const override
Get the PGW node.
Ipv4Address GetUeDefaultGatewayAddress() override
Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices) override
Assign IPv4 addresses to UE devices.
keep track of a set of node pointers.
uint32_t GetN() const
Get the number of Ptr<Node> stored in this container.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
NetDeviceContainer Install(NodeContainer c)
Smart pointer class similar to boost::intrusive_ptr.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
ApplicationContainer Install(NodeContainer c)
Hold an unsigned integer type.
void Reset()
Reset the initial value of every attribute as well as the value of every global to what they were bef...
void SetDefault(std::string name, const AttributeValue &value)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
static LteFrequencyReuseTestSuite lteFrequencyReuseTestSuite
Static variable for test initialization.
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs &&... bargs)
Make Callbacks with varying number of bound arguments.
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
Time Now()
create an ns3::Time instance which contains the current simulation time.
#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.
#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...
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
void UlDataRxStartNotificationArea(LteFrAreaTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
void UlDataRxStartNotification(LteFrTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
void DlDataRxStartNotification(LteFrTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
TestCase Data.
void DlDataRxStartNotificationArea(LteFrAreaTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Implement the data structure representing a TrafficFlowTemplate Packet Filter.
uint16_t localPortEnd
end of the port number range of the UE
uint16_t remotePortEnd
end of the port number range of the remote host
uint16_t remotePortStart
start of the port number range of the remote host
uint16_t localPortStart
start of the port number range of the UE