diff --git a/bricksrc/collections.py b/bricksrc/collections.py index 3bf1ac3a..62bdc2df 100644 --- a/bricksrc/collections.py +++ b/bricksrc/collections.py @@ -179,6 +179,17 @@ ] }, }, + "Automation_Group": { + "tags": [TAG.Collection, TAG.Automation, TAG.Group], + "constraints": { + BRICK.hasPart: [ + BRICK.Equipment, + BRICK.Point, + BRICK.Automation_Group, + BRICK.Point_Group, + ] + }, + }, "Loop": { "tags": [TAG.Collection, TAG.Loop], "subclasses": loop_subclasses, diff --git a/bricksrc/definitions.csv b/bricksrc/definitions.csv index 0ed996a5..5fb0ac05 100644 --- a/bricksrc/definitions.csv +++ b/bricksrc/definitions.csv @@ -57,6 +57,7 @@ https://brickschema.org/schema/Brick#Automatic_Switch,An automatic switch operat https://brickschema.org/schema/Brick#Automatic_Tint_Window,A window with tint control., https://brickschema.org/schema/Brick#Automatic_Tint_Window_Array,An array of Automatic Tint Windows., https://brickschema.org/schema/Brick#Automatic_Transfer_Switch,An automatic transfer switch (ATS) is a device that automatically transfers a power supply from its primary source to a backup source when it senses a failure or outage in the primary source., +https://brickschema.org/schema/Brick#Automation_Group,"A collection of equipment, points, and other automation groups that are logically grouped together for the purpose of management, control, or organization within a building automation system. We encourage that you develop your own sub-classes of Automation_Group to represent specific groupings relevant to your use case.", https://brickschema.org/schema/Brick#Availability_Status,"Indicates if a piece of equipment, system, or functionality is available for operation", https://brickschema.org/schema/Brick#Average_Cooling_Demand_Sensor,Measures the average power consumed by a cooling process as the amount of power consumed over some interval, https://brickschema.org/schema/Brick#Average_Exhaust_Air_Static_Pressure_Sensor,The computed average static pressure of air in exhaust regions of an HVAC system over some period of time, diff --git a/bricksrc/equipment.py b/bricksrc/equipment.py index 544098e5..efd5a3ad 100644 --- a/bricksrc/equipment.py +++ b/bricksrc/equipment.py @@ -99,7 +99,7 @@ "HVAC_Equipment": { "tags": [TAG.HVAC, TAG.Equipment], "constraints": { - BRICK.hasPart: [BRICK.HVAC_Equipment, BRICK.Valve], + BRICK.hasPart: [BRICK.HVAC_Equipment, BRICK.Valve, BRICK.Automation_Group], BRICK.feeds: [BRICK.HVAC_Equipment, BRICK.Valve, REC.Space], }, }, diff --git a/bricksrc/recpatches.ttl b/bricksrc/recpatches.ttl index a0bb682d..e0f876d8 100644 --- a/bricksrc/recpatches.ttl +++ b/bricksrc/recpatches.ttl @@ -1174,16 +1174,6 @@ brick:Switch_Room brick:deprecationMitigationMessage "Brick location classes are being phased out in favor of RealEstateCore classes. For a replacement, consider rec:DataServerRoom" ; brick:isReplacedBy rec:DataServerRoom ; . -brick:Collection - rdfs:subClassOf rec:Collection ; - sh:property [ - rdf:type sh:PropertyShape ; - sh:path rec:includes ; - sh:minCount 1 ; - sh:name "includes" ; - sh:nodeKind sh:IRI ; - ] ; -. brick:Team_Room owl:deprecated "true"^^xsd:boolean ; brick:deprecatedInVersion "1.4.0" ; @@ -1577,7 +1567,7 @@ brick:ICT_Equipment sh:property [ a sh:PropertyShape ; sh:name "Standard"^^xsd:string ; sh:path rec:standard ] . -brick:Ethernet_Port sh:property +brick:Ethernet_Port sh:property [ a sh:PropertyShape ; sh:datatype xsd:float ; sh:description "The data rate of the port in Mib/s, i.e. mebibit (2^20 bit) per second."^^xsd:string ; @@ -1591,7 +1581,7 @@ brick:Ethernet_Port sh:property sh:name "PoE Type"^^xsd:string ; sh:path rec:poeType ] . -brick:Wireless_Access_Point sh:property [ +brick:Wireless_Access_Point sh:property [ a sh:PropertyShape ; sh:datatype xsd:string ; sh:in ( "WiFi4"^^xsd:string "WiFi5"^^xsd:string "WiFi6"^^xsd:string "WiFi6E"^^xsd:string "WiFi7"^^xsd:string ) ; @@ -1599,7 +1589,7 @@ brick:Wireless_Access_Point sh:property [ sh:name "Generation"^^xsd:string ; sh:path rec:generation ] . -brick:Sensor_Equipment sh:property +brick:Sensor_Equipment sh:property [ a sh:PropertyShape ; sh:datatype xsd:double ; sh:name "Battery Percentage"^^xsd:string ; diff --git a/bricksrc/root_class_shapes.ttl b/bricksrc/root_class_shapes.ttl index 0296e9eb..6b70d6da 100644 --- a/bricksrc/root_class_shapes.ttl +++ b/bricksrc/root_class_shapes.ttl @@ -48,8 +48,11 @@ brick:Equipment a sh:NodeShape ; [ sh:class brick:EntityProperty ; sh:message "Instances of Equipment cannot be EntityProperties." ] ; sh:property [ sh:path brick:hasPart; - sh:class brick:Equipment; - sh:message "A piece of Equipment's parts should be always other Equipment." + sh:or ( + [ sh:class brick:Equipment ] + [ sh:class brick:Automation_Group ] + ) ; + sh:message "A piece of Equipment's parts should be always other Equipment or Automation Groups" ]; sh:property [ sh:path brick:hasPoint ; diff --git a/examples/collection/collection.ttl b/examples/collection/collection.ttl new file mode 100644 index 00000000..75e732b1 --- /dev/null +++ b/examples/collection/collection.ttl @@ -0,0 +1,39 @@ +@prefix brick: . +@prefix bldg: . +@prefix owl: . +@prefix rdfs: . +@prefix rdf: . +@prefix rdfs: . +@prefix mpo: . + + a owl:Ontology ; + owl:imports . + +# my custom class for frost detection group in my private ontology +mpo:FrostDetectionGroup a owl:Class ; + # Here, we did *not* define this as a subclass of brick:Automation_Group. + # For this reason, bldg:FrostDetection is explicitly typed as both. + # We can always subclass brick:Automation_Group if needed, and in that + # case we don't need the explicit rdf:type brick:Automation_Group below. + rdfs:label "Frost Detection Group" ; + rdfs:comment "An automation group that includes components for frost detection in an AHU." . + +bldg:Ahu a brick:AHU ; + brick:hasPart bldg:Hcl ; + brick:hasPart bldg:Fan ; + brick:hasPart bldg:FrostDetection . + +bldg:Hcl a brick:Heating_Coil . + +bldg:Fan a brick:Discharge_Fan . + +bldg:FrostDetection a brick:Automation_Group, mpo:FrostDetectionGroup ; + brick:hasPart bldg:FrostDetectionSensor ; + brick:hasPart bldg:FrostDetectionMonitoring . + +bldg:FrostDetectionSensor a brick:Sensor_Equipment ; + brick:hasPoint bldg:FrostDetected . + +bldg:FrostDetectionMonitoring a brick:Enable_Command . + +bldg:FrostDetected a brick:Frost_Sensor .