Graph definitions - HxGN SDx - Update 56 - Reference

HxGN SDx Schema Overview

Language
English
Product
HxGN SDx
Search by Category
Reference
SmartPlant Foundation / SDx Version
10

A graph consists of nodes and edges. The nodes (typically represented as circles) are connected to each other by the edges (lines). A directed graph is a special type of graph in which each of the lines goes in one direction only (typically represented using arrows). A directed graph traversal across an edge is always done in the one direction specified, never in the opposite direction.

A directed graph definition consists of a set of interface definitions (nodes) connected by a set of edge definitions (edges).

The definition of a directed graph begins by identifying the starting node (interface definition) for the graph. Once the starting interface definition has been defined, the next step in the process is to identify an edge (edge definition) to traverse. The list of edge definitions that can be used are the set of edge definitions that start at the specified interface definition or that start at an interface definition directly or indirectly implied by that interface definition.

When an edge (edge definition) is added to the graph, the node (interface definition) at the end of the edge is given a name. This name is used to identify the node for purposes of adding edges to the graph from that node.

After the starting node (interface definition) and the first edge (edge definition) have been defined, the directed graph consists of two nodes: one for the starting interface definition and one for the named interface definition at the end of the first edge. You can extend the graph definition by adding an edge to either the starting node (interface definition) or the node (interface definition) at the end of the first edge. You can continue to extend the graph definition this way until you have the graph definition that you want.

Occasionally, you may need to extend the graph from a specific node (interface definition) using an edge (edge definition) that starts at an interface definition that is not the interface definition for that node or an interface definition directly or indirectly implied by the interface definition for that node. In this case, you must identify a more "specialized" interface definition that either is or implies the starting interface definition for the edge definition that you want.

Explicit edge definitions and criteria

Every relationship definition results in two implied edge definitions: one for going from the interface definition at one end of the relationship definition to the interface definition at the other end and the second for traversing the opposite direction. For many graph definitions, the set of implied edge definitions is sufficient to define the graph definition. Occasionally a graph definition will require a more specific traversal than provided by the implicit edge definitions. For these cases, explicit edge definitions that define the more specific traversal are required.

Cases where explicit edge definitions are required include:

  • Traversing across multiple relationships as a single edge.

  • Traversing across a single relationship where only a subset of the objects at the other end of the relationship are required (the results need to be filtered).

  • Traversing multiple relationships where filtering is needed as part of a single edge. An example of this is the traversal from a graphical object to its drawing, which traverses the DrawingItems and DwgRepresentationComposition relationships. Examples of filtering include selecting the object at a particular position (1, 2, and so on), selecting only those objects that support a particular interface, or selecting those objects that have a particular value for a property.

Directed graphs

When a directed graph definition is applied to an object (or a set of objects), the result is a directed graph in which the nodes are objects and the edges are edges. A directed graph is therefore an instance of a directed graph definition (just as an object is an instance of a class). Where the directed graph definition consists of nodes that are interface definitions and edges that are edge definitions, the directed graph consists of nodes that are objects and edges that are edges. Therefore, a directed graph definition can start at interface definition IEquipment and traverse EquipmentEquipmentComponent to get to IEquipmentComponent. The corresponding directed graph can start at vessel V-100 and traverse to equipment components N1, N2, N3 and N4.

Graph definitions in SDx

In SDx, graph definitions are used to define default expansions and alternate expansions for class definitions. They are also used to define data sheets.

If the name of a class definition is the same as the name of a graph definition, the graph definition is automatically used to define the default expansion for the class definition. For example, when you expand an object in the tree view, the graph definition with the same name as the class to which the object belongs defines the default expansion that you see.