Skip to content

Commit

Permalink
Handle case where toplogical node is not reachable from the Connectiv…
Browse files Browse the repository at this point in the history
…ityNode
  • Loading branch information
davidkleiven committed May 16, 2024
1 parent a6c8b1f commit db56cdb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cimsparql/sparql/transformer_branches.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ PREFIX xsd: <${xsd}>
# Name: Transformer branches
select ?node_1 ?node_2 ?status ?name ?mrid ?un ?r ?x ?b ?g ?rate (?bidzone as ?bidzone_1) (?bidzone as ?bidzone_2) ?angle ?ratio ?connectivity_node_1 (?node_2 as ?connectivity_node_2)
where {
?con_node cim:ConnectivityNode.TopologicalNode/cim:IdentifiedObject.mRID ?node_1 .

{
?con_node cim:ConnectivityNode.TopologicalNode ?top_node
} union {
# Get topological node directly from the terminal when it does not
# exist via the connectivity node
filter not exists {?con_node cim:ConnectivityNode.TopologicalNode ?top_node }
?terminal cim:Terminal.TopologicalNode ?top_node
}.

?top_node cim:IdentifiedObject.mRID ?node_1 .
?terminal cim:ACDCTerminal.connected ?connected .
optional {?winding ^cim:SvStatus.ConductingEquipment/cim:SvStatus.inService ?in_service} .

Expand Down

0 comments on commit db56cdb

Please sign in to comment.