--- a/src/lte/model/fdtbfq-ff-mac-scheduler.cc Thu May 16 10:52:29 2013 -0400
+++ b/src/lte/model/fdtbfq-ff-mac-scheduler.cc Thu May 16 10:57:10 2013 -0400
@@ -30,6 +30,7 @@
#include <ns3/boolean.h>
#include <ns3/integer.h>
#include <set>
+#include <cfloat>
NS_LOG_COMPONENT_DEFINE ("FdTbfqFfMacScheduler");
@@ -1573,7 +1574,7 @@
sinrNum++;
}
}
- double estimatedSinr = sinrSum / (double)sinrNum;
+ double estimatedSinr = (sinrNum > 0) ? (sinrSum / sinrNum) : DBL_MAX;
// store the value
(*itCqi).second.at (rb) = estimatedSinr;
return (estimatedSinr);