Information on the
mixed traffic flow simulation
This is an interactive simulation of the fully two-dimensional model
which is fully
documented in following reference:
At present, only landscape-like viewports are supported, so the
width of the simulation screen should be greater than the height (3:2
works well).
The simulation starts with little traffic on a homogeneous road (the
U-bend is only there in order to display a longer road segment) with a
small downstream bottleneck realized by a road narrowing.
There
are two insert diagrams: a speed-density box-whisker plot at the top,
and a
flow-density scatter plot at the bottom. After each aggregation
interval (presently, set to 3 s), an additional box-whisker element and
data point is added to each plot, respectively. The plots give the
global picture over the whole simulation area, i.e., the
flow-densitry data approximate a macroscopic fundamental diagram and
the boxes of the speed-density plot are longest for phase-segregated
traffic, i.e., jammed in one portion and free in another.
Furthermore, there
are three possibilities for interaction: The sliders, the buttons to
the right, and loading a custom initial configuration
The sliders
- Timewarp controls the time-lapse factor simulated time
progression vs. real time progression
- Inflow controls the traffic demand
- MaxOutflow installs a bottleneck at the outflow and thus
controls the maximum outflow. By controlling the Inflow and Max
Outflow sliders, a complete simulated flow-density scatter plot can be
created in the lower right insert diagram:
- The free branch is
controlled by the inflow with MaxOutflow set to 100%
- The congested branch is controlled by MaxOutflow with
the Inflow set to the maximum
- The sliders FracTruck and FracBike control the
traffic composition of the respective vehicle types with the
remaining percentage (if any) consisting of
cars
- The last four sliders control selected model parameters,
see the paper:
- τlat,OVM is the time constant for the
lateral Optimal Velocity Model (see Chapter 10 of
Traffic Flow Dynamics for the normal OVM)
controlling the lateral
motion. The lower τlat,OVM, the faster
lateral movements are adapted to the desired ones (which are
often zero)
- sensdvy is a new experimental parameter
introducing relative speeds to the OVM-like lateral
dynamics. This avoids lateral crashes for
larger τlat,OVM values (approx > 1
s). For simulating the original model
in the paper,
set sensdvy=0.
- The pushlat factor p determines to
which extent
back vehicles are taken into account when moving
laterally. For pushlat=0,
the followers are exclusively
responsible for avoiding crashs and the leaders do not look
behind (not yet in the paper). For pushlat=1, the
followers "push" the leaders aside to the same amount as
the leaders the followers (actio=reactio)
For simulating the original model
in the paper,
set pushlat=0.
- The pushlong factor p acts similarly
for the longitudinal dynamics. For pushlong=0,
we have car-following, and for pushlong=1
pure actio=reactio. Notice that, as in the backwards
longitudinal interaction from the leader, only the
follower with the strongest forward interaction is selected.
Notice that there is no longer a "normal" fundamental diagram
for pushlong=1 and, instead, the flow
increases always with the density.
Increasing pushlong increases the capacity. For
simulating the original model
in the paper,
set pushlong=0.
The buttons/switch areas
- The Display Forces toggle indicates, if on,
the actual acceleration vector
for each vehicle by an arrow (the simulation needs to be running
to see the effect of this button)
- The Var. Width Left and Var. Width Right
toggles introduce bottlenecks as predefined road narrowings at the right and
left sides,
respectively. Activating both bottlenecks simultaneously takes the model to its limits
- If the Floor Field toggle is on, lane-based traffic is
simulated. This is introduced into the mixed traffic flow model by
adding a floor field producing lateral forces whenever a car or a
truck is not at the center of one of the five lanes. The bike
drivers, however, drive just between the lanes. Since they are
sufficiently wide, bike drivers can overtake and be
overtaken.
- Notice how the vehicles spontaneously order when
switching this toggle on
- destroying the lanes by switching the floor
field off may lead to more effective mixed flow in congested
conditions, particularly in the presence of congestions/stronger bottlenecks
(create congestion by increasing the inflow, switching on Var Width
Left or Right, or
reducing MaxOutflow)
-
Notice that the floor field a.k.a lanes is only sensible if there
are no significant road narrowings. Otherwise, the vehicles may
leave the road...
Custom initial conditions (micro ICs)
The simulation can be customized by prescribing arbitrary microscopic initial
conditions and road-blocking bottlenecks as specified in text
files
prescribing the type, initial longitudinal and lateral position
(u,v), and initial velocity
(speedLong,speedLat) of any
object. Pressing the button "IC from file" opens a file selector for
user-supplied files. Once selecting one, the simulation is cleared and
re-run with
the user-supplied vehicle configuration (the geometric bottlenecks are retained from the previous setting). The
file format is as follows:
# type length width u v speedLong speedLat
car 5.0 2.0 20 3 15 0
truck 10.0 3.0 20 -3 15 0
bike 2.0 1.0 40 -3 5 1
obstacle 80 2 300 9.5 0 0
... ... ... ... ... ... ...
Examples can be downloaded
at
the
GitHub
link or from the links further below. Besides the three moving types
car,
truck,
and
bike, there is also a
type
obstacle which can be used to implement various road-blocking
bottlenecks.
Micro ICs are useful when analyzing certain model aspects with
reproducible scenarios. For this reason, I also seed the random number
generator when a new
IC file is loaded. This is necessary because a certain acceleration noise is added
to resolve stalemates in the traffic flow (see file
IC_resolveStalemate.txt below). When using micro ICs, it is best to set the inflow to
zero because otherwise new incoming vehicles may disturb the
analysis/experiments. With zero inflow, there are also no further stochastic
elements in the simulation in addition to the
acceleration noise. Notice that the simulation is cleared from all
past vehicles and past obstacles and bottlenecks when a new
IC file is loaded but the other slider settings are unchanged.
As examples and templates for further modification, you
can download several template initial
configurations.
Hint: The filename indicates that the configurations work
as intended for a road width of 3.5 m times the given number of lanes.
furthermore, you should deactivate the "Var width*" geometry
settings and set the inflow to zero because, otherwise, the additional
inflow vehicles will interfere. You can also try if a given
configuration works better with lanes (floorfield on) or without)
- A car
navigating through a big obstacle parcours. The obstacles are
virtual standing vehicles
- A car and a bike
overtaking some slower trucks in the middle. This is more effective
with lanes since, otherwise, the space between the trucks is quite
narrow. Without lanes, it is only possible if the lateral pushing
factor is
above about pushlat=0.3 since, otherwise, the
trucks in front do
not care and the initial space is too low. Also with lanes, lateral
pushing helps. Can also be done with a width of 10.5 m (3 lanes)
- A very strong road narrowing down to one
lane. Some cooperation is necessary so that everyone can pass the
bottleneck. This brings the model to its limits since no explicit
cooperation is built into the drivers, so quite a chaos
occurs. Best (i.e., shortest time for all vehicles traversing the
simulation) is with lanes and longitudinal and lateral pushing activated
- This
visualizes the amount of stochasticity (in form of acceleration
noise) that is built into the simulator because, without noise,
the two pairs should drive exactly in parallel. Obviously, very
little noise is needed to resolve stalemates
- Here, the
pushing effect should resolve the stalemate, so, finally, the car
can overtake. For some reason, this does not yet work
- Two cars
symmetrically behind a symmetrical 3-to-1 lane drop
- An obstacle
parcours. You can also add some external inflow and look what happens
- A car and a truck just touching
each other while driving at the beginning. How will the situation be
resolved? For this, it is useful to set the timewarp to very low
values before loading the file.