8#include "nr-mac-scheduler-ofdma-qos.h"
9#include "nr-mac-scheduler-ue-info-ai.h"
11#include "ns3/traced-value.h"
38 friend class NrTestSchedulerAiCase;
98 const std::vector<NrMacSchedulerNs3::UePtrAndBufferReq>& ueVector)
const;
107 const std::vector<NrMacSchedulerNs3::UePtrAndBufferReq>& ueVector)
const;
127 float GetUeRewardsDl(
const std::vector<NrMacSchedulerNs3::UePtrAndBufferReq>& ueVector)
const;
135 float GetUeRewardsUl(
const std::vector<NrMacSchedulerNs3::UePtrAndBufferReq>& ueVector)
const;
144 const std::vector<NrMacSchedulerNs3::UePtrAndBufferReq>& ueVector)
const override;
153 const std::vector<NrMacSchedulerNs3::UePtrAndBufferReq>& ueVector)
const override;
164 const std::vector<NrMacSchedulerNs3::UePtrAndBufferReq>& ueVector)
const;
175 const std::vector<NrMacSchedulerNs3::UePtrAndBufferReq>& ueVector)
const;
std::pair< UePtr, uint32_t > UePtrAndBufferReq
Pair between a pointer to NrMacSchedulerUeInfo and its buffer occupancy.
The OFDMA scheduler with AI implementation.
bool GetIsGameOverUl() const
Check if the uplink game is over.
float GetUeRewardsDl(const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
Get rewards for downlink.
void SetNotifyCbDl(NrMacSchedulerUeInfoAi::NotifyCb notifyCb)
Set the notify callback function for downlink.
std::vector< NrMacSchedulerUeInfoAi::LcObservation > GetUeObservationsUl(const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
Get UE observations for uplink.
void UpdateAllUeWeightsDl(const NrMacSchedulerUeInfoAi::UeWeightsMap &ueWeights, const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
Update weights of all UEs for downlink.
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.
float GetUeRewardsUl(const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
Get rewards for uplink.
void SetNotifyCbUl(NrMacSchedulerUeInfoAi::NotifyCb notifyCb)
Set the notify callback function for uplink.
bool GetIsGameOverDl() const
Check if the downlink 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::shared_ptr< NrMacSchedulerUeInfo > CreateUeRepresentation(const NrMacCschedSapProvider::CschedUeConfigReqParameters ¶ms) const override
Create an UE representation of the type NrMacSchedulerUeInfoAi.
static TypeId GetTypeId()
GetTypeId.
void UpdateAllUeWeightsUl(const NrMacSchedulerUeInfoAi::UeWeightsMap &ueWeights, const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
Update weights of all UEs for uplink.
std::vector< NrMacSchedulerUeInfoAi::LcObservation > GetUeObservationsDl(const std::vector< NrMacSchedulerNs3::UePtrAndBufferReq > &ueVector) const
Get UE observations 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.
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.
NrMacSchedulerOfdmaAi()
NrMacSchedulerOfdmaAi constructor.
Assign frequencies in QoS-based fashion.
std::unordered_map< uint8_t, Weights > UeWeightsMap
A hash map for UE weights.
Callback< void, const std::vector< LcObservation > &, bool, float, const std::string &, const UpdateAllUeWeightsFn & > NotifyCb
A callback type for notifying with specific parameters.