📄 node140.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>13.3 Multi-state error model</TITLE><META NAME="description" CONTENT="13.3 Multi-state error model"><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="next" HREF="node141.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node141.html"><LINK REL="previous" HREF="node139.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node139.html"><LINK REL="up" HREF="node137.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node137.html"><LINK REL="next" HREF="node141.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node141.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html3432" HREF="node141.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node141.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3426" HREF="node137.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node137.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3420" HREF="node139.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node139.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3428" 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="tex2html3430" 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="tex2html3433" HREF="node141.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node141.html">13.4 Commands at a</A><B> Up:</B> <A NAME="tex2html3427" HREF="node137.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node137.html">13. Error Model</A><B> Previous:</B> <A NAME="tex2html3421" HREF="node139.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node139.html">13.2 Configuration</A>   <B> <A NAME="tex2html3429" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html3431" 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="SECTION031030000000000000000">13.3 Multi-state error model</A></H1><P>Contributed by Jianping Pan (jpan@bbcr.uwaterloo.ca).<P>The multi-state error model implements time-based error statetransitions. Transitions to the next error state occur at the end of the duration of the current state. Thenext error state is then selected using the transition state matrix.<P>To create a multi-state error model, the following parameters shouldbe supplied (as defined in /tcl/lib/ns-errmodel.tcl): <UL><LI><TT>states</TT>: an array of states (error models).</LI><LI><TT>periods</TT>: an array of state durations.</LI><LI><TT>trans</TT>: the transition state model matrix.</LI><LI><TT>transunit</TT>: one of <TT>[pkt|byte|time]</TT>.</LI><LI><TT>sttype</TT>: type of state transitions to use: either <TT> time</TT> or <TT>pkt</TT>.</LI><LI><TT>nstates</TT>: number of states.</LI><LI><TT>start</TT>: the start state.</LI></UL><P>Here is a simple example script to create a multi-state error model:<PRE> set tmp [new ErrorModel/Uniform 0 pkt] set tmp1 [new ErrorModel/Uniform .9 pkt] set tmp2 [new ErrorModel/Uniform .5 pkt] # Array of states (error models) set m_states [list $tmp $tmp1 $tmp2] # Durations for each of the states, tmp, tmp1 and tmp2, respectively set m_periods [list 0 .0075 .00375] # Transition state model matrix set m_transmx { {0.95 0.05 0} {0 0 1} {1 0 0} } set m_trunit pkt # Use time-based transition set m_sttype time set m_nstates 3 set m_nstart [lindex $m_states 0] set em [new ErrorModel/MultiState $m_states $m_periods $m_transmx \\ $m_trunit $m_sttype $m_nstates $m_nstart]</PRE> <P><BR><HR><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -