Fix CGMES connectivityNodesContainer performance#3915
Conversation
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
|
| String line = type != null && type.contains("Line") ? id : null; | ||
| String voltageLevel = type.contains("VoltageLevel") ? id : c.getId("VoltageLevel"); | ||
| String substation = type.contains(SUBSTATION) ? id : c.getId(SUBSTATION); | ||
| String line = type.contains("Line") ? id : null; |
There was a problem hiding this comment.
an If on the type would be cleaner
| ?ConnectivityNodeContainer cim:Bay.VoltageLevel ?VoltageLevel . | ||
| ?VoltageLevel cim:VoltageLevel.Substation ?Substation . |
There was a problem hiding this comment.
to check: does it work if Bay properly contained in VoltageLevel but VoltageLevel not contained in any Substation ?
There was a problem hiding this comment.
It does not work, but this is probably illegal data (?)
| cim:Bay.VoltageLevel ?VoltageLevel . | ||
| ?VoltageLevel cim:VoltageLevel.Substation ?Substation | ||
| } | ||
| OPTIONAL { |
There was a problem hiding this comment.
is this on purpose? ignoring that some connectivity nodes may be contained directly in a substation?
There was a problem hiding this comment.
Does the fix also apply to CIM100.sparql?
There was a problem hiding this comment.
Yes, CIM100.sparql is based in CIM16.sparql, only queries that are different are rewritten. the query for connectivity node containers is not overriden in CIM100.



Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Bug fix / performance
What is the current behavior?
connectivityNodeContainers query performing poorly for very large numbers of substations and voltage levels
What is the new behavior (if this is a feature change)?
Fixed performance issue by simplifying connectivityNodeContainers query and moving additional processing on Java side.
Does this PR introduce a breaking change or deprecate an API?
TBD: Unsure here, is changing PropertyBags content a breaking change ?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information:
Reported on PowSyBl #cgmes Slack channel by https://codeberg.org/caspereijkens
Tool to build large CGMES grids: https://codeberg.org/caspereijkens/gigagrid/src/branch/main/main.py