Sage Modeling and Simulation Library

Model Methods

The Model type exposes the following members.

Methods


  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 AddErrorCheckHandlerWithModelAbortOnFailure
Adds a handler that, after transition to a specified state, will check the model for errors and if it finds any, will abort the model, putting it back to idle.
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
Public method AddService<(Of <<'(T>)>>)
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.
Protected method CreateModelExecutive
Called during the creation of the model, this method creates the executive. It is intended to be overridden in derived classes if the designer wishes to create a new and different executive instead of the standard executive.
Protected method CreateStateMachine
Creates the state machine to be used by this model. Called by the framework, and intended to be overridden by a derived class.
Public method Dispose
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.)
Protected method FireModelCompletedEvent
Called by a derived class to cause this base class to fire the Model.Completed event.
Protected method FireModelStartingEvent
Called by a derived class to cause this base class to fire the Model.Starting event.
Protected method FireModelStoppingEvent
Called by a derived class to cause this base class to fire the Model.Stopping event.
Public method GetAbortEnum
Returns the enumeration that represents the resultant state of the ABORT transition in this model's state machine.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetIdleEnum
Returns the enumeration that represents the state of this model's state machine from which START is a legal transition.
Public method GetService<(Of <<'(T>)>>)
Public method GetStartEnum
Returns the enumeration that represents the resultant state of the START transition in this model's state machine.

NOTE:

This method, when added to a derived class, needs to ne 'new'ed, not overridden.
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.
Public method InitializeIdentity
Initializes the fields that feed the properties of this IModelObject identity.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method OnNewResourceCreated
Must be called by the creator when a new resource is created.
Public method Pause
Pauses execution of this model after completion of the running callback of the current event.
Public method RemoveAutoclearedErrors
Removes ModelErrors whose 'AutoClear' value is set to true. Typically applied to errors that do not persist from run to run - i.e. that are run time, not configuration, errors.
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
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.)