From 7a33084efc1ca7b0b8017daf83aaf49c41e2b366 Mon Sep 17 00:00:00 2001 From: Marco Miozzo Date: Wed, 11 May 2011 12:17:36 +0200 Subject: [PATCH] Test 1.4 (RR scheduler) finished and works --- src/lte/test/lte-test-rr-ff-mac-scheduler.cc | 96 ++++++++++++++------ 1 file changed, 66 insertions(+), 30 deletions(-) diff --git a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc index eac4c0d60..a6d0b896b 100644 --- a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc @@ -50,6 +50,7 @@ LenaTestRrFfMacSchedulerSuite::LenaTestRrFfMacSchedulerSuite () { SetVerbose (true); NS_LOG_INFO ("creating LenaRrFfMacSchedulerTestCase"); + // 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 // 3 users -> 8 PRB at Itbs 26 -> 749 -> 749000 bytes/sec @@ -57,15 +58,68 @@ LenaTestRrFfMacSchedulerSuite::LenaTestRrFfMacSchedulerSuite () // 9 user -> 2 PRB at Itbs 26 -> 185 -> 185000 bytes/sec // 12 users -> 2 PRB at Itbs 26 -> 185 -> 185000 bytes/sec // 15 users -> 2 PRB at Itbs 26 * 0.8 -> 148 -> 148000 bytes/sec + AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,0,2196000)); + AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,0,749000)); + AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,0,373000)); + AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,0,185000)); + AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,0,185000)); + AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,0,148000)); - AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,1,2196000)); + // 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)); -// AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,0,2196000)); -// AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,0,749000)); -// AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,0,373000)); -// AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,0,185000)); -// AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,0,185000)); -// AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,0,148000)); + // 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 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 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)); } @@ -91,7 +145,7 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) // LogComponentEnable ("LteUeRrc", LOG_LEVEL_ALL); // LogComponentEnable ("LteEnbMac", LOG_LEVEL_ALL); // LogComponentEnable ("LteUeMac", LOG_LEVEL_ALL); - LogComponentEnable ("LteRlc", LOG_LEVEL_ALL); +// LogComponentEnable ("LteRlc", LOG_LEVEL_ALL); // // LogComponentEnable ("LtePhy", LOG_LEVEL_ALL); // LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL); @@ -112,9 +166,9 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) // LogComponentEnable ("LteUeNetDevice", LOG_LEVEL_ALL); // LogComponentEnable ("LteEnbNetDevice", LOG_LEVEL_ALL); - LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL); +// LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL); LogComponentEnable ("LenaTestRrFfMacCheduler", LOG_LEVEL_ALL); - //LogComponentEnable ("LteAmc", LOG_LEVEL_ALL); +// LogComponentEnable ("LteAmc", LOG_LEVEL_ALL); // LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL); @@ -126,23 +180,6 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) Ptr lena = CreateObject (); - // Define the propagation model - /** - * Propagation Loss - * - * ( 4 * PI * distance * frequency ) 2 - * Loss = ( ------------------------------- ) - * ( c ) - * - * where: c is speed of light in vacuum = 3e8 (m/s) - * distance in (m) - * frequency in (Hz) - */ - double myLoss = ( ( 4 * M_PI * m_dist * 1.92e9 ) / 3e8 ); - myLoss = myLoss * myLoss; - lena->SetAttribute ("PropagationModel", StringValue ("ns3::ConstantSpectrumPropagationLossModel")); - lena->SetPropagationModelAttribute ("Loss", DoubleValue (myLoss)); - // Create Nodes: eNodeB and UE NodeContainer enbNodes; NodeContainer ueNodes; @@ -182,8 +219,7 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) double simulationTime = 0.4; double tolerance = 0.1; Simulator::Stop (Seconds (simulationTime)); - -// Config::SetDefault ("ns3::RlcStatsCalculator::EpochDuration", TimeValue(Seconds(simulationTime))); + Ptr rlcStats = lena->GetRlcStats (); rlcStats->SetAttribute("EpochDuration", TimeValue(Seconds(simulationTime))); @@ -193,7 +229,7 @@ LenaRrFfMacSchedulerTestCase::DoRun (void) /** * Check that the assignation is done in a RR fashion */ - NS_LOG_INFO("Test with " << m_nUser << " user(s) at distance " << m_dist << " loss " << myLoss); + NS_LOG_INFO("Test with " << m_nUser << " user(s) at distance " << m_dist); std::vector dlDataRxed; for (int i = 0; i < m_nUser; i++) {