From ad06a7c4a6f4c47a137a4336115b2079f4f3863d Mon Sep 17 00:00:00 2001 From: BradEstacio Date: Thu, 21 Dec 2023 09:33:52 -0500 Subject: [PATCH 1/7] Fix typo --- models/ibal.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/ibal.ttl b/models/ibal.ttl index a7977ba9..1d3c5474 100644 --- a/models/ibal.ttl +++ b/models/ibal.ttl @@ -5429,7 +5429,7 @@ IBAL:zs3_t_sp_f a s223:QuantifiableProperty ; bacnet:description "Zone4 Temperature Setpoint" ; bacnet:object-identifier "analog-input,6" ; - bacnet:object-name "zs4_t_sp_f" ; + bacnet:object-name "zs3_t_sp_f" ; bacnet:object-type "analog-input" ; bacnet:objectOf IBAL:VAV_4 ; bacnet:present-value "74"^^xsd:float ; From 6a1c5e6f472201d8597324fdb55aa8cf83386b81 Mon Sep 17 00:00:00 2001 From: BradEstacio Date: Thu, 21 Dec 2023 09:36:38 -0500 Subject: [PATCH 2/7] Fix typo --- examples/ibal.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/examples/ibal.md b/examples/ibal.md index 5c4a8dbd..8d1e6a94 100644 --- a/examples/ibal.md +++ b/examples/ibal.md @@ -17,12 +17,13 @@ The schematics of the air and hydronic systems can be found [here](../_static/sc ## Model Components | Parent Class | Class | Instances | |------------|-------|----------------| -| [Equipment](https://explore.open223.info/s223/Equipment.html) | [TemperatureSensor](https://explore.open223.info/s223/TemperatureSensor.html) | 38 | +| [Equipment](https://explore.open223.info/s223/Equipment.html) | [TemperatureSensor](https://explore.open223.info/s223/TemperatureSensor.html) | 48 | +| [Equipment](https://explore.open223.info/s223/Equipment.html) | [Controller](https://explore.open223.info/s223/Controller.html) | 40 | | [Equipment](https://explore.open223.info/s223/Equipment.html) | [Damper](https://explore.open223.info/s223/Damper.html) | 19 | -| [Equipment](https://explore.open223.info/s223/Equipment.html) | [FlowSensor](https://explore.open223.info/s223/FlowSensor.html) | 12 | -| [Equipment](https://explore.open223.info/s223/Equipment.html) | [Controller](https://explore.open223.info/s223/Controller.html) | 9 | +| [Equipment](https://explore.open223.info/s223/Equipment.html) | [FlowSensor](https://explore.open223.info/s223/FlowSensor.html) | 16 | +| [Equipment](https://explore.open223.info/s223/Equipment.html) | [ElectricMeter](https://explore.open223.info/s223/ElectricMeter.html) | 11 | +| [Equipment](https://explore.open223.info/s223/Equipment.html) | [PressureSensor](https://explore.open223.info/s223/PressureSensor.html) | 10 | | [Equipment](https://explore.open223.info/s223/Equipment.html) | [HumiditySensor](https://explore.open223.info/s223/HumiditySensor.html) | 9 | -| [Equipment](https://explore.open223.info/s223/Equipment.html) | [PressureSensor](https://explore.open223.info/s223/PressureSensor.html) | 8 | | [Equipment](https://explore.open223.info/s223/Equipment.html) | [HeatingCoil](https://explore.open223.info/s223/HeatingCoil.html) | 7 | | [Equipment](https://explore.open223.info/s223/Equipment.html) | [VariableFrequencyDrive](https://explore.open223.info/s223/VariableFrequencyDrive.html) | 5 | | [Equipment](https://explore.open223.info/s223/Equipment.html) | [Fan](https://explore.open223.info/s223/Fan.html) | 5 | @@ -33,13 +34,14 @@ The schematics of the air and hydronic systems can be found [here](../_static/sc | [Equipment](https://explore.open223.info/s223/Equipment.html) | [AirHandlingUnit](https://explore.open223.info/s223/AirHandlingUnit.html) | 3 | | [Equipment](https://explore.open223.info/s223/Equipment.html) | [CoolingCoil](https://explore.open223.info/s223/CoolingCoil.html) | 3 | | [Equipment](https://explore.open223.info/s223/Equipment.html) | [Chiller](https://explore.open223.info/s223/Chiller.html) | 2 | -| [Equipment](https://explore.open223.info/s223/Equipment.html) | [ElectricMeter](https://explore.open223.info/s223/ElectricMeter.html) | 2 | | [Equipment](https://explore.open223.info/s223/Equipment.html) | [HeatExchanger](https://explore.open223.info/s223/HeatExchanger.html) | 2 | | [Connection](https://explore.open223.info/s223/Connection.html) | [Pipe](https://explore.open223.info/s223/Pipe.html) | 1 | -| [ConnectionPoint](https://explore.open223.info/s223/ConnectionPoint.html) | [InletConnectionPoint](https://explore.open223.info/s223/InletConnectionPoint.html) | 159 | -| [ConnectionPoint](https://explore.open223.info/s223/ConnectionPoint.html) | [OutletConnectionPoint](https://explore.open223.info/s223/OutletConnectionPoint.html) | 137 | +| [ConnectionPoint](https://explore.open223.info/s223/ConnectionPoint.html) | [InletConnectionPoint](https://explore.open223.info/s223/InletConnectionPoint.html) | 160 | +| [ConnectionPoint](https://explore.open223.info/s223/ConnectionPoint.html) | [OutletConnectionPoint](https://explore.open223.info/s223/OutletConnectionPoint.html) | 148 | +| [FunctionBlock](https://explore.open223.info/s223/FunctionBlock.html) | [](https://explore.open223.info/s223/.html) | 6 | | [DomainSpace](https://explore.open223.info/s223/DomainSpace.html) | [](https://explore.open223.info/s223/.html) | 4 | | [Zone](https://explore.open223.info/s223/Zone.html) | [](https://explore.open223.info/s223/.html) | 6 | -| [Property](https://explore.open223.info/s223/Property.html) | [QuantifiableObservableProperty](https://explore.open223.info/s223/QuantifiableObservableProperty.html) | 77 | -| [Property](https://explore.open223.info/s223/Property.html) | [QuantifiableProperty](https://explore.open223.info/s223/QuantifiableProperty.html) | 6 | +| [Property](https://explore.open223.info/s223/Property.html) | [QuantifiableObservableProperty](https://explore.open223.info/s223/QuantifiableObservableProperty.html) | 137 | +| [Property](https://explore.open223.info/s223/Property.html) | [QuantifiableProperty](https://explore.open223.info/s223/QuantifiableProperty.html) | 10 | +| [Property](https://explore.open223.info/s223/Property.html) | [QuantifiableActuatableProperty](https://explore.open223.info/s223/QuantifiableActuatableProperty.html) | 3 | From 08f2ffa4b4e08de89673c8b49cfbd1d7ff33dbaf Mon Sep 17 00:00:00 2001 From: BradEstacio Date: Thu, 21 Dec 2023 10:42:40 -0500 Subject: [PATCH 3/7] Add a couple queries for IBAL --- queries.toml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/queries.toml b/queries.toml index 37cfdbfc..17b3f5ec 100644 --- a/queries.toml +++ b/queries.toml @@ -30,3 +30,35 @@ SELECT ?location ?sensor WHERE { ?sensor s223:hasObservationLocation ?location } """ + +[[ibal]] +description="Sensors in Connections" +query=""" +SELECT ?segment ?channel ?id WHERE { + ?segment a s223:Connection . + ?channel a/rdfs:subClassOf* s223:Sensor . + ?channel s223:observes ?id . +} +""" + +[[ibal]] +description="Sensors in AHU 1 and what units they are measured in" +query=""" +SELECT ?channel ?id ?unit WHERE { + BIND(IBAL:AHU_1 as ?ahu) { + } + UNION { + ?ahu s223:contains ?equipment . + ?channel s223:hasObservationLocation ?equipment . + ?channel s223:observes ?id . + ?id qudt:hasUnit ?unit . + } + UNION { + ?ahu s223:contains ?equipment . + ?equipment s223:connectedThrough ?connnection . + ?channel s223:hasObservationLocation ?connection . + ?channel s223:observes ?id . + ?id qudt:hasUnit ?u . + } +} +""" From e2c9b94f5e21659aa6270a7befd15a135a401488 Mon Sep 17 00:00:00 2001 From: BradEstacio Date: Thu, 21 Dec 2023 11:44:54 -0500 Subject: [PATCH 4/7] Rename IBAl query headers --- queries.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/queries.toml b/queries.toml index 0ccbfac8..99ee5962 100644 --- a/queries.toml +++ b/queries.toml @@ -31,7 +31,7 @@ SELECT ?location ?sensor WHERE { } """ -[[ibal]] +[[nist-ibal]] description="Sensors in Connections" query=""" SELECT ?segment ?channel ?id WHERE { @@ -41,7 +41,7 @@ SELECT ?segment ?channel ?id WHERE { } """ -[[ibal]] +[[nist-ibal]] description="Sensors in AHU 1 and what units they are measured in" query=""" SELECT ?channel ?id ?unit WHERE { From 0c1b83bca0faac6a7df55e9a40bfcc10d8d1c604 Mon Sep 17 00:00:00 2001 From: BradEstacio Date: Thu, 21 Dec 2023 12:27:11 -0500 Subject: [PATCH 5/7] Rename to nist-example --- queries.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/queries.toml b/queries.toml index af906444..3fe5c20b 100644 --- a/queries.toml +++ b/queries.toml @@ -31,7 +31,7 @@ SELECT ?location ?sensor WHERE { } """ -[[nist-ibal]] +[[nist-example]] description="Sensors in Connections" query=""" SELECT ?segment ?channel ?id WHERE { @@ -41,7 +41,7 @@ SELECT ?segment ?channel ?id WHERE { } """ -[[nist-ibal]] +[[nist-example]] description="Sensors in AHU 1 and what units they are measured in" query=""" SELECT ?channel ?id ?unit WHERE { From 052ed713754c3ec22602e0507d68fe2036be8411 Mon Sep 17 00:00:00 2001 From: BradEstacio Date: Fri, 22 Dec 2023 14:51:56 -0500 Subject: [PATCH 6/7] Clean up nist-example queries --- queries.toml | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/queries.toml b/queries.toml index 3fe5c20b..070c929e 100644 --- a/queries.toml +++ b/queries.toml @@ -32,33 +32,49 @@ SELECT ?location ?sensor WHERE { """ [[nist-example]] -description="Sensors in Connections" +description="Search for all the sensors along the connections and the associated property they're observing." query=""" -SELECT ?segment ?channel ?id WHERE { +SELECT ?segment ?channel ?property_id WHERE { ?segment a s223:Connection . ?channel a/rdfs:subClassOf* s223:Sensor . - ?channel s223:observes ?id . + ?channel s223:observes ?property_id . } """ [[nist-example]] -description="Sensors in AHU 1 and what units they are measured in" +description="Sensors in AHU1 and what units the properties are measured in" query=""" -SELECT ?channel ?id ?unit WHERE { +SELECT ?channel ?property_id ?unit WHERE { BIND(IBAL:AHU_1 as ?ahu) { } UNION { ?ahu s223:contains ?equipment . ?channel s223:hasObservationLocation ?equipment . - ?channel s223:observes ?id . - ?id qudt:hasUnit ?unit . + ?channel s223:observes ?property_id . + ?property_id qudt:hasUnit ?unit . } UNION { ?ahu s223:contains ?equipment . - ?equipment s223:connectedThrough ?connnection . + ?equipment s223:connectedThrough ?connection . ?channel s223:hasObservationLocation ?connection . - ?channel s223:observes ?id . - ?id qudt:hasUnit ?u . + ?channel s223:observes ?property_id . + ?property_id qudt:hasUnit ?unit . + } + UNION { + ?ahu s223:contains ?equipment . + ?equipment s223:hasConnectionPoint ?connectionPoint . + ?channel s223:hasObservationLocation ?connectionPoint . + ?channel s223:observes ?property_id . + ?property_id qudt:hasUnit ?unit . } } """ +[[nist-example]] +description="Find the downstream equipment for AHU1." +query=""" +SELECT ?segment ?channel ?property_id WHERE { + ?segment a s223:Connection . + ?channel a/rdfs:subClassOf* s223:Sensor . + ?channel s223:observes ?property_id . +} +""" \ No newline at end of file From 9eb3cfadcec78338ec6fb193315f5fe289920ba2 Mon Sep 17 00:00:00 2001 From: BradEstacio Date: Fri, 22 Dec 2023 15:47:43 -0500 Subject: [PATCH 7/7] Add third nist-example query --- queries.toml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/queries.toml b/queries.toml index 070c929e..d6364478 100644 --- a/queries.toml +++ b/queries.toml @@ -72,9 +72,28 @@ SELECT ?channel ?property_id ?unit WHERE { [[nist-example]] description="Find the downstream equipment for AHU1." query=""" -SELECT ?segment ?channel ?property_id WHERE { - ?segment a s223:Connection . - ?channel a/rdfs:subClassOf* s223:Sensor . - ?channel s223:observes ?property_id . +SELECT ?connectionDown ?connectionDown2 WHERE { + BIND(IBAL:AHU_1 as ?ahu) { + } + UNION { + ?ahu s223:hasConnectionPoint ?connectionPoint . + ?connectionPoint a s223:OutletConnectionPoint . + ?connectionPoint s223:hasMedium s223:Medium-Air . + ?connectionPoint s223:connectsThrough ?segment . + ?segment s223:connectsTo ?junction . + ?junction s223:connectedTo ?connectionDown . + ?connectionDown a s223:TerminalUnit . + } + UNION { + ?ahu s223:hasConnectionPoint ?connectionPoint . + ?connectionPoint a s223:OutletConnectionPoint . + ?connectionPoint s223:hasMedium s223:Medium-Air . + ?connectionPoint s223:connectsThrough ?segment . + ?segment s223:connectsTo ?junction . + ?junction s223:connectedTo ?connectionDown . + ?connectionDown a s223:Junction . + ?connectionDown s223:connectedTo ?connectionDown2 . + ?connectionDown2 a s223:TerminalUnit . + } } """ \ No newline at end of file