cartools: Tools for understanding highway performance.

Paul J. Ossenbruggen


This cartools package is created and designed to be used by transportation engineers, operators and managers.

Basic principles of traffic flow theory are used. Emphasis is placed on:

The cartools Package

A principal aim of the cartools package is to understand how a roadway system works. The key question is:

A roadway can operate normally on one day and on the next day, be congested. Obviously, traffic conditions change from day-to-day, They also change on a finer time-scale from second-to-second. In cartools, we treat these uncertainties or chance events with probability.

The trick is to identity those factors that can reliably predict a traffic breakdown event, an event when the average speed will falls below some pre-defined level.

The list of factors that explains a traffic breakdown event is long. Consider one of these factors, driver behavior. Drivers are described as safe, aggressive (speeders, tailgaters), reckless (text while driving), inattentive and so on. We will see that under ideal conditions, drivers, who are determined to maintain a specified speed, are unable to do so. Human frailty is part of the driver behavior mix.

Obviously, solving the traffic breakdown puzzle requires a comprehensive knowledge of the individual elements of the driver behavior mix and those factors that influence driver behavior and traffic demand: traffic management, law enforcement, roadway design, monetary (out-of-pocket) and human costs (crash risk), transport mode competition and technology.

In cartools, the strategy is to break this puzzle into more manageable parts, explore each part, and then reassemble the parts in a meaningful way. Fundamental principles of transportation, probability, statistics and visual imagery, graphics, are the principle means of exploring a part or an assembly of parts with cartools. Real-world problems are used to demonstrate the strategy.

The cartools Website

The primary aim of cartools is to enhance learning and to come closer to solving the traffic breakdown puzzle. The cartools website,, has been prepared to aid the learning process. Its principle function is to show how the cartools strategy works. Topics are introduced in a step-by-step manner. The following is a list of currently available website menu items:

  1. Drivers: Self Optimizers. Meeting the challenges.

  2. Noise: Traffic noise or volatility. Exploratory data analysis of a congested freeway bottleneck.

  3. Ring-Road: Driver behavior and safety. A “controlled” car-following experiment on a single lane road.

  4. Bottleneck: Stochastic modeling. Traffic merging at a bottleneck where two-lanes combine to form one lane.

  5. Breakdown: Highway performance. Traffic breakdown and queue formation at a bottleneck.

  6. Capacity: Highway performance. Measuring performance as a capacity.

  7. Smart Mobility: Intelligent Transportation Systems. Moving forward with innovative technology.

  8. Summary: cartools package highlights.

An Open-Source Project

Users are encouraged to freely use any of the material used to create this package. The raw code can be accessed by clinking on the following GitHub repositories:

  1. A repository containing all the cartools functions and data used for analysis.

  2. A repository containing the R code for creating the cartools website with GitHub Pages.

People familiar with R and RStudio may download, use and share this material as they see fit. Feedback is welcomed.