Skip to content

Commit

Permalink
working on more EVSe rules; put directionality on the port
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Sep 27, 2023
1 parent df09343 commit cdaacd0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
29 changes: 24 additions & 5 deletions bricksrc/entity_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,19 +348,28 @@
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)"),
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,
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."),
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,
Expand Down Expand Up @@ -558,7 +567,17 @@
"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"]
"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
13 changes: 12 additions & 1 deletion bricksrc/rules.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ bsh:hasSubstance a sh:NodeShape ;


# 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 [
Expand All @@ -399,8 +401,17 @@ bsh:AddDefaultEVSEChargerDirection a sh:NodeShape ;
$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:electricVehicleChargerDirectionality ?direction .
}
FILTER NOT EXISTS {
$this brick:hasPart ?port .
?port a brick:Electric_Vehicle_Charging_Port .
?port brick:electricVehicleChargerDirectionality ?other_direction .
}
}
""" ;
] ;
.

# inherit

0 comments on commit cdaacd0

Please sign in to comment.