Skip to topic | Skip to bottom

Arthur.TraFlowPACKr1.6 - 13 Apr 2007 - 15:52 - ArthurVanDamtopic end

Start of topic | Skip to actions


Solution plot
Solution plot

mesh dynamics plot
mesh dynamics plot

traffix trajectories plot
traffic trajectories plot

TraFlowPACK is a matlab implementation of a moving-mesh finite-volume solver for nonlinear systems of hyperbolic PDEs

Hyperbolic PDE formula

History and Future

TraFlowPACK was developed as part of my MSc graduation project in 2002. No updates were released since, but the solver component is likely to be improved, as part of the PhD project started in 2004. No short term improvements to the TraFlow component should be expected.


  • Core is standalone moving-mesh finite volume solver for nonlinear systems of hyperbolic PDEs. A separate layer for traffic flow simulations is available on top.
  • Automated grid-adaptivity using a smart monitor
  • Automated time-adaptivity using light-weight CFL condition
  • save simulation results, and retrieve them later to look back at your computed solution again.
  • various visualizations

Detailed Info

TraFlowPACK was developed as part of a graduation project. It turned out to be a quite handy tool, so now it is released to the public under the GNU General Public License (GPL).

There are two parts:

  • mmfvpdes : The actual, purely mathematical moving-mesh finite volume solver. Is fully functional stand-alone, and has proven to handle other PDE systems very well, e.g. MHD systems.
  • traflow : Small `shell' on top of mmfvpdes that allows more intuititive specification of macroscopic traffic flow models.

Macroscopic traffic flow models

Macroscopic traffic flow models describe traffic as a continuous traffic flow in terms of aggregate variables like density and average velocity. To maintain a realistic description of traffic flow, many macroscopic models have been proposed in the past (for example by Kerner, Helbing and Hoogendoorn) and many are still being improved or newly invented.

TraFlowPACK is a macroscopic traffic flow simulation package in MATLAB


Macroscopic models are generally solved by computer simulation. TraFlowPACK does this, but is flexible to use for many different macroscopic models. The actual simulator, TraFlow, needs the user to specify the model equations, settings for roadway lanes and userclasses, and the roadlength and initial traffic distribution.

Moving Mesh solver

The real work, behind the simulator, is done by a mathematical solver for partial differential equations. It uses a finite volume approach, in combination with moving mesh techniques. Moving meshes concentrate meshpoints in a discretized domain in regions of higher importance, for example where the traffic density changes rapidly (at the tail of a traffic jam). In regions of low detail (i.e. a fairly constant traffic density and flow), no very fine discretization is needed, so much less meshpoints are placed in regions of that kind.

This way, the overall level of accuracy is increased, without too much increase in computing time.

The solver is not specifically aimed at traffic flow models in any way, so other models can be solved by this standalone solver as well. As long as the governing equations are in the beforementioned form:

Hyperbolic PDE formula
the solver can handle the problem.


To present the simulation results in an intuitive way to the user, some visualization routines are included in TraFlowPACK. The images below show some examples of 2D visualization:
Moving mesh 2D plots


3D plot of congestion (traffic jam)

And finally, a traffic flow specific plot: trajectories and the underlying flow:

Time trajectory + density plot of traffic flow

A real-life visualization in a movie of traffic flow through time:

Frame from a traffic flow movie

Input-/Output possibilities

To retrieve simulation results at a later time, simulation results can automatically be stored in a file and retrieved from it.

Download and Documentation

Component Date Download Type Size
TraFlowPACK 1.02 sources October 2, 2002 traflowpack-1.02.tar.gz 46kB
TraFlowPACK 1.0 reference June 19, 2002 traflowpack-doc-1.0.pdf 1.1MB

Installation and Getting Started

  1. Download the source tar.gz
  2. Unpack it in its preferred location (tar zxvf traflowpack-1.02.tar.gz)
  3. Change to the created directory traflowpack
  4. Start matlab
  5. At the matlab prompt, type: addpaths
  6. You're ready to run, type help traflowpack and use the documentation PDF.

to top

Arthur.TraFlowPACK r1.6 - 13 Apr 2007 - 15:52 - ArthurVanDam
Revisions: | r1.6 | > | r1.5 | > | r1.4 | Total page history

You are here: Arthur > Research > TraFlowPACK