Database
markdown LimSim stores all data in the database during simulation to facilitate analysis and evaluation of simulation. LimSim uses a lightweight open-source database SQLite for data storage, which makes it easy to view and migrate data. The storage of simulation data in LimSim is mainly divided into three parts: road network data, vehicle data, and simulation data, which are introduced below.
Road Network Data¶
Based on the SUMO road network, LimSim models multiple types of road network structures. The following tables record road network data. When replaying data, the road network is reconstructed based on the following data.
edgeINFO¶
Field | Data Type | Description |
---|---|---|
id |
TEXT PRIMARY KEY | ID of edge |
laneNumber |
INT | Number of lanes on edge |
from_junction |
TEXT | ID of starting junction of edge |
to_junction |
TEXT | ID of ending junction of edge |
laneINFO¶
Field | Data Type | Description |
---|---|---|
id |
TEXT PRIMARY KEY | ID of lane |
rawShape |
TEXT | Geometric structure of lane centerline |
width |
REAL | Width of lane |
maxSpeed |
REAL | Maximum speed of lane |
edgeID |
TEXT | ID of edge to which lane belongs |
length |
REAL | Length of lane |
The rawShape
of a lane is stored as a string in the database, separated by spaces and commas, respectively. For example, the following rawShape
records three points, which are (10.2, 100.3)
, (14.3, 15.4)
, and (13.4, 12.6)
.
junctionLaneINFO¶
In the SUMO road network, there are two types of lanes, one is generated by the user with a specific name. The other is a lane automatically generated by SUMO to connect the first type of lane. These lanes have the property of internal
. Here for convenience, we define the second type of lane as the junctionLane. The junctionLane always connects two lanes, and some junctionLanes also have the property of traffic signals.
Field | Data Type | Description |
---|---|---|
id |
TEXT PRIMARY KEY | ID of junctionLane |
width |
REAL | Width of junctionLane |
maxSpeed |
REAL | Maximum speed of junctionLane |
length |
REAL | Length of junctionLane |
tlLogicID |
TEXT | ID of traffic signal control logic to which junctionLane belongs |
tlIndex |
INT | Number in the traffic signal control logic to which the junctionLane belongs |
connectionINFO¶
As mentioned earlier, two lanes are connected by a junctionLane, and the connection records this connection relationship.
Field | Data Type | Description |
---|---|---|
fromLane |
TEXT | ID of starting lane |
toLane |
TEXT | ID of ending lane |
direction |
TEXT | Direction, refer to XXXX |
via |
TEXT | ID of junctionLane that connects the two lanes together |
junctionINFO¶
Field | Data Type | Description |
---|---|---|
id |
TEXT PRIMARY KEY | ID of junction |
rawShape |
TEXT | Geometric structure of junction |
Like the rawShape
of a lane, the rawShape
of a junction is also recorded as a string in the database, separated by spaces and commas, respectively. But the rawShape
of the junction records the outer contour of the junction.
tlLogicINFO¶
Field | Data Type | Description |
---|---|---|
id |
TEXT PRIMARY KEY | ID of traffic signal control logic, also corresponding to junction ID |
tlType |
TEXT | Type of traffic signal control logic, divided into static , actuated , and delay_based |
preDefPhases |
TEXT | Phases and order of traffic signal control logic, refer to XXX |
trafficLightStates¶
Field | Data Type | Description |
---|---|---|
frame |
INT | Current simulation time |
id |
TEXT | ID of traffic signal control logic |
currPhase |
TEXT | Current phase |
nextPhase |
TEXT | Next phase |
switchTime |
REAL | Remaining duration of current phase |
Vehicle Information¶
Vehicle information is divided into two types: inherent attributes of vehicles and real-time status during simulation.
vehicleINFO¶
Field | Data Type | Description |
---|---|---|
vid |
INT | ID of vehicle |
length |
REAL | Length of vehicle |
width |
REAL | Width of vehicle |
maxAccel |
REAL | Maximum acceleration of vehicle |
maxDecel |
REAL | Maximum deceleration rate of vehicle |
maxSpeed |
REAL | Maximum speed of vehicle |
vTypeID |
TEXT | ID of vehicle model |
routes |
TEXT | Route information for the vehicle |
frameINFO¶
Field | Data Type | Description |
---|---|---|
frame |
INT | Current simulation time |
vid |
INT | ID of vehicle |
vtag |
TEXT | Role of vehicle, can be ego , AoI , or outOfAoI |
x |
REAL | X position of vehicle at this moment |
y |
REAL | Y position of vehicle at this moment |
yaw |
REAL | Yaw angle of vehicle at this moment, with x-axis as a starting point and counterclockwise as a positive direction |
speed |
REAL | Speed of vehicle at this moment |
accel |
REAL | Acceleration of vehicle at this moment |
laneID |
TEXT | ID of lane in which the vehicle is located |
lanePos |
REAL | Distance from the starting point of the lane to the vehicle at this moment |
routeIdx |
INT | The number of the current section of the |
Values processed
The above indicators have been normalized and are not real values. For more information, please refer to Scenario Evaluation.
-
TTC(Time To Collision): refers to how long it will take for two vehicles to collide while they maintain their current speed. ↩