Sage Modeling and Simulation Library

Task Members

The Task type exposes the following members.

Constructors


  Name Description
Public method Task(IModel, String)
Creates a new instance of the Task class. Creates an arbitrary Guid for the new task.
Public method Task(IModel, String, Guid)
Creates a new instance of the Task class.
Public method Task()()()()
Default constructor for serialization only.

Methods


  Name Description
Protected method _PopulateClone
Populates the clone, adding clones of its children, and the edges relating them to the clone of this edge.
(Inherited from Edge.)
Public method Accept
Accepts a visitor, subsequently calling the visitor's Visit(this) method. See the Visitor design pattern for details.
(Inherited from Edge.)
Public method AddChainOfChildren
This method takes a list of edges, and first creates a chain out of them, and then adds that chain as a set of child tasks. Note that a restriction is that the edge to which these edges are being added cannot already have children assigned to it.
(Inherited from Edge.)
Public method AddChildEdge
Adds the child edge as a child to this edge. It will be attached at its pre-vertex to this one's pre-vertex, and at its post-vertex to this one's post-vertex. Any further sequencing between the provided edge and other edges is governed by otherwise-defined ligatures, synchronizers, etc.
(Inherited from Edge.)
Public method AddChildEdges
Adds the list of child edges as children to this edge. They are treated as equals, all attached at their pre-vertices to this one's pre-vertex, and at their post-vertices to this one's post-vertex. Any further sequencing between them is governed by otherwise-defined ligatures, synchronizers, etc.
(Inherited from Edge.)
Public method AddCofinish
Adds the slave Edge as a CoFinish. A CoFinish exists when a master edge's postVertex is not permitted to fire until the slave edge has completed. Thus, the master edge's postvertex will not be allowed to fire until the slave edge's postvertex has fired.
(Inherited from Edge.)
Public method AddCostart
Adds the slave Edge as a CoStart. A CoStart is an edge that is allowed to start as soon as this edge has started. Thus, the slave edge's prevertex will not be allowed to fire until this edge's prevertex has fired.
(Inherited from Edge.)
Public method AddPredecessor
Creates a Ligature between the provided edge's postVertex and this one's PreVertex, making the provided edge a predecessor to this one. This API also interacts with a ValidationService to enable it to correctly manage graph validity state.
(Inherited from Edge.)
Public method AddSuccessor
Creates a Ligature between the provided edge's preVertex and this one's postVertex, making the provided edge a successor to this one. This API also interacts with a ValidationService to enable it to correctly manage graph validity state.
(Inherited from Edge.)
Public method Clone
Creates a new object that is a copy of the current instance.
Protected method CreateVertices
Creates the pre and post vertices for this edge, providing them with default names and connecting them to this edge.
(Inherited from Edge.)
Public method DeserializeFrom
Reconstitutes this object from the specified XmlSerializationContext.
Public method Disconnect
Disconnects this instance from any parent edges, predecessors and successors. Child edges are left attached.
(Inherited from Edge.)
Protected method DoTask
Performs the processing that is embodied in this task object. This method is called at the simulation time that the task is to begin, and the call returns once the processing has completed.

It is imperative that a developer, overriding this method, ensure that they call [T:Highpoint.Sage.Graphs.Tasks.Task#SignalTaskCompletion]

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 GetChildren
Gets the children (from a perspective of validity) of the implementer.
Public method GetChildTasks(Boolean)
Gets the child tasks of this task.
Public method GetFinishTime
Gets the time at which this task completed in the specified GraphContext.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetNominalDuration
Nominal duration is the average amount of time that executing the specific task has taken across all runs of the model since the last call to ResetDurationData();
Public method GetOptimisticDuration
Optimistic duration is the minimum amount of time that executing the specific task has taken across all runs of the model since the last call to ResetDurationData();
Public method GetParent
Gets the parent edge to this one. If the graph is not hierarchical, this will be null.
(Inherited from Edge.)
Public method GetPessimisticDuration
Pessimistic duration is the maximum amount of time that executing the specific task has taken across all runs of the model since the last call to ResetDurationData();
Public method GetRecordedDuration
Returns the duration of this task in the specified GraphContext.
Public method GetRootTask
Gets the root task of the graph to which this edge belongs.
Public method GetStartTime
Gets the time at which this task began in the specified GraphContext.
Public method GetSuccessors
Gets the successors (from a perspective of validity) of the implementer.
(Inherited from Edge.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method GetVertex
Gets the pre- or post-vertex of this edge..
(Inherited from Edge.)
Public method InitializeIdentity
Initialize the identity of this model object, once.
Protected method InitializeStructuralChangeHandlers
Initializes the structural change handlers - GainedPredecessorEvent, GainedSuccessorEvent, LostPredecessorEvent, and LostSuccessorEvent.
(Inherited from Edge.)
Public method InsertBetween
Inserts this edge between the two provided edges. This is done by calling [T:Edge#AddSuccessor] for this edge on the preEdge, and [T:Edge#AddPredecessor] for this edge on the postEdge.
(Inherited from Edge.)
Public method IsRunning
Determines whether the specified graph context is running.
(Inherited from Edge.)
Public method Join
This edge will immediately suspend execution until the otherEdge completes.
(Inherited from Edge.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method NotifyOverallValidityChange
Called by the ValidationService upon an overall validity change.
(Inherited from Edge.)
Protected method OnEdgeExecution
Called when edge execution is to begin. This is the method that subclasses of this class implement to hold application code.
Protected method OnExecutionComplete
Called when execution of this edge is complete.
(Inherited from Edge.)
Public method PreVertexSatisfied
Called by the pre-vertex when it has been satisfied - that is, all incoming edges and synchronizers to that vertex have fired.
(Inherited from Edge.)
Public method RecordFinishTime
Records the time that this task completed execution.
Public method RecordStartTime
Records the time that this task started execution.
Public method Static member RecursivelyResetAllDurationStats
Recursivelies the reset all duration statistics for this task and all tasks below this task.
Public method RemoveChildEdge
Removes the child edge, and the ligatures that establish it as a child (i.e. between the parent's pre-vertex and this one's pre-vertex, and the parent's post-vertex and this one's post-vertex.)
(Inherited from Edge.)
Public method RemoveChildEdges
Removes the child edges, and the ligatures that establish them as children (i.e. between the parent's pre-vertex and their pre-vertices, and the parent's post-vertex and their post-vertices.)
(Inherited from Edge.)
Public method RemoveCofinish
Removes a cofinish relationship between this edge and the provided slave edge, if such exists.
(Inherited from Edge.)
Public method RemoveCostart
Removes a costart relationship between this edge and the provided slave edge, if such exists.
(Inherited from Edge.)
Public method RemovePredecessor
Either removes a Ligature between the provided edge's postVertex and this one's PreVertex, removing the provided edge as a predecessor to this one. If the provided edge is a Ligature, then the ligature itself is disconnected from this edge. This API also interacts with a ValidationService to enable it to correctly manage graph validity state.
Public method RemoveSuccessor
Either removes a Ligature between the provided edge's preVertex and this one's PostVertex, removing the provided edge as a successor to this one. If the provided edge is a Ligature, then the ligature itself is disconnected from this edge. This API also interacts with a ValidationService to enable it to correctly manage graph validity state.
(Inherited from Edge.)
Public method ResetDurationData
Resets the duration data to TimeSpan.MaxValue for the minimum, MinValue for the maximum, and zero for aggregate.
Public method ResetDurationStats
Resets the duration statistics. Since a task can run many times and track its min, max and average, this resets the min, max, aggregate and count-of executions.
Public method SerializeTo
Stores this object to the specified XmlSerializationContext.
Public method SetDurationData
Sets the duration data to be used in PERT & CPM analysis.
Protected method SignalTaskCompletion
Signals to the engine that the task has completed all of its execution, and that execution of the next task may be notified that this one has completed.
Public method Start()()()()
Begins execution of the graph under this edge using a default GraphContext. Start
(Inherited from Edge.)
Public method Start(IDictionary)
Begins execution of the graph under the specified graph context.
(Inherited from Edge.)
Public method ToString
Returns a String that represents the current Edge.
(Inherited from Edge.)
Public method Yield
Gives up the execution thread temporarily to any awaiting edges. This edge will be called to resume execution later in this same timeslice.
(Inherited from Edge.)

Fields


  Name Description
Protected field EecsKey
The ke under which this task's Edge Execution Completion Signaler is stored, in the Graph Context.

Properties


  Name Description
Public property AllChildrenValid
Gets a value indicating whether [all children valid].
Public property AllUpstreamValid
Gets a value indicating whether [all upstream valid].
Public property Channel
An edge's channel is used by a vertex's branch manager to determine which successor edges are to fire when the vertex's predecessors have all fired. The channel can be null, if there is no branch manager, or if the provided branch manager allows it.
(Inherited from Edge.)
Public property ChildEdges
Gets the child edges of this one. No sequence is implied in this collection - child edges are executed in an order according to their vertices' relationships to each other and their parents.
(Inherited from Edge.)
Protected property CloneName
Gets a name for the next clone to be obtained. Note that calling this method increases the index number used to create the name.
(Inherited from Edge.)
Public property Description
A description of this Edge.
(Inherited from Edge.)
Public property ExecutionDelegate
Gets or sets the execution delegate that this edge uses to call application code.
(Inherited from Edge.)
Public property Guid
The Guid for this object. Typically required to be unique.
Public property KeepTimingData
Gets or sets a value indicating whether we want to keep timing data as this task executes.
Public property Model
The model that owns this object, or from which this object gets time, etc. data.
Public property Name
The name of this edge.
(Inherited from Edge.)
Protected property Parent
Gets or sets the parent edge to this one. If the graph is not hierarchical, this will be null.
(Inherited from Edge.)
Public property PostVertex
The postVertes to this edge.
(Inherited from Edge.)
Public property PredecessorEdges
Gets a list of predecessor edges attached to this edge's preVertex.
(Inherited from Edge.)
Public property PreVertex
The preVertex to this edge.
(Inherited from Edge.)
Public property SelfState
Gets or sets the state (from a perspective of validity) of the implementer.
Public property SelfValidState
Gets or sets a value indicating whether this task's state is appropriate to call this task, irrespective of predecessors and children, valid.
Public property SuccessorEdges
Gets a list of successor edges attached to this edge's postVertex.
(Inherited from Edge.)
Public property UtilRef
Gets or sets the utility reference. This is a reference that can be used by whomever needs to do so, for short periods. The cloning mechanism, for example, uses it during cloning.
(Inherited from Edge.)
Public property ValidationService
Gets or sets the validation service that oversees the implementer.
(Inherited from Edge.)
Public property ValidityState
Gets a value indicating whether this task is valid overall - meaning that it, all of its children and all of its predecessors are themselves valid.

Events


  Name Description
Public event CloneEvent
Fired after this edge is cloned.
(Inherited from Edge.)
Public event EdgeExecutionFinishingEvent
Called as soon as the application code in the EdgeExecutionDelegate has finished.
(Inherited from Edge.)
Public event EdgeExecutionStartingEvent
Fired after an edge has been notified that it may start, and immediately prior to calling the EdgeExecutionDelegate which contains the application code.
(Inherited from Edge.)
Public event EdgeFinishingEvent
Called as an edge's post-vertex is starting to fire.
(Inherited from Edge.)
Public event EdgeStartingEvent
Called as an edge's pre-vertex is starting to fire.
(Inherited from Edge.)
Public event GainedPredecessorEvent
Fired after an edge has gained a predecessor.
(Inherited from Edge.)
Public event GainedSuccessorEvent
Fired after an edge has gained a successor.
(Inherited from Edge.)
Public event LostPredecessorEvent
Fired after an edge has lost a predecessor.
(Inherited from Edge.)
Public event LostSuccessorEvent
Fired after an edge has lost a successor.
(Inherited from Edge.)
Public event StructureChangeHandler
This event is fired any time the graph's structure changes.
(Inherited from Edge.)
Public event TaskBecameInvalidEvent
This event is fired when the task becomes invalid.
Public event TaskBecameValidEvent
This event is fired when the task becomes valid.
Public event TaskExecutionFinishingEvent
Fired immediately following completion of the ExecutionDelegate (where application code was run.)
Public event TaskExecutionStartingEvent
Fired immediately prior to calling the ExecutionDelegate (where application code is run.)
Public event TaskFinishingEvent
Fired when the task is finishing, as a result of the EdgeCompletionEvent, which is fired when the postVertex has been fully satisfied.
Public event TaskStartingEvent
Fired when the task is starting, as a result of the EdgeStartingEvent, which is fired when the preVertex has been fully satisfied.
Public event ValidityChangeEvent
Fired when the Validation Service determines that this edge's validity has changed.
(Inherited from Edge.)