<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Amin,<div class=""><br class=""></div><div class="">About the question #1:</div><div class=""><br class=""></div><div class="">Yes, using the particular forwarding strategy, the rate limits will be assigned per outgoing face.</div><div class=""><br class=""></div><div class="">About your question #2:</div><div class=""><br class=""></div><div class="">In general, you have to call periodically the UpdateCurrentLimit method of the LimitsRate class that accepts a double variable as an argument. This double variable will be the new limit value.</div><div class=""><br class=""></div><div class="">However, keep in mind that he existing implementation of the limits takes into account two double variables and multiply them (assuming that the first one is the delay and the second one is the rate).</div><div class=""><br class=""></div><div class="">If you want to have an equation with fundamentally different rationale than having two double variables and just multiple them to compute the limit, then you have to create your own limit class and inherit the Limit class of the ndn-limits file. You will also have to create more methods in order to customize the rate computation in the way that you want (e.g. if you want to have more than two or different parameters). Generally, you can take a look at the ndn-limits, ndn-limits-rate and ndn-limits-window files and see if they are ok for you.</div><div class=""><br class=""></div><div class="">Hope that this helps,</div><div class="">Spyros</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 6, 2014, at 12:28 PM, amin1431 <<a href="mailto:amin1431@yahoo.com" class="">amin1431@yahoo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div id="yui_3_16_0_1_1417895351574_5644" class="" style="" dir="ltr">Hi Spyros :-)
</div><div id="yui_3_16_0_1_1417895351574_5644" class="" style="" dir="ltr">Thank you for your response. I tried my best for better understanding of classes.</div><div id="yui_3_16_0_1_1417895351574_5644" class="" style="" dir="ltr"><br class=""></div><div id="yui_3_16_0_1_1417895351574_5644" class="" style="" dir="ltr">I have two questions:</div><div id="yui_3_16_0_1_1417895351574_5644" class="" style="" dir="ltr"><br class=""></div><div id="yui_3_16_0_1_1417895351574_5644" class="" style="" dir="ltr">1- If we use the below Forwarding Strategy with the Interest limit, the rate will be assigned per-interface?</div><pre style="overflow-x: auto; overflow-y: hidden; padding: 5px; line-height: 17.6000003814697px; border-top-width: 1px; border-bottom-width: 1px; border-style: solid none; border-top-color: rgb(170, 204, 153); border-bottom-color: rgb(170, 204, 153); font-size: 15px; text-align: justify;" class="" id="yui_3_16_0_1_1417895351574_6740"><span class="" style="">ndnHelper</span><span class="" style="">.</span><span class="" style="" id="yui_3_16_0_1_1417895351574_7550">SetForwardingStrategy</span> <span class="" style="" id="yui_3_16_0_1_1417895351574_6742">(</span><span class="" style="color: rgb(64, 112, 160);" id="yui_3_16_0_1_1417895351574_6741">"ns3::ndn::fw::Flooding::PerOutFaceLimits"</span>
                                 <span class="" style="color: rgb(64, 112, 160);" id="yui_3_16_0_1_1417895351574_7113">"Limit"</span><span class="" style="">,</span> <span class="" style="color: rgb(64, 112, 160);" id="yui_3_16_0_1_1417895351574_6743">"ns3::ndn::Limits::Rate"</span><span class="" style="">);</span>
<span class="" style="">...</span>
<span class="" style="">ndnHelper</span><span class="" style="">.</span><span class="" style="" id="yui_3_16_0_1_1417895351574_7090">Install</span> <span class="" style="">(</span><span class="" style="">nodes</span><span class="" style="">);</span></pre><div id="yui_3_16_0_1_1417895351574_5644" class="" style="" dir="ltr"><br class=""></div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773" dir="ltr">2- In the above code, we can assign the Interest Rate Limit. I want to assign a new formula to change periodically the Interest Rate Limit. The initial idea is in: <a href="http://ndnsim.net/fw.html#strategies-with-interest-limits" id="yui_3_16_0_1_1417895351574_7089" class="">http://ndnsim.net/fw.html#strategies-with-interest-limits</a> . Where is it possible to write a new Interest Limit? Can we define it in the main function (in *.cc) as a global variable? Could you please give me an hint?</div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773" dir="ltr"><br class=""></div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773"><br class=""></div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773" dir="ltr">I will be thankful if you or anyone can guide me in these questions.</div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773" dir="ltr"><br class=""></div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773" dir="ltr"><br class=""></div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773" dir="ltr">Regards,</div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773" dir="ltr">Amin</div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773"><br class=""></div><div class="" style="" id="yui_3_16_0_1_1417895351574_5773"><br class="" style="">
  <br class="" style="">
-------- Original Message --------
  <table class="" cellpadding="0" cellspacing="0" border="0" style="" id="yui_3_16_0_1_1417895351574_6138">
<tbody class="" style="" id="yui_3_16_0_1_1417895351574_6137"><tr class="" style="" id="yui_3_16_0_1_1417895351574_6164"><th align="RIGHT" nowrap="nowrap" valign="BASELINE" class="" style="">Subject: </th><td class="" style="" id="yui_3_16_0_1_1417895351574_6163">Re: [ndnSIM] Per-interface strategies in ndnSIM</td></tr><tr class="" style="" id="yui_3_16_0_1_1417895351574_6162"><th align="RIGHT" nowrap="nowrap" valign="BASELINE" class="" style="">Date: </th><td class="" style="" id="yui_3_16_0_1_1417895351574_6161">Sat, 15 Nov 2014 10:58:54 -0800</td></tr><tr class="" style="" id="yui_3_16_0_1_1417895351574_6136"><th align="RIGHT" nowrap="nowrap" valign="BASELINE" class="" style="">From: </th><td class="" style="" id="yui_3_16_0_1_1417895351574_6135">Spyridon (Spyros) Mastorakis <<a href="mailto:spiros.mastorakis@gmail.com" class="">spiros.mastorakis@gmail.com</a>></td></tr><tr class="" style="" id="yui_3_16_0_1_1417895351574_6143"><th align="RIGHT" nowrap="nowrap" valign="BASELINE" class="" style="">To: </th><td class="" style="" id="yui_3_16_0_1_1417895351574_6142">amin1431 <<a href="mailto:amin1431@yahoo.com" class="">amin1431@yahoo.com</a>></td></tr><tr class="" style="" id="yui_3_16_0_1_1417895351574_6145"><th align="RIGHT" nowrap="nowrap" valign="BASELINE" class="" style="">CC: </th><td class="" style="" id="yui_3_16_0_1_1417895351574_6144">Ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu" class="">ndnsim@lists.cs.ucla.edu</a>></td></tr></tbody>
  </table>

  <br class="" style="">
  <br class="" style="">
Hello Amin,
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6146"><br class="" style=""></div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6147">I will answer your question, based on the best of my 
knowledge in ndnSIM. Alex can complement my answer if anything is 
misleading or incomplete.</div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6121"><br class="" style=""></div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6122">There is a template class PerOutFaceLimits that I think 
it would be helpful. You can write a specialization of this template to 
apply it to your forwarding strategy. Moreover, each forwarding strategy
 uses a convention about green, yellow and red faces. There is a number 
of forwarding strategies implemented, but you can also create your own 
custom forwarding strategy based on the already implemented strategies. </div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6120"><br class="" style=""></div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6118">Follow the first link to take a look at the 
PerOutFaceLimits template class and the second link for the forwarding 
strategies (with and without limits): <a moz-do-not-send="true" href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1fw_1_1_per_out_face_limits.html#a3ea8ba5325d54412c5894e02fb519839" class="" style="" id="yui_3_16_0_1_1417895351574_6119">http://ndnsim.net/doxygen/classns3_1_1ndn_1_1fw_1_1_per_out_face_limits.html#a3ea8ba5325d54412c5894e02fb519839</a></div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6123"><a moz-do-not-send="true" href="http://ndnsim.net/fw.html" class="" style="" id="yui_3_16_0_1_1417895351574_6148">http://ndnsim.net/fw.html</a></div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6124"><br class="" style=""></div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_6125">If you eventually use the limits, do not forget to 
enable them first at your simulation scenario (there are some examples 
at the second aforementioned link).</div>
  <div class="" style=""><br class="" style=""></div>
  <div class="" style="">Let me know if you need anything else.</div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_5777">Kind regards,</div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_5778">Spyros Mastorakis</div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_5779"><br class="" style=""></div>
  <div class="" style="" id="yui_3_16_0_1_1417895351574_5772"><div class="" style="" id="yui_3_16_0_1_1417895351574_5771"><blockquote type="cite" class="" style="" id="yui_3_16_0_1_1417895351574_5770"><div class="" style="" id="yui_3_16_0_1_1417895351574_5769">On Nov 14, 2014, at 11:54 AM, amin1431 <<a moz-do-not-send="true" href="mailto:amin1431@yahoo.com" class="" style="" id="yui_3_16_0_1_1417895351574_6084">amin1431@yahoo.com</a>> wrote:</div><br class="" style=""><div class="" style="" id="yui_3_16_0_1_1417895351574_5776"><div class="" style="" id="yui_3_16_0_1_1417895351574_5775"><div class="" style="" id="yui_3_16_0_1_1417895351574_5774"><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><span class="" style="">Hi Alex,</span></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><span class="" style=""><br class="" style=""></span></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><span id="yui_3_16_0_1_1415994592014_4816" class="" style="">Could you please tell me in which section of the ndnSIM classes/functions we can do some strategy per-interface?</span></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><span id="yui_3_16_0_1_1415994592014_4820" class="" style="">Is
 there any assigned class for that? for instance, change the rate of 
InInterest or add a value into data packet per interface not for all 
incoming data packets.</span></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><span class="" style=""><br class="" style=""></span></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><span class="" style=""><br class="" style=""></span></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><span id="yui_3_16_0_1_1415994592014_4838" class="" style="">Thanks a lot for your all support.</span></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><span class="" style=""><br class="" style=""></span></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style="">/Amin<br class="" style=""></div><div id="yui_3_16_0_1_1415994592014_4801" dir="ltr" class="" style=""><br class="" style=""></div></div></div>_______________________________________________<br class="" style="">ndnSIM mailing list<br class="" style=""><a moz-do-not-send="true" href="mailto:ndnSIM@lists.cs.ucla.edu" class="" style="" id="yui_3_16_0_1_1417895351574_5780">ndnSIM@lists.cs.ucla.edu</a><br class="" style=""><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br class="" style=""></div></blockquote></div><br class="" style=""></div>

  </div><div class=""><br class="" style=""></div></div></div>_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br class=""></div></blockquote></div><br class=""></div></body></html>