LenaTestRrFfMacSchedulerSuite updatded to new AMC
This commit is contained in:
@@ -480,7 +480,7 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched
|
||||
std::vector <struct RlcPduListElement_s> newRlcPduLe;
|
||||
int totRbg = lcNum * rbgPerFlow;
|
||||
int tbSize = (LteAmc::GetTbSizeFromMcs (newDci.m_mcs.at (0), totRbg * rbgSize) / 8);
|
||||
//NS_LOG_DEBUG (this << "Allocate user " << newEl.m_rnti << " LCs " << (uint16_t)(*itLcRnti).second << " bytes " << tbSize << " PRBs " << totRbg * rbgSize << " mcs " << (uint16_t) newDci.m_mcs.at (0));
|
||||
NS_LOG_DEBUG (this << "Allocate user " << newEl.m_rnti << " LCs " << (uint16_t)(*itLcRnti).second << " bytes " << tbSize << " PRBs " << totRbg * rbgSize << " mcs " << (uint16_t) newDci.m_mcs.at (0));
|
||||
uint16_t rlcPduSize = tbSize / lcNum;
|
||||
for (int i = 0; i < lcNum ; i++)
|
||||
{
|
||||
|
||||
@@ -53,10 +53,17 @@ LenaTestPfFfMacSchedulerSuite::LenaTestPfFfMacSchedulerSuite ()
|
||||
|
||||
std::vector<uint16_t> dist;
|
||||
dist.push_back (0); // User 0 distance
|
||||
std::vector<uint16_t> estThrPf;
|
||||
estThrPf.push_back (0); // User 0 estimated TTI throughput from PF
|
||||
dist.push_back (6000); // User 1 distance
|
||||
std::vector<uint32_t> estThrPf;
|
||||
estThrPf.push_back (89000); // User 0 estimated TTI throughput from PF
|
||||
estThrPf.push_back (28000); // User 1 estimated TTI throughput from PF
|
||||
|
||||
AddTestCase (new LenaPfFfMacSchedulerTestCase2 (1,dist,estThrPf));
|
||||
|
||||
// 0 mt -> mcs 28
|
||||
// 6000 mt -> mcs 24
|
||||
// 12000 mt -> mcs 6
|
||||
|
||||
AddTestCase (new LenaPfFfMacSchedulerTestCase2 (2,dist,estThrPf));
|
||||
|
||||
// // DISTANCE 0 -> MCS 28 -> Itbs 26 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// // 1 user -> 24 PRB at Itbs 26 -> 2196 -> 2196000 bytes/sec
|
||||
@@ -136,9 +143,6 @@ LenaPfFfMacSchedulerTestCase1::LenaPfFfMacSchedulerTestCase1 (uint16_t nUser, ui
|
||||
m_thrRef (thrRef)
|
||||
{
|
||||
|
||||
// 0 mt -> mcs 28
|
||||
// 6000 mt -> mcs 24
|
||||
// 12000 mt -> mcs 6
|
||||
}
|
||||
|
||||
LenaPfFfMacSchedulerTestCase1::~LenaPfFfMacSchedulerTestCase1 ()
|
||||
@@ -265,7 +269,7 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void)
|
||||
// --------------- T E S T - C A S E # 2 ------------------------------
|
||||
|
||||
|
||||
LenaPfFfMacSchedulerTestCase2::LenaPfFfMacSchedulerTestCase2 (uint16_t nUser, std::vector<uint16_t> dist, std::vector<uint16_t> estThrPf)
|
||||
LenaPfFfMacSchedulerTestCase2::LenaPfFfMacSchedulerTestCase2 (uint16_t nUser, std::vector<uint16_t> dist, std::vector<uint32_t> estThrPf)
|
||||
: TestCase ("Proportional Fair (PF) Mac Scheduler Test Case"),
|
||||
m_nUser (nUser),
|
||||
m_dist (dist),
|
||||
@@ -307,7 +311,7 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void)
|
||||
// LogComponentEnable ("LteUeNetDevice", LOG_LEVEL_ALL);
|
||||
// LogComponentEnable ("LteEnbNetDevice", LOG_LEVEL_ALL);
|
||||
|
||||
// LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("PfFfMacScheduler", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("LenaTestPfFfMacCheduler", LOG_LEVEL_ALL);
|
||||
// LogComponentEnable ("LteAmc", LOG_LEVEL_ALL);
|
||||
// LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
|
||||
@@ -356,7 +360,7 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void)
|
||||
|
||||
lena->EnableDlRlcTraces();
|
||||
|
||||
double simulationTime = 2.0;
|
||||
double simulationTime = 0.4;
|
||||
double tolerance = 0.1;
|
||||
Simulator::Stop (Seconds (simulationTime));
|
||||
|
||||
@@ -377,7 +381,7 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void)
|
||||
uint8_t lcId = ueDevs.Get (i)-> GetObject<LteUeNetDevice> ()->GetRrc ()->GetLcIdVector ().at(0);
|
||||
dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId));
|
||||
totalData += (double)dlDataRxed.at (i);
|
||||
NS_LOG_INFO ("\tUser " << i << "dist" << m_dist.at (i) << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataRxed.at (i) / simulationTime << " ref " << m_nUser);
|
||||
NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " thr " << (double)dlDataRxed.at (i) / simulationTime << " ref " << m_nUser);
|
||||
totalEstThrPf += m_estThrPf.at (i);
|
||||
}
|
||||
|
||||
@@ -390,6 +394,7 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void)
|
||||
{
|
||||
double thrRatio = (double)dlDataRxed.at (i) / totalData;
|
||||
double estThrRatio = (double)m_estThrPf.at (i) / totalEstThrPf;
|
||||
NS_LOG_INFO ("User " << i << " thrRatio " << thrRatio << " estThrRatio " << estThrRatio);
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (estThrRatio, thrRatio, tolerance, " Unfair Throughput!");
|
||||
}
|
||||
|
||||
|
||||
@@ -55,14 +55,14 @@ class LenaPfFfMacSchedulerTestCase1 : public TestCase
|
||||
class LenaPfFfMacSchedulerTestCase2 : public TestCase
|
||||
{
|
||||
public:
|
||||
LenaPfFfMacSchedulerTestCase2 (uint16_t nUser, std::vector<uint16_t> dist, std::vector<uint16_t> estThrPf);
|
||||
LenaPfFfMacSchedulerTestCase2 (uint16_t nUser, std::vector<uint16_t> dist, std::vector<uint32_t> estThrPf);
|
||||
virtual ~LenaPfFfMacSchedulerTestCase2 ();
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
uint16_t m_nUser;
|
||||
std::vector<uint16_t> m_dist;
|
||||
std::vector<uint16_t> m_estThrPf;
|
||||
std::vector<uint32_t> m_estThrPf;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -66,61 +66,61 @@ LenaTestRrFfMacSchedulerSuite::LenaTestRrFfMacSchedulerSuite ()
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,0,185000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,0,148000));
|
||||
|
||||
// DISTANCE 6000 -> MCS 24 -> Itbs 22 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// 1 user -> 24 PRB at Itbs 22 -> 1572 -> 1572000 bytes/sec
|
||||
// 3 users -> 8 PRB at Itbs 22 -> 533 -> 533000 bytes/sec
|
||||
// 6 users -> 4 PRB at Itbs 22 -> 269 -> 269000 bytes/sec
|
||||
// 9 user -> 2 PRB at Itbs 22 -> 133 -> 133000 bytes/sec
|
||||
// 12 users -> 2 PRB at Itbs 22 -> 133 -> 133000 bytes/sec
|
||||
// 15 users -> 2 PRB at Itbs 22 * 0.8 -> 106.4 -> 106400 bytes/sec
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,6000,1572000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,6000,533000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,6000,269000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,6000,133000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,6000,133000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,6000,106400));
|
||||
// DISTANCE 3000 -> MCS 24 -> Itbs 20 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// 1 user -> 24 PRB at Itbs 20 -> 1383 -> 1383000 bytes/sec
|
||||
// 3 users -> 8 PRB at Itbs 20 -> 469 -> 469000 bytes/sec
|
||||
// 6 users -> 4 PRB at Itbs 20 -> 233 -> 233000 bytes/sec
|
||||
// 9 user -> 2 PRB at Itbs 20 -> 113 -> 113000 bytes/sec
|
||||
// 12 users -> 2 PRB at Itbs 20 -> 113 -> 113000 bytes/sec
|
||||
// 15 users -> 2 PRB at Itbs 20 * 0.8 -> 90.4 -> 90400 bytes/sec
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,3000,1383000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,3000,469000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,3000,233000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,3000,113000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,3000,113000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,3000,90400));
|
||||
|
||||
// DISTANCE 9000 -> MCS 10 -> Itbs 9 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// 1 user -> 24 PRB at Itbs 9 -> 469 -> 469000 bytes/sec
|
||||
// 3 users -> 8 PRB at Itbs 9 -> 157 -> 157000 bytes/sec
|
||||
// 6 users -> 4 PRB at Itbs 9 -> 77 -> 77000 bytes/sec
|
||||
// 9 user -> 2 PRB at Itbs 9 -> 37 -> 37000 bytes/sec
|
||||
// 12 users -> 2 PRB at Itbs 9 -> 37 -> 37000 bytes/sec
|
||||
// 15 users -> 2 PRB at Itbs 9 * 0.8 -> 29.6 -> 29600 bytes/sec
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,9000,469000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,9000,157000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,9000,77000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,9000,37000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,9000,37000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,9000,29600));
|
||||
// DISTANCE 6000 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// 1 user -> 24 PRB at Itbs 15 -> 903 -> 903000 bytes/sec
|
||||
// 3 users -> 8 PRB at Itbs 15 -> 309 -> 309000 bytes/sec
|
||||
// 6 users -> 4 PRB at Itbs 15 -> 153 -> 153000 bytes/sec
|
||||
// 9 user -> 2 PRB at Itbs 15 -> 75 -> 75000 bytes/sec
|
||||
// 12 users -> 2 PRB at Itbs 15 -> 75 -> 75000 bytes/sec
|
||||
// 15 users -> 2 PRB at Itbs 15 * 0.8 -> 60 -> 60000 bytes/sec
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,6000,903000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,6000,309000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,6000,153000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,6000,75000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,6000,75000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,6000,60000));
|
||||
|
||||
// DISTANCE 15000 -> MCS 4 -> Itbs 4 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// 1 user -> 24 PRB at Itbs 4 -> 217 -> 217000 bytes/sec
|
||||
// 3 users -> 8 PRB at Itbs 4 -> 69 -> 69000 bytes/sec
|
||||
// 6 users -> 4 PRB at Itbs 4 -> 32 -> 32000 bytes/sec
|
||||
// 9 user -> 2 PRB at Itbs 4 -> 15 -> 15000 bytes/sec
|
||||
// 12 users -> 2 PRB at Itbs 4 -> 15 -> 15000 bytes/sec
|
||||
// 15 users -> 2 PRB at Itbs 4 * 0.8 -> 12 -> 12000 bytes/sec
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,15000,217000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,15000,69000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,15000,32000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,15000,15000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,15000,15000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,15000,12000));
|
||||
// DISTANCE 9000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// 1 user -> 24 PRB at Itbs 11 -> 597 -> 597000 bytes/sec
|
||||
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 bytes/sec
|
||||
// 6 users -> 4 PRB at Itbs 11 -> 97 -> 97000 bytes/sec
|
||||
// 9 user -> 2 PRB at Itbs 11 -> 47 -> 47000 bytes/sec
|
||||
// 12 users -> 2 PRB at Itbs 11 -> 47 -> 47000 bytes/sec
|
||||
// 15 users -> 2 PRB at Itbs 11 * 0.8 -> 37.6 -> 37600 bytes/sec
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,9000,597000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,9000,201000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,9000,97000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,9000,47000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,9000,47000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,9000,37600));
|
||||
|
||||
// DISTANCE 20000 -> MCS 2 -> Itbs 2 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// 1 user -> 24 PRB at Itbs 2 -> 133 -> 133000 bytes/sec
|
||||
// 3 users -> 8 PRB at Itbs 2 -> 41 -> 41000 bytes/sec
|
||||
// 6 users -> 4 PRB at Itbs 2 -> 22 -> 22000 bytes/sec
|
||||
// 9 user -> 2 PRB at Itbs 2 -> 9 -> 9000 bytes/sec
|
||||
// 12 users -> 2 PRB at Itbs 2 -> 9 -> 9000 bytes/sec
|
||||
// 15 users -> 2 PRB at Itbs 2 * 0.8 -> 7.2 -> 7200 bytes/sec
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,20000,133000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,20000,41000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,20000,22000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,20000,9000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,20000,9000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,20000,7200));
|
||||
// DISTANCE 15000 -> MCS 6 -> Itbs 6 (from table 7.1.7.2.1-1 of 36.213)
|
||||
// 1 user -> 24 PRB at Itbs 6 -> 309 -> 309000 bytes/sec
|
||||
// 3 users -> 8 PRB at Itbs 6 -> 101 -> 101000 bytes/sec
|
||||
// 6 users -> 4 PRB at Itbs 6 -> 49 -> 49000 bytes/sec
|
||||
// 9 user -> 2 PRB at Itbs 6 -> 22 -> 22000 bytes/sec
|
||||
// 12 users -> 2 PRB at Itbs 6 -> 22 -> 22000 bytes/sec
|
||||
// 15 users -> 2 PRB at Itbs 6 * 0.8 -> 17.6 -> 17600 bytes/sec
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,15000,309000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,15000,101000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,15000,49000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,15000,22000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,15000,22000));
|
||||
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,15000,17600));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user