Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bricksrc/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,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]},
},
}
3 changes: 3 additions & 0 deletions bricksrc/definitions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ https://brickschema.org/schema/Brick#Electric_Current,,
https://brickschema.org/schema/Brick#Electric_Energy,,
https://brickschema.org/schema/Brick#Electric_Power_Sensor,Measures the amount of instantaneous electric power consumed,
https://brickschema.org/schema/Brick#Electric_Radiator,Electric heating device,
https://brickschema.org/schema/Brick#Electric_Vehicle_Charging_Hub,"A collection of charging stations for charging electric vehicles. A hub may be located in a parking lot, for example",
https://brickschema.org/schema/Brick#Electric_Vehicle_Charging_Port,An individual point of attachment for charing a single electric vehicle,
https://brickschema.org/schema/Brick#Electric_Vehicle_Charging_Station,An individual piece of equipment supplying electrical power for charging electric vehicles. Contains 1 or more electric vehicle charging ports,
https://brickschema.org/schema/Brick#Electric_Voltage,,
https://brickschema.org/schema/Brick#Electrical_Energy_Usage_Sensor,A sensor that records the quantity of electrical energy consumed in a given period,
https://brickschema.org/schema/Brick#Electrical_Meter,A meter that measures the usage or consumption of electricity,
Expand Down
48 changes: 47 additions & 1 deletion bricksrc/entity_properties.py
Original file line number Diff line number Diff line change
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 @@ -451,7 +478,7 @@
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 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
19 changes: 19 additions & 0 deletions bricksrc/equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@
"Electrical_Equipment": {
"tags": [TAG.Electrical, TAG.Equipment],
"subclasses": {
"Electric_Vehicle_Charging_Station": {
"tags": [
TAG.Electric,
TAG.Vehicle,
TAG.Charging,
TAG.Station,
TAG.Equipment,
],
"constraints": {BRICK.hasPart: [BRICK.Electric_Vehicle_Charging_Port]},
},
"Electric_Vehicle_Charging_Port": {
"tags": [
TAG.Electric,
TAG.Vehicle,
TAG.Charging,
TAG.Port,
TAG.Equipment,
],
},
"Energy_Storage": {
"tags": [TAG.Energy, TAG.Storage, TAG.Equipment],
"subclasses": {
Expand Down
67 changes: 67 additions & 0 deletions bricksrc/rules.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ WHERE {
sh:targetClass brick:Entity ;
.

bsh:InferInverseProperties2
a sh:NodeShape ;
sh:rule [
a sh:SPARQLRule ;
sh:construct """
CONSTRUCT {
$this ?p ?o .
}
WHERE {
?o ?invP $this .
?invP owl:inverseOf ?p .
}
""" ;
sh:prefixes <https://brickschema.org/schema/1.3/Brick> ;
] ;
sh:targetClass brick:Entity ;
.

bsh:InferSymmetricProperties
a sh:NodeShape ;
sh:rule [
Expand Down Expand Up @@ -424,3 +442,52 @@ bsh:hasSubstance a sh:NodeShape ;
sh:targetObjectsOf brick:hasSubstance ;
sh:class brick:Substance ;
.


# add unidirectional charging to all EVsE chargers as a default value
# UNLESS there is already a brick:electricVehicleChargerDirectionality attribute
# on ports associated with the charger
bsh:AddDefaultEVSEChargerDirection a sh:NodeShape ;
sh:targetClass brick:Electric_Vehicle_Charging_Station ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes <https://brickschema.org/schema/1.3/Brick> ;
sh:construct """
CONSTRUCT {
$this brick:electricVehicleChargerDirectionality [ brick:value "unidirectional" ]
} WHERE {
$this rdf:type brick:Electric_Vehicle_Charging_Station .
FILTER NOT EXISTS {
$this brick:electricVehicleChargerDirectionality ?direction .
}
FILTER NOT EXISTS {
$this brick:hasPart ?port .
?port a brick:Electric_Vehicle_Charging_Port .
?port brick:electricVehicleChargerDirectionality ?other_direction .
}
}
""" ;
] ;
.

# inherit the directionality of the EVSE charger to the ports
bsh:InheritEVSEChargerDirection a sh:NodeShape ;
sh:targetClass brick:Electric_Vehicle_Charging_Port ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes <https://brickschema.org/schema/1.3/Brick> ;
sh:construct """
CONSTRUCT {
$this brick:electricVehicleChargerDirectionality ?direction
} WHERE {
$this rdf:type brick:Electric_Vehicle_Charging_Port .
$this brick:isPartOf ?charger .
?charger a brick:Electric_Vehicle_Charging_Station .
?charger brick:electricVehicleChargerDirectionality ?direction .
FILTER NOT EXISTS {
$this brick:electricVehicleChargerDirectionality ?other_direction .
}
}
""" ;
] ;
.
55 changes: 55 additions & 0 deletions examples/evse/evse.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@prefix brick: <https://brickschema.org/schema/Brick#> .
@prefix unit: <http://qudt.org/vocab/unit/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <urn:evse#> .

:parking_lot a brick:Parking_Structure ;
brick:isLocationOf :hub .

:hub a brick:Electric_Vehicle_Charging_Hub ;
brick:hasPart :station1, :station2 .

:station1 a brick:Electric_Vehicle_Charging_Station ;
brick:electricVehicleChargerType [ brick:value "Level 1" ] ;
brick:hasPart :port1-1, :port1-2 ;
.

:port1-1 a brick:Electric_Vehicle_Charging_Port ;
brick:electricVehicleChargerDirectionality [ brick:value "bidirectional" ] ;
brick:electricVehicleConnectorType [ brick:value "Level 1 (SAE J1772)" ] ;
brick:currentFlowType [ brick:value "AC" ] ;
brick:electricalPhaseCount [ brick:value 1 ] ;
brick:hasPoint :port1-1-voltage ;
.
:port1-1-voltage a brick:Battery_Voltage_Sensor ;
brick:hasUnit unit:PERCENT ;
.

:port1-2 a brick:Electric_Vehicle_Charging_Port ;
brick:electricVehicleChargerDirectionality [ brick:value "bidirectional" ] ;
brick:electricVehicleConnectorType [ brick:value "Level 1 (SAE J1772)" ] ;
brick:currentFlowType [ brick:value "AC" ] ;
brick:electricalPhaseCount [ brick:value 1 ] ;
brick:hasPoint :port1-2-voltage ;
.
:port1-2-voltage a brick:Battery_Voltage_Sensor ;
brick:hasUnit unit:PERCENT ;
.

:station2 a brick:Electric_Vehicle_Charging_Station ;
brick:electricVehicleChargerDirectionality [ brick:value "unidirectional" ] ;
brick:electricVehicleChargerType [ brick:value "Level 2" ] ;
brick:hasPart :port2-1 ;
.

:port2-1 a brick:Electric_Vehicle_Charging_Port ;
# this should inherit 'unidirectional' from the station
brick:electricVehicleConnectorType [ brick:value "Level 2 (IEC 62196)" ] ;
brick:currentFlowType [ brick:value "AC" ] ;
brick:electricalPhaseCount [ brick:value 3 ] ;
brick:hasPoint :port2-1-voltage ;
.

:port2-1-voltage a brick:Battery_Voltage_Sensor ;
brick:hasUnit unit:PERCENT ;
.
4 changes: 4 additions & 0 deletions examples/last_known_value/last_known_value.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
@prefix unit: <http://qudt.org/vocab/unit/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix bacnet: <http://data.ashrae.org/bacnet/2020#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

bldg: a owl:Ontology ;
owl:imports <https://brickschema.org/schema/1.3/Brick> .

bldg:sample-device a bacnet:BACnetDevice ;
bacnet:device-instance 123 ;
Expand Down
Loading