You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the electrical CIM, a query Substation Connectivity "List all substations that are connected via an AC-line or a DC line to substation named XYZ"
looks like this (note: CIM properties have a class name as prefix; and each relation has an inverse):
This query is quite impossible for an LLM to generate (this project is Talk2PowerSystem, I also call it Statnett-LLM).
The query can be simplified a lot if we add derived props. Assume a namespace cimex: (CIM Extensions):
Containers, subcontainers and equipments (Substation has VoltageLevels that may have Bays that have Equipments) cim:EquipmentContainer.Equipments|cim:Substation.VoltageLevels|cim:VoltageLevel.Bays => cimex:hasPart; inverse cimex:isPart
Equipments (conducting or auxiliary) have Terminals but there's no super-prop to abstract over these two cases: cim:Terminal.ConductingEquipment|cim:Terminal.AuxiliaryEquipment => cimex:Terminal.Equipment; inverse cimex:Equipment.Terminals
Equipments are connected through their Terminals and a ConnectivityNode: cim:ConductingEquipment.Terminals / cim:Terminal.ConnectivityNode / cim:ConnectivityNode.Terminals / cim:Terminal.ConductingEquipment => cimex:connectedTo (symmetric)
This case is similar to (but simpler than) #343, and mentions it in section "Aside: ASHRAE/Bricks Connections".
I've implemented this using standard OWL2-RL reasoning (more specifically owl2-rl-optimized, see GraphDB documentation).
rdfs:subClassOf
owl:inverseOf (all CIM relations have inverses)
rdfs:subPropertyOf: needed for cimex:hasPart, cimex:isPart
owl:TransitiveProperty: needed for cimex:hasPartTransitive, cimex:isPartTransitive
owl:propertyChainAxiom: needed for cimex:connectedTo, cimex:connectedThroughPart
owl:SymmetricProperty: cimex:connectedTo, cimex:connectedThroughPart are declared symmetric, but we don't need this reasoning since the respective property chains are already symmetric.
By using some specialized constructs we can make the reasoning simpler. owl:inverseOf and rdfs:subPropertyOf remain the same, but we replace owl:TransitiveProperty and owl:propertyChainAxiom
with specialized fixed-arity fixed-slot constructs:
reasoning: transitiveOver (transitive with "step" property) #351: psys:transitiveOver looks to extend the transitive chain only on the right; owl:TransitiveProperty forgets which is the step (explicitly asserted) property, so it is penalized by needing to consider every split of the chain.
reasoning: more specialized inference constructs #353:
At the expense of needing more rules (PropChain2, PropChain3, PropChain4), we get rid of the generic owl:propertyChainAxiom that involves iterating through an rdf:List
Uh oh!
There was an error while loading. Please reload this page.
https://github.com/statnett/Talk2PowerSystem/wiki/Inference
In the electrical CIM, a query
Substation Connectivity "List all substations that are connected via an AC-line or a DC line to substation named XYZ"
looks like this (note: CIM properties have a class name as prefix; and each relation has an inverse):
This query is quite impossible for an LLM to generate (this project is
Talk2PowerSystem
, I also call itStatnett-LLM
).The query can be simplified a lot if we add derived props. Assume a namespace
cimex:
(CIM Extensions):cim:EquipmentContainer.Equipments|cim:Substation.VoltageLevels|cim:VoltageLevel.Bays
=>cimex:hasPart
; inversecimex:isPart
cim:Terminal.ConductingEquipment|cim:Terminal.AuxiliaryEquipment
=>cimex:Terminal.Equipment
; inversecimex:Equipment.Terminals
cimex:hasPart+
=>cimex:hasPartTransitive
; inversecimex:isPartTransitive
cim:ConductingEquipment.Terminals / cim:Terminal.ConnectivityNode / cim:ConnectivityNode.Terminals / cim:Terminal.ConductingEquipment
=>cimex:connectedTo
(symmetric)cimex:hasPartTransitive / cimex:connectedTo / cimex:isPartTransitive
=>cimex:connectedThroughPart
(symmetric)This case is similar to (but simpler than) #343, and mentions it in section "Aside: ASHRAE/Bricks Connections".
I've implemented this using standard OWL2-RL reasoning (more specifically
owl2-rl-optimized
, see GraphDB documentation).rdfs:subClassOf
owl:inverseOf
(all CIM relations have inverses)rdfs:subPropertyOf
: needed forcimex:hasPart, cimex:isPart
owl:TransitiveProperty
: needed forcimex:hasPartTransitive, cimex:isPartTransitive
owl:propertyChainAxiom
: needed forcimex:connectedTo, cimex:connectedThroughPart
owl:SymmetricProperty
:cimex:connectedTo, cimex:connectedThroughPart
are declared symmetric, but we don't need this reasoning since the respective property chains are already symmetric.Here are the axioms (T-Box):
cimex:hasPart owl:inverseOf cimex:isPart. cimex:hasPartTransitive owl:inverseOf cimex:isPartTransitive, a owl:TransitiveProperty. cimex:isPartTransitive owl:inverseOf cimex:hasPartTransitive. cimex:Terminal.Equipment owl:inverseOf cimex:Equipment.Terminals. cim:EquipmentContainer.Equipments rdfs:subPropertyOf cimex:hasPart. cim:Substation.VoltageLevels rdfs:subPropertyOf cimex:hasPart. cim:VoltageLevel.Bays rdfs:subPropertyOf cimex:hasPart. cimex:hasPart rdfs:subPropertyOf cimex:hasPartTransitive. cim:Terminal.ConductingEquipment rdfs:subPropertyOf cimex:Terminal.Equipment. cim:Terminal.AuxiliaryEquipment rdfs:subPropertyOf cimex:Terminal.Equipment. cimex:connectedTo owl:propertyChainAxiom (cimex:Equipment.Terminals cim:Terminal.ConnectivityNode cim:ConnectivityNode.Terminals cimex:Terminal.Equipment). cimex:connectedThroughPart owl:propertyChainAxiom (cimex:hasPartTransitive cimex:connectedTo cimex:isPartTransitive).
After adding cimex: derived props, the query becomes much simpler and LLM generates it with no problem:
The text was updated successfully, but these errors were encountered: