Constructor

Simulator(Status status)

status: the class Simulator contains the status object.

Scheduling a new event

void Schedule(Event<Scenario, Status> evnt, TimeSpan delay)

Schedules the event evnt after a time duration specified by delay.

void Schedule(Event<Scenario, Status> evnt, DateTime time)

Schedules the event evnt at simulation clock time specified by time.

Immediate execution of an event

void Execute(Event<Scenario, Status> evnt)

Immediately executes the event evnt.

Running the simulation

bool Run(TimeSpan duration)

Runs the simulation for a specified simulation time duration as denoted by duration.

bool Run(DateTime terminate)

Runs the simulation up to a specified simulation clock time as denoted by terminate.

Note: The default initial simulation clock is DateTime.MinValue. This can be overridden by specifying the initial simulation clock time in the constructor.

bool Run(int eventCount)

Runs the simulation for a specified number of events as denoted by eventCount.