Skip to content

Commit

Permalink
Merge pull request #143 from BrickSchema/add-definitions
Browse files Browse the repository at this point in the history
Incorporate the definitions into the Brick compilation framework
  • Loading branch information
gtfierro authored Jul 10, 2020
2 parents dc68301 + f70e267 commit f9b4565
Show file tree
Hide file tree
Showing 14 changed files with 2,670 additions and 1,517 deletions.
2,740 changes: 1,575 additions & 1,165 deletions Brick.ttl

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions bricksrc/alarm.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
from rdflib import Literal
from .namespaces import BRICK, TAG, SKOS, RDFS
from .namespaces import BRICK, TAG, RDFS

alarm_definitions = {
"Alarm": {
SKOS.definition: Literal(
"Alarm points are signals (either audible or visual) that alert an operator to an off-normal condition which requires some form of corrective action"
),
RDFS.seeAlso: Literal(
"https://xp20.ashrae.org/terminology/index.php?term=alarm"
),
"tags": [TAG.Point, TAG.Alarm],
"subclasses": {
"Air_Alarm": {
Expand Down
25 changes: 3 additions & 22 deletions bricksrc/command.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
from rdflib import Literal
from .namespaces import TAG, BRICK, SKOS
from .namespaces import TAG, BRICK

command_definitions = {
"Command": {
SKOS.definition: Literal(
"A Command is an output point that directly determines the behavior of equipment and/or affects relevant operational points."
),
"tags": [TAG.Point, TAG.Command],
"subclasses": {
"Cooling_Command": {"tags": [TAG.Point, TAG.Cool, TAG.Command]},
Expand Down Expand Up @@ -262,23 +259,10 @@
},
"Occupancy_Command": {"tags": [TAG.Point, TAG.Occupancy, TAG.Command]},
"On_Off_Command": {
SKOS.definition: Literal(
"An On/Off Command controls or reports the binary status of a control loop, relay or equipment activity"
),
"tags": [TAG.Point, TAG.On, TAG.Off, TAG.Command],
"subclasses": {
"Off_Command": {
SKOS.definition: Literal(
"An Off Command controls or reports the binary 'off' status of a control loop, relay or equipment activity. It can only be used to stop/terminate/deactivate an associated equipment or process, or determine that the related entity is 'off'"
),
"tags": [TAG.Point, TAG.Off, TAG.Command],
},
"On_Command": {
SKOS.definition: Literal(
"An On Command controls or reports the binary 'on' status of a control loop, relay or equipment activity. It can only be used to start/activate an associated equipment or process, or determine that the related entity is 'on'"
),
"tags": [TAG.Point, TAG.On, TAG.Command],
},
"Off_Command": {"tags": [TAG.Point, TAG.Off, TAG.Command]},
"On_Command": {"tags": [TAG.Point, TAG.On, TAG.Command]},
"Lead_On_Off_Command": {
"tags": [TAG.Point, TAG.Lead, TAG.On, TAG.Off, TAG.Command],
},
Expand All @@ -287,9 +271,6 @@
},
"Start_Stop_Command": {
"tags": [TAG.Point, TAG.Start, TAG.Stop, TAG.Command],
SKOS.definition: Literal(
"A Start/Stop Command controls or reports the active/inactive status of a control sequence"
),
},
},
},
Expand Down
888 changes: 888 additions & 0 deletions bricksrc/definitions.csv

Large diffs are not rendered by default.

127 changes: 10 additions & 117 deletions bricksrc/equipment.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib import Literal
from .namespaces import TAG, OWL, SKOS, BRICK, RDFS
from .namespaces import TAG, OWL, BRICK

"""
Set up subclasses of the equipment superclass
Expand Down Expand Up @@ -191,9 +191,6 @@
"Variable_Frequency_Drive": {
"tags": [TAG.Equipment, TAG.Variable, TAG.Frequency, TAG.Drive],
OWL.equivalentClass: BRICK["VFD"],
SKOS.definition: Literal(
"Electronic device that varies its output frequency to vary the rotating speed of a motor, given a fixed input frequency. Used with fans or pumps to vary the flow in the system as a function of a maintained pressure."
),
},
"Valve": {
"tags": [TAG.Valve, TAG.Equipment]
Expand All @@ -205,17 +202,9 @@
"Heat_Wheel_VFD": {"tags": [TAG.Equipment, TAG.Heat, TAG.Wheel, TAG.VFD]},
},
},
"Thermostat": {
"tags": [TAG.Equipment, TAG.Thermostat],
SKOS.definition: Literal(
"An automatic control device used to maintain temperature at a fixed or adjustable setpoint."
),
},
"Thermostat": {"tags": [TAG.Equipment, TAG.Thermostat]},
"Terminal_Unit": {
"tags": [TAG.Equipment, TAG.Terminal, TAG.Unit],
SKOS.definition: Literal(
"A device that regulates the volumetric flow rate and/or the temperature of the controlled medium."
),
"subclasses": {
"Fan_Coil_Unit": {
"tags": [TAG.Equipment, TAG.Fan, TAG.Coil, TAG.Unit],
Expand All @@ -242,17 +231,9 @@
"VAV": {"tags": [TAG.Equipment, TAG.VAV]},
},
},
"Space_Heater": {
"tags": [TAG.Equipment, TAG.Space, TAG.Heater],
SKOS.definition: Literal(
"A heater used to warm the air in an enclosed area, such as a room or office"
),
},
"Space_Heater": {"tags": [TAG.Equipment, TAG.Space, TAG.Heater]},
"Pump": {
"tags": [TAG.Equipment, TAG.Pump],
SKOS.definition: Literal(
"Machine for imparting energy to a fluid, causing it to do work, drawing a fluid into itself through an entrance port, and forcing the fluid out through an exhaust port."
),
"subclasses": {
"Water_Pump": {
"tags": [TAG.Equipment, TAG.Pump, TAG.Water],
Expand Down Expand Up @@ -280,35 +261,20 @@
"Condenser_Heat_Exchanger": {
"tags": [TAG.Condenser, TAG.Equipment, TAG.Heat, TAG.Exchanger],
},
"Heat_Wheel": {
"tags": [TAG.Equipment, TAG.Heat, TAG.Wheel],
SKOS.definition: Literal(
"A type of energy recovery heat exchanger positioned within the supply and exhaust air streams of an air-handling system or in the exhaust gases of an industrial process, in order to recover the heat energy"
),
RDFS.seeAlso: Literal("https://en.wikipedia.org/wiki/Thermal_wheel"),
},
"Heat_Wheel": {"tags": [TAG.Equipment, TAG.Heat, TAG.Wheel]},
},
},
"HX": {"tags": [TAG.Equipment, TAG.HX]},
"Fume_Hood": {
"tags": [TAG.Equipment, TAG.Fume, TAG.Hood],
SKOS.definition: Literal(
"A fume-collection device mounted over a work space, table, or shelf and serving to conduct unwanted gases away from the area enclosed."
),
},
"Fume_Hood": {"tags": [TAG.Equipment, TAG.Fume, TAG.Hood]},
"Filter": {
"tags": [TAG.Equipment, TAG.Filter],
SKOS.definition: Literal("Device to remove gases from a mixture of gases"),
"subclasses": {
"Mixed_Air_Filter": {
"tags": [TAG.Equipment, TAG.Mixed, TAG.Air, TAG.Filter],
},
},
},
"Fan": {
SKOS.definition: Literal(
"Any device with two or more blades or vanes attached to a rotating shaft used to produce an airflow for the purpose of comfort, ventilation, exhaust, heating, cooling, or any other gaseous transport."
),
"tags": [TAG.Equipment, TAG.Fan],
"subclasses": {
"Cooling_Tower_Fan": {
Expand All @@ -326,16 +292,8 @@
},
},
},
"Economizer": {
"tags": [TAG.Equipment, TAG.Economizer],
SKOS.definition: Literal(
"Device that, on proper variable sensing, initiates control signals or actions to conserve energy. A control system that reduces the mechanical heating and cooling requirement."
),
},
"Economizer": {"tags": [TAG.Equipment, TAG.Economizer]},
"Damper": {
SKOS.definition: Literal(
"Element inserted into an air-distribution system or element of an air-distribution system permitting modification of the air resistance of the system and consequently changing the airflow rate or shutting off the airflow."
),
"tags": [TAG.Equipment, TAG.Damper],
"subclasses": {
"Economizer_Damper": {"tags": [TAG.Equipment, TAG.Damper, TAG.Economizer]},
Expand All @@ -344,17 +302,9 @@
"Return_Damper": {"tags": [TAG.Equipment, TAG.Damper, TAG.Return]},
},
},
"Condenser": {
"tags": [TAG.Equipment, TAG.Condenser],
SKOS.definition: Literal(
"A heat exchanger in which the primary heat transfer vapor changes its state to a liquid phase."
),
},
"Condenser": {"tags": [TAG.Equipment, TAG.Condenser]},
"Computer_Room_Air_Conditioning": {
"tags": [TAG.Equipment, TAG.Computer, TAG.Room, TAG.Air, TAG.Conditioning],
SKOS.definition: Literal(
"A device that monitors and maintains the temperature, air distribution and humidity in a network room or data center. "
),
OWL.equivalentClass: BRICK["CRAC"],
},
"CRAC": {
Expand All @@ -364,16 +314,8 @@
"Standby_CRAC": {"tags": [TAG.Equipment, TAG.CRAC, TAG.Standby]},
},
},
"Compressor": {
"tags": [TAG.Equipment, TAG.Compressor],
SKOS.definition: Literal(
"(1) device for mechanically increasing the pressure of a gas. (2) often described as being either open, hermetic, or semihermetic to describe how the compressor and motor drive is situated in relation to the gas or vapor being compressed. Types include centrifugal, axial flow, reciprocating, rotary screw, rotary vane, scroll, or diaphragm. 1. device for mechanically increasing the pressure of a gas. 2. specific machine, with or without accessories, for compressing refrigerant vapor."
),
},
"Compressor": {"tags": [TAG.Equipment, TAG.Compressor]},
"Coil": {
SKOS.definition: Literal(
"Exchanger that transfers heat from an exhaust airstream to a separated supply airstream."
),
"tags": [TAG.Equipment, TAG.Coil],
"subclasses": {
"Cooling_Coil": {"tags": [TAG.Equipment, TAG.Coil, TAG.Cool]},
Expand All @@ -392,17 +334,9 @@
},
},
"Humidifier": {"tags": [TAG.Equipment, TAG.Humidifier]},
"Boiler": {
"tags": [TAG.Equipment, TAG.Boiler],
SKOS.definition: Literal(
"A closed, pressure vessel that uses fuel or electricity for heating water or other fluids to supply steam or hot water for heating, humidification, or other applications."
),
},
"Boiler": {"tags": [TAG.Equipment, TAG.Boiler]},
"Air_Handler_Unit": {
"tags": [TAG.Equipment, TAG.Air, TAG.Handler, TAG.Unit],
SKOS.definition: Literal(
"Assembly consisting of sections containing a fan or fans and other necessary equipment to perform one or more of the following functions: circulating, filtration, heating, cooling, heat recovery, humidifying, dehumidifying, and mixing of air. Is usually connected to an air-distribution system."
),
OWL.equivalentClass: BRICK["AHU"],
},
"AHU": {
Expand Down Expand Up @@ -430,9 +364,6 @@
"Reheat_Valve": {"tags": [TAG.Valve, TAG.Reheat, TAG.Heat, TAG.Equipment]},
"Return_Heating_Valve": {
"tags": [TAG.Valve, TAG.Return, TAG.Heat, TAG.Equipment],
SKOS.definition: Literal(
"A valve installed on the return side of a heat exchanger"
),
},
"Domestic_Hot_Water_Valve": {
"tags": [
Expand Down Expand Up @@ -483,10 +414,6 @@
TAG.Reader,
TAG.Control,
],
SKOS.definition: Literal(
"Used in physical security systems to read a credential that allows access through access points. "
"Usually card badge credentials for locked doors or monitored checkpoints."
),
},
},
# TODO subclasses
Expand Down Expand Up @@ -519,9 +446,6 @@
TAG.Surveillance,
TAG.Camera,
],
SKOS.definition: Literal(
"An optical instrument to capture still images or record moving images, which are stored on a physical or digital medium."
),
"parents": [BRICK.Camera]
# TODO: subclass of PTZ (Pan/Tilt/Zoom) cameras?
},
Expand All @@ -534,7 +458,6 @@
TAG.NVR,
],
OWL.equivalentClass: BRICK["Network_Video_Recorder"],
SKOS.definition: Literal("A Network Video Recorder."),
},
"Network_Video_Recorder": {
"tags": [
Expand All @@ -546,7 +469,6 @@
TAG.Network,
],
OWL.equivalentClass: BRICK["NVR"],
SKOS.definition: Literal("A Network Video Recorder."),
},
},
# TODO
Expand Down Expand Up @@ -578,15 +500,9 @@
TAG.Emergency,
TAG.Phone,
],
SKOS.definition: Literal(
"A phone specifically provided for making calls to emergency services."
),
},
"Video_Intercom": {
"tags": [TAG.Equipment, TAG.Security, TAG.Intercom, TAG.Video],
SKOS.definition: Literal(
"An intercom device that has video capabilites as well as voice capabilities"
),
},
},
},
Expand All @@ -596,28 +512,14 @@
"Automated_External_Defibrillator": {
OWL.equivalentClass: BRICK["AED"],
"tags": [TAG.Equipment, TAG.Safety, TAG.AED, TAG.Defibrillator],
SKOS.definition: Literal(
"Automated External Defibrillator. Used by trained people to help those experiencing cardiac issues."
),
},
"AED": {
OWL.equivalentClass: BRICK["Automated_External_Defibrillator"],
"tags": [TAG.Equipment, TAG.Safety, TAG.AED, TAG.Defibrillator],
SKOS.definition: Literal(
"Automated External Defibrillator. Used by trained people to help those experiencing cardiac issues."
),
},
"First_Aid_Kit": {
"tags": [TAG.Equipment, TAG.Safety, TAG.Aid, TAG.FirstAid],
SKOS.definition: Literal(
"A collection of medical supplies placed in a well-known location to provide immediate treatment"
),
},
"First_Aid_Kit": {"tags": [TAG.Equipment, TAG.Safety, TAG.Aid, TAG.FirstAid]},
"Emergency_Wash_Station": {
"tags": [TAG.Equipment, TAG.Safety, TAG.Wash, TAG.Station, TAG.Emergency],
SKOS.definition: Literal(
"A piece of plumbed equipment to flush chemicals or hazardous substances off of a person"
),
"subclasses": {
"Eye_Wash_Station": {
"tags": [
Expand All @@ -628,9 +530,6 @@
TAG.Emergency,
TAG.Eye,
],
SKOS.definition: Literal(
"An emergency wash station to flush chemicals or hazardous substances out of a persons eye"
),
},
"Safety_Shower": {
"tags": [
Expand All @@ -641,9 +540,6 @@
TAG.Emergency,
TAG.Shower,
],
SKOS.definition: Literal(
"An emergency wash station to flush chemicals or hazardous substances off of a person"
),
},
"Drench_Hose": {
"tags": [
Expand All @@ -655,9 +551,6 @@
TAG.Drench,
TAG.Hose,
],
SKOS.definition: Literal(
"An emergency wash station to flush chemicals or hazardous substances off of a person by spraying water on them from a distance"
),
},
},
},
Expand Down
17 changes: 3 additions & 14 deletions bricksrc/location.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from rdflib import Literal

from .namespaces import BRICK, TAG, OWL, SKOS
from .namespaces import BRICK, TAG, OWL

"""
Location class structure
Expand All @@ -11,27 +11,16 @@
"tags": [TAG.Floor, TAG.Location],
"subclasses": {
"Basement": {"tags": [TAG.Basement, TAG.Location, TAG.Floor]},
"Rooftop": {
"tags": [TAG.Rooftop, TAG.Location, TAG.Floor],
SKOS.definition: Literal("The top surface area of a roof."),
},
"Rooftop": {"tags": [TAG.Rooftop, TAG.Location, TAG.Floor]},
},
OWL.equivalentClass: BRICK["Storey"],
SKOS.definition: Literal(
"A level, typically representing a horizontal aggregation of spaces that are vertically bound. (referring to IFC)"
),
},
"Storey": {
"tags": [TAG.Storey, TAG.Location],
OWL.equivalentClass: BRICK["Floor"],
},
"Outside": {"tags": [TAG.Outside, TAG.Location]},
"Site": {
"tags": [TAG.Site, TAG.Location],
SKOS.definition: Literal(
"A site is a geographic region that may or may not include built structures."
),
},
"Site": {"tags": [TAG.Site, TAG.Location]},
"Wing": {"tags": [TAG.Wing, TAG.Location]},
"Space": {
"tags": [TAG.Space, TAG.Location],
Expand Down
Loading

0 comments on commit f9b4565

Please sign in to comment.