<div dir="ltr"><div>The problem was already solved. The answer was the following:<br><br>It is because of the consumer application,<br>
<br>
// Consumer<br>
ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");.<br>
<br>
The "ns3::ndn::ConsumerCbr" generates a series of "sequential interest 
packets"; for example, Consumer will request /prefix/0, /prefix/1, ....<br>
<br>
Therefore, the Consumer will never request any previously requested content object, so CacheHit is always zero.<br>
By contrast, there is more than one Consumer in tree topology. As a 
result, a content object that has requested by a Consumer is also 
requested by another Consumer, so CacheHit occurs.<br>
<br>
To see what is actually generated by Consumer while running a simulation, you can put the command below to see the log,<br>
<br>
NS_LOG=ndn.Consumer ./waf --run=ndn-simple<br><br></div>Thanks to all.<br><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-03 13:37 GMT+09:00 G.Sánchez <span dir="ltr"><<a href="mailto:g.sanchez148@gmail.com" target="_blank">g.sanchez148@gmail.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi all,<br><br></div><div>Firstly, I'm quite new with ndnSim, so sorry if my questions may seem too obvious.<br>

<br></div>I am trying to implement scenarios with caching probability, i.e. each node has a probability X to cache the content or not. As far as I know, this is done by using the following function inside the .cc scenario:<br>


<br><i>ndnHelper.SetContentStore ("ns3::ndn::cs::Probability::Lru", "CacheProbability", "1.0");<br><br></i></div>before installing the ndnHelper on the nodes. <br><br>I have tried it with 2 scenarios, the tree scenario with cs tracers, and the ndn simple scenario (adding the same cs tracer). Then I check the cs tracer output (CacheHits/Misses), to see if the behaviour is as expected. <br>


<br></div><div>In the tree scenario, it works correctly, depending on the probability, we have a number or another of CacheHits, but in the ndn simple scenario, everything is missed (no CacheHits), even if probability is set to 1.0, offering the same results no matter which probability is used. The rest of the code has remained untouched.<br>


<br></div><div>Does the simple scenario have something special that the tree one doesn't for this situation? Should I add something else in the code? Something different? Is it a bug?<br><br></div><div>Thank you all for your time and help.<br>


<br></div><div>Guillermo Sánchez<br></div></div>
</blockquote></div><br></div>