flowsim.core
Class Simulator

java.lang.Object
  |
  +--flowsim.core.Simulator

public final class Simulator
extends java.lang.Object

A Simulator object does contain all the services which are needed globally by every element such as the scheduler.


Constructor Summary
Simulator()
           
 
Method Summary
 void debug(java.lang.Object who, java.lang.String str)
          Writes a debug to the log.
 void error(java.lang.Object who, java.lang.String str)
          Writes an error string to the log.
 long now()
          Get the current time of the simulation in microseconds.
 void run(long how_long)
          Runs the simulation.
 EventQueueElement schedule_absolute(long when, Event e)
          Schedules an event at absolute time.
 EventQueueElement schedule(long when, Event e)
          Schedules an event at a time relative to now.
 void set_verbose(boolean v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Simulator

public Simulator()
Method Detail

now

public long now()
Get the current time of the simulation in microseconds.

run

public void run(long how_long)
Runs the simulation.
Parameters:
how_long - duration in microseconds.

schedule

public EventQueueElement schedule(long when,
                                  Event e)
Schedules an event at a time relative to now.

schedule_absolute

public EventQueueElement schedule_absolute(long when,
                                           Event e)
Schedules an event at absolute time.

error

public void error(java.lang.Object who,
                  java.lang.String str)
Writes an error string to the log.

debug

public void debug(java.lang.Object who,
                  java.lang.String str)
Writes a debug to the log.

set_verbose

public void set_verbose(boolean v)