Cell detection¶
A Cell represents a connected subgraph of nodes that participate in a common purpose.
The goal of the cell detection is to create these subgraphs that will then:
Structure the organization of the busbar layout;
Be displayed according to their types.
Cell types¶
Cells can be of one of the following enum CellType:
INTERN
The smallest subGraph delimited byBUSnodes (i.e., not includingFEEDER) and that is not shuntingExternCellcells (seeSHUNTdefinition below).
Such cells instantiate theInternCellsubclass.EXTERN
The smallest subGraph delimited byBUSnodes andFEEDERnodes with at least one node having the following property: each branch extracted from this very node ends with nodes of a singlenodeTypeamongBUSorFEEDERorSHUNT.
Such cells instantiate theExternCellsubclass.SHUNT
A path between twoFictitiousNodenodes of twoExternCellcells.
Such cells instantiate theShuntCellsubclass.ARCH
A path between anExternCelland aBusNode.
Such cells instantiate theArchCellclass.
This type is obtained when anExternCellis linked to two subsections, which cannot be displayed with the current algorithm. Such anExternCellis then cut in anExternCellonly on one subsection, and in severalArchCell.
The figure shows examples of cells of several CellType.
Cell detection algorithm¶
The ImplicitCellDetector class implements an algorithm sticking to the above cell type definitions.
The detectCell method is used to detect cells by exploring the graph.
It takes as parameters two lists of types that delimit the traversal algorithm :
stopTypeslist: for types that end a current branchexclusionTypeslist: for types that invalidate the current subgraph.
The algorithm is explained based on the following graph that would result in the figure displayed to illustrate the cellTypes enum:
Step 1: identify InternCell cells¶
stopTypes: BUS
exclusionTypes: FEEDER
InternCell cells are easy to determine as being exclusively bordered by BUS nodes.
Step 2: identifies ExternCell cells¶
stopTypes: BUS, FEEDER
exclusionTypes:
If one node of the subgraph has each of its branches ending with one single kind of NodeType among BUS and FEEDER,
(”bottleneck” node in the picture) this is an ExternCell.
Other ExternCell cells could be discovered in the next steps when adding the SHUNT NodeType.
Step 3: discriminates EXTERN and SHUNT cells¶
stopTypes:
exclusionTypes: BUS, FEEDER, SHUNT
To identify the first candidate SHUNT node, each FICTITIOUS node with more than 3 branches is visited.
The expected property of the SHUNT node is that:
At least one branch ends with only
BUSnodesAt least one branch ends with only
FEEDERnodesOne branch ends with
FEEDERandBUSnodes.
The branches of the first two categories constitute the first ExternCell cell.
Then the SHUNT cell is constituted of:
The first
SHUNTnodeThe string of nodes that have only 2 adjacent nodes
The first node with more than 2 adjacent nodes that becomes the second
SHUNTnode
Last, the second ExternCell cell is build with the second SHUNT node and the remaining nodes.
⚠️ The algorithm does not handle any other pattern.