6#include "nr-mac-scheduler-ue-info-ai.h"
13NS_LOG_COMPONENT_DEFINE(
"NrMacSchedulerUeInfoAi");
15std::vector<NrMacSchedulerUeInfoAi::LcObservation>
18 NS_LOG_FUNCTION(
this);
19 std::vector<NrMacSchedulerUeInfoAi::LcObservation> observations;
20 for (
const auto& ueLcg :
m_dlLCG)
22 std::vector<uint8_t> ueActiveLCs = ueLcg.second->GetActiveLCIds();
24 for (
const auto lcId : ueActiveLCs)
26 std::unique_ptr<NrMacSchedulerLC>&
LCPtr = ueLcg.second->GetLC(lcId);
33 LCPtr->m_rlcTransmissionQueueHolDelay};
35 observations.push_back(lcObservation);
41std::vector<NrMacSchedulerUeInfoAi::LcObservation>
44 NS_LOG_FUNCTION(
this);
45 std::vector<NrMacSchedulerUeInfoAi::LcObservation> observations;
46 for (
const auto& ueLcg :
m_ulLCG)
48 std::vector<uint8_t> ueActiveLCs = ueLcg.second->GetActiveLCIds();
50 for (
const auto lcId : ueActiveLCs)
52 std::unique_ptr<NrMacSchedulerLC>&
LCPtr = ueLcg.second->GetLC(lcId);
59 LCPtr->m_rlcTransmissionQueueHolDelay};
61 observations.push_back(lcObservation);
83 for (
const auto& ueLcg :
m_dlLCG)
85 std::vector<uint8_t> ueActiveLCs = ueLcg.second->GetActiveLCIds();
87 for (
const auto lcId : ueActiveLCs)
89 std::unique_ptr<NrMacSchedulerLC>&
LCPtr = ueLcg.second->GetLC(lcId);
96 LCPtr->m_rlcTransmissionQueueHolDelay);
107 for (
const auto& ueLcg :
m_ulLCG)
109 std::vector<uint8_t> ueActiveLCs = ueLcg.second->GetActiveLCIds();
111 for (
const auto lcId : ueActiveLCs)
113 std::unique_ptr<NrMacSchedulerLC>&
LCPtr = ueLcg.second->GetLC(lcId);
120 LCPtr->m_rlcTransmissionQueueHolDelay);
std::vector< LcObservation > GetUlObservation()
Get the current observation for uplink.
void UpdateUlWeights(Weights &weights)
Update the weights for uplink.
void UpdateDlWeights(Weights &weights)
Update the weights for downlink.
std::vector< LcObservation > GetDlObservation()
Get the current observation for downlink.
float GetDlReward()
Get the reward for downlink.
Weights m_weightsDl
Weights assigned to each flow for a UE in the downlink.
std::unordered_map< uint8_t, double > Weights
A hash map for weights.
float GetUlReward()
Get the reward for uplink.
Weights m_weightsUl
Weights assigned to each flow for a UE in the uplink.
uint16_t m_rnti
RNTI of the UE.
std::unordered_map< uint8_t, LCGPtr > m_dlLCG
DL LCG.
std::unordered_map< uint8_t, LCGPtr > m_ulLCG
UL LCG.
double m_avgTputDl
Average throughput in downlink during all the slots.
float m_alpha
PF fairness metric.
double m_avgTputUl
Average throughput in uplink during all the slots.
std::unique_ptr< NrMacSchedulerLC > LCPtr
Unique pointer to an instance of NrMacSchedulerLC.
A struct for an observation of a flow.