33    : m_ffrSapUser(nullptr),
 
   34      m_ffrRrcSapUser(nullptr)
 
   58        TypeId(
"ns3::LteFfrDistributedAlgorithm")
 
   63                "CalculationInterval",
 
   64                "Time interval between calculation of Edge sub-band, Default value 1 second",
 
   70                "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
 
   73                MakeUintegerChecker<uint8_t>())
 
   75                "RsrpDifferenceThreshold",
 
   76                "If the difference between the power of the signal received by UE from " 
   77                "the serving cell and the power of the signal received from the adjacent cell is " 
   79                "than a RsrpDifferenceThreshold value, the cell weight is incremented",
 
   82                MakeUintegerChecker<uint8_t>())
 
   83            .AddAttribute(
"CenterPowerOffset",
 
   84                          "PdschConfigDedicated::Pa value for Center Sub-band, default value dB0",
 
   87                          MakeUintegerChecker<uint8_t>())
 
   88            .AddAttribute(
"EdgePowerOffset",
 
   89                          "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
 
   92                          MakeUintegerChecker<uint8_t>())
 
   93            .AddAttribute(
"EdgeRbNum",
 
   94                          "Number of RB that can be used in edge Sub-band",
 
   97                          MakeUintegerChecker<uint8_t>())
 
   98            .AddAttribute(
"CenterAreaTpc",
 
   99                          "TPC value which will be set in DL-DCI for UEs in center area" 
  100                          "Absolute mode is used, default value 1 is mapped to -1 according to" 
  101                          "TS36.213 Table 5.1.1.1-2",
 
  104                          MakeUintegerChecker<uint8_t>())
 
  105            .AddAttribute(
"EdgeAreaTpc",
 
  106                          "TPC value which will be set in DL-DCI for UEs in edge area" 
  107                          "Absolute mode is used, default value 1 is mapped to -1 according to" 
  108                          "TS36.213 Table 5.1.1.1-2",
 
  111                          MakeUintegerChecker<uint8_t>())
 
  157    NS_LOG_LOGIC(
this << 
" requesting Event A1 and A4 measurements" 
  250    auto it = 
m_ues.find(rnti);
 
  251    if (it == 
m_ues.end())
 
  263    return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
 
  291    auto it = 
m_ues.find(rnti);
 
  292    if (it == 
m_ues.end())
 
  304    return (edgeRbg && edgeUe) || (!edgeRbg && !edgeUe);
 
  312    NS_LOG_WARN(
"Method should not be called, because it is empty");
 
  320    NS_LOG_WARN(
"Method should not be called, because it is empty");
 
  327    NS_LOG_WARN(
"Method should not be called, because it is empty");
 
  351    auto it = 
m_ues.find(rnti);
 
  352    if (it == 
m_ues.end())
 
  378        return minContinuousUlBandwidth;
 
  383                                   : minContinuousUlBandwidth;
 
  385    return minContinuousUlBandwidth;
 
  393                           << 
" MeasId: " << (uint16_t)measResults.
measId 
  400        auto it = 
m_ues.find(rnti);
 
  401        if (it == 
m_ues.end())
 
  406        it = 
m_ues.find(rnti);
 
  411                NS_LOG_INFO(
"UE RNTI: " << rnti << 
" will be served in Center sub-band");
 
  423                NS_LOG_INFO(
"UE RNTI: " << rnti << 
" will be served in Edge sub-band");
 
  434        auto it = 
m_ues.find(rnti);
 
  435        if (it == 
m_ues.end())
 
  452                              "RSRP measurement is missing from cellId " << it->physCellId);
 
  454                              "RSRQ measurement is missing from cellId " << it->physCellId);
 
  460                    if ((*ncIt) == it->physCellId)
 
  474                this << 
" Event A4 received without measurement results from neighbouring cells");
 
  503    for (
auto areaIt = 
m_ues.begin(); areaIt != 
m_ues.end(); areaIt++)
 
  515            auto areaIt = 
m_ues.find(it1->first);
 
  521            servingCellMeasures = 
nullptr;
 
  522            neighbourCellMeasures = 
nullptr;
 
  524            auto it2 = it1->second.find(
m_cellId);
 
  525            if (it2 != it1->second.end())
 
  527                servingCellMeasures = it2->second;
 
  534            for (it2 = it1->second.begin(); it2 != it1->second.end(); it2++)
 
  538                    neighbourCellMeasures = it2->second;
 
  545                if (servingCellMeasures && neighbourCellMeasures)
 
  547                    int16_t rsrpDifference =
 
  548                        servingCellMeasures->m_rsrp - neighbourCellMeasures->m_rsrp;
 
  550                                           << 
" NeighborCellId: " << neighbourCellMeasures->m_cellId
 
  551                                           << 
" RSRP Serving: " << (
int)servingCellMeasures->m_rsrp
 
  552                                           << 
" RSRP Neighbor: " 
  553                                           << (
int)neighbourCellMeasures->m_rsrp
 
  554                                           << 
" RSRP Difference: " << (
int)rsrpDifference);
 
  564        std::map<uint16_t, uint64_t> metricA;
 
  565        for (uint16_t i = 0; i < rbgNum; i++)
 
  573                                   << 
" Weight: " << cellIt->second);
 
  575            auto rntpIt = 
m_rntp.find(cellIt->first);
 
  576            if (rntpIt == 
m_rntp.end())
 
  581            for (uint16_t i = 0; i < rbgNum; i++)
 
  583                if (rntpIt->second[i])
 
  585                    metricA[i] += cellIt->second;
 
  590        std::vector<uint16_t> sortedRbgByMetric;
 
  591        std::multimap<uint64_t, uint16_t> sortedMetricA;
 
  592        for (
auto it = metricA.begin(); it != metricA.end(); ++it)
 
  594            sortedMetricA.insert(std::pair<uint64_t, uint16_t>(it->second, it->first));
 
  597        for (
auto it = sortedMetricA.begin(); it != sortedMetricA.end(); ++it)
 
  599            sortedRbgByMetric.push_back(it->second);
 
  609            uint32_t rbgIndex = sortedRbgByMetric[i];
 
  610            for (
int k = 0; k < rbgSize; k++)
 
  612                uint32_t rbIndex = rbgSize * rbgIndex + k;
 
  629    NS_LOG_INFO(
"SendLoadInformation to CellId : " << targetCellId);
 
  631    std::vector<EpcX2Sap::UlInterferenceOverloadIndicationItem>
 
  632        m_currentUlInterferenceOverloadIndicationList;
 
  633    std::vector<EpcX2Sap::UlHighInterferenceInformationItem>
 
  634        m_currentUlHighInterferenceInformationList;
 
  646    params.targetCellId = targetCellId;
 
  647    params.cellInformationList.push_back(cii);
 
  657                           << params.cellInformationList[0].sourceCellId);
 
  659    if (params.cellInformationList[0].sourceCellId > 
m_cellId)
 
  664    uint16_t neighborCellId = params.cellInformationList[0].sourceCellId;
 
  665    auto it = 
m_rntp.find(neighborCellId);
 
  668        it->second = params.cellInformationList[0].relativeNarrowbandTxBand.rntpPerPrbList;
 
  672        m_rntp.insert(std::pair<uint16_t, std::vector<bool>>(
 
  674            params.cellInformationList[0].relativeNarrowbandTxBand.rntpPerPrbList));
 
  692        auto ret = 
m_ueMeasures.insert(std::pair<uint16_t, MeasurementRow_t>(rnti, row));
 
  698    auto it2 = it1->second.find(cellId);
 
  700    if (it2 != it1->second.end())
 
  702        it2->second->m_cellId = cellId;
 
  703        it2->second->m_rsrp = rsrp;
 
  704        it2->second->m_rsrq = rsrq;
 
  710        cellMeasures->m_cellId = cellId;
 
  711        cellMeasures->m_rsrp = rsrp;
 
  712        cellMeasures->m_rsrq = rsrq;
 
  713        it1->second[cellId] = cellMeasures;
 
The abstract base class of a Frequency Reuse algorithm.
 
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
 
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
 
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
 
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
 
uint8_t m_dlBandwidth
downlink bandwidth in RBs
 
uint8_t m_ulBandwidth
uplink bandwidth in RBs
 
Distributed Fractional Frequency Reuse algorithm implementation.
 
std::map< uint16_t, Ptr< UeMeasure > > MeasurementRow_t
Cell Id is used as the key for the following map.
 
void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) override
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
 
uint8_t DoGetTpc(uint16_t rnti) override
DoGetTpc for UE.
 
LteFfrSapProvider * m_ffrSapProvider
FFR SAP Provider.
 
~LteFfrDistributedAlgorithm() override
 
LteFfrRrcSapProvider * m_ffrRrcSapProvider
FFR RRC SAP Provider.
 
std::map< uint16_t, uint8_t > m_ues
UEs map.
 
void UpdateNeighbourMeasurements(uint16_t rnti, uint16_t cellId, uint8_t rsrp, uint8_t rsrq)
Initialize up link RBG maps function.
 
uint8_t m_rsrpDifferenceThreshold
RSRP difference threshold.
 
uint8_t m_rsrpMeasId
RSRP measurement ID.
 
void DoDispose() override
Destructor implementation.
 
Time m_calculationInterval
calculation interval
 
LteFfrRrcSapUser * m_ffrRrcSapUser
FFR RRC SAP User.
 
std::map< uint16_t, uint32_t > m_cellWeightMap
cell weight map
 
friend class MemberLteFfrSapProvider< LteFfrDistributedAlgorithm >
let the forwarder class access the protected and private members
 
bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
 
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set up link configuration function.
 
void DoInitialize() override
Initialize() implementation.
 
void DoReportDlCqiInfo(const FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms) override
DoReportDlCqiInfo.
 
LteFfrDistributedAlgorithm()
 
uint8_t m_edgeAreaTpc
edge area TCP
 
uint8_t m_rsrqMeasId
RSRQ measurement ID.
 
uint16_t DoGetMinContinuousUlBandwidth() override
DoGetMinContinuousUlBandwidth in number of RB.
 
uint8_t m_edgePowerOffset
edge power offset
 
void SetLteFfrSapUser(LteFfrSapUser *s) override
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
 
void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params) override
DoRecvLoadInformation.
 
uint8_t m_centerAreaTpc
center area TPC
 
MeasurementTable_t m_ueMeasures
UE measures.
 
std::vector< bool > DoGetAvailableDlRbg() override
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
 
std::map< uint16_t, std::vector< bool > > m_rntp
RNTP.
 
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
Set down link configuration function.
 
std::vector< uint16_t > m_neighborCell
neighbor cell
 
friend class MemberLteFfrRrcSapProvider< LteFfrDistributedAlgorithm >
let the forwarder class access the protected and private members
 
std::vector< bool > m_ulRbgMap
UL RBG map.
 
uint8_t m_edgeRbNum
edge RB number
 
std::vector< bool > m_ulEdgeRbgMap
UL edge RBG map.
 
uint8_t m_edgeSubBandRsrqThreshold
edge sub band RSRQ threshold
 
EventId m_calculationEvent
calculation event
 
std::vector< bool > DoGetAvailableUlRbg() override
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
 
bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti) override
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
 
static TypeId GetTypeId()
Get the type ID.
 
LteFfrSapProvider * GetLteFfrSapProvider() override
Export the "provider" part of the LteFfrSap interface.
 
void Calculate()
Calculate function.
 
LteFfrRrcSapProvider * GetLteFfrRrcSapProvider() override
Export the "provider" part of the LteFfrRrcSap interface.
 
std::vector< bool > m_dlRbgMap
DL RBG map.
 
void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s) override
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
 
void Reconfigure() override
Automatic FR reconfiguration.
 
uint8_t m_centerPowerOffset
center power offset
 
void InitializeUplinkRbgMaps()
Initialize up link RBG maps function.
 
std::vector< bool > m_dlEdgeRbgMap
DL edge RBG map.
 
LteFfrSapUser * m_ffrSapUser
FFR SAP User.
 
void DoReportUlCqiInfo(const FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms) override
DoReportUlCqiInfo.
 
void SendLoadInformation(uint16_t targetCellId)
Send load information function.
 
void InitializeDownlinkRbgMaps()
Initialize down link RBG maps function.
 
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
 
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
 
virtual void SetPdschConfigDedicated(uint16_t rnti, LteRrcSap::PdschConfigDedicated pdschConfigDedicated)=0
Instruct the eNodeB RRC entity to perform RrcConnectionReconfiguration to inform UE about new PdschCo...
 
virtual uint8_t AddUeMeasReportConfigForFfr(LteRrcSap::ReportConfigEutra reportConfig)=0
Request a certain reporting configuration to be fulfilled by the UEs attached to the eNodeB entity.
 
virtual void SendLoadInformation(EpcX2Sap::LoadInformationParams params)=0
SendLoadInformation.
 
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
 
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
 
virtual void DoInitialize()
Initialize() implementation.
 
Smart pointer class similar to boost::intrusive_ptr.
 
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
 
static EventId ScheduleNow(FUNC f, Ts &&... args)
Schedule an event to expire Now.
 
AttributeValue implementation for Time.
 
a unique identifier for an interface.
 
TypeId SetParent(TypeId tid)
Set the parent TypeId.
 
Hold an unsigned integer type.
 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
 
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
 
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
 
#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_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
 
Time Seconds(double value)
Construct a Time in the indicated unit.
 
Every class exported by the ns3 library is enclosed in the ns3 namespace.
 
Relative Narrowband Tx Power (RNTP) as it is used in the LOAD INFORMATION message.
 
std::vector< bool > rntpPerPrbList
RNTP per prb list.
 
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
 
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
 
uint8_t rsrqResult
the RSRQ result
 
uint8_t rsrpResult
the RSRP result
 
bool haveMeasResultNeighCells
have measure result neighbor cells
 
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
 
MeasResultPCell measResultPCell
measurement result primary cell
 
PdschConfigDedicated structure.
 
Specifies criteria for triggering of an E-UTRA measurement reporting event.
 
enum ns3::LteRrcSap::ReportConfigEutra::@62 eventId
Event enumeration.
 
@ RSRP
Reference Signal Received Power.
 
@ RSRQ
Reference Signal Received Quality.
 
@ EVENT_A4
Event A4: Neighbour becomes better than absolute threshold.
 
@ EVENT_A1
Event A1: Serving becomes better than absolute threshold.
 
enum ns3::LteRrcSap::ReportConfigEutra::@65 reportInterval
Report interval enumeration.
 
enum ns3::LteRrcSap::ReportConfigEutra::@63 triggerQuantity
Trigger type enumeration.
 
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
 
@ THRESHOLD_RSRP
RSRP is used for the threshold.
 
@ THRESHOLD_RSRQ
RSRQ is used for the threshold.
 
enum ns3::LteRrcSap::ThresholdEutra::@60 choice
Threshold enumeration.
 
uint8_t range
Value range used in RSRP/RSRQ threshold.