Bug 1986 FIX
authorPiotr Gawlowicz <gawlowicz.p@gmail.com>
Fri, 19 Dec 2014 16:16:27 +0100
changeset 11110 b6f6e368aa51
parent 11109 85263da002b9
child 11111 dc2d615b152f
Bug 1986 FIX
src/lte/model/pss-ff-mac-scheduler.cc
--- a/src/lte/model/pss-ff-mac-scheduler.cc	Fri Dec 19 11:41:18 2014 +0100
+++ b/src/lte/model/pss-ff-mac-scheduler.cc	Fri Dec 19 16:16:27 2014 +0100
@@ -1298,13 +1298,14 @@
                 {
                   if (rbgMap.at (i) == true)
                     continue;
-                  if ((m_ffrSapProvider->IsDlRbgAvailableForUe (i, (*it).first)) == false)
-                    continue;
 
                   std::map <uint16_t, pssFlowPerf_t>::iterator itMax = tdUeSet.end ();
                   double metricMax = 0.0;
                   for (it = tdUeSet.begin (); it != tdUeSet.end (); it++)
                     {
+                      if ((m_ffrSapProvider->IsDlRbgAvailableForUe (i, (*it).first)) == false)
+                        continue;
+
                       // calculate PF weigth 
                       double weight = (*it).second.targetThroughput / (*it).second.lastAveragedThroughput;
                       if (weight < 1.0)
@@ -1373,11 +1374,10 @@
                           itMax = it;
                         }
                     } // end of tdUeSet
-        
-                  if (itMax == m_flowStatsDl.end ())
+
+                  if (itMax == tdUeSet.end ())
                     {
-                      // no UE available for downlink 
-                      return;
+                      // no UE available for downlink
                     }
                   else
                     {
@@ -1397,13 +1397,12 @@
                   if (rbgMap.at (i) == true)
                     continue;
 
-                  if ((m_ffrSapProvider->IsDlRbgAvailableForUe (i, (*it).first)) == false)
-                    continue;
-        
                   std::map <uint16_t, pssFlowPerf_t>::iterator itMax = tdUeSet.end ();
                   double metricMax = 0.0;
                   for (it = tdUeSet.begin (); it != tdUeSet.end (); it++)
                     {
+                      if ((m_ffrSapProvider->IsDlRbgAvailableForUe (i, (*it).first)) == false)
+                        continue;
                       // calculate PF weigth 
                       double weight = (*it).second.targetThroughput / (*it).second.lastAveragedThroughput;
                       if (weight < 1.0)
@@ -1468,11 +1467,10 @@
                           itMax = it;
                         }
                     } // end of tdUeSet
-         
-                  if (itMax == m_flowStatsDl.end ())
+
+                  if (itMax == tdUeSet.end ())
                     {
                       // no UE available for downlink 
-                      return;
                     }
                   else
                     {