Correcting randomized model. Treat unknown stats as 100%, call parent
in WillEraseTimedOutPendingInterest (to get unsatisfaction rate stats).
Rebasing randomized model on top of FwStats (no need for dynamic
limits).
diff --git a/model/fw/stats-based-randomized-interest-accept.cc b/model/fw/stats-based-randomized-interest-accept.cc
index ef8374f..c124612 100644
--- a/model/fw/stats-based-randomized-interest-accept.cc
+++ b/model/fw/stats-based-randomized-interest-accept.cc
@@ -99,7 +99,7 @@
if (stats.count ().GetStats ().get<0> () >= m_threshold * pitEntry->GetFibEntry ()->GetLimits ().GetMaxLimit ())
{
double ratio = std::min (1.0, stats.GetSatisfiedRatio ().get<0> ());
- if (ratio < 0) ratio = 0.5;
+ // if (ratio < 0) ratio = 0.5;
// NS_ASSERT_MSG (ratio > 0, "If count is a reasonable value, ratio cannot be negative");
UniformVariable randAccept (0, 1);
double dice = randAccept.GetValue ();
@@ -143,6 +143,7 @@
StatsBasedRandomizedInterestAccept::WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry)
{
NS_LOG_FUNCTION (this << pitEntry->GetPrefix ());
+ super::WillEraseTimedOutPendingInterest (pitEntry);
for (pit::Entry::out_container::iterator face = pitEntry->GetOutgoing ().begin ();
face != pitEntry->GetOutgoing ().end ();
diff --git a/model/fw/stats-based-randomized-interest-accept.h b/model/fw/stats-based-randomized-interest-accept.h
index 84494d7..6092682 100644
--- a/model/fw/stats-based-randomized-interest-accept.h
+++ b/model/fw/stats-based-randomized-interest-accept.h
@@ -43,9 +43,11 @@
* (probability is shifted to allow small rate of acceptance (1% by default) of Interests from faces with 0 satisfaction ratio.
*/
class StatsBasedRandomizedInterestAccept :
- public DynamicLimits
+ public FwStats
{
public:
+ typedef FwStats super;
+
static TypeId
GetTypeId ();
@@ -76,8 +78,6 @@
private:
double m_threshold;
double m_graceAcceptProbability;
-
- typedef FwStats super;
};