24 #include "ns3/boolean.h"
53 { 2, 100, 28, 24, 24},
78 { 2, 100, 28, 24, 24},
89 m_dlEgdeSubBandOffset (0),
90 m_dlEdgeSubBandwidth (0),
91 m_ulEgdeSubBandOffset (0),
92 m_ulEdgeSubBandwidth (0),
123 .AddAttribute (
"UlCommonSubBandwidth",
124 "Uplink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
127 MakeUintegerChecker<uint8_t> ())
128 .AddAttribute (
"UlEdgeSubBandOffset",
129 "Uplink Edge SubBand Offset in number of Resource Block Groups",
132 MakeUintegerChecker<uint8_t> ())
133 .AddAttribute (
"UlEdgeSubBandwidth",
134 "Uplink Edge SubBandwidth Configuration in number of Resource Block Groups",
137 MakeUintegerChecker<uint8_t> ())
138 .AddAttribute (
"DlCommonSubBandwidth",
139 "Downlink Medium (Common) SubBandwidth Configuration in number of Resource Block Groups",
142 MakeUintegerChecker<uint8_t> ())
143 .AddAttribute (
"DlEdgeSubBandOffset",
144 "Downlink Edge SubBand Offset in number of Resource Block Groups",
147 MakeUintegerChecker<uint8_t> ())
148 .AddAttribute (
"DlEdgeSubBandwidth",
149 "Downlink Edge SubBandwidth Configuration in number of Resource Block Groups",
152 MakeUintegerChecker<uint8_t> ())
153 .AddAttribute (
"CenterRsrqThreshold",
154 "If the RSRQ of is worse than this threshold, UE should be served in Medium sub-band",
157 MakeUintegerChecker<uint8_t> ())
158 .AddAttribute (
"EdgeRsrqThreshold",
159 "If the RSRQ of is worse than this threshold, UE should be served in Edge sub-band",
162 MakeUintegerChecker<uint8_t> ())
163 .AddAttribute (
"CenterAreaPowerOffset",
164 "PdschConfigDedicated::Pa value for Center Sub-band, default value dB0",
167 MakeUintegerChecker<uint8_t> ())
168 .AddAttribute (
"MediumAreaPowerOffset",
169 "PdschConfigDedicated::Pa value for Medium Sub-band, default value dB0",
172 MakeUintegerChecker<uint8_t> ())
173 .AddAttribute (
"EdgeAreaPowerOffset",
174 "PdschConfigDedicated::Pa value for Edge Sub-band, default value dB0",
177 MakeUintegerChecker<uint8_t> ())
178 .AddAttribute (
"CenterAreaTpc",
179 "TPC value which will be set in DL-DCI for UEs in center area"
180 "Absolute mode is used, default value 1 is mapped to -1 according to"
181 "TS36.213 Table 5.1.1.1-2",
184 MakeUintegerChecker<uint8_t> ())
185 .AddAttribute (
"MediumAreaTpc",
186 "TPC value which will be set in DL-DCI for UEs in medium area"
187 "Absolute mode is used, default value 1 is mapped to -1 according to"
188 "TS36.213 Table 5.1.1.1-2",
191 MakeUintegerChecker<uint8_t> ())
192 .AddAttribute (
"EdgeAreaTpc",
193 "TPC value which will be set in DL-DCI for UEs in edge area"
194 "Absolute mode is used, default value 1 is mapped to -1 according to"
195 "TS36.213 Table 5.1.1.1-2",
198 MakeUintegerChecker<uint8_t> ())
250 NS_LOG_LOGIC (
this <<
" requesting Event A1 measurements"
251 <<
" (threshold = 0" <<
")");
323 "DlCommonSubBandwidth + DlEgdeSubBandOffset higher than DlBandwidth");
327 "(DlCommonSubBandwidth + DlEgdeSubBandOffset+DlEdgeSubBandwidth) higher than DlBandwidth");
360 "UlCommonSubBandwidth + UlEgdeSubBandOffset higher than UlBandwidth");
364 "(UlCommonSubBandwidth + UlEgdeSubBandOffset+UlEdgeSubBandwidth) higher than UlBandwidth");
408 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
409 if (it ==
m_ues.end ())
414 it =
m_ues.find (rnti);
423 bool isCenterUe =
false;
424 bool isMediumUe =
false;
425 bool isEdgeUe =
false;
440 return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
470 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
471 if (it ==
m_ues.end ())
476 it =
m_ues.find (rnti);
485 bool isCenterUe =
false;
486 bool isMediumUe =
false;
487 bool isEdgeUe =
false;
502 return (isCenterRbg && isCenterUe) || (isMediumRbg && isMediumUe) || (isEdgeRbg && isEdgeUe);
509 NS_LOG_WARN (
"Method should not be called, because it is empty");
516 NS_LOG_WARN (
"Method should not be called, because it is empty");
523 NS_LOG_WARN (
"Method should not be called, because it is empty");
546 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
547 if (it ==
m_ues.end ())
578 uint8_t centerSubBandwidth = 0;
579 uint8_t mediumSubBandwidth = 0;
580 uint8_t edgeSubBandwidth = 0;
586 centerSubBandwidth++;
594 mediumSubBandwidth++;
608 minContinuousUlBandwidth =
609 ((centerSubBandwidth > 0 ) && (centerSubBandwidth < minContinuousUlBandwidth)) ? centerSubBandwidth : minContinuousUlBandwidth;
611 minContinuousUlBandwidth =
612 ((mediumSubBandwidth > 0 ) && (mediumSubBandwidth < minContinuousUlBandwidth)) ? mediumSubBandwidth : minContinuousUlBandwidth;
614 minContinuousUlBandwidth =
615 ((edgeSubBandwidth > 0 ) && (edgeSubBandwidth < minContinuousUlBandwidth)) ? edgeSubBandwidth : minContinuousUlBandwidth;
617 NS_LOG_INFO (
"minContinuousUlBandwidth: " << (
int)minContinuousUlBandwidth);
619 return minContinuousUlBandwidth;
628 <<
" RSRP: " << (uint16_t)measResults.
rsrpResult
629 <<
" RSRQ: " << (uint16_t)measResults.
rsrqResult);
632 "CenterSubBandThreshold must be higher than EgdeSubBandThreshold");
641 std::map< uint16_t, uint8_t >::iterator it =
m_ues.find (rnti);
642 if (it ==
m_ues.end ())
647 it =
m_ues.find (rnti);
652 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Center sub-band");
664 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Edge sub-band");
676 NS_LOG_INFO (
"UE RNTI: " << rnti <<
" will be served in Medium sub-band");
691 NS_LOG_WARN (
"Method should not be called, because it is empty");
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
virtual void DoInitialize(void)
Initialize() implementation.
Template for the implementation of the LteFfrRrcSapProvider as a member of an owner class of type C t...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
#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_ulEdgeRbgMap
std::vector< bool > m_dlCenterRbgMap
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
void InitializeDownlinkRbgMaps()
enum ns3::LteRrcSap::ReportConfigEutra::@70 eventId
Choice of E-UTRA event triggered reporting criteria.
uint8_t m_ulCommonSubBandwidth
void InitializeUplinkRbgMaps()
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
virtual LteFfrSapProvider * GetLteFfrSapProvider()
Export the "provider" part of the LteFfrSap interface.
virtual bool DoIsUlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsUlRbgAvailableForUe.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
uint8_t m_dlEdgeSubBandwidth
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual void DoRecvLoadInformation(EpcX2Sap::LoadInformationParams params)
DoRecvLoadInformation.
uint8_t dlEdgeSubBandwidth
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
virtual void SetLteFfrRrcSapUser(LteFfrRrcSapUser *s)
Set the "user" part of the LteFfrRrcSap interface that this frequency reuse algorithm instance will i...
virtual bool DoIsDlRbgAvailableForUe(int i, uint16_t rnti)
Implementation of LteFfrSapProvider::IsDlRbgAvailableForUe.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)
Implementation of LteFfrRrcSapProvider::ReportUeMeas.
uint8_t m_centerSubBandThreshold
uint8_t dlCommonSubBandwidth
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 SetPdschConfigDedicated(uint16_t rnti, LteRrcSap::PdschConfigDedicated pdschConfigDedicated)=0
Instruct the eNodeB RRC entity to perform RrcConnectionReconfiguration to inform UE about new PdschCo...
std::vector< bool > m_ulCenterRbgMap
Template for the implementation of the LteFfrSapProvider as a member of an owner class of type C to w...
static const struct ns3::FfrSoftDownlinkDefaultConfiguration g_ffrSoftDownlinkDefaultConfiguration[]
Reference Signal Received Quality.
uint8_t m_centerAreaPowerOffset
virtual uint8_t DoGetTpc(uint16_t rnti)
DoGetTpc for UE.
Event A1: Serving becomes better than absolute threshold.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
std::vector< bool > m_ulRbgMap
Soft Fractional Frequency Reuse algorithm implementation.
Hold an unsigned integer type.
std::vector< bool > m_dlRbgMap
std::vector< bool > m_dlEdgeRbgMap
uint8_t ulEdgeSubBandwidth
bool m_enabledInUplink
If true FR algorithm will also work in Uplink.
bool m_needReconfiguration
If true FR algorithm will be reconfigured.
uint8_t m_dlEgdeSubBandOffset
std::vector< bool > m_ulMediumRbgMap
virtual void DoReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)
DoReportDlCqiInfo.
uint8_t m_dlCommonSubBandwidth
uint8_t m_dlBandwidth
downlink bandwidth in RBs
virtual LteFfrRrcSapProvider * GetLteFfrRrcSapProvider()
Export the "provider" part of the LteFfrRrcSap interface.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
virtual void Reconfigure()
Automatic FR reconfiguration.
LteFfrSapUser * m_ffrSapUser
virtual std::vector< bool > DoGetAvailableUlRbg()
Implementation of LteFfrSapProvider::GetAvailableUlRbg.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
The abstract base class of a Frequency Reuse algorithm.
uint8_t m_edgeAreaPowerOffset
virtual std::vector< bool > DoGetAvailableDlRbg()
Implementation of LteFfrSapProvider::GetAvailableDlRbg.
uint8_t range
Value range used in RSRP/RSRQ threshold.
virtual void DoInitialize()
Initialize() implementation.
std::map< uint16_t, uint8_t > m_ues
virtual ~LteFfrSoftAlgorithm()
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
enum ns3::LteRrcSap::ReportConfigEutra::@72 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
virtual void DoReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)
DoReportUlCqiInfo.
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
uint8_t m_frCellTypeId
FFR cell type ID for automatic configuration.
void SetUplinkConfiguration(uint16_t cellId, uint8_t bandwidth)
uint8_t m_egdeSubBandThreshold
uint8_t ulEgdeSubBandOffset
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
enum ns3::LteRrcSap::ThresholdEutra::@68 choice
void SetDownlinkConfiguration(uint16_t cellId, uint8_t bandwidth)
virtual void SetLteFfrSapUser(LteFfrSapUser *s)
Set the "user" part of the LteFfrSap interface that this frequency reuse algorithm instance will inte...
uint8_t m_ulEgdeSubBandOffset
int GetRbgSize(int dlbandwidth)
Get RBG size for DL Bandwidth according to table 7.1.6.1-1 of 36.213.
enum ns3::LteRrcSap::ReportConfigEutra::@74 reportInterval
Indicates the interval between periodical reports.
virtual void DoDispose()
Destructor implementation.
std::vector< bool > m_dlMediumRbgMap
uint8_t ulCommonSubBandwidth
LteFfrRrcSapProvider * m_ffrRrcSapProvider
static TypeId GetTypeId()
const uint16_t NUM_DOWNLINK_CONFS(sizeof(g_ffrEnhancedDownlinkDefaultConfiguration)/sizeof(FfrEnhancedDownlinkDefaultConfiguration))
LteFfrSapProvider * m_ffrSapProvider
uint8_t dlEgdeSubBandOffset
RSRQ is used for the threshold.
static const struct ns3::FfrSoftUplinkDefaultConfiguration g_ffrSoftUplinkDefaultConfiguration[]
virtual uint8_t DoGetMinContinuousUlBandwidth()
DoGetMinContinuousUlBandwidth in number of RB.
uint8_t m_ulEdgeSubBandwidth
uint8_t m_mediumAreaPowerOffset
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface.
LteFfrRrcSapUser * m_ffrRrcSapUser
TypeId SetParent(TypeId tid)
Set the parent TypeId.
LteFfrSoftAlgorithm()
Creates a trivial ffr algorithm instance.
const uint16_t NUM_UPLINK_CONFS(sizeof(g_ffrEnhancedUplinkDefaultConfiguration)/sizeof(FfrEnhancedUplinkDefaultConfiguration))