Sage Modeling and Simulation Library

IModel Members

The IModel type exposes the following members.


  Name Description
Public method Abort
Aborts the model.
Public method AddError
Adds an error to the model, and iterates over all of the error handlers, allowing each in turn to respond to the error. As soon as any errorHandler indicates that it has HANDLED the error (by returning true from 'HandleError'), the error is cleared, and further handlers are not called.
Public method AddErrorHandler
Enables a user/developer to add an error handler to the model in real time, (e.g. during a simulation run) and ensures that that handler is called for any errors currently in existence in the model.
Public method AddModelObject
Adds a model object to this model's ModelObjects collection.
Public method AddService<(Of <<'(T>)>>)
Adds the specified service with the provided name.
Public method AddWarning
Adds a warning to this model, e.g. a 'GenericModelWarning'...
Public method ClearAllErrors
Removes all errors.
Public method ClearAllErrorsFor
Removes all errors whose target is the specified object.
Public method ClearAllWarnings
Clears all of the warnings applicable to this model.
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 GetService<(Of <<'(T>)>>)
Gets the service of the specified type, and known by the provided name.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method HasErrors
Returns true if the model has errors.
Public method HasWarnings
Returns true if this model has any active warnings.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Pause
Pauses execution of this model after completion of the running callback of the current event.
Public method RemoveError
Removes the error from the model's collection of errors.
Public method RemoveErrorHandler
Removes an error handler from the model.
Public method Reset
Resets the model. First resets the executive, then fires the Model.Resetting event.
Public method Resume
Resumes execution of this model. Ignored if the model is not already paused.
Public method Start
Starts the model.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)


  Name Description
Public property Errors
An enumeration over all of the errors in the model.
Public property ErrorSummary
Provides a string that summarizes all of the errors currently active in this model.
Public property Executive
Provides access to the executive being used by this model.
Public property ExecutiveController
Gets the executive controller that governs the rate-throttling and frame-rendering event frequency of this model.
Public property IsCompleted
Gets or sets a value indicating whether this instance is completed.
Public property IsPaused
Gets or sets a value indicating whether this instance is paused.
Public property IsReady
Gets or sets a value indicating whether this instance is ready to be started.
Public property IsRunning
Gets or sets a value indicating whether this instance is running.
Public property ModelConfig
The ModelConfig is an object that holds the contents of the Sage section of the app.config file.
Public property ModelObjects
A dictionary of currently live IModelObjects. An IModelObject that is garbage- collected is automatically removed from this collection. Note that the object is not necessarily removed at the time of last release, but at the time of garbage collection. Code can call Remove(...) to explicitly remove the object.
Public property RandomSeed
Gets the random seed in use by this model.
Public property RandomServer
Gets the random server.
Public property StateMachine
Provides access to the state machine being used by this model. While the state machine can be set, too, this is an advanced feature, and should not be done unless the developer is sure what they are doing.
Public property Warnings
An collection of all of the warnings currently applicable to this model.


  Name Description
Public event Completed
Fired when the model has completed.
Public event ErrorCleared
Fired when an error is removed from a model.
Public event ErrorHappened
Fired when an error happens in (is added to) a model.
Public event Resetting
Fired when the model has been commanded to reset.
Public event Starting
Fired when the model has been commanded to start.
Public event Stopping
Fired when the model has been commanded to stop.