Simulation/Safety
Contents
Collisions
SUMO tracks gaps between vehicles that are on the same edge either fully or partially. By default, whenever these gaps are reduced to below a vehicles minGap a collision is registered. Currently, this threshold is fixed to the vehicles minGap value (default 2.5m). This (potentially) surprising behavior is used to detect issues with the car-following models that are supposed to never reduce the gap below the minGap. The threshold will likely be made configurable in the future (ticket1102.
When setting the option --collisions.check-junctions, collisions between vehicles on the same intersection are also checked by detecting overlap of the vehicles shapes.Junction collisions are never registered on junctions of type unregulated.
The consequence of a collision is configured using the option --collision.action using one of the following keywords:
- teleport: (the default): the follower vehicle is moved (teleported) to the next edge on its route
- warn: a warning is issued
- none: no action is take
- remove: both vehicles are removed from the simulation
Additionally there is the possibility of stopping vehicles for a fixed time before the collision action takes place. This allows for pile-ups and traffic disturbance. To enable stopping, the option --collision.stoptime <TIME> must be set with the stopping time in seconds.
The pedestrian model striping detects collisions between pedestrians. This only serves to detect issues with the model.
Deliberately causing collisions
To force collisions at a set time, TraCI must be used. Besides setting the speed, it is also necessary to disable safety checks using the commands speedMode and laneChangeMode.
To create rear-end collisions with some probability one can configure vehicles with a value of tau that is lower than the simulation step size (default 1s) and use the default Krauss model.
Collisions at intersections may be caused by any of the following:
- yellow phases which are too short in relation to the vehicle speed (giving insufficient time to come to a stop). By default this causes strong braking (Warning: emergency braking) potentially followed by rear-end collisions
- Green phases that allow conflicting streams to drive at the same time. Collision beyond the intersection due to this are always detected but collisions on the intersection are only registered when setting the option --collision.check-junctions.
- Double connections from a traffic-light-controlled edge: If two lanes from the same edge with the same target lane get the green light at the same time, collisions are likely
- If all Double connections at an edge are configured with pass="true"
- If connections from the minor road of a priority junction are configured with pass="true"
To simulate the effects of an accident see FAQ#How_to_simulate_an_accident.
Simulation of unsafe behavior is a developing subject. Expect model additions and extensions. The following vehicle type parameters are safety related:
car-following model
- speedFactor: higher value causes speeding (driving above the speed limit)
- accel, decel: higher values lead to abrupt speed changes
- tau: lower values lead to reduced gaps to the leader vehicle. When setting tau lower than the simulation --step-length parameter (default 1s), collisions may occur
- emergencyDecel: this is the maximum deceleration a vehicle can take to avoid an accident. By default this takes the same value as decel
- apparentDecel: this is the deceleration value that will be assumed by other vehicles of the configured vehicle. By default this takes the same value as decel
Lane-Changing Model
- lcCooperative: lower values cause less cooperation during lane changing
- lcSpeedGain: higher values cause more overtaking for speed
- lcKeepRight: lower values cause less driving on the right
- lcPushy: setting this to values between 0 and 1 causes aggressive lateral encroachment (only when using the Sublane Model)
- lcAssertive: setting this to values between 0 and 1 cause acceptance of smaller longitudinal gaps in proportion to driver impatience(only when using the Sublane Model)
Junction Model
There are further parameters which affect safety-related junction behavior. For a description see Definition_of_Vehicles,_Vehicle_Types,_and_Routes#Junction_Model_Parameters.
- impatience: higher values lead to acceptance of smaller time gaps at intersections. These are still safe in the sense of collision avoidance.
- jmCrossingGap
- jmDriveAfterRedTime
- jmDriveRedSpeed
Safety-Related Outputs
- The Instant Induction Loop output records the gap attribute which gives the time gap between successive vehicles with sub-second precision.
- The Lanechange output generates a record of all lane-changes that take place in the simulation. It includes the longitudinal gap to the leader and follower vehicle on the target lane (both the actual gap and the one that would have been required to ensure stringent deceleration bounds under all circumstances). When using the sublane model, the attribute latGap records the lateral gap to the neighboring vehicle in the direction of the change if such a vehicle exists.