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

📄 node341.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>28.2.1 The class rtModel</TITLE><META NAME="description" CONTENT="28.2.1 The class rtModel"><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="node346.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node346.html"><LINK REL="previous" HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><LINK REL="up" HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><LINK REL="next" HREF="node342.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node342.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html6573"  HREF="node342.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node342.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html6567"  HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html6561"  HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html6569"  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="tex2html6571"  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="tex2html6574"  HREF="node342.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node342.html">28.2.1.0.1 Exponential</A><B> Up:</B> <A NAME="tex2html6568"  HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html">28.2 The Internal Architecture</A><B> Previous:</B> <A NAME="tex2html6562"  HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html">28.2 The Internal Architecture</A> &nbsp <B>  <A NAME="tex2html6570"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html6572"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H2><A NAME="SECTION05321000000000000000"></A><A NAME="sec:rtmodel"></A><BR>28.2.1 The class rtModel</H2><P>To use a new route model, the routine []rtmodelcreates an instance of the appropriate type,defines the node or link that the model will operate upon,configures the model,and possibly enables tracing;The individual instance procedures that accomplish this in pieces are:<UL><LI>The   constructor for the base class../ns-2/dynamics.tclrtModel::init  stores a reference to the Simulator in its instance variable, <TT>ns_</TT>.  It also initializes the <TT>startTime_</TT> and <TT>finishTime_</TT>  from the class variables of the same name.</LI><LI>The instance procedure   set-elements../ns-2/dynamics.tclrtModel::set-elements  identifies the node or link that the model will operate upon.  The command stores two arrays: <TT>links_</TT>, of the links that the  model will act upon; <TT>nodes_</TT>, of the incident nodes  that will be affected by the link failure or recovery caused by the model.</LI><LI>The default procedure in the base class   to set the model configuration parameters is  set-parms../ns-2/dynamics.tclrtModel::set-parms.  It assumes a well defined  start time, up interval, down interval, and a finish time,  and sets up configuration parameters for some class of models.  It stores these values in the instance variables:  <TT>startTime_</TT>, <TT>upInterval_</TT>, <TT>downInterval_</TT>,  <TT>finishTime_</TT>.    The exponential and deterministic models use this default routine,  the trace based and manual models define their own procedures.</LI><LI>The instance procedure  []trace../ns-2/dynamics.tclrtModel::trace  enables []trace-dynamics on each of the links that it affects.  Additional details on []trace-dynamics is discussed in the  section on extensions to the class LinkSectionsec:nd-extensions.</LI></UL>The next sequence of configuration steps are taken just prior tothe start of the simulator. invokes []rtmodel-configure../ns-2/dynamics.tclSimulator::rtmodel-configurejust before starting the simulation.This instance procedure first acquires an instance of the class rtQueue,and then invokes []configure for each route model in its list,<TT>rtModel_</TT>.<UL><LI>The instance procedure  []configure../ns-2/dynamics.tclrtModel::configure  makes each link that is is applied to dynamic;  this is the set of links stored in its instance variable array,  <TT>links_</TT>.  Then the procedure schedules its first event.</LI><LI>The default instance procedure  []set-first-event../ns-w/dynamics.tclrtModel::set-first-event  schedules the first event to take all the links ``down'' at <BR>  <TT>$startTime_</TT> + <TT>upInterval_</TT>.  Individual types of route models derived from this base class should  redefine tihs function.</LI><LI>Two instance procedures in the base class ,  []set-event../ns-2/dynamics.tclrtModel::set-event and  []set-event-exact../ns-2/dynamics.tclrtModel::set-event-exact,  can be used to schedule events in the route queue.<P>[interval, operation]set-event schedules <TT>operation</TT>  after <TT>interval</TT> seconds from the current time; it uses the  procedure []set-event-exact below.<P>[fireTime, operation]set-event-exact schedules <TT>operation</TT>  to execute at <TT>fireTime</TT>.<P>If the time for execution is greater than the <TT>finishTime_</TT>,  then the only possible action is to take a failed link ``up''.<P></LI><LI>Finally, the base class provides the methods to take the links  []up../ns-2/dynamics.tclrtModel::up or  []down../ns-2/dynamics.tclrtModel::down.  Each method invokes the appropriate procedure on each of the links  in the instance variable, <TT>links_</TT>.</LI></UL><P><BR><HR><!--Table of Child-Links--><A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A><UL><LI><UL><LI><A NAME="tex2html6575"  HREF="node342.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node342.html">28.2.1.0.1 Exponential</A><LI><A NAME="tex2html6576"  HREF="node343.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node343.html">28.2.1.0.2 Deterministic</A><LI><A NAME="tex2html6577"  HREF="node344.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node344.html">28.2.1.0.3 Trace</A><LI><A NAME="tex2html6578"  HREF="node345.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node345.html">28.2.1.0.4 Manual</A></UL></UL><!--End of Table of Child-Links--><HR><!--Navigation Panel--><A NAME="tex2html6573"  HREF="node342.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node342.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html6567"  HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html6561"  HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html6569"  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="tex2html6571"  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="tex2html6574"  HREF="node342.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node342.html">28.2.1.0.1 Exponential</A><B> Up:</B> <A NAME="tex2html6568"  HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html">28.2 The Internal Architecture</A><B> Previous:</B> <A NAME="tex2html6562"  HREF="node340.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node340.html">28.2 The Internal Architecture</A> &nbsp <B>  <A NAME="tex2html6570"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html6572"  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 + -