Sage Modeling and Simulation Library

ProcedureFunctionChart Methods

The ProcedureFunctionChart type exposes the following members.

Methods


  Name Description
Public method _Clone
If you override Clone to create your own kind of PFC, call this from inside that override.
Protected method _OnCloneComplete
Protected method _PopulateClone
Public method AddElement
Adds the element to the PFC.
Public method ApplyGuidMap
Applies the GUID map.
Public method ApplyNamingCosmetics
Applies the naming cosmetics appropriate for the type of recipe being generated. This is currently hard-coded, and performs naming of transitions to T_001, T_002, ... T_00n, and null steps to NULL_UP:0, NULL_UP:1, ... NULL_UP:n.
Public method Bind(IPfcNode, IPfcNode)
Binds the two nodes. If both are steps, it inserts a transition between them, and if both are transitions, it inserts a step between them - in both cases, creating links between the 'from' node, the shim node, and the 'to' node. Piggybacking is allowed by default. Use the full-featured API to disallow piggybacking.
Public method Bind(IPfcNode, IPfcNode, IPfcLinkElement%, IPfcNode%, IPfcLinkElement%, Boolean)
Binds the two nodes. If both are steps, it inserts a transition between them, and if both are transitions, it inserts a step between them - in both cases, creating links between the 'from' node, the shim node, and the 'to' node. If piggybacking is allowed, and a suitable path already exists, we use that path instead. A suitable path is either a link between differently-typed nodes, or a link-node-link path between same-typed nodes, where the interstitial node is simple, and opposite-typed.
Public method Bind(IPfcNode, IPfcLinkElement)
Binds the linkable and the link node. If the link node is floating (and has nothing on the other end yet), it just binds them. Otherwise, if the link is bound to the same type of node on the other side that we've indicated to bind to, it inserts a shim node of the opposite type between the two same-type nodes.
Public method Bind(IPfcLinkElement, IPfcNode)
Binds the linkable and the link node. If the link node is floating (and has nothing on the other end yet), it just binds them. Otherwise, if the link is bound to the same type of node on the other side that we've indicated to bind to, it inserts a shim node of the opposite type between the two same-type nodes.
Public method BindParallelConvergent(array<IPfcNode>[]()[][], IPfcNode)
Binds the inbound nodes to the outbound node through a parallel convergent link structure. Since the caller has indicated that they desire a PARALLEL convergent structure, appropriate shimming is done to ensure that the convergence node is a step.
Public method BindParallelConvergent(PfcNodeList, IPfcNode)
Binds the inbound nodes to the outbound node through a parallel convergent link structure. Since the caller has indicated that they desire a PARALLEL convergent structure, appropriate shimming is done to ensure that the convergence node is a step.
Public method BindParallelDivergent(IPfcNode, array<IPfcNode>[]()[][])
Binds the inbound node to the outbound nodes through a parallel divergent link structure. Since the caller has indicated that they desire a PARALLEL divergent structure, appropriate shimming is done to ensure that the divergence node is a transition.
Public method BindParallelDivergent(IPfcNode, PfcNodeList)
Binds the inbound node to the outbound nodes through a parallel divergent link structure. Since the caller has indicated that they desire a PARALLEL divergent structure, appropriate shimming is done to ensure that the divergence node is a transition.
Public method BindSeriesConvergent(array<IPfcNode>[]()[][], IPfcNode)
Binds the inbound nodes to the outbound node through a series convergent link structure. Since the caller has indicated that they desire a SERIES convergent structure, appropriate shimming is done to ensure that the convergence node is a step.
Public method BindSeriesConvergent(PfcNodeList, IPfcNode)
Binds the inbound nodes to the outbound node through a series convergent link structure. Since the caller has indicated that they desire a SERIES convergent structure, appropriate shimming is done to ensure that the convergence node is a step.
Public method BindSeriesDivergent(IPfcNode, array<IPfcNode>[]()[][])
Binds the inbound node to the outbound nodes through a series divergent link structure. Since the caller has indicated that they desire a SERIES divergent structure, appropriate shimming is done to ensure that the divergence node is a step.
Public method BindSeriesDivergent(IPfcNode, PfcNodeList)
Binds the inbound node to the outbound nodes through a series divergent link structure. Since the caller has indicated that they desire a SERIES divergent structure, appropriate shimming is done to ensure that the divergence node is a step.
Public method Clone()()()()
Public method Clone(String, String, Guid)
Public method CollapseParticipantDirectories
Recursively collapses childrens' participant directories into the parent, renaming the absorbed child elements and Steps as necessary. Only the rootChart's ParticipantDirectory is left in existence. All others point up to the root.
Public method Static member CreateFromStep(IPfcStepNode)
Creates a new SFC with the given step as its root element.
Public method Static member CreateFromStep(IPfcStepNode, Boolean)
Creates a new SFC with the given step as its root element.
Public method CreateLink()()()()
Creates a new link. It must later be bound to a predecessor and a successor. Throws an exception if the Guid is already known to this ProcedureFunctionChart.
Public method CreateLink(String, String, Guid)
Creates a new link. It must later be bound to a predecessor and a successor. Throws an exception if the Guid is already known to this ProcedureFunctionChart.
Public method CreateLink(String, String, Guid, IPfcNode, IPfcNode)
Creates a link with the specified name & guid.
Public method CreateStep()()()()
Creates and adds a step with the specified information. Throws an exception if the Guid is already in use.
Public method CreateStep(String, String, Guid)
Creates and adds a step with the specified information. Throws an exception if the Guid is already in use.
Public method CreateTransition()()()()
Creates and adds a transition with default information. Throws an exception if the Guid is already in use.
Public method CreateTransition(String, String, Guid)
Creates and adds a transition with the specified information. Throws an exception if the Guid is already in use.
Public method Delete
Deletes the specified node and its pair (preceding Step if it is a transition, succeeding transition if it is a step).
  • If either member of the pair being deleted has more than one predecessor and one successor, the delete attempt will fail - these other paths need to be deleted themselves first.
  • If neither node has multiple inputs or outputs, then they are both deleted, and a link is added from the transition preceding the deleted step to the step following the deleted transition.
  • If the node to be deleted is not connected to anything on either end, then the node is simply removed from Pfc data structures.
Public method DepthFirstIterator
Retrieves a depth-first iterator over all nodes in this PFC.
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 FindAll
Retrieves a depth-first iterator over all nodes in this PFC that satisfy the predicate.
Public method FindFirst
Finds the first node for which the predicate returns true.
Public method FindNode
Finds the node at the specified path from this location. Currently, works only absolutely from this PFC. Paths are specified as "parentStepName/childStepName/grandchildStepName"

Public method Flatten()()()()
Combines this PFC and all of its child PFCs (the actions associated with steps) into one flat PFC with no children. Steps that had children are replaced by their children, inserted inline into the parents' PFC structure, in place of the parent.
Public method Static member FromXmlString(String, Guid, Guid, Int32)
Creates a ProcedureFunctionChart with repeatable GUID generation characteristics from a properly-schemed XML string.
Public method Static member FromXmlString(String)
Creates a ProcedureFunctionChart from a properly-schemed XML string.
Public method GetChildren
Gets all of the elements that are contained in or under this Pfc, to a depth specified by the 'depth' parameter, and that pass the 'filter' criteria.
Public method GetCleanGuidMap
Gets a list of NewGuidHolder objects. After obtaining this list, go through it and for each NewGuidHolder, inspect the target object, determine the new Guid to be applied, and set it into the newGuidHolder.NewGuid property. After this, the entire list must be submitted to the ApplyGuidMap(myNewGuidHolderList); API, and the new guids will be applied.

Do not simply set the Guids on the objects. If, after setting a new guid, you want not to change the object's guid, you can set it to NewGuidHolder.NO_CHANGE, a special guid that causes the engine to skip that object in the remapping of guids.

Public method GetFinishSteps Obsolete.
Gets the finish steps in this ProcedureFunctionChart.
Public method GetFinishTransition
Gets the finish transition in this ProcedureFunctionChart.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetNodesOnPath
Gets the nodes on all paths that proceed from the 'from' node to the 'to' node, through the 'through' node.
Public method GetPermissionToStart
Gets permission from the step to transition to run.
Public method Static member GetPfcSchema
Gets the PFC schema.
Public method GetSchema
This property is reserved, apply the XmlSchemaProviderAttribute to the class instead.
Public method GetStartSteps
Gets the start steps in this ProcedureFunctionChart.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method InitializeIdentity
Initializes the fields that feed the properties of this IModelObject identity.
Public method LookBackwardForNodesOnPathStartingAt
Looks backward from node 'node' for a path ending at 'start', and returns a list of nodes that are on all such paths.
Public method LookForwardForNodesOnPathEndingAt
Looks forward from node 'node' for a path ending at 'finish', and returns a list of nodes that are on all such paths.
Public method MakeLinkPrimary
Makes the link primary, setting its priority to int.MaxValue.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Prune(Func<(Of <<'(IPfcStepNode, Boolean>)>>))
Prunes the PFC so that only the steps that return 'true' from the function are left in the PFC.
Public method ReadXml
Generates an object from its XML representation.
Public method Reduce
Removes the null nodes.
Public method Static member ReductionRule_RemoveNullNodesParallel
Public method Static member ReductionRule_RemoveNullNodesSeries
Public method ResumeNodeSorting
This is a performance enhancer - when making internal changes (i.e. changes that are a part of a larger process such as flattening a Pfc hierarchy), there is no point to doing node sorting on the entire graph, each time. So, prior to the start of the wholesale changes, suspend node sorting, and then resume once the changes are complete. Resuming also results in a call to UpdateStructure(...).
Public method Run
Public method SuspendNodeSorting
This is a performance enhancer - when making internal changes (i.e. changes that are a part of a larger process such as flattening a Pfc hierarchy), there is no point to doing node sorting on the entire graph, each time. So, prior to the start of the wholesale changes, suspend node sorting, and then resume once the changes are complete. Resuming also results in a call to UpdateStructure(...).
Public method Synchronize(array<IPfcNode>[]()[][], array<IPfcNode>[]()[][])
Binds the inbound elements to the outbound elements through a synchronizer construct. All elements in both arrays must be the same type (either all Steps or all Transitions), and null or empty arrays are illegal.
Public method Synchronize(PfcNodeList, PfcNodeList)
Binds the inbound elements to the outbound elements through a synchronizer construct. Empty collections are illegal.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method ToXmlString
Creates an XML string representation of this Pfc.
Public method Unbind(IPfcNode, IPfcNode, Boolean)
Unbinds the two nodes, removing ONE link between them. Returns false if they were not connected directly in the first place. If called directly by the user, this API can result in an illegal PFC graph. Note that if they are connected by two sets of links, this will not completely disconnect them - for infallible disconnection, call this method repeatedly until it returns false.
Public method Unbind(IPfcNode, IPfcLinkElement, Boolean)
Unbinds the node from the link. Returns false if they were not connected directly in the first place. If called directly by the user, this API can result in an illegal PFC graph.
Public method Unbind(IPfcLinkElement, IPfcNode, Boolean)
Unbinds the link from the node. Returns false if they were not connected directly in the first place. If called directly by the user, this API can result in an illegal PFC graph.
Public method UpdateStructure
Updates the structure of the PFC and sorts outbound links per their priority then their textual names, then their guids. Next, does a depth-first traversal to identify loopback links, then does a breadth-first traversal, assigning nodes a sequence number. Finally sorts node lists per their sequence numbers. Loop breaking then can occur between the node with the higher sequence number and the *following* node with the lower number. This way, loop-break always occurs at the intuitively-correct place.
Public method WriteXml