Skip to content

Problem with FindVertexGroups() and registered vertices #2

@jgoeders

Description

@jgoeders

During construction of a DelayGraphSolution(), FixSolutionForSiblingVertices() is called, which ensures that for all registered vertices, their siblings are also registered. This process relies upon FindVertexGroups() to determine groupings of sibling vertices.

I am running into inconsistencies between two scenarios in which I am creating a DelayGraphSolution():

  1. Using the NI-created RegisterPlacement code. This code executes a register placement algorithm to obtain a set of registeredTerminals. It then creates a DelayGraphSolution, passing in the set of registeredTerminals. The FindVertexGroups() code correctly finds all sibling groups, and siblings of vertices in the registeredTerminals set are correctly marked as registered.

  2. My own flow. This code executes a register placement algorithm to obtain a set of registeredTerminals. In the graph these are marked as isRegistered, and the graph is written back out to a graphMl file. This file is then imported back into the DelayGraph structures, and a DelayGraphSolution is constructed. This differs from the first flow because now the registered vertices are already marked as properties in the graph, rather than in the separate registeredTerminals set. Under this flow, FindVertexGroups() will behave differently, and will fail to return the siblings of the nodes that have the property isRegistered.

FindVertexGroups() contains the following code comment:


// group vertices which are inputs and outputs of common node ids together
// there are 3 types of vertices: IsRegistered, (!IsRegistered && IsInputTerminal), (!IsRegisted && !IsInputTerminal)
// ignore IsRegistered vertices, and group the other types by common node id and types

So it appears that the function is intentionally ignoring the vertices that are marked as isRegistered. Is this a bug? If this is done intentionally, how can I go about my flow, where a graph is exported, then imported, and obtain the same results as the NI provided code?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions