5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrMacSchedulerTdmaAi Class Reference

The TDMA scheduler with AI implementation. More...

#include "nr-mac-scheduler-tdma-ai.h"

+ Inheritance diagram for ns3::NrMacSchedulerTdmaAi:
+ Collaboration diagram for ns3::NrMacSchedulerTdmaAi:

Public Member Functions

 NrMacSchedulerTdmaAi ()
 NrMacSchedulerTdma constructor.
 
- Public Member Functions inherited from ns3::NrMacSchedulerTdmaQos
 NrMacSchedulerTdmaQos ()
 NrMacSchedulerTdmaQos constructor.
 
 ~NrMacSchedulerTdmaQos () override
 ~NrMacSchedulerTdmaQos deconstructor
 
double GetFairnessIndex () const
 Get the value of attribute "FairnessIndex".
 
double GetTimeWindow () const
 Get the attribute "LastAvgTPutWeight".
 
void SetFairnessIndex (double v)
 Set the value of attribute "FairnessIndex".
 
void SetTimeWindow (double v)
 Set the attribute "LastAvgTPutWeight".
 
- Public Member Functions inherited from ns3::NrMacSchedulerTdmaRR
 NrMacSchedulerTdmaRR ()
 NrMacSchedulerTdmaRR constructor.
 
 ~NrMacSchedulerTdmaRR () override
 ~NrMacSchedulerTdmaRR deconstructor
 
- Public Member Functions inherited from ns3::NrMacSchedulerTdma
 NrMacSchedulerTdma ()
 NrMacSchedulerTdma constructor.
 
 ~NrMacSchedulerTdma () override
 NrMacSchedulerTdma deconstructor.
 
- Public Member Functions inherited from ns3::NrMacSchedulerNs3
 NrMacSchedulerNs3 ()
 NrMacSchedulerNs3 default constructor.
 
 NrMacSchedulerNs3 (const NrMacSchedulerNs3 &other)=delete
 NrMacSchedulerNs3 copy constructor (deleted)
 
 ~NrMacSchedulerNs3 () override
 NrMacSchedulerNs3 deconstructor.
 
int64_t AssignStreams (int64_t stream) override
 Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.
 
void DoCschedCellConfigReq (const NrMacCschedSapProvider::CschedCellConfigReqParameters &params) override
 Cell configuration.
 
void DoCschedLcConfigReq (const NrMacCschedSapProvider::CschedLcConfigReqParameters &params) override
 Configure a logical channel for a UE.
 
void DoCschedLcReleaseReq (const NrMacCschedSapProvider::CschedLcReleaseReqParameters &params) override
 Release a LC.
 
void DoCschedUeConfigReq (const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) override
 Register an UE.
 
void DoCschedUeReleaseReq (const NrMacCschedSapProvider::CschedUeReleaseReqParameters &params) override
 Release an UE.
 
void DoSchedDlCqiInfoReq (const NrMacSchedSapProvider::SchedDlCqiInfoReqParameters &params) override
 Received a DL CQI message.
 
void DoSchedDlRachInfoReq (const NrMacSchedSapProvider::SchedDlRachInfoReqParameters &params) override
 RACH information.
 
void DoSchedDlRlcBufferReq (const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters &params) override
 RLC informs of DL data.
 
void DoSchedDlTriggerReq (const NrMacSchedSapProvider::SchedDlTriggerReqParameters &params) override
 Decide how to fill the frequency/time of a DL slot.
 
void DoSchedSetMcs (uint32_t mcs) override
 Set a fixed MCS.
 
void DoSchedUlCqiInfoReq (const NrMacSchedSapProvider::SchedUlCqiInfoReqParameters &params) override
 Received a UL CQI message.
 
void DoSchedUlMacCtrlInfoReq (const NrMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters &params) override
 Evaluate different types of control messages (only BSR for the moment)
 
void DoSchedUlSrInfoReq (const NrMacSchedSapProvider::SchedUlSrInfoReqParameters &params) override
 Save the SR list into m_srList.
 
void DoSchedUlTriggerReq (const NrMacSchedSapProvider::SchedUlTriggerReqParameters &params) override
 Decide how to fill the frequency/time of a UL slot.
 
void EnableHarqReTx (bool enableFlag)
 Enable HARQ ReTx function.
 
Time GetCqiTimerThreshold () const
 Get the CqiTimerThreshold.
 
Ptr< const NrAmcGetDlAmc () const
 Get the AMC for DL.
 
uint8_t GetDlCtrlSyms () const override
 Retrieve the number of DL ctrl symbols configured in the scheduler.
 
std::vector< bool > GetDlNotchedRbgMask () const
 Get the notched (blank) RBGs Mask for the DL.
 
int8_t GetMaxDlMcs () const
 Get the maximum DL MCS index.
 
NrFhSchedSapUserGetNrFhSchedSapUser () override
 
uint64_t GetNumRbPerRbg () const
 Private function that is used to get the number of resource blocks per resource block group and also to check whether this value is configured.
 
uint8_t GetSrsCtrlSyms () const
 Get the configured value for the SRS symbols.
 
uint8_t GetStartMcsDl () const
 Get the DL MCS starting value.
 
uint8_t GetStartMcsUl () const
 Get the DL MCS starting value.
 
Ptr< const NrAmcGetUlAmc () const
 Get the AMC for UL.
 
uint8_t GetUlCtrlSyms () const override
 Retrieve the number of UL ctrl symbols configured in the scheduler.
 
std::vector< bool > GetUlNotchedRbgMask () const
 Get the notched (blank) RBGs Mask for the UL.
 
void InstallDlAmc (const Ptr< NrAmc > &dlAmc)
 Install the AMC for the DL part.
 
void InstallUlAmc (const Ptr< NrAmc > &ulAmc)
 Install the AMC for the DL part.
 
bool IsDlMcsFixed () const
 Check if the MCS in DL is fixed.
 
bool IsHarqReTxEnable () const
 Is HARQ ReTx enable function.
 
bool IsSrsInFSlots () const
 Check if the F slots are allowed for SRS transmission.
 
bool IsSrsInUlSlots () const
 Check if the UL slots are allowed for SRS transmission.
 
bool IsUlMcsFixed () const
 Check if the MCS in UL is fixed.
 
void SetCqiTimerThreshold (const Time &v)
 Set the CqiTimerThreshold.
 
void SetDlCtrlSyms (uint8_t v)
 Set the number of DL ctrl symbols.
 
void SetDlNotchedRbgMask (const std::vector< bool > &dlNotchedRbgsMask)
 Set the notched (blank) RBGs Mask for the DL.
 
void SetFixedDlMcs (bool v)
 Set if the MCS in DL is fixed (in case, it will take the starting value)
 
void SetFixedUlMcs (bool v)
 Set if the MCS in UL is fixed (in case, it will take the starting value)
 
void SetLcSched (const TypeId &type)
 Set LC Scheduler Algorithm model type.
 
void SetMaxDlMcs (int8_t v)
 Set the maximum index for the DL MCS.
 
void SetNrFhSchedSapProvider (NrFhSchedSapProvider *s) override
 
void SetRachUlGrantMcs (uint8_t v)
 Sets the default RACH UL grant MCS.
 
void SetSrsCtrlSyms (uint8_t v)
 Set the number of UL SRS symbols.
 
void SetSrsInFSlots (bool v)
 Set if the F slots are allowed for SRS transmission.
 
void SetSrsInUlSlots (bool v)
 Set if the UL slots are allowed for SRS transmission (if True, UL and F slots may carry SRS, if False, SRS are transmitted only in F slots)
 
void SetStartMcsDl (uint8_t v)
 Set the starting value for the DL MCS.
 
void SetStartMcsUl (uint8_t v)
 Set the starting value for the UL MCS.
 
void SetUlCtrlSyms (uint8_t v)
 Set the number of UL ctrl symbols.
 
void SetUlNotchedRbgMask (const std::vector< bool > &ulNotchedRbgsMask)
 Set the notched (blank) RBGs Mask for the UL.
 
- Public Member Functions inherited from ns3::NrMacScheduler
 NrMacScheduler ()
 NrMacScheduler constructor.
 
 ~NrMacScheduler () override
 NrMacScheduler deconstructor.
 
NrMacCschedSapProviderGetMacCschedSapProvider ()
 Get the MacCschedSapProvider pointer.
 
NrMacSchedSapProviderGetMacSchedSapProvider ()
 Get the MacSchedSapProvider pointer.
 
void SetMacCschedSapUser (NrMacCschedSapUser *sap)
 SetMacCschedSapUser.
 
void SetMacSchedSapUser (NrMacSchedSapUser *sap)
 Set the MacSchedSapUser pointer.
 

Static Public Member Functions

static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacSchedulerTdmaQos
static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacSchedulerTdmaRR
static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacSchedulerTdma
static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacSchedulerNs3
static TypeId GetTypeId ()
 GetTypeId.
 
- Static Public Member Functions inherited from ns3::NrMacScheduler
static TypeId GetTypeId ()
 Get the type id.
 

Protected Member Functions

void CallNotifyDlFn (const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const override
 Call the notify callback function in the OpenGymEnv class in the ns3-gym module for downlink.
 
void CallNotifyUlFn (const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const override
 Call the notify callback function in the OpenGymEnv class in the ns3-gym module for uplink.
 
std::shared_ptr< NrMacSchedulerUeInfoCreateUeRepresentation (const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
 Create an UE representation of the type NrMacSchedulerUeInfoAi.
 
bool GetIsGameOverDl () const
 Check if the downlink game is over.
 
bool GetIsGameOverUl () const
 Check if the uplink game is over.
 
std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> GetUeCompareDlFn () const override
 Return the comparison function to sort DL UEs according to the scheduler policy.
 
std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> GetUeCompareUlFn () const override
 Return the comparison function to sort UL UEs according to the scheduler policy.
 
std::vector< NrMacSchedulerUeInfoAi::LcObservationGetUeObservationsDl (const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
 Get UE observations for downlink.
 
std::vector< NrMacSchedulerUeInfoAi::LcObservationGetUeObservationsUl (const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
 Get UE observations for uplink.
 
float GetUeRewardsDl (const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
 Get rewards for downlink.
 
float GetUeRewardsUl (const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
 Get rewards for uplink.
 
void SetNotifyCbDl (NrMacSchedulerUeInfoAi::NotifyCb notifyCb)
 Set the notify callback function for downlink.
 
void SetNotifyCbUl (NrMacSchedulerUeInfoAi::NotifyCb notifyCb)
 Set the notify callback function for uplink.
 
void UpdateAllUeWeightsDl (const NrMacSchedulerUeInfoAi::UeWeightsMap &ueWeights, const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
 Update weights of all UEs for downlink.
 
void UpdateAllUeWeightsUl (const NrMacSchedulerUeInfoAi::UeWeightsMap &ueWeights, const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
 Update weights of all UEs for uplink.
 
- Protected Member Functions inherited from ns3::NrMacSchedulerTdmaQos
void AssignedDlResources (const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
 Update DL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosDlMetric.
 
void AssignedUlResources (const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
 Update UL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosUlMetric.
 
void BeforeDlSched (const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
 Calculate the potential throughput for the DL based on the available resources.
 
void BeforeUlSched (const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
 Calculate the potential throughput for the UL based on the available resources.
 
std::shared_ptr< NrMacSchedulerUeInfoCreateUeRepresentation (const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
 Create an UE representation of the type NrMacSchedulerUeInfoQos.
 
std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> GetUeCompareDlFn () const override
 Return the comparison function to sort DL UE according to the scheduler policy.
 
std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> GetUeCompareUlFn () const override
 Return the comparison function to sort UL UE according to the scheduler policy.
 
void NotAssignedDlResources (const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totAssigned) const override
 Update DL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosDlMetric.
 
void NotAssignedUlResources (const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totAssigned) const override
 Update UL metrics by calling NrMacSchedulerUeInfoQos::UpdateQosUlMetric.
 
- Protected Member Functions inherited from ns3::NrMacSchedulerTdmaRR
void AssignedDlResources (const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
 Update the UE representation after a symbol (DL) has been assigned to it.
 
void AssignedUlResources (const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
 Update the UE representation after a symbol (DL) has been assigned to it.
 
void BeforeDlSched (const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
 Prepare UE for the DL scheduling.
 
void BeforeUlSched (const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
 Prepare UE for the UL scheduling.
 
std::shared_ptr< NrMacSchedulerUeInfoCreateUeRepresentation (const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
 Create an UE representation of the type NrMacSchedulerUeInfoRR.
 
std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> GetUeCompareDlFn () const override
 Return the comparison function to sort DL UE according to the scheduler policy.
 
std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> GetUeCompareUlFn () const override
 Return the comparison function to sort UL UE according to the scheduler policy.
 
void NotAssignedDlResources (const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totalAssigned) const override
 Update the UE representation after a symbol (DL) has been assigned to other UE.
 
void NotAssignedUlResources (const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totalAssigned) const override
 Update the UE representation after a symbol (UL) has been assigned to other UE.
 
- Protected Member Functions inherited from ns3::NrMacSchedulerTdma
BeamSymbolMap AssignDLRBG (uint32_t symAvail, const ActiveUeMap &activeDl) const override
 Assign the available DL RBG to the UEs.
 
BeamSymbolMap AssignULRBG (uint32_t symAvail, const ActiveUeMap &activeUl) const override
 Assign the available UL RBG to the UEs.
 
void ChangeDlBeam (PointInFTPlane *spoint, uint32_t symOfBeam) const override
 Not doing anything, moving forward the spoint is done by CreateDci.
 
void ChangeUlBeam (PointInFTPlane *spoint, uint32_t symOfBeam) const override
 Not doing anything, moving forward the spoint is done by CreateDci.
 
std::shared_ptr< DciInfoElementTdmaCreateDlDci (PointInFTPlane *spoint, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t maxSym) const override
 Create a DL DCI starting from spoint and spanning maxSym symbols.
 
std::shared_ptr< DciInfoElementTdmaCreateUlDci (PointInFTPlane *spoint, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t maxSym) const override
 Create a UL DCI starting from spoint and spanning maxSym symbols.
 
uint8_t GetTpc () const override
 Returns TPC command.
 
- Protected Member Functions inherited from ns3::NrMacSchedulerNs3
virtual LCPtr CreateLC (const nr::LogicalChannelConfigListElement_s &config) const
 Create a logical channel starting from a configuration.
 
virtual LCGPtr CreateLCG (const nr::LogicalChannelConfigListElement_s &config) const
 Create a logical channel group starting from a configuration.
 
bool DoesFhAllocationFit (uint16_t bwpId, uint32_t mcs, uint32_t nRegs, uint8_t dlRank) const
 Returns a boolean indicating whether the current allocation can fit in the available FH bandwidth (when FH Control is enabled).
 
uint16_t GetBandwidthInRbg () const
 
uint16_t GetBwpId () const
 Get the bwp id of this MAC.
 
uint16_t GetCellId () const
 Get the cell id of this MAC.
 
uint8_t GetFhControlMethod () const
 Get the FH Control Method.
 
virtual uint8_t ScheduleDlHarq (NrMacSchedulerNs3::PointInFTPlane *startingPoint, uint8_t symAvail, const ActiveHarqMap &activeDlHarq, const std::unordered_map< uint16_t, UePtr > &ueMap, std::vector< DlHarqInfo > *dlHarqToRetransmit, const std::vector< DlHarqInfo > &dlHarqFeedback, SlotAllocInfo *slotAlloc) const
 Giving the input, append to slotAlloc the allocations for the DL HARQ retransmissions.
 
virtual uint8_t ScheduleUlHarq (NrMacSchedulerNs3::PointInFTPlane *startingPoint, uint8_t symAvail, const std::unordered_map< uint16_t, UePtr > &ueMap, std::vector< UlHarqInfo > *ulHarqToRetransmit, const std::vector< UlHarqInfo > &ulHarqFeedback, SlotAllocInfo *slotAlloc) const
 Giving the input, append to slotAlloc the allocations for the DL HARQ retransmissions.
 
virtual void SortDlHarq (ActiveHarqMap *activeDlHarq) const
 Sort the DL HARQ retransmission.
 
virtual void SortUlHarq (ActiveHarqMap *activeUlHarq) const
 Sort the UL HARQ retransmission.
 

Friends

class NrTestSchedulerAiCase
 

Additional Inherited Members

- Public Types inherited from ns3::NrMacSchedulerNs3
typedef std::unordered_map< BeamId, HarqVectorIteratorList, BeamIdHashActiveHarqMap
 Map between a beamID and the HARQ of that beam.
 
typedef std::unordered_map< BeamId, std::vector< UePtrAndBufferReq >, BeamIdHashActiveUeMap
 Map between a BeamId and a vector of UE (the UE are in that beam)
 
typedef std::unordered_map< BeamId, uint32_t, BeamIdHashBeamSymbolMap
 Map between a BeamId and the symbol assigned to that beam.
 
typedef PointInFTPlane FTResources
 Represent an amount of RBG/symbols that can be, or is, assigned.
 
using HarqVectorIterator = NrMacHarqVector::iterator
 
using HarqVectorIteratorList = std::vector< HarqVectorIterator >
 
typedef std::pair< UePtr, uint32_t > UePtrAndBufferReq
 Pair between a pointer to NrMacSchedulerUeInfo and its buffer occupancy.
 
- Protected Attributes inherited from ns3::NrMacSchedulerNs3
bool m_activeDlAi {false}
 Flag for activating AI for downlink.
 
bool m_activeUlAi {false}
 Flag for activating AI for uplink.
 
Ptr< NrAmcm_dlAmc
 AMC pointer.
 
NrMacSchedulerUeInfo::McsCsiSource m_mcsCsiSource
 CSI information source for DL MCS estimation.
 
NrFhSchedSapProviderm_nrFhSchedSapProvider {nullptr}
 FH Control SAP provider.
 
NrFhSchedSapUserm_nrFhSchedSapUser {nullptr}
 FH Control SAP user.
 
Ptr< NrAmcm_ulAmc
 AMC pointer.
 
- Protected Attributes inherited from ns3::NrMacScheduler
NrMacCschedSapProviderm_macCschedSapProvider {nullptr}
 SAP Provider.
 
NrMacCschedSapUserm_macCschedSapUser {nullptr}
 SAP User.
 
NrMacSchedSapProviderm_macSchedSapProvider {nullptr}
 SAP Provider.
 
NrMacSchedSapUserm_macSchedSapUser {nullptr}
 SAP user.
 

Detailed Description

The TDMA scheduler with AI implementation.

This class extends the NrMacSchedulerTdmaQos class and implements the AI scheduler for the downlink and uplink. If the AI model is activated, the scheduler uses the AI model to schedule the UEs. If the AI model is not activated, the scheduler works in a similar manner as the QoS scheduler.

When the AI model is activated, the scheduler sends observations to the OpenGymEnv class in the ns3-gym module, which are used to train the AI model. The AI model then sends back the weights for all flows of all UEs. The AI scheduler uses these weights to schedule the UEs.

The AI scheduler also sends rewards to the OpenGymEnv class, which are used to train the AI model. All information needed by the gym is sent once through the NotifyCb callback function for each iteration.

Details in the class NrMacSchedulerUeInfoAI.

Definition at line 34 of file nr-mac-scheduler-tdma-ai.h.

Constructor & Destructor Documentation

◆ NrMacSchedulerTdmaAi()

ns3::NrMacSchedulerTdmaAi::NrMacSchedulerTdmaAi ( )

NrMacSchedulerTdma constructor.

Definition at line 51 of file nr-mac-scheduler-tdma-ai.cc.

Member Function Documentation

◆ CallNotifyDlFn()

void ns3::NrMacSchedulerTdmaAi::CallNotifyDlFn ( const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &  ueVector) const
overrideprotectedvirtual

Call the notify callback function in the OpenGymEnv class in the ns3-gym module for downlink.

Parameters
ueVectorA vector containing pointers to active UEs and their corresponding buffer requests

Reimplemented from ns3::NrMacSchedulerTdma.

Definition at line 179 of file nr-mac-scheduler-tdma-ai.cc.

References GetIsGameOverDl(), GetUeObservationsDl(), GetUeRewardsDl(), and UpdateAllUeWeightsDl().

+ Here is the call graph for this function:

◆ CallNotifyUlFn()

void ns3::NrMacSchedulerTdmaAi::CallNotifyUlFn ( const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &  ueVector) const
overrideprotectedvirtual

Call the notify callback function in the OpenGymEnv class in the ns3-gym module for uplink.

Parameters
ueVectorA vector containing pointers to active UEs and their corresponding buffer requests

Reimplemented from ns3::NrMacSchedulerTdma.

Definition at line 200 of file nr-mac-scheduler-tdma-ai.cc.

References GetIsGameOverUl(), GetUeObservationsUl(), GetUeRewardsUl(), and UpdateAllUeWeightsUl().

+ Here is the call graph for this function:

◆ CreateUeRepresentation()

std::shared_ptr< NrMacSchedulerUeInfo > ns3::NrMacSchedulerTdmaAi::CreateUeRepresentation ( const NrMacCschedSapProvider::CschedUeConfigReqParameters params) const
overrideprotectedvirtual

Create an UE representation of the type NrMacSchedulerUeInfoAi.

Parameters
paramsparameters
Returns
NrMacSchedulerUeInfo instance

Implements ns3::NrMacSchedulerNs3.

Definition at line 57 of file nr-mac-scheduler-tdma-ai.cc.

References ns3::NrMacSchedulerNs3::GetNumRbPerRbg(), and ns3::NrMacCschedSapProvider::CschedUeConfigReqParameters::m_beamId.

+ Here is the call graph for this function:

◆ GetIsGameOverDl()

bool ns3::NrMacSchedulerTdmaAi::GetIsGameOverDl ( ) const
protected

Check if the downlink game is over.

Returns
A boolean value indicating whether the downlink game is over (true) or not (false)

Definition at line 139 of file nr-mac-scheduler-tdma-ai.cc.

Referenced by CallNotifyDlFn().

+ Here is the caller graph for this function:

◆ GetIsGameOverUl()

bool ns3::NrMacSchedulerTdmaAi::GetIsGameOverUl ( ) const
protected

Check if the uplink game is over.

Returns
A boolean value indicating whether the downlink game is over (true) or not (false)

Definition at line 145 of file nr-mac-scheduler-tdma-ai.cc.

Referenced by CallNotifyUlFn().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::NrMacSchedulerTdmaAi::GetTypeId ( )
static

GetTypeId.

Returns
The TypeId of the class

Definition at line 22 of file nr-mac-scheduler-tdma-ai.cc.

References ns3::NrMacSchedulerNs3::m_activeDlAi, and ns3::NrMacSchedulerNs3::m_activeUlAi.

◆ GetUeCompareDlFn()

std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> ns3::NrMacSchedulerTdmaAi::GetUeCompareDlFn ( ) const
overrideprotectedvirtual

Return the comparison function to sort DL UEs according to the scheduler policy.

Returns
A pointer to NrMacSchedulerUeInfoAi::CompareUeWeightsDl if the AI model is activated, otherwise, a pointer to NrMacSchedulerUeInfoQos::CompareUeWeightsDl

Implements ns3::NrMacSchedulerTdma.

Definition at line 70 of file nr-mac-scheduler-tdma-ai.cc.

References ns3::NrMacSchedulerUeInfoAi::CompareUeWeightsDl(), ns3::NrMacSchedulerUeInfoQos::CompareUeWeightsDl(), and ns3::NrMacSchedulerNs3::m_activeDlAi.

+ Here is the call graph for this function:

◆ GetUeCompareUlFn()

std::function< bool(const NrMacSchedulerNs3::UePtrAndBufferReq &lhs, const NrMacSchedulerNs3::UePtrAndBufferReq &rhs)> ns3::NrMacSchedulerTdmaAi::GetUeCompareUlFn ( ) const
overrideprotectedvirtual

Return the comparison function to sort UL UEs according to the scheduler policy.

Returns
A pointer to NrMacSchedulerUeInfoAi::CompareUeWeightsUl if the AI model is activated, otherwise, a pointer to NrMacSchedulerUeInfoQos::CompareUeWeightsUl

Implements ns3::NrMacSchedulerTdma.

Definition at line 81 of file nr-mac-scheduler-tdma-ai.cc.

References ns3::NrMacSchedulerUeInfoAi::CompareUeWeightsUl(), ns3::NrMacSchedulerUeInfoQos::CompareUeWeightsUl(), and ns3::NrMacSchedulerNs3::m_activeUlAi.

+ Here is the call graph for this function:

◆ GetUeObservationsDl()

std::vector< NrMacSchedulerUeInfoAi::LcObservation > ns3::NrMacSchedulerTdmaAi::GetUeObservationsDl ( const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &  ueVector) const
protected

Get UE observations for downlink.

Parameters
ueVectorA vector containing pointers to active UEs and their corresponding buffer requests
Returns
An Observation object representing the observations for all UEs

Definition at line 107 of file nr-mac-scheduler-tdma-ai.cc.

Referenced by CallNotifyDlFn().

+ Here is the caller graph for this function:

◆ GetUeObservationsUl()

std::vector< NrMacSchedulerUeInfoAi::LcObservation > ns3::NrMacSchedulerTdmaAi::GetUeObservationsUl ( const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &  ueVector) const
protected

Get UE observations for uplink.

Parameters
ueVectorA vector containing pointers to active UEs and their corresponding buffer requests
Returns
An Observation object representing the observations for all UEs

Definition at line 123 of file nr-mac-scheduler-tdma-ai.cc.

Referenced by CallNotifyUlFn().

+ Here is the caller graph for this function:

◆ GetUeRewardsDl()

float ns3::NrMacSchedulerTdmaAi::GetUeRewardsDl ( const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &  ueVector) const
protected

Get rewards for downlink.

Parameters
ueVectorA vector containing pointers to active UEs and their corresponding buffer requests
Returns
A float value representing the calculated rewards

Definition at line 151 of file nr-mac-scheduler-tdma-ai.cc.

Referenced by CallNotifyDlFn().

+ Here is the caller graph for this function:

◆ GetUeRewardsUl()

float ns3::NrMacSchedulerTdmaAi::GetUeRewardsUl ( const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &  ueVector) const
protected

Get rewards for uplink.

Parameters
ueVectorA vector containing pointers to active UEs and their corresponding buffer requests
Returns
A float value representing the calculated rewards

Definition at line 165 of file nr-mac-scheduler-tdma-ai.cc.

Referenced by CallNotifyUlFn().

+ Here is the caller graph for this function:

◆ SetNotifyCbDl()

void ns3::NrMacSchedulerTdmaAi::SetNotifyCbDl ( NrMacSchedulerUeInfoAi::NotifyCb  notifyCb)
protected

Set the notify callback function for downlink.

Parameters
notifyCbThe callback function to be set

Definition at line 91 of file nr-mac-scheduler-tdma-ai.cc.

References ns3::NrMacSchedulerNs3::m_activeDlAi.

◆ SetNotifyCbUl()

void ns3::NrMacSchedulerTdmaAi::SetNotifyCbUl ( NrMacSchedulerUeInfoAi::NotifyCb  notifyCb)
protected

Set the notify callback function for uplink.

Parameters
notifyCbThe callback function to be set

Definition at line 99 of file nr-mac-scheduler-tdma-ai.cc.

References ns3::NrMacSchedulerNs3::m_activeUlAi.

◆ UpdateAllUeWeightsDl()

void ns3::NrMacSchedulerTdmaAi::UpdateAllUeWeightsDl ( const NrMacSchedulerUeInfoAi::UeWeightsMap ueWeights,
const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &  ueVector 
) const
protected

Update weights of all UEs for downlink.

Parameters
ueWeightsAn unordered map where the key is the UE's RNTI (Radio Network Temporary Identifier) and the value is the UE's weights for all flows
ueVectorA vector containing pointers to active UEs and their corresponding buffer requests

Definition at line 221 of file nr-mac-scheduler-tdma-ai.cc.

Referenced by CallNotifyDlFn().

+ Here is the caller graph for this function:

◆ UpdateAllUeWeightsUl()

void ns3::NrMacSchedulerTdmaAi::UpdateAllUeWeightsUl ( const NrMacSchedulerUeInfoAi::UeWeightsMap ueWeights,
const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &  ueVector 
) const
protected

Update weights of all UEs for uplink.

Parameters
ueWeightsAn unordered map where the key is the UE's RNTI (Radio Network Temporary Identifier) and the value is the UE's weights for all flows
ueVectorA vector containing pointers to active UEs and their corresponding buffer requests

Definition at line 235 of file nr-mac-scheduler-tdma-ai.cc.

Referenced by CallNotifyUlFn().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ NrTestSchedulerAiCase

friend class NrTestSchedulerAiCase
friend

Definition at line 36 of file nr-mac-scheduler-tdma-ai.h.


The documentation for this class was generated from the following files: