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

📄 node538.html

📁 相关搜索: ns2仿真结果分析 all-awk ns2 ns2 无限网络中awk文件 ... [2.tcl.rar] - 在ns2平台上实现对AODV协议的模拟
💻 HTML
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by:  Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by:  Nikos Drakos, CBLU, University of Leeds* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from:  Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>38. Asim: approximate analytical simulation</TITLE><META NAME="description" CONTENT="38. Asim: approximate analytical simulation"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="previous" HREF="node524.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node524.html"><LINK REL="up" HREF="node523.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node523.html"><LINK REL="next" HREF="node539.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node539.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html9666"  HREF="node539.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node539.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html9660"  HREF="node523.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node523.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html9656"  HREF="node537.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node537.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html9662"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html9664"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html9667"  HREF="node539.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node539.html">8 Emulation</A><B> Up:</B> <A NAME="tex2html9661"  HREF="node523.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node523.html">7 Scale</A><B> Previous:</B> <A NAME="tex2html9657"  HREF="node537.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node537.html">37.4 Commands at a</A> &nbsp <B>  <A NAME="tex2html9663"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html9665"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION08200000000000000000"></A><A NAME="chap:asim"></A><BR>38. Asim: approximate analytical simulation</H1><P><DIV ALIGN="CENTER"><A NAME="fig:struct"></A><A NAME="17711"></A><TABLE><CAPTION ALIGN="BOTTOM"><STRONG>Figure 38.1:</STRONG>The structure of Asim</CAPTION><TR><TD><DIV ALIGN="CENTER">[angle=0,width=5in]figures/struct.eps</DIV></TD></TR></TABLE></DIV><P>This chapter describes a fast approximate network simulator, Asim. Asim solves the steady state of the network using approximate fixed points. The overall structure is shown in Figure <A HREF="node538.html#fig:struct" tppabs="http://www.isi.edu/nsnam/ns/doc/node538.html#fig:struct">38.1</A>.The user feeds a regular ns script and turns on the asim flag.Asim would do a fast approximate simulation of the network scenario and would present to the user the drop probabilitiesof the routers, the delays and the approximate aggregate throughput of the links and the flows.<P>In particular, we the following links/traffic are supported:<UL><LI>Drop Tail Queues</LI><LI>RED Queues</LI><LI>Bulk TCP flows with FTP traffic</LI><LI>Short lived TCP flows </LI></UL> <P>The data structures of Asim are populated by a module within the Tcl space of ns from the user supplied script. Upon executing Asim, the results can be accessed using Tcl routines. To use the Asim within a script the user has to use <P>Simulator set useasim_ 1<P>By default, this flag is set to 0<P>A simple script is given below<P><PRE>proc addsrc { s } {    global ns    set t [$ns set src_]    lappend t $s    $ns set src_ $t}proc adddst { src } {    global ns    set t [$ns set dst_]    lappend t $src    $ns set dst_ $t}proc finish {} {        global ns fmon    set drops  [$fmon set pdrops_]    set pkts   [$fmon set parrivals_]    set notDroped [$fmon set pdepartures_]    set overflow_prob [expr 1.0 * $drops / $pkts]    puts [format "tdrops $drops tpkts $pkts o_prob. %7.4f" $overflow_prob]    exit 0}set N_ 100000set arrival 0set available $N_set endTime_ 200set ns [new Simulator]$ns set useasim_ 1$ns at $endTime_ "finish"set src_ ""set dst_ ""$ns set src_ $src_$ns set dst_ $dst_set n(0) [$ns node]set n(1) [$ns node]set link(0:1) [$ns duplex-link $n(0) $n(1)  1Mbps  50ms RED]for {set i 0} { $i &lt; 4} {incr i} {	set ltcp($i) [new Agent/TCP]	set ltcpsink($i) [new Agent/TCPSink]	$ns attach-agent $n(0) $ltcp($i)	$ns attach-agent $n(1) $ltcpsink($i)	$ns connect  $ltcp($i) $ltcpsink($i)	set lftp($i) [new Application/FTP]	$lftp($i) attach-agent $ltcp($i)	$ns at 0 "$lftp($i) start"}# Short term flowsaddsrc 1adddst 0set pool [new PagePool/WebTraf]# Set up server and client nodes$pool set-num-client [llength [$ns set src_]]$pool set-num-server [llength [$ns set dst_]]global nset i 0foreach s [$ns set src_] {        $pool set-client $i $n($s)        incr i}set i 0foreach s [$ns set dst_] {        $pool set-server $i $n($s)        incr i}# Number of Pages per Sessionset numPage 100000$pool set-num-session 1set interPage [new RandomVariable/Exponential]$interPage set avg_ 0.5set pageSize [new RandomVariable/Constant]$pageSize set val_ 1set interObj [new RandomVariable/Exponential]$interObj set avg_ 1set objSize [new RandomVariable/Constant]$objSize set val_ 20# This is needed$pool use-asim$pool create-session 0 $numPage 0 $interPage $pageSize $interObj $objSize# Dumps internal data structures to this dumpfile$ns asim-dump dumpfile# Calls asim-run $ns asim-run# Access asim statisticsset l [$ns link $n(0) $n(1)]puts "after asim run, link bw = [$ns asim-getLinkTput $l] packets"puts "after asim run, flow bw = [$ns asim-getFlowTput $ltcp(0)] packets"</PRE><P><P><HR><!--Navigation Panel--><A NAME="tex2html9666"  HREF="node539.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node539.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html9660"  HREF="node523.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node523.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html9656"  HREF="node537.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node537.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html9662"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html9664"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html9667"  HREF="node539.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node539.html">8 Emulation</A><B> Up:</B> <A NAME="tex2html9661"  HREF="node523.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node523.html">7 Scale</A><B> Previous:</B> <A NAME="tex2html9657"  HREF="node537.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node537.html">37.4 Commands at a</A> &nbsp <B>  <A NAME="tex2html9663"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html9665"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>

⌨️ 快捷键说明

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