Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add waste tracking and management concepts #598

Merged
merged 12 commits into from
Jan 16, 2024
18 changes: 14 additions & 4 deletions bricksrc/alarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
],
"subclasses": {
"Low_Supply_Air_Flow_Alarm": {
"aliases": [BRICK["Low_Discharge_Air_Flow_Alarm"]],
"aliases": [
BRICK["Low_Discharge_Air_Flow_Alarm"]
],
"tags": [
TAG.Point,
TAG.Air,
Expand Down Expand Up @@ -217,7 +219,11 @@
],
"subclasses": {
"High_Supply_Air_Temperature_Alarm": {
"aliases": [BRICK["High_Discharge_Air_Temperature_Alarm"]],
"aliases": [
BRICK[
"High_Discharge_Air_Temperature_Alarm"
]
],
"tags": [
TAG.Point,
TAG.High,
Expand All @@ -230,7 +236,9 @@
"parents": [BRICK.High_Temperature_Alarm],
},
"Low_Supply_Air_Temperature_Alarm": {
"aliases": [BRICK["Low_Discharge_Air_Temperature_Alarm"]],
"aliases": [
BRICK["Low_Discharge_Air_Temperature_Alarm"]
],
"tags": [
TAG.Point,
TAG.Low,
Expand Down Expand Up @@ -288,7 +296,9 @@
"tags": [TAG.Point, TAG.Smoke, TAG.Detection, TAG.Alarm],
"subclasses": {
"Supply_Air_Smoke_Detection_Alarm": {
"aliases": [BRICK["Discharge_Air_Smoke_Detection_Alarm"]],
"aliases": [
BRICK["Discharge_Air_Smoke_Detection_Alarm"]
],
"tags": [
TAG.Point,
TAG.Supply,
Expand Down
14 changes: 13 additions & 1 deletion bricksrc/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@
},
"Gas_System": {"tags": [TAG.Gas, TAG.System]},
"Heating_Ventilation_Air_Conditioning_System": {
"tags": [TAG.Heat, TAG.Ventilation, TAG.Air, TAG.Conditioning, TAG.HVAC, TAG.System],
"tags": [
TAG.Heat,
TAG.Ventilation,
TAG.Air,
TAG.Conditioning,
TAG.HVAC,
TAG.System,
],
"aliases": [BRICK["HVAC_System"]],
"subclasses": {
"Air_System": {
Expand Down Expand Up @@ -173,4 +180,9 @@
"aliases": [BRICK["PV_Array"]],
"constraints": {BRICK.hasPart: [BRICK.PV_Panel]},
},
"Electric_Vehicle_Charging_Hub": {
"tags": [TAG.Collection, TAG.Electric, TAG.Vehicle, TAG.Charging, TAG.Hub],
"aliases": [BRICK["EV_Charging_Hub"]],
"constraints": {BRICK.hasPart: [BRICK.Electric_Vehicle_Charging_Station]},
},
}
1 change: 0 additions & 1 deletion bricksrc/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
},
"Humidify_Command": {
"tags": [TAG.Point, TAG.Humidify, TAG.Command],
BRICK.hasQuantity: BRICK.Humidity,
},
"Position_Command": {
"tags": [TAG.Point, TAG.Position, TAG.Command],
Expand Down
36 changes: 20 additions & 16 deletions bricksrc/definitions.csv

Large diffs are not rendered by default.

42 changes: 26 additions & 16 deletions bricksrc/deprecations.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
from .namespaces import BRICK, RDFS, SKOS, A

deprecations = {
BRICK.Heat_Sensor: {
"version": "1.4.0",
"mitigation_message": "This class has a poor definition is supplanted by Temperature_Sensor",
"replace_with": BRICK.Temperature_Sensor,
},
BRICK.Trace_Heat_Sensor: {
"version": "1.4.0",
"mitigation_message": "Removed due to unclear definition",
"replace_with": BRICK.Sensor,
},
BRICK.Solar_Radiance_Sensor: {
"version": "1.3.0",
"mitigation_message": "The class 'Solar_Radiance_Sensor' is deprecated in favor of 'Solar_Irradiance_Sensor'. The new name better reflects the standard unit of measurement, watts per square meter (W/m²), and aligns with the terminology commonly used in solar applications.",
"replace_with": BRICK.Solar_Irradiance_Sensor,
RDFS.subClassOf: BRICK.Sensor,
},
BRICK.Occupied_Air_Temperature_Cooling_Setpoint: {
"version": "1.3.0",
"mitigation_message": "'Occupied_Air_Temperature_Cooling_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Occupied_Cooling_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Occupied_Air_Temperature_Setpoint,
"version": "1.3.0",
"mitigation_message": "'Occupied_Air_Temperature_Cooling_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Occupied_Cooling_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Occupied_Air_Temperature_Setpoint,
},
BRICK.Occupied_Air_Temperature_Heating_Setpoint: {
"version": "1.3.0",
"mitigation_message": "'Occupied_Air_Temperature_Heating_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Occupied_Heating_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Occupied_Air_Temperature_Setpoint,
"version": "1.3.0",
"mitigation_message": "'Occupied_Air_Temperature_Heating_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Occupied_Heating_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Occupied_Air_Temperature_Setpoint,
},
BRICK.Unoccupied_Air_Temperature_Cooling_Setpoint: {
"version": "1.3.0",
"mitigation_message": "'Unoccupied_Air_Temperature_Cooling_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Unoccupied_Cooling_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Unoccupied_Air_Temperature_Setpoint,
"version": "1.3.0",
"mitigation_message": "'Unoccupied_Air_Temperature_Cooling_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Unoccupied_Cooling_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Unoccupied_Air_Temperature_Setpoint,
},
BRICK.Unoccupied_Air_Temperature_Heating_Setpoint: {
"version": "1.3.0",
"mitigation_message": "'Unoccupied_Air_Temperature_Heating_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Unoccupied_Heating_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Unoccupied_Air_Temperature_Setpoint,
"version": "1.3.0",
"mitigation_message": "'Unoccupied_Air_Temperature_Heating_Setpoint' is deprecated in favor of further specifying that it is a zone air setpoint.",
"replace_with": BRICK.Unoccupied_Heating_Zone_Air_Temperature_Setpoint,
RDFS.subClassOf: BRICK.Unoccupied_Air_Temperature_Setpoint,
},
BRICK.Effective_Air_Temperature_Cooling_Setpoint: {
"version": "1.3.0",
Expand Down
57 changes: 57 additions & 0 deletions bricksrc/deprecations.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@prefix bacnet: <http://data.ashrae.org/bacnet/2020#> .
@prefix brick: <https://brickschema.org/schema/Brick#> .
@prefix bsh: <https://brickschema.org/schema/BrickShape#> .
@prefix dcterms: <http://purl.org/dc/terms#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix qudt: <http://qudt.org/schema/qudt/> .
@prefix qudtqk: <http://qudt.org/vocab/quantitykind/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sdo: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix sosa: <http://www.w3.org/ns/sosa/> .
@prefix tag: <https://brickschema.org/schema/BrickTag#> .
@prefix unit: <http://qudt.org/vocab/unit/> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# deprecations.ttl is reserved for non-class deprecations, e.g. entity properties

brick:powerComplexity brick:deprecation [
brick:deprecatedInVersion "1.3.1" ;
brick:deprecationMitigationMessage "powerComplexity is deprecated in favor of electricalComplexPower because the latter is more clear";
brick:deprecationMigitationRule [
a sh:NodeShape ;
sh:rule [
a sh:SPARQLRule ;
sh:construct """
CONSTRUCT {
$this brick:electricalComplexPower ?prop .
} WHERE {
$this brick:powerComplexity ?prop .
}""" ;
sh:prefixes brick: ;
] ;
sh:targetSubjectsOf brick:powerComplexity ;
] ;
] .

brick:powerFlow brick:deprecation [
brick:deprecatedInVersion "1.3.1" ;
brick:deprecationMitigationMessage "powerFlow is deprecated in favor of electricalFlow as the latter is more clear";
brick:deprecationMigitationRule [
a sh:NodeShape ;
sh:rule [
a sh:SPARQLRule ;
sh:construct """
CONSTRUCT {
$this brick:electricalFlow ?prop .
} WHERE {
$this brick:powerFlow ?prop .
}""" ;
sh:prefixes brick: ;
] ;
sh:targetSubjectsOf brick:powerFlow ;
] ;
] .
74 changes: 60 additions & 14 deletions bricksrc/entity_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from collections import defaultdict
from rdflib import Literal
from .namespaces import BRICK, RDFS, SKOS, UNIT, XSD, SH, BSH, REF
from .namespaces import BRICK, RDFS, SKOS, UNIT, XSD, SH, BSH, REF, QUDTQK

# these are the "relationship"/predicates/OWL properties that
# relate a Brick entity to a structured value.
Expand Down Expand Up @@ -77,18 +77,18 @@
"property_of": [BRICK.Equipment, BRICK.Location],
},
# electrical properties
BRICK.powerComplexity: {
SKOS.definition: Literal("Entity has this power complexity"),
SH.node: BSH.PowerComplexityShape,
RDFS.label: Literal("Power complexity"),
BRICK.electricalComplexPower: {
SKOS.definition: Literal("Associated electrical complexity with the entity"),
SH.node: BSH.ElectricalComplexPowerShape,
RDFS.label: Literal("electrical complex power type"),
"property_of": [BRICK.Equipment, BRICK.Point],
},
BRICK.powerFlow: {
BRICK.electricalFlow: {
SKOS.definition: Literal(
"Entity has this power flow relative to the building'"
"Entity has this electrical flow relative to the building'"
),
SH.node: BSH.PowerFlowShape,
RDFS.label: Literal("Power flow"),
SH.node: BSH.ElectricalFlowShape,
RDFS.label: Literal("Electrical flow direction"),
"property_of": [BRICK.Equipment, BRICK.Point],
},
BRICK.electricalPhases: {
Expand Down Expand Up @@ -347,6 +347,33 @@
SH.node: BSH.VirtualMeterShape,
RDFS.label: Literal("is virtual meter"),
},
BRICK.electricVehicleChargerType: {
SKOS.definition: Literal(
"Which type of EVSE charger this is, e.g. Level 1 (up to up to 2.5kW of AC power on 1 phase 120V input), Level 2 (direct AC power but can use higher voltage and up to 3 phases), or Level 3 (direct DC power)"
),
"property_of": BRICK.Electric_Vehicle_Charging_Station,
RDFS.label: Literal("has electric vehicle charger type"),
SH.node: BSH.ElectricVehicleChargingTypeShape,
},
BRICK.electricVehicleChargerDirectionality: {
SKOS.definition: Literal(
"Indicates if the EVSE charger supports bidirectional charging or just unidirectional charging of the EV battery"
),
"property_of": [
BRICK.Electric_Vehicle_Charging_Station,
BRICK.Electric_Vehicle_Charging_Port,
],
RDFS.label: Literal("has electric vehicle charger directionality"),
SH.node: BSH.ElectricVehicleChargingDirectionalityShape,
},
BRICK.electricVehicleConnectorType: {
SKOS.definition: Literal(
"Identifies which kind of connector the port has. This property helps identify the physical connection required between the vehicle and the charging equipment."
),
"property_of": BRICK.Electric_Vehicle_Charging_Port,
RDFS.label: Literal("has electric vehicle connector type"),
SH.node: BSH.ElectricVehicleConnectorTypeShape,
},
}

building_primary_function_values = [
Expand Down Expand Up @@ -448,10 +475,10 @@
},
},
BSH.VolumeShape: {"units": [UNIT.FT3, UNIT.M3], "datatype": BSH.NumericValue},
BSH.PowerComplexityShape: {"values": ["real", "reactive", "apparent"]},
BSH.PowerFlowShape: {"values": ["import", "export", "net", "absolute"]},
BSH.ElectricalComplexPowerShape: {"values": ["real", "reactive", "apparent"]},
BSH.ElectricalFlowShape: {"values": ["import", "export", "net", "absolute"]},
BSH.PhasesShape: {"values": ["A", "B", "C", "AB", "BC", "AC", "ABC"]},
BSH.PhaseCountShape: {"values": ["1", "2", "3", "Total"]},
BSH.PhaseCountShape: {"values": [1, 2, 3, "Total"]},
BSH.CurrentFlowTypeShape: {"values": ["AC", "DC"]},
BSH.StageShape: {"values": [1, 2, 3, 4]},
BSH.BuildingPrimaryFunctionShape: {"values": building_primary_function_values},
Expand All @@ -461,7 +488,7 @@
BRICK.longitude: {"datatype": BSH.NumericValue},
},
},
BSH.TiltShape: {"unitsFromQuantity": BRICK.Angle, "datatype": BSH.NumericValue},
BSH.TiltShape: {"unitsFromQuantity": QUDTQK.Angle, "datatype": BSH.NumericValue},
BSH.TemperatureShape: {
"unitsFromQuantity": BRICK.Temperature,
"datatype": BSH.NumericValue,
Expand All @@ -471,7 +498,7 @@
"datatype": BSH.NumericValue,
},
BSH.AzimuthShape: {
"unitsFromQuantity": BRICK.Angle,
"unitsFromQuantity": QUDTQK.Angle,
"datatype": BSH.NumericValue,
"rotationalDirection": {"values": ["clockwise", "counterclockwise"]},
"referenceDirection": {"values": ["North", "South", "East", "West"]},
Expand Down Expand Up @@ -533,6 +560,25 @@
},
},
},
BRICK.ElectricVehicleChargingTypeShape: {
"values": ["Level 1", "Level 2", "Level 3"]
},
BRICK.ElectricVehicleChargingDirectionalityShape: {
"values": ["unidirectional", "bidirectional"]
},
BRICK.ElectricVehicleConnectorTypeShape: {
"values": [
"Type 1 (CSS)",
"Type 2 (CSS)",
"GB/T",
"Type 1 (SAE J1772)",
"Type 2 (IEC 62196)",
"CHAdeMO",
"CCS (Combined Charging System)",
"Tesla Supercharger",
"Wireless",
]
},
}


Expand Down
Loading