[ns] mean rate of pareto on/off source
Hakan YILMAZ
hy@boun.edu.tr
Fri Apr 26 10:35:03 2002
--------------070401080909020004050007
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi Tim,
Thank you for your reply.
My expectation about the mean rate was the same, however I 've ran the
following code:
## pareto_rate2.tcl
set ns_ [new Simulator]
set sinknode [$ns_ node]
for {set i 0} {$i < 64 } {incr i} {
set pnode_($i) [$ns_ node]
$ns_ duplex-link $pnode_($i) $sinknode 1Mb 15ms DropTail
}
set sink [new Agent/LossMonitor]
$ns_ attach-agent $sinknode $sink
for {set i 0} {$i < 64 } {incr i} {
set src_($i) [new Agent/UDP]
$ns_ attach-agent $pnode_($i) $src_($i)
$ns_ connect $src_($i) $sink
set rng_($i) [new RNG]
$rng_($i) seed predef $i
set p_($i) [new Application/Traffic/Pareto]
$p_($i) attach-agent $src_($i)
$p_($i) use-rng $rng_($i)
$p_($i) set packetSize_ 200
$p_($i) set burst_time_ 0.160
$p_($i) set idle_time_ 0.100
$p_($i) set rate_ 1e6
$p_($i) set shape_ [lindex $argv 0]
}
proc finish {} {
global sink
set mean [expr [$sink set bytes_]/100.0]
puts "Mean rate = $mean"
}
for {set i 0} {$i < 64 } {incr i} {
$ns_ at 0.0 "$p_($i) start"
$ns_ at 100.0 "$p_($i) stop"
}
$ns_ at 100.0 "finish"
$ns_ run
and ot the following results for different shape parameters:
$ ns pareto_rate2.tcl 1.2
Mean rate = 4633304.0
$ ns pareto_rate2.tcl 1.4
Mean rate = 4706408.0
$ ns pareto_rate2.tcl 1.6
Mean rate = 4788320.0
$ ns pareto_rate2.tcl 1.8
Mean rate = 4840370.0
The difference is even greater with single pareto source.
I would be glad if you could clarify this. Thank you.
Best regards,
Hakan YILMAZ
Timothy Neame wrote:
> --- Hakan Yilmaz <hy@boun.edu.tr> wrote: >
>
>>Dear All,
>>Pareto On/Off soruce in NS is parameterized by the
>>following member
>>variables:
>>packetSize_
>>burst_time_
>>idle_time_
>>rate_
>>shape_
>>
>>The shape parameter is said to have a
>>"shape=3-2*Hurst" relationship with
>>the Hurst parameter. The Hurst parameter should
>>affect the mean bit rate
>>of the source. I would like to change the hurst
>>parameter of the
>>sourceand adjust the other parameters to have a
>>constant mean
>>rate. Does any one know how to calculate the mean
>>rate of the pareto
>>on/off source?
>>Regards,
>>
>>Hakan YILMAZ
>>
>>
>
>Hello Hakan,
>
>The ns software is set up to do exactly what you want
>to do. If you change the shape_ parameter, and leave
>the other parameters of the pareto on/off source
>unchanged, then you will get a source that has the
>same mean bit rate but different Hurst parameter. The
>C code does the manipulation to make sure that the
>Pareto distributions have the means specified by
>burst_time_ and idle_time_.
>
>The mean rate of the Pareto on/off source will be
>(burst_time_ * rate_)/(burst_time_ + idle_time_).
>
>Hope that helps.
>
>Tim Neame
>
>http://messenger.yahoo.com.au - Yahoo! Messenger
>- A great way to communicate long-distance for FREE!
>
--------------070401080909020004050007
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<html>
<head>
</head>
<body>
Hi Tim,<br>
Thank you for your reply.<br>
My expectation about the mean rate was the same, however I 've ran the following
code:<br>
<br>
## pareto_rate2.tcl<br>
<br>
set ns_ [new Simulator]<br>
<br>
set sinknode [$ns_ node]<br>
for {set i 0} {$i < 64 } {incr i} {<br>
set pnode_($i) [$ns_ node]<br>
$ns_ duplex-link $pnode_($i) $sinknode 1Mb 15ms DropTail<br>
}<br>
<br>
set sink [new Agent/LossMonitor]<br>
$ns_ attach-agent $sinknode $sink<br>
<br>
for {set i 0} {$i < 64 } {incr i} {<br>
set src_($i) [new Agent/UDP]<br>
$ns_ attach-agent $pnode_($i) $src_($i)<br>
$ns_ connect $src_($i) $sink<br>
set rng_($i) [new RNG]<br>
$rng_($i) seed predef $i<br>
set p_($i) [new Application/Traffic/Pareto]<br>
$p_($i) attach-agent $src_($i)<br>
$p_($i) use-rng $rng_($i)<br>
$p_($i) set packetSize_ 200<br>
$p_($i) set burst_time_ 0.160<br>
$p_($i) set idle_time_ 0.100<br>
$p_($i) set rate_ 1e6<br>
$p_($i) set shape_ [lindex $argv 0]<br>
}<br>
<br>
proc finish {} {<br>
global sink<br>
<br>
set mean [expr [$sink set bytes_]/100.0]<br>
puts "Mean rate = $mean"<br>
}<br>
<br>
for {set i 0} {$i < 64 } {incr i} {<br>
$ns_ at 0.0 "$p_($i) start"<br>
$ns_ at 100.0 "$p_($i) stop"<br>
}<br>
$ns_ at 100.0 "finish"<br>
<br>
$ns_ run<br>
<br>
and ot the following results for different shape parameters:<br>
<br>
$ ns pareto_rate2.tcl 1.2<br>
Mean rate = 4633304.0<br>
$ ns pareto_rate2.tcl 1.4<br>
Mean rate = 4706408.0<br>
$ ns pareto_rate2.tcl 1.6<br>
Mean rate = 4788320.0<br>
$ ns pareto_rate2.tcl 1.8<br>
Mean rate = 4840370.0<br>
<br>
The difference is even greater with single pareto source.<br>
I would be glad if you could clarify this. Thank you.<br>
Best regards,<br>
Hakan YILMAZ<br>
<br>
Timothy Neame wrote:<br>
<blockquote type="cite" cite="mid:20020426013625.54504.qmail@web20101.mail.yahoo.com">
<pre wrap=""> --- Hakan Yilmaz <a class="moz-txt-link-rfc2396E" href="mailto:hy@boun.edu.tr"><hy@boun.edu.tr></a> wrote: > <br></pre>
<blockquote type="cite">
<pre wrap="">Dear All,<br>Pareto On/Off soruce in NS is parameterized by the<br>following member<br>variables:<br>packetSize_<br>burst_time_<br>idle_time_<br>rate_<br>shape_<br><br>The shape parameter is said to have a<br>"shape=3-2*Hurst" relationship with<br>the Hurst parameter. The Hurst parameter should<br>affect the mean bit rate<br>of the source. I would like to change the hurst<br>parameter of the<br>sourceand adjust the other parameters to have a<br>constant mean<br>rate. Does any one know how to calculate the mean<br>rate of the pareto<br>on/off source?<br>Regards,<br><br>Hakan YILMAZ<br> <br></pre>
</blockquote>
<pre wrap=""><!----><br>Hello Hakan,<br><br>The ns software is set up to do exactly what you want<br>to do. If you change the shape_ parameter, and leave<br>the other parameters of the pareto on/off source<br>unchanged, then you will get a source that has the<br>same mean bit rate but different Hurst parameter. The<br>C code does the manipulation to make sure that the<br>Pareto distributions have the means specified by<br>burst_time_ and idle_time_.<br><br>The mean rate of the Pareto on/off source will be <br>(burst_time_ * rate_)/(burst_time_ + idle_time_).<br><br>Hope that helps.<br><br>Tim Neame<br><br><a class="moz-txt-link-freetext" href="http://messenger.yahoo.com.au">http://messenger.yahoo.com.au</a> - Yahoo! Messenger<br>- A great way to communicate long-distance for FREE!<br><br></pre>
</blockquote>
<br>
</body>
</html>
--------------070401080909020004050007--