https://ap-con.cim4.eu/SecurityAnalysisResult-Complex/2.5#PowerFlowResult-topologicalNode
"PowerFlowResult.valueW, PowerFlowResult.valueVA, PowerFlowResult.valueVAR and PowerFlowResult.valueA shall not be instantiated if PowerFlowResult is associated with TopologicalNode.
SELECT $this
WHERE {
BIND(EXISTS{$this nc:PowerFlowResult.TopologicalNode ?ot} AS ?hasTN).
BIND(EXISTS{$this nc:PowerFlowResult.valueW ?o1} AS ?hasvalueW).
BIND(EXISTS{$this nc:PowerFlowResult.valueVA ?o2} AS ?hasvalueVA).
BIND(EXISTS{$this nc:PowerFlowResult.valueVAR ?o3} AS ?hasvalueVAR).
BIND(EXISTS{$this PowerFlowResult.valueA ?o4} AS ?hasvalueA). ##### missing prefix
FILTER ( ?hasTN=true && (?hasvalueW=true || ?hasvalueVA=true || ?hasvalueVAR=true || ?hasvalueA=true)).
}
Furthermore, the query is unnecessarily complex. Here is a better way:
SELECT $this {
$this nc:PowerFlowResult.TopologicalNode ?tn.
values ?prohibited {nc:PowerFlowResult.valueW nc:PowerFlowResult.valueVA nc:PowerFlowResult.valueVAR nc:PowerFlowResult.valueA}
filter exists {$this ?prohibited ?value}
}
https://ap-con.cim4.eu/SecurityAnalysisResult-Complex/2.5#PowerFlowResult-topologicalNode
"PowerFlowResult.valueW, PowerFlowResult.valueVA, PowerFlowResult.valueVAR and PowerFlowResult.valueA shall not be instantiated if PowerFlowResult is associated with TopologicalNode.
Furthermore, the query is unnecessarily complex. Here is a better way: