Skip to content

Implementation Details

dominicparga edited this page Jun 26, 2018 · 8 revisions

This section is intended to inform developers and interested parties about implementation details. It is not finished yet, but it is growing.

Nagel-Schreckenberg-Model

The simulation bases on the Nagel-Schreckenberg-Model. The basic model describes a cellular automaton, where the streets are divided into cells of length 7.5 m. If one time step is defined as one second, the discrete velocities for vehicles are more or less the same as the allowed velocities in real traffic:

  • 1 cps = 27 km/h
  • 2 cps = 54 km/h
  • 3 cps = 81 km/h
  • 4 cps = 108 km/h
  • 5 cps = 135 km/h

For this simulation, the basic model is expanded by crossing logic, multilane logic and individual driver behaviour. Details can be found in the linked papers.

Serialization

The serialization of our graph and routes has finished. This happens deterministically according to our test cases. Maybe, the serialized file type changes a little due to style improvements.

Critical Zone at crossroads

It is possible that two vehicles wait for each other at the end of a road. To prevent this, a critical zone has been introduced directly in front of a crossroad. The implementation guarantees no deadlocks because only certain vehicles enter the critical zone.

Only lane changes lead the vehicles to wait for each other on the same road. Hence vehicles, which are already driving on the correct lane, will leave the critical zone without trouble. They are allowed to enter the zone in every case. Vehicles, which still have to change their lane before crossing the crossroad, are only allowed to enter the critical zone if (1) it is empty. Without further criterion, the deadlock would still exist just one cell in front of the critical zone. Thus (2) a vehicle is also allowed to enter the critical zone if it is the outermost vehicle on this road (containing >= 1 lanes).

Traffic Jam Inversion

Traffic Jam Inversion means that vehicles tend to overtake and thus, the inner lanes of a road are getting fuller (-> smaller velocity) than outer lanes.

The used traffic model extends the NaSch-model by letting vehicles decide to overtake after accelerating.

In the decision process, the current velocity of the front vehicle is checked for zero. After accelerating, the velocity is not zero. Hence a vehicle has to check whether the velocity of the previous step was zero.