<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 13, 2014, at 6:54 PM, Chengcheng Li <<a href="mailto:lengcangche@bupt.edu.cn" class="">lengcangche@bupt.edu.cn</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<!-- begin sanitized html -->
<br class="">Thank you very much, Alex!<div class="">An extra question, if I want to set the rate of sending Interest from a specific face, which data member in class <span style="line-height: 23.7999992370605px;" class="">Limits::Window should I set or which member function should I call?</span></div><div class="">For example, if I want to send Interest packets from face 0 below the rate 100 pps(packet per second), what should I do?</div></div></blockquote><div><br class=""></div><div>What you want has nothing to do with Limits class.  Limits just enforces the limit and the question is where this limit is applied.</div><div><br class=""></div><div>In the current implementation, limits are enforced by strategy, and in particular PerOutFaceLimits strategy.  It assumes that Limits object is “aggregated” on a corresponding face (see per-out-face-limits.h line 80, 141, 160).</div><div><br class=""></div><div>To update limits on specific face, you need to get hold of the face somehow, then</div><div><br class=""></div><div>face->GetObject<Limits>()->(any method in limits class)</div><div><br class=""></div><div>—</div><div>Alex</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">Yours,</div><div class="">Chengcheng</div><div class=""><div id="signEditor" class=""></div><br class=""><br class=""><div style="FONT: 9pt 宋体" class="">----- 回复邮件 -----<div style="BACKGROUND: #e4e4e4; font-color: black" class=""><b class="">发信人:</b>Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu" class="">alexander.afanasyev@ucla.edu</a>></div><div class=""><b class="">收信人:</b>Chengcheng Li <<a href="mailto:lengcangche@bupt.edu.cn" class="">lengcangche@bupt.edu.cn</a>></div><div class=""><b class="">抄  送:</b>ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu" class="">ndnsim@lists.cs.ucla.edu</a>></div><div class=""><b class="">时  间:</b>2014年11月14日 09时42分40秒</div><div class=""><b class="">主  题:</b>Re: [ndnSIM] some questions about  limit </div></div><br class=""><blockquote style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0mm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0mm; MARGIN: 5pt 0mm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0mm; BORDER-BOTTOM: medium none" class=""><br class=""><div class="bodyclass">Hi Chengcheng,<div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 3, 2014, at 5:41 PM, Chengcheng Li <<a href="mailto:lengcangche@bupt.edu.cn" class="" target="_blank" title="">lengcangche@bupt.edu.cn</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="line-height: 23.3240013122559px;" class="">Hi, everyone</span><br class=""><span style="line-height: 23.3240013122559px;" class="">​</span><span style="line-height: 23.3240013122559px;" class="">I'm so confused about the concept 'limit' in the ndnsim code.</span><div style="line-height: 23.3240013122559px;" class="">1. On this page '<a href="http://ndnsim.net/fw.html'" class="" target="_blank" title="">http://ndnsim.net/fw.html'</a>,  a equation is presented according to which limit is set. What are the meanings of Delay and Bandwidth? Is it about a single link or all the links?</div></div></blockquote><div class=""><br class=""></div><div class="">This is something similar to TCP’s delay-bandwidth product (<a href="http://en.wikipedia.org/wiki/Bandwidth-delay_product" class="" target="_blank" title="">http://en.wikipedia.org/wiki/Bandwidth-delay_product</a>).  To “fill the pipe” with Interest-Data, you need to allow a certain number of outstanding Interests and this certain number would depend on path’s delay.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="line-height: 23.3240013122559px;" class="">2. And I notice that the dimension(量纲) of limit in this equation is number of interest, not number per second. I think this doesn't comply with <a class="external reference" href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_limits_1_1_rate.html" title="" style="color: rgb(145, 165, 1); text-decoration: none; font-weight: bold; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: rgb(145, 165, 1); font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 15px; line-height: 19.0666675567627px; text-align: justify;" target="_blank">ns3::ndn::Limits::Rate</a> situation.</div></div></blockquote><div class=""><br class=""></div><div class="">It still applies, but just in a different way. Limits::Rate implements a token bucket shaping algorithm (<a href="http://en.wikipedia.org/wiki/Token_bucket" class="" target="_blank" title="">http://en.wikipedia.org/wiki/Token_bucket</a>) and `limit` defines the size of the bucket = number of allowed burst (bucket is “refilled” with a certain rate).  Limits::Window implements a simple windowing mechanism, where `limit` is just a number of outstanding interests.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="line-height: 23.3240013122559px;" class="">3. Following that, a code is presented: '<span class="n" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">ndnHelper</span><span class="p" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">.</span><span class="n" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">EnableLimits</span><span style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;" class=""> </span><span class="p" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">(</span><span class="nb" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap; color: rgb(0, 112, 32);">true</span><span class="p" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">,</span><span style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;" class=""> </span><span class="n" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">Seconds</span><span style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;" class=""> </span><span class="p" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">(</span><span class="mf" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap; color: rgb(32, 128, 80);">0.2</span><span class="p" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">),</span><span style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;" class=""> </span><span class="mi" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap; color: rgb(32, 128, 80);">40</span><span class="p" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">,</span><span style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;" class=""> </span><span class="mi" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap; color: rgb(32, 128, 80);">1100</span><span class="p" style="font-size: 15px; line-height: 17.6000003814697px; white-space: pre-wrap;">);</span><span style="line-height: 1.7;" class="">', does this mean that all the links' delay in topology are 0.2?</span></div></div></blockquote><div class=""><br class=""></div><div class="">It doesn’t mean, but implies that in your simulation scenario paths over which Interest/Data are exchanges will be ~200ms.  This method makes a big assumption that this will be constant, which may not be applicable for some scenarios.</div><div class=""><br class=""></div><div class="">—</div><div class="">Alex</div><div class=""><br class=""></div></div><br class=""></div></div></blockquote>
<!-- end sanitized html -->
</div></div></blockquote></div><br class=""></body></html>