From e34c0989201146f99d1c14ffbe3450bf7ab1ea8d Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 30 May 2024 15:02:44 +0200 Subject: [PATCH 1/4] closes #22, simplify modeling of confidence level on observations --- ontology/saref4auto.ttl | 74 +++-------------------------------------- 1 file changed, 5 insertions(+), 69 deletions(-) diff --git a/ontology/saref4auto.ttl b/ontology/saref4auto.ttl index 219ef37..c9bfe11 100644 --- a/ontology/saref4auto.ttl +++ b/ontology/saref4auto.ttl @@ -77,12 +77,6 @@ vann:preferredNamespacePrefix rdf:type owl:AnnotationProperty . vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . -### https://saref.etsi.org/saref4auto/hasConfidenceUnitOfMeasure -:hasConfidenceUnitOfMeasure rdf:type owl:ObjectProperty ; - rdfs:comment "A relation that allows to specify the unit of measure associated with a certain confidence"@en ; - rdfs:label "has confidence unit of measure"@en . - - ### https://saref.etsi.org/saref4auto/hasAutomationLevel :hasAutomationLevel rdf:type owl:ObjectProperty ; rdfs:comment """A relation to define the level of automation of a singular vehicle. According to SAE J3016, there are five levels of automation: @@ -96,14 +90,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "hasAutomationLevel"@en . -### https://saref.etsi.org/saref4auto/hasConfidence -:hasConfidence rdf:type owl:ObjectProperty ; - owl:inverseOf :isConfidenceOf ; - rdfs:range :Confidence ; - rdfs:comment "A relation between some entity (ex. an observation) and its confidence (s4auto:Confidence)"@en ; - rdfs:label "hasConfidence"@en . - - :hasEnvironment rdf:type owl:ObjectProperty ; rdfs:range :VehicleEnvironment ; rdfs:comment "A relation that allows to describe the environment of a vehicle"@en ; @@ -132,13 +118,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "hasRole"@en . -### https://saref.etsi.org/saref4auto/isConfidenceOf -:isConfidenceOf rdf:type owl:ObjectProperty ; - rdfs:domain :Confidence ; - rdfs:comment "A relation between the confidence (s4auto:Confidence class) of some entity (ex. an observation) and that entity"@en ; - rdfs:label "isConfidenceOf"@en . - - ### https://saref.etsi.org/saref4auto/usesProperty :usesProperty rdf:type owl:ObjectProperty ; rdfs:range :Property ; @@ -150,10 +129,11 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . # Data properties ################################################################# -### https://saref.etsi.org/saref4auto/hasConfidenceValue -:hasConfidenceValue rdf:type owl:DatatypeProperty ; - rdfs:comment "A relation between the confidence (s4auto:Confidence) and its value, which can be a discrete value (+/- 5 cm/s) or a level (e.g. 95 %)"@en ; - rdfs:label "hasConfidenceValue"@en . +:hasConfidenceLevel rdf:type owl:DatatypeProperty ; + rdfs:domain saref:Observation ; + rdfs:range xsd:decimal ; + rdfs:comment "Associates a confidence level (a decimal value between 0 and 1) to an observation result, stating that the actual value of the property is estimated to be inside the result value."@en ; + rdfs:label "has Confidence Level"@en . ### https://saref.etsi.org/saref4auto/hasDescriptionName @@ -174,18 +154,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . ################################################################# - -### https://saref.etsi.org/saref4auto/AccelerationConfidence -:AccelerationConfidence rdf:type owl:Class ; - rdfs:subClassOf :Confidence , - [ rdf:type owl:Restriction ; - owl:onProperty :hasConfidenceValue ; - owl:someValuesFrom xsd:float - ] ; - rdfs:comment "A type of confidence for acceleration observations that represents the absolute accuracy of a reported vehicle acceleration value with a predefined confidence level (e.g. 95 %)"@en ; - rdfs:label "AccelerationConfidence"@en . - - ### https://saref.etsi.org/saref4auto/AutomationLevel :AutomationLevel rdf:type owl:Class ; rdfs:comment "The level of automation a platoon of vehicles or a singular vehicle"@en ; @@ -198,20 +166,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "AutomotiveObject"@en . -### https://saref.etsi.org/saref4auto/Confidence -:Confidence rdf:type owl:Class ; - rdfs:subClassOf [ rdf:type owl:Restriction ; - owl:onProperty :hasConfidenceUnitOfMeasure ; - owl:someValuesFrom saref:UnitOfMeasure - ] , - [ rdf:type owl:Restriction ; - owl:onProperty :hasConfidenceValue ; - owl:someValuesFrom xsd:float - ] ; - rdfs:comment "Every observation in the automotive domain is an estimated observation coming from the aggregation of several observations from different sensor or devices taken at the same time or at consecutive times very close to each other. Therefore, a confidence is always associated to each mesurement to indicate that it has not 100% accuracy."@en ; - rdfs:label "Confidence"@en . - - ### https://saref.etsi.org/saref4auto/CriticalObject :CriticalObject rdf:type owl:Class ; rdfs:subClassOf owl:Thing , @@ -395,13 +349,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "PlatoonRole"@en . -### https://saref.etsi.org/saref4auto/PositionConfidenceEllipse -:PositionConfidenceEllipse rdf:type owl:Class ; - rdfs:subClassOf :Confidence ; - rdfs:comment "A type of confidence that represents horizontal position accuracy in a shape of ellipse with a predefined confidence level (e.g. 95 %). The centre of the ellipse shape corresponds to the reference position point for which the position accuracy is evaluated."@en ; - rdfs:label "PositionConfidenceEllipse"@en . - - ### https://saref.etsi.org/saref4auto/RegularParkingSpot :RegularParkingSpot rdf:type owl:Class ; rdfs:subClassOf :ParkingSpot ; @@ -556,17 +503,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "SpecialPermitParkingSpot"@en . -### https://saref.etsi.org/saref4auto/SpeedConfidence -:SpeedConfidence rdf:type owl:Class ; - rdfs:subClassOf :Confidence , - [ rdf:type owl:Restriction ; - owl:onProperty :hasConfidenceValue ; - owl:someValuesFrom xsd:int - ] ; - rdfs:comment "A type of confidence for speed measurements that represents absolute accuracy of a speed value in cm/s"@en ; - rdfs:label "SpeedConfidence"@en . - - ### https://saref.etsi.org/saref4auto/TrafficLightController :TrafficLightController rdf:type owl:Class ; rdfs:subClassOf :RoadSideActuator ; -- GitLab From 7c5bd9664d50a7c12511fc2e046dc1f2cfd70091 Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 30 May 2024 15:23:29 +0200 Subject: [PATCH 2/4] closes #32: define criticalobject as a feature kind, with narrower kinds --- ontology/saref4auto.ttl | 91 +++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 58 deletions(-) diff --git a/ontology/saref4auto.ttl b/ontology/saref4auto.ttl index 58945b7..97647cd 100644 --- a/ontology/saref4auto.ttl +++ b/ontology/saref4auto.ttl @@ -141,33 +141,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "AutomotiveObject"@en . -### https://saref.etsi.org/saref4auto/CriticalObject -:CriticalObject rdf:type owl:Class ; - rdfs:subClassOf owl:Thing , - [ rdf:type owl:Restriction ; - owl:onProperty :hasProperty ; - owl:hasValue :Height - ] , - [ rdf:type owl:Restriction ; - owl:onProperty saref:hasProperty ; - owl:hasValue :Length - ] , - [ rdf:type owl:Restriction ; - owl:onProperty saref:hasState ; - owl:someValuesFrom :Movement - ] , - [ rdf:type owl:Restriction ; - owl:onProperty :hasShape ; - owl:someValuesFrom :Shape - ] , - [ rdf:type owl:Restriction ; - owl:onProperty :hasWidth ; - owl:hasValue :Width - ] ; - rdfs:comment "A critical object located on the road. Critical objects are small object, medium object, large object"@en ; - rdfs:label "CriticalObject"@en . - - ### https://saref.etsi.org/saref4auto/ElectricChargingParkingSpot :ElectricChargingParkingSpot rdf:type owl:Class ; rdfs:subClassOf :ParkingSpot ; @@ -207,20 +180,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "ElectronicControlUnit"@en . -### https://saref.etsi.org/saref4auto/LargeObject -:LargeObject rdf:type owl:Class ; - rdfs:subClassOf :CriticalObject ; - rdfs:comment "A type of Critical Object"@en ; - rdfs:label "Large Object"@en . - - -### https://saref.etsi.org/saref4auto/MediumObject -:MediumObject rdf:type owl:Class ; - rdfs:subClassOf :CriticalObject ; - rdfs:comment "A type of Critical Object"@en ; - rdfs:label "Medium Object"@en . - - ### https://saref.etsi.org/saref4auto/NotifiedEvent :NotifiedEvent rdf:type owl:Class ; rdfs:subClassOf owl:Thing ; @@ -333,7 +292,7 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . ] , [ rdf:type owl:Restriction ; owl:onProperty saref:consistsOf ; - owl:someValuesFrom :CriticalObject + owl:someValuesFrom [ a owl:Restriction ; owl:onProperty saref:hasFeatureKind ; owl:hasValue :CriticalObject ] ; ] , [ rdf:type owl:Restriction ; owl:onProperty saref:consistsOf ; @@ -360,8 +319,8 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . owl:hasValue :RelativePosition ] , [ rdf:type owl:Restriction ; - owl:onProperty :hasShape ; - owl:someValuesFrom :Shape + owl:onProperty saref:hasProperty ; + owl:hasValue :Shape ] , [ rdf:type owl:Restriction ; owl:onProperty :hasWidth ; @@ -453,13 +412,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "Route"@en . -### https://saref.etsi.org/saref4auto/SmallObject -:SmallObject rdf:type owl:Class ; - rdfs:subClassOf :CriticalObject ; - rdfs:comment "A type of Critical Object"@en ; - rdfs:label "Small Object"@en . - - ### https://saref.etsi.org/saref4auto/SpecialPermitParkingSpot :SpecialPermitParkingSpot rdf:type owl:Class ; rdfs:subClassOf :ParkingSpot ; @@ -627,6 +579,32 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . # Individuals ################################################################# + + +### Instances of CriticalObject + +:CriticalObject rdf:type saref:FeatureKind ; + saref:hasProperty :Height , :Length , :Width , :Shape ; + saref:hasState :Movement ; + rdfs:comment "A critical object located on the road. Critical objects are small object, medium object, large object"@en ; + rdfs:label "Critical Object"@en . + +:LargeObject rdf:type saref:FeatureKind ; + skos:broader :CriticalObject ; + rdfs:comment "A kind of Critical Object"@en ; + rdfs:label "Large Object"@en . + +:MediumObject rdf:type saref:FeatureKind ; + skos:broader :CriticalObject ; + rdfs:comment "A kind of Critical Object"@en ; + rdfs:label "Medium Object"@en . + +:SmallObject rdf:type saref:FeatureKind ; + skos:broader :CriticalObject ; + rdfs:comment "A kind of Critical Object"@en ; + rdfs:label "Small Object"@en . + + ### Instances of VehicleKind :Car rdf:type :VehicleKind ; @@ -891,6 +869,10 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:comment "The location where the vehicle member joins a platoon" ; rdfs:label "Rendez-vous Location"@en . +:Shape rdf:type saref:Property ; + rdfs:comment "The shape of an entity: i.e., Sphere, Torus, Cylinder, Cone, Ellipsoid, Cube, Cuboid, Pyramid, Prism, Multiple shapes"@en ; + rdfs:label "Shape"@en . + ### SAREF patterns for states: Categorizing states for the automotive domain :AutomotiveState a owl:Class ; @@ -1090,13 +1072,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "static"@en . -### SAREF Pattern for states: shape - -:Shape rdf:type owl:Class ; - rdfs:subClassOf saref:State ; - rdfs:comment "The state of shape of an entity: i.e., Sphere, Torus, Cylinder, Cone, Ellipsoid, Cube, Cuboid, Pyramid, Prism, Multiple shapes"@en ; - rdfs:label "Shape"@en . - ### SAREF Pattern for states: automation level :PlatoonAutomationLevel rdf:type saref:State ; -- GitLab From 7491870ef6b94a4e7e3894094e2d60cd54c36050 Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 30 May 2024 15:36:58 +0200 Subject: [PATCH 3/4] closes #33: defines Parking Spot as feature kind with narrower kinds --- ontology/saref4auto.ttl | 89 ++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 60 deletions(-) diff --git a/ontology/saref4auto.ttl b/ontology/saref4auto.ttl index 97647cd..79420da 100644 --- a/ontology/saref4auto.ttl +++ b/ontology/saref4auto.ttl @@ -83,13 +83,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "has Environment"@en . -### https://saref.etsi.org/saref4auto/hasOpeningTimeAvailability -:hasOpeningTimeAvailability rdf:type owl:ObjectProperty ; - rdfs:range time:TemporalEntity ; - rdfs:comment "A relation to express the opening time of parking spot"@en ; - rdfs:label "hasOpeningTimeAvailability"@en . - - ### https://saref.etsi.org/saref4auto/hasPlatoonRole :hasPlatoonRole rdf:type owl:ObjectProperty ; rdfs:subPropertyOf :hasRole ; @@ -141,13 +134,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "AutomotiveObject"@en . -### https://saref.etsi.org/saref4auto/ElectricChargingParkingSpot -:ElectricChargingParkingSpot rdf:type owl:Class ; - rdfs:subClassOf :ParkingSpot ; - rdfs:comment "A type pf parking spot"@en ; - rdfs:label "ElectricChargingParkingSpot"@en . - - ### https://saref.etsi.org/saref4auto/ElectronicControlUnit :ElectronicControlUnit rdf:type owl:Class ; rdfs:subClassOf saref:Device , @@ -187,38 +173,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "NotifiedEvent"@en . -### https://saref.etsi.org/saref4auto/ParkingSpot -:ParkingSpot rdf:type owl:Class ; - rdfs:subClassOf saref:FeatureOfInterest, geo:Feature , - [ rdf:type owl:Restriction ; - owl:onProperty saref:hasProperty ; - owl:hasValue :Height - ] , - [ rdf:type owl:Restriction ; - owl:onProperty saref:hasIdentifier ; - owl:minCardinality 1 - ] , - [ rdf:type owl:Restriction ; - owl:onProperty saref:hasProperty ; - owl:hasValue :Length - ] , - [ rdf:type owl:Restriction ; - owl:onProperty :hasOpeningTimeAvailability ; - owl:someValuesFrom time:TemporalEntity - ] , - [ rdf:type owl:Restriction ; - owl:onProperty :hasWidth ; - owl:hasValue :Width - ] , - [ rdf:type owl:Restriction ; - owl:onProperty saref:hasState ; - owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ; - owl:onClass :ParkingSpotState - ] ; - rdfs:comment "A location that is designated for parking. A parking spot is a geo:Feature and can thus have a geometry."@en ; - rdfs:label "ParkingSpot"@en . - - ### https://saref.etsi.org/saref4auto/PersonalDevice :PersonalDevice rdf:type owl:Class ; rdfs:subClassOf saref:Device , @@ -272,13 +226,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "PlatoonRole"@en . -### https://saref.etsi.org/saref4auto/RegularParkingSpot -:RegularParkingSpot rdf:type owl:Class ; - rdfs:subClassOf :ParkingSpot ; - rdfs:comment "A type pf parking spot"@en ; - rdfs:label "RegularParkingSpot"@en . - - ### https://saref.etsi.org/saref4auto/RoadEntity :RoadEntity rdf:type owl:Class ; rdfs:subClassOf saref:FeatureOfInterest , @@ -412,13 +359,6 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "Route"@en . -### https://saref.etsi.org/saref4auto/SpecialPermitParkingSpot -:SpecialPermitParkingSpot rdf:type owl:Class ; - rdfs:subClassOf :ParkingSpot ; - rdfs:comment "A type pf parking spot. Parking spot reserved for special permits (authorities, disabled, blue Zone, resident ...)"@en ; - rdfs:label "SpecialPermitParkingSpot"@en . - - ### https://saref.etsi.org/saref4auto/TrafficLightController :TrafficLightController rdf:type owl:Class ; rdfs:subClassOf :RoadSideActuator ; @@ -873,6 +813,10 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:comment "The shape of an entity: i.e., Sphere, Torus, Cylinder, Cone, Ellipsoid, Cube, Cuboid, Pyramid, Prism, Multiple shapes"@en ; rdfs:label "Shape"@en . +:OpeningTimeAvailability rdf:type owl:ObjectProperty ; + rdfs:comment "The opening time of a parking spot."@en ; + rdfs:label "has opening time availability"@en . + ### SAREF patterns for states: Categorizing states for the automotive domain :AutomotiveState a owl:Class ; @@ -880,6 +824,31 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . rdfs:label "Automotive State"@en ; rdfs:comment "Class of states related to the automotive domain."@en . + +### SAREF patterns for feature kinds: for parking spots + +:ParkingSpot rdf:type saref:FeatureKind ; + saref:hasProperty :Height , :Length , :Width , :OpeningTimeAvailability ; + saref:hasState :ParkingSpotState ; + rdfs:comment "A location that is designated for parking. A parking spot is a geo:Feature and can thus have a geometry."@en ; + rdfs:label "ParkingSpot"@en . + +:ElectricChargingParkingSpot rdf:type saref:FeatureKind ; + skos:broader :ParkingSpot ; + rdfs:comment "A type pf parking spot"@en ; + rdfs:label "ElectricChargingParkingSpot"@en . + +:RegularParkingSpot rdf:type saref:FeatureKind ; + skos:broader :ParkingSpot ; + rdfs:comment "A type pf parking spot"@en ; + rdfs:label "RegularParkingSpot"@en . + +:SpecialPermitParkingSpot rdf:type saref:FeatureKind ; + skos:broader :ParkingSpot ; + rdfs:comment "A type pf parking spot. Parking spot reserved for special permits (authorities, disabled, blue Zone, resident ...)"@en ; + rdfs:label "SpecialPermitParkingSpot"@en . + + ### SAREF patterns for states: for parking spots :ParkingSpotState rdf:type owl:Class ; -- GitLab From 460911630fc8d72877cf579c0cea4ffd41654f4a Mon Sep 17 00:00:00 2001 From: Maxime Date: Fri, 31 May 2024 09:46:01 +0200 Subject: [PATCH 4/4] allow confidence level to be attached to the result of an observation --- ontology/saref4auto.ttl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ontology/saref4auto.ttl b/ontology/saref4auto.ttl index 79420da..fdbf6d2 100644 --- a/ontology/saref4auto.ttl +++ b/ontology/saref4auto.ttl @@ -110,9 +110,9 @@ vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . ################################################################# :hasConfidenceLevel rdf:type owl:DatatypeProperty ; - rdfs:domain saref:Observation ; + rdfs:domain [ a owl:Class ; owl:unionOf ( saref:Observation saref:PropertyValue ) ] ; rdfs:range xsd:decimal ; - rdfs:comment "Associates a confidence level (a decimal value between 0 and 1) to an observation result, stating that the actual value of the property is estimated to be inside the result value."@en ; + rdfs:comment "Associates a confidence level (a decimal value between 0 and 1) to an observation or its result, stating that the actual value of the property is estimated to be inside the result's value."@en ; rdfs:label "has Confidence Level"@en . -- GitLab