26#include "ns3/applications-module.h"
27#include "ns3/internet-module.h"
28#include "ns3/lte-helper.h"
29#include "ns3/mobility-helper.h"
30#include "ns3/point-to-point-epc-helper.h"
31#include "ns3/point-to-point-module.h"
32#include <ns3/boolean.h>
33#include <ns3/callback.h>
34#include <ns3/config.h>
35#include <ns3/double.h>
37#include <ns3/ff-mac-scheduler.h>
39#include <ns3/lte-common.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>
46#include <ns3/pointer.h>
47#include <ns3/simulator.h>
48#include <ns3/string.h>
59 :
TestSuite(
"lte-frequency-reuse", SYSTEM)
64 std::vector<bool> availableDlRb;
65 std::vector<bool> availableUlRb;
68 availableDlRb.push_back(
true);
69 availableUlRb.push_back(
true);
73 availableDlRb.push_back(
false);
74 availableUlRb.push_back(
false);
79 "ns3::PfFfMacScheduler",
91 "ns3::PfFfMacScheduler",
103 "ns3::PssFfMacScheduler",
115 "ns3::PssFfMacScheduler",
127 "ns3::CqaFfMacScheduler",
139 "ns3::CqaFfMacScheduler",
151 "ns3::FdTbfqFfMacScheduler",
163 "ns3::FdTbfqFfMacScheduler",
175 "ns3::TdTbfqFfMacScheduler",
187 "ns3::TdTbfqFfMacScheduler",
198 availableDlRb.clear();
199 availableUlRb.clear();
202 availableDlRb.push_back(
true);
203 availableUlRb.push_back(
true);
207 availableDlRb.push_back(
false);
208 availableUlRb.push_back(
false);
212 availableDlRb.push_back(
true);
213 availableUlRb.push_back(
true);
217 availableDlRb.push_back(
false);
218 availableUlRb.push_back(
false);
223 "ns3::PfFfMacScheduler",
237 "ns3::PfFfMacScheduler",
251 "ns3::PssFfMacScheduler",
265 "ns3::PssFfMacScheduler",
279 "ns3::CqaFfMacScheduler",
293 "ns3::CqaFfMacScheduler",
307 "ns3::FdTbfqFfMacScheduler",
321 "ns3::FdTbfqFfMacScheduler",
335 "ns3::TdTbfqFfMacScheduler",
349 "ns3::TdTbfqFfMacScheduler",
413 "ns3::FdTbfqFfMacScheduler"),
416 "ns3::TdTbfqFfMacScheduler"),
420 "ns3::PfFfMacScheduler"),
423 "ns3::PssFfMacScheduler"),
426 "ns3::CqaFfMacScheduler"),
429 "ns3::FdTbfqFfMacScheduler"),
432 "ns3::TdTbfqFfMacScheduler"),
455 uint16_t dlBandwidth,
456 uint16_t ulBandwidth,
457 std::vector<bool> availableDlRb,
458 std::vector<bool> availableUlRb)
461 m_dlBandwidth(dlBandwidth),
462 m_ulBandwidth(ulBandwidth),
463 m_availableDlRb(availableDlRb),
464 m_usedMutedDlRbg(false),
465 m_availableUlRb(availableUlRb),
466 m_usedMutedUlRbg(false)
478 Values::const_iterator it;
480 for (it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
498 Values::const_iterator it;
500 for (it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
521 std::string schedulerType,
522 uint16_t dlBandwidth,
523 uint16_t ulBandwidth,
524 uint8_t dlSubBandOffset,
525 uint16_t dlSubBandwidth,
526 uint8_t ulSubBandOffset,
527 uint16_t ulSubBandwidth,
528 std::vector<bool> availableDlRb,
529 std::vector<bool> availableUlRb)
530 :
LteFrTestCase(name, userNum, dlBandwidth, ulBandwidth, availableDlRb, availableUlRb),
531 m_schedulerType(schedulerType),
532 m_dlSubBandOffset(dlSubBandOffset),
533 m_dlSubBandwidth(dlSubBandwidth),
534 m_ulSubBandOffset(ulSubBandOffset),
535 m_ulSubBandwidth(ulSubBandwidth)
574 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
585 lteHelper->
Attach(ueDevs, enbDevs.
Get(0));
605 ->GetDownlinkSpectrumPhy()
611 testDlSpectrumPhy->SetRxSpectrumModel(
613 dlChannel->AddRx(testDlSpectrumPhy);
615 testDlSpectrumPhy->TraceConnectWithoutContext(
623 ->GetUplinkSpectrumPhy()
628 testUlSpectrumPhy->SetRxSpectrumModel(
630 ulChannel->AddRx(testUlSpectrumPhy);
632 testUlSpectrumPhy->TraceConnectWithoutContext(
636 Simulator::Stop(
Seconds(0.500));
643 Simulator::Destroy();
648 std::string schedulerType,
649 uint16_t dlBandwidth,
650 uint16_t ulBandwidth,
651 uint16_t dlCommonSubBandwidth,
652 uint8_t dlEdgeSubBandOffset,
653 uint16_t dlEdgeSubBandwidth,
654 uint16_t ulCommonSubBandwidth,
655 uint8_t ulEdgeSubBandOffset,
656 uint16_t ulEdgeSubBandwidth,
657 std::vector<bool> availableDlRb,
658 std::vector<bool> availableUlRb)
659 :
LteFrTestCase(name, userNum, dlBandwidth, ulBandwidth, availableDlRb, availableUlRb),
660 m_schedulerType(schedulerType),
661 m_dlCommonSubBandwidth(dlCommonSubBandwidth),
662 m_dlEdgeSubBandOffset(dlEdgeSubBandOffset),
663 m_dlEdgeSubBandwidth(dlEdgeSubBandwidth),
664 m_ulCommonSubBandwidth(ulCommonSubBandwidth),
665 m_ulEdgeSubBandOffset(ulEdgeSubBandOffset),
666 m_ulEdgeSubBandwidth(ulEdgeSubBandwidth)
711 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
722 lteHelper->
Attach(ueDevs, enbDevs.
Get(0));
743 ->GetDownlinkSpectrumPhy()
749 testDlSpectrumPhy->SetRxSpectrumModel(
751 dlChannel->AddRx(testDlSpectrumPhy);
753 testDlSpectrumPhy->TraceConnectWithoutContext(
761 ->GetUplinkSpectrumPhy()
766 testUlSpectrumPhy->SetRxSpectrumModel(
768 ulChannel->AddRx(testUlSpectrumPhy);
770 testUlSpectrumPhy->TraceConnectWithoutContext(
774 Simulator::Stop(
Seconds(0.500));
781 Simulator::Destroy();
798 m_schedulerType(schedulerType)
820 Values::const_iterator it;
822 for (it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
840 "Wrong Data Channel DL Power level");
856 Values::const_iterator it;
864 for (it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
873 NS_LOG_DEBUG(
"Total number of active RBs = " << numActiveRbs);
877 for (it = spectrumValue->ConstValuesBegin(); it != spectrumValue->ConstValuesEnd(); it++)
879 double power = (*it) * (numActiveRbs * 180000);
891 "Wrong Data Channel UL Power level"
902 NS_LOG_DEBUG(
"Teleport UE to : (" << x <<
", " << y <<
", 0)");
910 double expectedPower,
911 std::vector<bool> expectedDlRb)
914 NS_LOG_DEBUG(
"Teleport UE to : (" << x <<
", " << y <<
", 0)");
925 double expectedPower,
926 std::vector<bool> expectedDlRb)
929 NS_LOG_DEBUG(
"Teleport UE to : (" << x <<
", " << y <<
", 0)");
979 double eNbTxPower = 30;
1009 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1010 positionAlloc->Add(Vector(1000, 0.0, 0.0));
1011 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1012 positionAlloc->Add(Vector(1020, 0.0, 0.0));
1014 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1015 mobility.SetPositionAllocator(positionAlloc);
1052 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
1053 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
1075 ->GetDownlinkSpectrumPhy()
1081 testDlSpectrumPhy->SetRxSpectrumModel(
1083 dlChannel->AddRx(testDlSpectrumPhy);
1085 testDlSpectrumPhy->SetCellId(1);
1087 testDlSpectrumPhy->TraceConnectWithoutContext(
1095 ->GetUplinkSpectrumPhy()
1100 testUlSpectrumPhy->SetRxSpectrumModel(
1102 ulChannel->AddRx(testUlSpectrumPhy);
1104 testUlSpectrumPhy->SetCellId(1);
1106 testUlSpectrumPhy->TraceConnectWithoutContext(
1110 std::vector<bool> expectedDlRbCenterArea;
1112 std::vector<bool> expectedUlRbCenterArea;
1116 expectedDlRbCenterArea[i] =
true;
1117 expectedUlRbCenterArea[i] =
true;
1120 std::vector<bool> expectedDlRbEdgeArea;
1122 std::vector<bool> expectedUlRbEdgeArea;
1126 expectedDlRbEdgeArea[i] =
true;
1127 expectedUlRbEdgeArea[i] =
true;
1136 expectedDlRbCenterArea);
1141 expectedUlRbCenterArea);
1149 expectedDlRbEdgeArea);
1154 expectedUlRbEdgeArea);
1162 expectedDlRbCenterArea);
1167 expectedUlRbCenterArea);
1169 Simulator::Stop(
Seconds(1.500));
1175 Simulator::Destroy();
1198 double eNbTxPower = 30;
1228 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1229 positionAlloc->Add(Vector(1000, 0.0, 0.0));
1230 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1231 positionAlloc->Add(Vector(1020, 0.0, 0.0));
1233 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1234 mobility.SetPositionAllocator(positionAlloc);
1269 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
1270 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
1291 ->GetDownlinkSpectrumPhy()
1297 testDlSpectrumPhy->SetRxSpectrumModel(
1299 dlChannel->AddRx(testDlSpectrumPhy);
1301 testDlSpectrumPhy->SetCellId(1);
1303 testDlSpectrumPhy->TraceConnectWithoutContext(
1311 ->GetUplinkSpectrumPhy()
1316 testUlSpectrumPhy->SetRxSpectrumModel(
1318 ulChannel->AddRx(testUlSpectrumPhy);
1320 testUlSpectrumPhy->SetCellId(1);
1322 testUlSpectrumPhy->TraceConnectWithoutContext(
1326 std::vector<bool> expectedDlRbCenterArea;
1328 std::vector<bool> expectedUlRbCenterArea;
1332 expectedDlRbCenterArea[i] =
true;
1333 expectedUlRbCenterArea[i] =
true;
1337 expectedDlRbCenterArea[i] =
true;
1340 std::vector<bool> expectedDlRbEdgeArea;
1342 std::vector<bool> expectedUlRbEdgeArea;
1346 expectedDlRbEdgeArea[i] =
true;
1347 expectedUlRbEdgeArea[i] =
true;
1356 expectedDlRbCenterArea);
1361 expectedUlRbCenterArea);
1369 expectedDlRbEdgeArea);
1374 expectedUlRbEdgeArea);
1382 expectedDlRbCenterArea);
1387 expectedUlRbCenterArea);
1389 Simulator::Stop(
Seconds(1.500));
1394 "Scheduler used DL RBG muted by FFR Algorithm");
1399 Simulator::Destroy();
1422 double eNbTxPower = 30;
1452 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1453 positionAlloc->Add(Vector(1000, 0.0, 0.0));
1454 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1455 positionAlloc->Add(Vector(1020, 0.0, 0.0));
1457 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1458 mobility.SetPositionAllocator(positionAlloc);
1498 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
1499 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
1520 ->GetDownlinkSpectrumPhy()
1526 testDlSpectrumPhy->SetRxSpectrumModel(
1528 dlChannel->AddRx(testDlSpectrumPhy);
1530 testDlSpectrumPhy->SetCellId(1);
1532 testDlSpectrumPhy->TraceConnectWithoutContext(
1540 ->GetUplinkSpectrumPhy()
1545 testUlSpectrumPhy->SetRxSpectrumModel(
1547 ulChannel->AddRx(testUlSpectrumPhy);
1549 testUlSpectrumPhy->SetCellId(1);
1551 testUlSpectrumPhy->TraceConnectWithoutContext(
1555 double expectedDlPowerCenterArea = 0.5;
1556 std::vector<bool> expectedDlRbCenterArea;
1558 std::vector<bool> expectedUlRbCenterArea;
1562 expectedDlRbCenterArea[i] =
true;
1563 expectedUlRbCenterArea[i] =
true;
1567 expectedDlRbCenterArea[i] =
true;
1568 expectedUlRbCenterArea[i] =
true;
1571 double expectedDlPowerMiddleArea = 1.0;
1572 std::vector<bool> expectedDlRbMiddleArea;
1574 std::vector<bool> expectedUlRbMiddleArea;
1578 expectedDlRbMiddleArea[i] =
true;
1579 expectedUlRbMiddleArea[i] =
true;
1582 double expectedDlPowerEdgeArea = 2.0;
1583 std::vector<bool> expectedDlRbEdgeArea;
1585 std::vector<bool> expectedUlRbEdgeArea;
1589 expectedDlRbEdgeArea[i] =
true;
1590 expectedUlRbEdgeArea[i] =
true;
1598 expectedDlPowerCenterArea,
1599 expectedDlRbCenterArea);
1604 expectedUlRbCenterArea);
1611 expectedDlPowerMiddleArea,
1612 expectedDlRbMiddleArea);
1617 expectedUlRbMiddleArea);
1624 expectedDlPowerEdgeArea,
1625 expectedDlRbEdgeArea);
1630 expectedUlRbEdgeArea);
1637 expectedDlPowerMiddleArea,
1638 expectedDlRbMiddleArea);
1643 expectedUlRbMiddleArea);
1650 expectedDlPowerCenterArea,
1651 expectedDlRbCenterArea);
1656 expectedUlRbCenterArea);
1658 Simulator::Stop(
Seconds(2.500));
1665 Simulator::Destroy();
1671 NS_LOG_INFO(
"Creating LteEnhancedFfrAreaTestCase");
1689 double eNbTxPower = 30;
1719 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1720 positionAlloc->Add(Vector(1000, 0.0, 0.0));
1721 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1722 positionAlloc->Add(Vector(1020, 0.0, 0.0));
1724 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1725 mobility.SetPositionAllocator(positionAlloc);
1769 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
1770 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
1791 ->GetDownlinkSpectrumPhy()
1797 testDlSpectrumPhy->SetRxSpectrumModel(
1799 dlChannel->AddRx(testDlSpectrumPhy);
1801 testDlSpectrumPhy->SetCellId(1);
1803 testDlSpectrumPhy->TraceConnectWithoutContext(
1811 ->GetUplinkSpectrumPhy()
1816 testUlSpectrumPhy->SetRxSpectrumModel(
1818 ulChannel->AddRx(testUlSpectrumPhy);
1820 testUlSpectrumPhy->SetCellId(1);
1822 testUlSpectrumPhy->TraceConnectWithoutContext(
1826 double expectedDlPowerCenterArea = 0.251189;
1827 std::vector<bool> expectedDlRbCenterArea;
1829 std::vector<bool> expectedUlRbCenterArea;
1833 expectedDlRbCenterArea[i] =
true;
1834 expectedUlRbCenterArea[i] =
true;
1838 expectedDlRbCenterArea[i] =
true;
1839 expectedUlRbCenterArea[i] =
true;
1843 expectedDlRbCenterArea[i] =
true;
1844 expectedUlRbCenterArea[i] =
true;
1847 double expectedDlPowerMiddleArea = 0.251189;
1848 std::vector<bool> expectedDlRbMiddleArea;
1850 std::vector<bool> expectedUlRbMiddleArea;
1854 expectedDlRbMiddleArea[i] =
true;
1855 expectedUlRbMiddleArea[i] =
true;
1858 double expectedDlPowerEdgeArea = 1.0;
1859 std::vector<bool> expectedDlRbEdgeArea;
1861 std::vector<bool> expectedUlRbEdgeArea;
1865 expectedDlRbEdgeArea[i] =
true;
1866 expectedUlRbEdgeArea[i] =
true;
1874 expectedDlPowerCenterArea,
1875 expectedDlRbCenterArea);
1880 expectedUlRbCenterArea);
1887 expectedDlPowerMiddleArea,
1888 expectedDlRbMiddleArea);
1893 expectedUlRbMiddleArea);
1900 expectedDlPowerEdgeArea,
1901 expectedDlRbEdgeArea);
1906 expectedUlRbEdgeArea);
1913 expectedDlPowerCenterArea,
1914 expectedDlRbCenterArea);
1919 expectedUlRbCenterArea);
1926 expectedDlPowerMiddleArea,
1927 expectedDlRbMiddleArea);
1932 expectedUlRbCenterArea);
1934 Simulator::Stop(
Seconds(2.500));
1941 Simulator::Destroy();
1945 std::string schedulerType)
1948 NS_LOG_INFO(
"Creating LteDistributedFfrAreaTestCase");
1966 double eNbTxPower = 30;
1978 uint16_t bandwidth = 25;
1989 remoteHostContainer.
Create(1);
1992 internet.
Install(remoteHostContainer);
2001 ipv4h.
SetBase(
"1.0.0.0",
"255.0.0.0");
2010 remoteHostStaticRouting->AddNetworkRouteTo(
Ipv4Address(
"7.0.0.0"),
Ipv4Mask(
"255.0.0.0"), 1);
2034 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
2035 positionAlloc->Add(Vector(1000, 0.0, 0.0));
2037 positionAlloc->Add(Vector(200, 0.0, 0.0));
2038 positionAlloc->Add(Vector(200, 0.0, 0.0));
2039 positionAlloc->Add(Vector(800, 0.0, 0.0));
2042 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
2043 mobility.SetPositionAllocator(positionAlloc);
2071 ueLteDevs.
Add(ueDevs1);
2072 ueLteDevs.
Add(ueDevs2);
2092 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
2093 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
2096 uint16_t dlPort = 10000;
2097 uint16_t ulPort = 20000;
2172 ->GetDownlinkSpectrumPhy()
2178 testDlSpectrumPhy->SetRxSpectrumModel(
2180 dlChannel->AddRx(testDlSpectrumPhy);
2182 testDlSpectrumPhy->SetCellId(2);
2184 testDlSpectrumPhy->TraceConnectWithoutContext(
2192 ->GetUplinkSpectrumPhy()
2197 testUlSpectrumPhy->SetRxSpectrumModel(
2199 ulChannel->AddRx(testUlSpectrumPhy);
2201 testUlSpectrumPhy->SetCellId(2);
2203 testUlSpectrumPhy->TraceConnectWithoutContext(
2207 double expectedDlPowerCenterArea = 1.0;
2208 std::vector<bool> expectedDlRbCenterArea;
2210 std::vector<bool> expectedUlRbCenterArea;
2214 expectedDlRbCenterArea[i] =
true;
2215 expectedUlRbCenterArea[i] =
true;
2218 double expectedDlPowerEdgeArea = 2.0;
2219 std::vector<bool> expectedDlRbEdgeArea;
2221 std::vector<bool> expectedUlRbEdgeArea;
2225 expectedDlRbEdgeArea[i] =
true;
2226 expectedUlRbEdgeArea[i] =
true;
2229 std::vector<bool> expectedDlRbEdgeArea2;
2231 std::vector<bool> expectedUlRbEdgeArea2;
2235 expectedDlRbEdgeArea2[i] =
true;
2236 expectedUlRbEdgeArea2[i] =
true;
2244 expectedDlPowerCenterArea,
2245 expectedDlRbCenterArea);
2250 expectedUlRbCenterArea);
2257 expectedDlPowerEdgeArea,
2258 expectedDlRbEdgeArea);
2263 expectedUlRbEdgeArea);
2271 expectedDlPowerEdgeArea,
2272 expectedDlRbEdgeArea2);
2277 expectedUlRbEdgeArea2);
2285 expectedDlPowerEdgeArea,
2286 expectedDlRbEdgeArea);
2291 expectedUlRbEdgeArea);
2298 expectedDlPowerCenterArea,
2299 expectedDlRbCenterArea);
2304 expectedUlRbCenterArea);
2306 Simulator::Stop(
Seconds(2.500));
2311 "Scheduler used DL RBG muted by FFR Algorithm");
2316 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 teleporing UEs to different parts of area and checking if the frequ...
Time m_teleportTime
the telport 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 stric 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.
AttributeValue implementation for Boolean.
AttributeValue implementation for DataRate.
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.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
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.
AttributeValue implementation for Time.
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.
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 UlDataRxStartNofiticationArea(LteFrAreaTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
void DlDataRxStartNofiticationArea(LteFrAreaTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
static LteFrequencyReuseTestSuite lteFrequencyReuseTestSuite
void DlDataRxStartNofitication(LteFrTestCase *testcase, Ptr< const SpectrumValue > spectrumValue)
TestCase Data.
void UlDataRxStartNofitication(LteFrTestCase *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