The simulator needs to co-ordinate multiple simultaneous network dynamics events, especially to ensure the right coherent behaviour. Hence, the network dynamics models use their own internal route queue to schedule dynamics events. There is one instance of this object in the simulator, in the class Simulator instance variable rtq_.
The queue object stores an array of queued operations in its instance variable, rtq_. The index is the time at which the event will execute. Each element is the list of operations that will execute at that time.
The instance procedures insq../ns-2/dynamics.tclrtQueue::insq and insq-i../ns-2/dynamics.tclrtQueue::insq-i can insert an element into the queue.
These arguments are placed into the route queue for execution at the appropriate time.
The instance procedure runq../ns-2/dynamics.tclrtQueue::runq executes eval $obj $iproc $args at the appropriate instant. After all the events for that instance are executed, runq will notify each object about the execution.
Finally, the instance procedure delq../ns-2/dynamics.tclrtQueue::delq can remove a queued action with the time and the name of the object.
Tom Henderson 2011-11-05