5G-LENA nr-v3.3-161-gad18933f
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-scheduler-ofdma-pf.h
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#pragma once
6#include "nr-mac-scheduler-ofdma-rr.h"
7
8namespace ns3
9{
10
21{
22 public:
27 static TypeId GetTypeId();
32
37 {
38 }
39
44 void SetFairnessIndex(double v);
45
50 double GetFairnessIndex() const;
51
56 void SetTimeWindow(double v);
61 double GetTimeWindow() const;
62
63 protected:
64 // inherit
70 std::shared_ptr<NrMacSchedulerUeInfo> CreateUeRepresentation(
71 const NrMacCschedSapProvider::CschedUeConfigReqParameters& params) const override;
72
77 std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
79 GetUeCompareDlFn() const override;
80
85 std::function<bool(const NrMacSchedulerNs3::UePtrAndBufferReq& lhs,
87 GetUeCompareUlFn() const override;
88
102 const FTResources& assigned,
103 const FTResources& totAssigned) const override;
104
122 const FTResources& notAssigned,
123 const FTResources& totalAssigned) const override;
124
138 const FTResources& assigned,
139 const FTResources& totAssigned) const override;
140
158 const FTResources& notAssigned,
159 const FTResources& totalAssigned) const override;
160
169 void BeforeDlSched(const UePtrAndBufferReq& ue,
170 const FTResources& assignableInIteration) const override;
171
180 void BeforeUlSched(const UePtrAndBufferReq& ue,
181 const FTResources& assignableInIteration) const override;
182
183 private:
184 double m_timeWindow{
185 99.0};
186 double m_alpha{0.0};
187};
188
189} // namespace ns3
std::pair< UePtr, uint32_t > UePtrAndBufferReq
Pair between a pointer to NrMacSchedulerUeInfo and its buffer occupancy.
PointInFTPlane FTResources
Represent an amount of RBG/symbols that can be, or is, assigned.
Assign frequencies in a proportional fair fashion.
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 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.
double GetFairnessIndex() const
Get the value of attribute "FairnessIndex".
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< NrMacSchedulerUeInfo > CreateUeRepresentation(const NrMacCschedSapProvider::CschedUeConfigReqParameters &params) const override
Create an UE representation of the type NrMacSchedulerUeInfoPF.
void NotAssignedUlResources(const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totalAssigned) const override
Update UL metrics by calling NrMacSchedulerUeInfoPF::UpdatePFUlMetric.
NrMacSchedulerOfdmaPF()
NrMacSchedulerOfdmaPF constructor.
void SetTimeWindow(double v)
Set the attribute "LastAvgTPutWeight".
void AssignedUlResources(const UePtrAndBufferReq &ue, const FTResources &assigned, const FTResources &totAssigned) const override
Update the UE representation after a symbol (UL) has been assigned to it.
void NotAssignedDlResources(const UePtrAndBufferReq &ue, const FTResources &notAssigned, const FTResources &totalAssigned) const override
Update DL metrics by calling NrMacSchedulerUeInfoPF::UpdatePFDlMetric.
void BeforeDlSched(const UePtrAndBufferReq &ue, const FTResources &assignableInIteration) const override
Calculate the potential throughput for the DL based on the available resources.
void SetFairnessIndex(double v)
Set the value of attribute "FairnessIndex".
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.
static TypeId GetTypeId()
GetTypeId.
~NrMacSchedulerOfdmaPF() override
~NrMacSchedulerOfdmaPF deconstructor
double GetTimeWindow() const
Get the attribute "LastAvgTPutWeight".
Assign frequencies in a round-robin fashion.