⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 app_pareto_on_off.html

📁 相关搜索: ns2仿真结果分析 all-awk ns2 ns2 无限网络中awk文件 ... [2.tcl.rar] - 在ns2平台上实现对AODV协议的模拟
💻 HTML
字号:
<html><head><title>Mini-HOWTO: Pareto On/Off Traffic Generator</title></head><body background="parchment.gif" tppabs="http://nile.wpi.edu/NS/Icons/parchment.gif" text="#000000" link="#0000FF"vlink="#000080" alink="#FF0000"><br><center><h2>Mini-HOWTO: Pareto On/Off Traffic Generator</h2></center><br><br><li><b>Description</b></li><p>The Pareto On/Off Traffic Generator (POO_Traffic) is a traffic generator(an application) embodied in the OTcl class Application/Traffic/Pareto.POO_Traffic generates traffic according to a Pareto On/Off distribution.Packets are sent at a fixed rate during on periods, and no packets aresent during off periods. Both on and off periods are taken from a Paretodistribution with constant size packets.  These sources can be used togenerate aggregate traffic that exhibits long range dependency.  Forother traffic generators, refer to the<a href="javascript:if(confirm('http://www.isi.edu/nsnam/ns/doc/node454.html  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.isi.edu/nsnam/ns/doc/node454.html'" tppabs="http://www.isi.edu/nsnam/ns/doc/node454.html" target=_top>NS manual</a>.</p><br><li><b>Usage Example</b></li><p>A new Pareto On/Off traffic generator can be created as follows:<pre>        set p [new Application/Traffic/Pareto]        $p set burst_time_ 500ms        $p set idle_time_ 500ms        $p set rate_ 200k        $p set packetSize_ 210        $p set shape_ 1.5</pre></p><br><li><b>Detailed Explanation</b></li><ol type=A>  <li>Input parameters:</li>  <pre>  burst_time_ : Mean On (burst) time  idle_time_  : Mean Off (idle) time  rate_       : Send rate during burst  packetSize_ : Packet size (fixed application frame size)  shape_      : Pareto shape parameter  </pre>  <li>Initial computation:</li>  <pre>  interval = packetSize_ * 8 / rate_  burstlen = burst_time_ / interval (in packets of given packetSize_)  </pre>  <li>In each On/Off round, the following two (independent) Pareto random       variables are computed:  <pre>  next_burstlen  : # of packets to be transmitted in the next burst period                   (ex: next Web object size in packets of given packetSize_)  next_idle_time : next idle period length in seconds                   (ex: next think time)  </pre>  <li>Pareto Traffic Generator algorithm:<br>&nbsp;</li>  <ol>    <li>Compute <tt>next_burstlen</tt> given the mean <tt>burstlen</tt>        and the Pareto <tt>shape_</tt> parameter.</li>    <li>Send all <tt>next_burstlen</tt> packets (each packet transmission        interval is <tt>interval</tt> seconds).</li>    <li>Compute the <tt>next_idle_time</tt> using the mean <tt>idle_time_</tt>        and the Pareto <tt>shape_</tt> parameter.</li>    <li>Go to sleep for <tt>next_idle_time</tt> and go back to step 1.<br>&nbsp;</li>  </ol>  <li>Pareto Distribution:</li>  <p>In general, if X is a random variable from a Pareto distribution<br>  (let <var>f</var> be the pdf, and <var>E</var> be the expected value)</p>  <ul>  <p><var>f</var>(<var>x</var>) = <var>a</var> *<var>b</var><sup>a</sup></var> /      <var>x<sup>a</sup></var><sup> + 1</sup> for<var> x</var> &ge;      <var>b</var></p>  <p><var>E</var>(<var>X</var>) = <var>b</var> *<var>a</var> / (<var>a</var>      &minus; 1) if <var>a</var> &gt; 1</p>  </ul>  <p>where, <var>a</var> is called the Pareto "shape parameter" (<tt>shape_</tt>)     and <var>b</var> is called the Pareto "scale parameter".</p>  <li>How Pareto is used in the Pareto Traffic Generator:<br>     (The Pareto <tt>shape_</tt> parameter is denoted as <var>a</var> in the      following equations.)</li>  <ul>  <p><tt>burstlen</tt> &nbsp;&nbsp; = <var>E</var>(<var>X</var>) = <var>b1</var>      *<var>a</var> / (<var>a</var> &minus; 1)<br>     <tt>idle_time_</tt> = <var>E</var>(<var>Y</var>) = <var>b2</var>     *<var>a</var> / (<var>a</var> &minus; 1)</p>  </ul>  Therefore:  <ul>  <p><var>b1</var> = <tt>burstlen</tt> * (<var>a</var> &minus; 1) /      <var>a</var><br>     <var>b2</var> = <tt>idle_time_</tt> * (<var>a</var> &minus; 1) /      <var>a</var></p>  </ul>  NS has a Pareto random number generator that takes the scale and  shape parameter:</p>  <pre>      double pareto(double scale, double shape)  </pre>  When the Pareto traffic generator needs to compute <tt>next_burstlen</tt>,  it does:  <pre>      int next_burstlen = int(pareto(b1, a) + 0.5);      /* next_burstlen should be at least 1 packet */      if(next_burstlen == 0) next_burstlen = 1;  </pre>  When the Pareto traffic generator needs to compute <tt>next_idle_time</tt>,  it does:  <pre>      double next_idle_time = pareto(b2, a);  </pre></ol><br><li><b>Discussion</b></li><p>The Pareto traffic generator can be used as a Web traffic generator assuming that Web object sizes form a Pareto distribution. The NS default Pareto <tt>shape_</tt> parameter (or <var>a</var>) is 1.5.  However, it is uncertain if that 1.5 makes sense for Web object size distribution.</p><p>To find a reasonable Pareto <tt>shape_</tt> parameter for Web object sizes,one should sample Web object sizes during transmissions (or borrow the results  other research), draw the pdf of the samples and compute the mean object size (i.e., <var>E</var>(<var>X</var>)). Since <var>E</var>(<var>X</var>) can be computed from the collected data, the theoretical <var>f</var>(<var>x</var>)should be:</p><ul><p><var>f</var>(<var>x</var>) = <var>g</var>(<var>x</var>, <var>a</var>)</p></ul><p>Then, one should be able to find <var>a</var> that makes the <var>f</var>(<var>x</var>) closest to the pdf of the measured Web object samples.</p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -