Sage Modeling and Simulation Library

IExecutive Members

The IExecutive type exposes the following members.

Methods


  Name Description
Public method Abort
Aborts the executive. This always flushes the event queue and terminates all running events.
Public method ClearVolatiles
Removes any entries in the task graph whose keys or values have the TaskGraphVolatile attribute. This is used, typically, to 'reset' the task graph for a new simulation run.
Public method Detach
Removes all instances of .NET event and simulation discrete event callbacks from this executive.
Public method Equals(System.Object)
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method Join
This method blocks until the events that correlate to the provided event codes (which are returned from the RequestEvent APIs) are completely serviced. The event on whose thread this method is called must be a detachable event, all of the provided events must have been requested already, and none can have already been serviced.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Pause
If running, pauses the executive and transitions its state to 'Paused'.
Public method RequestDaemonEvent
Requests that the executive queue up a daemon event to be serviced at a specific time and priority. If only daemon events are enqueued, the executive will not be kept alive.
Public method RequestEvent(ExecEventReceiver, DateTime)
Requests that the executive queue up an event to be serviced at a specific time. Priority is assumed to be zero, and the userData object is assumeds to be null.
Public method RequestEvent(ExecEventReceiver, DateTime, Object)
Requests that the executive queue up an event to be serviced at a specific time. Priority is assumed to be zero.
Public method RequestEvent(ExecEventReceiver, DateTime, Double, Object)
Requests that the executive queue up an event to be serviced at a specific time and priority.
Public method RequestEvent(ExecEventReceiver, DateTime, Double, Object, ExecEventType)
Requests that the executive queue up an event to be serviced at a specific time and priority.
Public method RequestImmediateEvent
Requests that the executive queue up an event to be serviced at the current executive time and priority.
Public method Reset
Resets the executive - this clears the event list and resets now to 1/1/01, 12:00 AM
Public method Resume
If paused, unpauses the executive and transitions its state to 'Running'.
Public method SetStartTime
Public method Start
Starts the executive. The calling thread will be the primary execution thread, and will not return until execution is completed (via completion of all non-daemon events or the Abort method.)
Public method Stop
Stops the executive. This may be a pause or a stop, depending on if events are queued or running at the time of call.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method UnRequestEvent
Removes an already-submitted request for a time-based notification.
Public method UnRequestEvents(IExecEventSelector)
Removes an already-submitted request for a time-based notification based on a user-provided selector object.
Public method UnRequestEvents(Object)
Removes all already-submitted requests for a time-based notification into a specific callback target object.
Public method UnRequestEvents(Delegate)
Removes all already-submitted requests for a time-based notification into a specific callback target object.

Properties


  Name Description
Public property CurrentEventController
The DetachableEventController associated with the currently-executing event, if it was launched as a detachable event. Otherwise, it returns null.
Public property CurrentEventType
The type of event currently being serviced by the executive.
Public property CurrentPriorityLevel
The priority of the event currently being serviced.
Public property EventCount
The number of events that have been serviced on this run.
Public property EventList
Returns a read-only list of the ExecEvents currently in queue for execution. Cast the elements in the list to IExecEvent to access the items' field values.
Public property Guid
The Guid by which this executive is known.
Public property LastEventServed
If this executive has been run, this holds the DateTime of the last event serviced. May be from a previous run.
Public property LiveDetachableEvents
Returns a list of the detachable events that are currently running.
Public property Now
The current DateTime being managed by this executive. This is the 'Now' point of a simulation being run by this executive.
Public property RunNumber
The integer count of the number of times this executive has been run.
Public property State
The current state of this executive (running, stopped, paused, finished)

Events


  Name Description
Public event ClockAboutToChange
Fired after service of the last event scheduled in the executive to fire at a specific time, assuming that there are more non-daemon events to fire.
Public event EventAboutToFire
Fired after an event has been selected to be fired, but before it actually fires.
Public event EventHasCompleted
Fired after an event has been selected to be fired, and after it actually fires.
Public event ExecutiveAborted
Fired when this executive has been aborted.
Public event ExecutiveFinished
Fired when this executive finishes (including after an abort).
Public event ExecutivePaused
Fired when this executive pauses.
Public event ExecutiveReset
Fired when this executive is reset.
Public event ExecutiveResumed
Fired when this executive resumes.
Public event ExecutiveStarted
Fired when this executive starts.
Public event ExecutiveStarted_SingleShot
Fired when this executive starts. All events are fired once, and then cleared. This enables the designer to register this event on starting the model, to set up the simulation model when the executive starts. If it was not then cleared, it would be re-registered and then called twice on the second start, three times on the third call, etc.
Public event ExecutiveStopped
Fired when this executive stops.