4. The Class Simulator

The overall simulator is described by a Tcl Simulator../ns-2/ns-lib.h. It provides a set of interfaces for configuring a simulation and for choosing the type of event scheduler used to drive the simulation. A simulation script generally begins by creating an instance of this class and calling various methods to create nodes, topologies, and configure other aspects of the simulation. A subclass of Simulator called OldSim is used to support ns v1 backward compatibility.

The procedures and functions described in this chapter can be found in ~ns/tcl/lib/ns-lib.tcl, ~ns/scheduler.{cc,h}, and, ~ns/heap.h.


Tom Henderson 2011-11-05