Vehicle routing

From Traffic Manager: President Edition
Jump to navigation Jump to search


Traffic Manager: President Edition implements a custom lane routing algorithmin order to provide

  1. more realistic lane changing patterns at road junctions & transitions (see Junction & transition routing),
  2. finer-grained control over permitted lane changes at junctions and on regular road segments (see Change lane arrows and Lane connector),
  3. a stricter set of lane merging and splitting rules targeting highway interchanges (see Highway rules),
  4. improvements regarding overall road utilization and congestion avoidance (see Advanced Vehicle AI), and
  5. a feature that enables vehicles to adapt their behavior in accordance to the current traffic situation in realtime (see Dynamic Lane Selection).

While modified junction routing rules (currently) take effect as soon as TM:PE is being activated all latter features can selectively be enabled or disabled by the player at any time.

Associated features

Feature timeline

The feature timeline of TM:PE. Though all features affect the overall game experience they perform their work at different instants of time.

As you may see in the image, the different lane selection features operate at different instants of time.

One-time calculations

The functions

modify vehicle routing decisions as soon as the structure of the road network changes (e.g. when the player builds or upgrades roads) or when the player interacts with TM:PE's tools (e.g. by setting up lane arrows). As long as the network structure does not change and the player does not interact with TM:PE, previous routing decisions made by these features are persisted for later reuse.

During path-finding

Since the modified path-finding algorithm (and thus also the Advanced Vehicle AI) is incorporated into the base path-finding algorithm it affects vehicle behavior at the time when a route to a destination is being queried by any agent (e.g. citizen, vehicle) in the game. Depending on the number of active agents requiring a new path, up to several hundred path-finding requests are being dispatched within each second.

During main simulation

The Dynamic Lane Selection (DLS) feature enables real-time routing adaptions, that means it operates alongside with the agent simulation. Every moving vehicle that uses DLS to optimize its route performs one DLS execution per traversed road segment.

Cross-cutting features

Three of the four available junction restrictions affect vehicle routing at different moments:

  • The Vehicles going straight on may change lanes at junctions policy modifies routing information as soon as the player (de)selects the feature in the Options dialog or sets it for individual junctions.
  • Both the Enable/Disable crosswalks feature and the Vehicles may do u-turns at junctions setting affect routing decisions at path-finding time.
  • The Vehicles may enter blocked junctions restriction does not have any impact on lane selection.

See also