# A Scenario-Adaptive Driving Behavior Prediction Approach to Urban Autonomous Driving
## Materials and Methods
### Ontology-Based Scenario Description and Reasoning
#### 2.2.1 A Novel Ontological Model for Scenario Description
The _MapEntity_ class has two sub-classes: _AreaEntity_ and _PointEntity_. The former entity represents one area of the road that cannot be simplified by a location point, such as _RoadPart_, _Sidewalk_, _Junction_, _Segment_, and _Lane_. _PointEntity_ indicates the remaining road elements that can be considered a location point, e.g., _TrafficSign_, _LaneMarker_, _StopLine_. The detailed definition of these road entities and the decomposition are shown in Figure 3 (in the figure just one part of the entities are shown with the corresponding identifying number). 2. _ObstacleEntity._ This entity indicates the static and moving obstacles around the target vehicle. _StaticObstacle_, _Pedestrian_, _Vehicle_, _Animal_, _DynamicObstacle_ are included in this entity: \[ObstacleEntity\equiv StaticObstacle\sqcup Pedestrian\sqcup Vehicle\sqcup DynamicObstacle.\] (8)
3. _EgoVehicle._ The ego vehicle entity was defined to express related attributes for the ego vehicle, including _VehicleType_, _EquippedSensors_ (e.g., radar, cameral, etc.) and so on. 4. _Environment._ This entity considers environmental conditions such as _Weather_, _LightingConditions_, and _RoadSurfaceConditions_. These factors can significantly affect driving behaviors [30]. The variables in this entity usually cannot be easily detected by equipped sensors on the car, but can be acquired from on-line forecast systems (like a weather forecast, etc.). Figure 2: Layout of the ontology model to describe the traffic scenario. Attributes were defined to represent locations, area range, and restriction types. Three types of attributes were defined, i.e., _Position_, _Perimeter_, _ConnectionRestriction_. _Position_ and _Perimeter_ represent the GPS location and the scope for _PointEntity_ and _AreaEntity_ correspondingly. The _ConnectionRestriction_ represents the connection directions between different segments. Road elements related object properties were defined to express the semantic relationships between road elements pairs, such as segment to segment, segment to junction, junction to traffic light, etc. All these relationships are represented in Figure 2 and plotted by dash lines. The semantic relationships between different concepts were described by operators, for example,  
\[\left\{ \begin{array}{cl}\mathit{Sidewalk}&\sqsubseteq AreaEntity\sqcap \\ &\exists\mathit{hasSidewalk}.\mathit{Junction}\\ \mathit{TrafficSign}&\sqsubseteq PointEntity\sqcap\\ &\exists\mathit{hasTrafficSign}.\mathit{Segment}\end{array} \right.. \tag{9}\]  
The object properties related to the obstacles are also shown in Figure 2. This study discretizes the direction from the view of the target vehicle (as Figure 4 shows). In this way, their relative position can be described qualitatively by _hasFrontLeftObstacle_, _hasFrontObstacle_, and so on [31]. Data properties are defined to characterize the detailed value of the classes' attributes, such as the distance to the StopLine (_distanceToStopLine_), type of lane (_isLeftMost_), and value of position (_valueOfPosition_). The data type of this property can be _double_, _boolean_, or _string_. In this study, the distance and velocity are discretized (as Figure 4 shows) to achieve a qualitative description. Based on the above definitions, for a given traffic scenario, each entity can be contextualized as one individual. The map-related instances were extracted from the high-resolution digital map [32]  
Figure 4: Qualitative mapping. Figure 3: Schematic figure for road entity decomposition. and assigned an identification number (as Figure 3 shows). Instances of traffic participants were built based on perception data. Figure 5 shows some example instances for the traffic scenario in Figure 3. The data attributes for each individual were assigned, e.g., the velocity of _vehicle2_ is 20 km/h, and the location of _junction2_ is expressed as a rectangle with four GPS coordinates. Relationships between different road entities were determined by their spatial relationships, e.g., sidewalk4 and junction2 have the relationship _hasSidewalk_.