This repository was archived by the owner on Feb 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathscenario.shacl.ttl
More file actions
370 lines (350 loc) · 15.7 KB
/
Copy pathscenario.shacl.ttl
File metadata and controls
370 lines (350 loc) · 15.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
@prefix scenario: <https://w3id.org/ascs-ev/envited-x/scenario/v5/> .
@prefix environment-model: <https://w3id.org/ascs-ev/envited-x/environment-model/v5/> .
@prefix hdmap: <https://w3id.org/ascs-ev/envited-x/hdmap/v5/> .
@prefix envited-x: <https://w3id.org/ascs-ev/envited-x/envited-x/v3/> .
@prefix manifest: <https://w3id.org/ascs-ev/envited-x/manifest/v5/> .
@prefix georeference: <https://w3id.org/ascs-ev/envited-x/georeference/v5/> .
@prefix openlabel: <https://openlabel.asam.net/V1-0-0/ontologies/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix gx: <https://w3id.org/gaia-x/development#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
# The Shapes Graph URI appends "/shapes" to the Ontology URI
<https://w3id.org/ascs-ev/envited-x/scenario/v5/shapes>
a owl:Ontology ;
# The Shapes Graph must import the Domain Ontology
owl:imports <https://w3id.org/ascs-ev/envited-x/scenario/v5> .
### Scenario SHACL Shape
scenario:ScenarioShape a sh:NodeShape ;
sh:closed false ;
# 1) hasResourceDescription
sh:property [
sh:path scenario:hasResourceDescription ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:or (
[ sh:node envited-x:ResourceDescriptionShape ]
[ sh:and ( manifest:LinkShape envited-x:ExtendedLinkShape ) ]
) ;
sh:message "Each Scenario must have exactly one ResourceDescription (Inline or Linked)."@en ;
] ;
# 2) hasDomainSpecification
sh:property [
sh:path scenario:hasDomainSpecification ;
sh:node scenario:DomainSpecificationShape ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "Each Scenario must have one associated DomainSpecification."@en ;
] ;
# 3) hasManifest
sh:property [
sh:path scenario:hasManifest ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:or (
# Case 1: Linked manifest reference
[ sh:node envited-x:ManifestLinkReferenceShape ]
# Case 2: Inline manifest node
[ sh:and (
[ sh:node manifest:ManifestShape ]
[ sh:node envited-x:ManifestShape ]
[ sh:node scenario:ScenarioManifestConstraints ]
)]
) ;
sh:message "Each Scenario must have exactly one manifest (Inline or Linked)."@en ;
] ;
sh:targetClass scenario:Scenario .
### Scenario Specific Manifest Constraints
scenario:ScenarioManifestConstraints a sh:NodeShape ;
# "A scenario MAY have an hdmap and environment model"
sh:property [
sh:path manifest:hasReferencedArtifacts ;
# Validates EVERY item in the list against these options
sh:node [
a sh:NodeShape ;
sh:or (
# Option A: Full inline HD Map (Points to the SHAPE, not the Class)
[ sh:node hdmap:HdMapShape ]
# Option B: Full inline Environment Model (Points to the SHAPE)
[ sh:node environment-model:EnvironmentModelShape ]
# Option C: Valid Link with category 'Simulation Data'
[ sh:and (
[ sh:node manifest:LinkShape ]
[ sh:node envited-x:ExtendedLinkShape ]
[ sh:property [
sh:path manifest:hasCategory ;
sh:hasValue envited-x:isSimulationData ;
sh:message "Referenced Artifacts in a Scenario MUST be of category 'Simulation Data' (since they are already distinguished by being in the 'referencedArtifacts' list)."
]
]
)]
)
] ;
sh:message "Any referenced artifact provided must be either an HD Map, an Environment Model, or a valid link with category 'Simulation Data'."@en ;
] .
### DomainSpecification SHACL Shape
scenario:DomainSpecificationShape a sh:NodeShape ;
sh:property
[
sh:minCount 1 ;
sh:node scenario:ContentOrTagShape ;
sh:name "content"@en ;
sh:description "Attributes describing the content of the scenario."@en ;
sh:order 1 ;
sh:path scenario:hasContent
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node scenario:FormatShape ;
sh:name "format"@en ;
sh:description "File format details of the scenario."@en ;
sh:order 2 ;
sh:path scenario:hasFormat
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node scenario:QualityShape ;
sh:name "quality"@en ;
sh:description "Quality metrics of the scenario."@en ;
sh:order 3 ;
sh:path scenario:hasQuality
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node scenario:QuantityShape ;
sh:name "quantity"@en ;
sh:description "Quantitative metrics describing the scenario."@en ;
sh:order 4 ;
sh:path scenario:hasQuantity
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node scenario:DataSourceShape ;
sh:name "data source"@en ;
sh:description "Data sources used to create the scenario."@en ;
sh:order 5 ;
sh:path scenario:hasDataSource
],
[
sh:maxCount 1 ;
sh:minCount 1 ;
sh:node georeference:GeoreferenceShape ;
sh:name "georeference"@en ;
sh:description "Georeferencing information for the scenario."@en ;
sh:order 6 ;
sh:path scenario:hasGeoreference
] ;
sh:targetClass scenario:DomainSpecification .
### New Union Shape for Content
scenario:ContentOrTagShape a sh:NodeShape ;
sh:description "Scenario Content or OpenLABEL Tag Union Shape"@en ;
sh:or (
[ sh:node scenario:ContentShape ]
[ sh:node openlabel:TagShape ]
[ sh:node xsd:boolean ]
) ;
sh:message "Each item of hasContent must conform to either Scenario Content, an OpenLABEL Tag, or a boolean."@en .
### Detailed Shapes (Expanded based on Instance Data)
scenario:FormatShape a sh:NodeShape ;
sh:closed false;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ skos:example "ASAM OpenSCENARIO" ;
sh:description "Defines the type of data format used for the scenario asset."@en ;
sh:in ("ASAM OpenSCENARIO") ;
sh:maxCount 1 ;
sh:message "Validation of type failed!"@en ;
sh:name "type"@en ;
sh:order 1 ;
sh:path scenario:formatType ],
[ skos:example "1.5" ;
sh:datatype xsd:string ;
sh:description "Defines the version of the data format used for the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of version failed!"@en ;
sh:name "version"@en ;
sh:order 2 ;
sh:path scenario:version ] ;
sh:targetClass scenario:Format .
scenario:ContentShape a sh:NodeShape ;
sh:closed false;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ skos:example "Functional, Logical, Concrete" ;
sh:description "Specifies the abstraction level (as defined in the Pegasus project) of the scenario asset."@en ;
sh:in ("Functional" "Logical" "Concrete") ;
sh:maxCount 1 ;
sh:message "Validation of type failed!"@en ;
sh:name "abstraction level"@en ;
sh:order 1 ;
sh:path scenario:abstractionLevel ],
[ skos:example "2009-06-30T18:30:00+02:00" ;
sh:datatype xsd:dateTime ;
sh:description "Optionally specifies the time associated with the scenario asset (e.g., time of recording or time of event for a synthetic scenario)."@en ;
sh:maxCount 1 ;
sh:message "Validation of timeDate failed!"@en ;
sh:minCount 0 ;
sh:name "time date"@en ;
sh:order 2 ;
sh:path scenario:timeDate ],
[ skos:example "criticality analysis, testing, specific component test (e.g. lateral movement control)"@en ;
sh:datatype xsd:string ;
sh:description "Defines the purpose of the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of aim failed!"@en ;
sh:minCount 0 ;
sh:name "aim"@en ;
sh:order 3 ;
sh:path scenario:aim ],
[ skos:example "GlobalPosition" ;
skos:example "ParameterDeclaration" ;
sh:datatype xsd:string ;
sh:description "Specifies which functions (e.g., actions) from the standard are utilized."@en ;
sh:message "Validation of usedStandardFunctions failed!"@en ;
sh:maxCount 1 ;
sh:minCount 0 ;
sh:name "used functions in the standard"@en ;
sh:order 4 ;
sh:path scenario:usedStandardFunctions ],
[ skos:example "via trajectory, via support points"@en ;
sh:datatype xsd:string ;
sh:description "Indicates the type of movement employed by traffic participants according to the ASAM OpenSCENARIO standard."@en ;
sh:maxCount 1 ;
sh:message "Validation of movementDescription failed!"@en ;
sh:name "movement description"@en ;
sh:order 5 ;
sh:path scenario:movementDescription ],
[ skos:example "stopIfTTCLowerThan" ;
sh:datatype xsd:string ;
sh:description "Defines scenario- or domain-specific commands or actions used in the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of customCommands failed!"@en ;
sh:minCount 0 ;
sh:name "custom commands"@en ;
sh:order 6 ;
sh:path scenario:customCommands ],
[ skos:example "194.01" ;
sh:datatype xsd:float ;
sh:description "Defines the azimuth of the sun in degrees."@en ;
sh:message "Validation of sunAzimuth failed!"@en ;
sh:minCount 0 ;
sh:name "sun azimuth"@en ;
sh:order 10 ;
sh:minInclusive -360 ;
sh:maxInclusive 360 ;
sh:path scenario:sunAzimuth ],
[ skos:example "kangaroo crossing" ;
sh:datatype xsd:string ;
sh:description "Indicates which country-specific traffic signs are used in the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of countrySpecificSign failed!"@en ;
sh:minCount 0 ;
sh:name "country specific sign"@en ;
sh:order 11 ;
sh:path scenario:countrySpecificSign ],
[ skos:example "tuk tuk" ;
sh:datatype xsd:string ;
sh:description "Indicates which country-specific participants are used in the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of countrySpecificTrafficParticipants failed!"@en ;
sh:minCount 0 ;
sh:name "country specific traffic participants"@en ;
sh:order 12 ;
sh:path scenario:countrySpecificTrafficParticipants ],
[ skos:example "germany, not applicable" ;
sh:datatype xsd:string ;
sh:description "Indicates the country of origin for the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of country failed!"@en ;
sh:minCount 0 ;
sh:name "country"@en ;
sh:order 13 ;
sh:path scenario:country ] ;
sh:targetClass scenario:Content .
scenario:QuantityShape a sh:NodeShape ;
sh:closed false;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ skos:example "2" ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:description "Specifies the total number of temporary traffic objects defined in the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of temporaryTrafficObjects failed!"@en ;
sh:name "temporary traffic objects"@en ;
sh:order 1 ;
sh:path scenario:temporaryTrafficObjects ],
[ skos:example "10" ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:description "Specifies the total number of traffic objects defined in the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of numberTrafficObjects failed!"@en ;
sh:name "number traffic objects"@en ;
sh:order 2 ;
sh:path scenario:numberTrafficObjects ],
[ skos:example "myDriver, BestPedestrianController2000" ;
sh:datatype xsd:string ;
sh:description "Specifies the simulation core controllers (internal or external) used in the scenario."@en ;
sh:message "Validation of controllers failed!"@en ;
sh:minCount 0 ;
sh:name "controllers"@en ;
sh:order 3 ;
sh:path scenario:controllers ],
[ skos:example "8" ;
sh:datatype xsd:integer ;
sh:minInclusive 0 ;
sh:description "Specifies the total number of permanent traffic objects defined in the scenario asset."@en ;
sh:maxCount 1 ;
sh:message "Validation of permanentTrafficObjects failed!"@en ;
sh:name "permanent traffic objects"@en ;
sh:order 4 ;
sh:path scenario:permanentTrafficObjects ] ;
sh:targetClass scenario:Quantity .
scenario:QualityShape a sh:NodeShape ;
sh:closed false;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ skos:example "0.1" ;
sh:datatype xsd:float ;
sh:description "Defines the accuracy of moving objects in the scenario asset (only applicable for scenarios based on real measurements)."@en ;
sh:maxCount 1 ;
sh:message "Validation of accuracyObjects failed!"@en ;
sh:minCount 0 ;
sh:name "accuracy objects"@en ;
sh:order 1 ;
sh:path scenario:accuracyObjects ],
[ skos:example "Static sensor calibration performed at <origin> using system XYZ"@en ;
sh:datatype xsd:string ;
sh:description "Describes the calibration steps performed prior to the measurements."@en ;
sh:maxCount 1 ;
sh:message "Validation of calibration failed!"@en ;
sh:minCount 0 ;
sh:name "calibration"@en ;
sh:order 2 ;
sh:path scenario:calibration ] ;
sh:targetClass scenario:Quality .
scenario:DataSourceShape a sh:NodeShape ;
sh:closed false;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ skos:example "Real World Data" ;
sh:description "Specifies the category of source data used to create the scenario."@en ;
sh:maxCount 1 ;
sh:message "Validation of source type failed!"@en ;
sh:in ("Accident Database" "Real World Data" "Analytical Hazard Based Approach" "Formal Verification" "Operational Design Domain" "Ontology" "Standards, Regulations, Guidelines" "Real-world Deployment and Trials") ;
sh:minCount 0 ;
sh:name "source type"@en ;
sh:order 1 ;
sh:path scenario:sourceType ],
[ skos:example "Test drives on proving ground XYZ and system ABC"@en ;
sh:datatype xsd:string ;
sh:description "Provides a detailed description of the source data used."@en ;
sh:maxCount 1 ;
sh:message "Validation of source description failed!"@en ;
sh:minCount 0 ;
sh:name "source description"@en ;
sh:order 2 ;
sh:path scenario:sourceDescription ] ;
sh:targetClass scenario:DataSource .