Modules are loosely defined by their corresponding entry in the config file.
They are also sorted in the same sequence (which is done by the machine, not by content).
Note that individual config options are often explained inside the config section of the log file.
Config file modules that just define files/directories are, as a tendency, not explained here.
Maintainers are mentioned as far as possible, but they are not responsible for answering arbitrary service requests.
Marcel Rieser, senozon AG (rieser_at_senozon.com)
www.matsim.org/javadoc/org/matsim/core/controler/package-summary.html
www.matsim.org/javadoc/org/matsim/core/controler/package-summary.html#controler_parameters
Central module to run matsim. Specifies, for example, the number of iterations.
See here for some instructions how to use an external executable as mobsim.
A. Horni, IVT (horni_at_IVT.baug.ethz.ch)
www.matsim.org/javadoc/org/matsim/counts/package-summary.html
www.matsim.org/javadoc/org/matsim/counts/package-summary.html#counts_parameters
MATSim can compare the simulated traffic volumes to traffic counts from the real world. Counts is the module that allows to
There is a feature to re-scale the counts before comparison (for example if you are running the simulations with a 10% sample).
Prepare a file containing the real-world traffic counts. The file, e.g. named counts.xml, must follow the xml-format defined in counts_v1.xsd. An example of such a file can be found in MATSim at examples/equil/counts100.xml.
The file contains the following information:
loc_id. In addition, an optional cs_id can be stored that may, for example, refer to the original id of the counting station (for tracking back the origin of the data).val") for an hour of the day (attribute "h", numbered from 1 to 24; 1 = 00:00-00:59, 2 = 01:00-01:59, etc). It is not necessary that traffic counts are available for all 24 hours of a day.Add the following lines to your configuration file:
<module name="counts"> <param name="inputCountsFile" value="/path/to/counts.xml" /> <param name="outputformat" value="txt,html,kml" /> </module>
The comparison is automatically generated every 10th iteration. Generated output is located in the output-directory of the iteration (usually something like output/ITERS/it.10/).
The counts-module offers the following config-parameters:
<param name="outputformat" value="txt,html,kml" />txt, html and kml. Multiple formats can be specified separated by commas. txt writes simple text-tables containing the values to a file. It is most useful to create custom graphs, e.g. in Excel. html creates a directory containing several html files, allowing to browse the results interactively. kml creates a file to be displayed in Google Earth. This last option only works if the correct coordinate system is set.<param name="countsScaleFactor" value="1.0" /><param name="distanceFilterCenterNode" value="2386" />
<param name="distanceFiler" value="30000.0" />distanceFilter", the unit being the same unit as the length of links (i.e. usually meters).
Evacuation code used by IVT; please note that IVT and VSP use different evacuation codes.
Maintained by C. Dobler.
I (kn) don't know how this works
(Note that VSP and IVT use different evacuation packages.)
G. Lämmel, TU Berlin
http://www.matsim.org/javadoc/org/matsim/evacuation/package-summary.html
http://www.matsim.org/javadoc/org/matsim/evacuation/package-summary.html#evacuation_parameters
I (kn) can't say how this works. There is, at this point, neither documentation nor funding.
Maintainer: Andreas Horni
One may, or may not, use a separate file that contains "facilities" – essentially some kind of land use information.
The prototype for this is fairly old. But the final design is somewhat different, and has not been fully executed. So I (kn) do not know if this can currently be used as a non-developer.
"Maintainer": Marcel Rieser
"Global" information. Arguably should be merged with "controler" section.
Maintainer: Christoph Dobler
An option to read a households file into matsim.
I (kn) don't know the exact status.
Maintainer: Rashid Waraich
JDEQSim (Java Deterministic Event Driven Queue Based Simulation) has the following properties and features:
Insert a new module called 'JDEQSim' into the config XML file. All parameters are optional and have default values (shown below), never the less it could be helpful to know their meaning and physical units.
<module name="JDEQSim"> <param name="endTime" value="00:00:00" /> <param name="flowCapacityFactor" value="1.0" /> <param name="storageCapacityFactor" value="1.0" /> <param name="minimumInFlowCapacity" value="1800" /> <param name="carSize" value="7.5" /> <param name="gapTravelSpeed" value="15.0" /> <param name="squeezeTime" value="1800" /> </module>
The 'endTime' defines the time of the last event of the simulation. If it is set to '00:00:00', no end time is defined and the simulation will stop, when the last event of the simulation has been processed. The (scaling) parameters 'flowCapacityFactor' and 'storageCapacityFactor' can be used as with mobSim and have no unit. The 'minimumInFlowCapacity' defines for all roads the minimum number of cars, which could enter the road per hour, for the congestion less case. The 'carSize' parameter allows to set the size of a car in meters. The 'gapTravelSpeed' parameter defines the speed of gaps in [m/s]. Finally the 'squeezeTime' is used for deadlock prevention and defines, how long a car should wait at maximum for entering the next road before deadlock prevention is turned on (unit: seconds).
The 'minimumInFlowCapacity' is a parameter, which was not published in the C++ DEQSim, but only used interally and was hardcoded to the value 1800 vehicles per hour. This value was estimated from literature assuming that independently from the speed limit of a road the minimum interval between two vehicles is 2 seconds (inverse of 1800 vehicles per hour). This factor does not need to be changed, when the 'flowCapacityFactor' is changed, as the scaling is automatically done internally. The reason for publishing this factor is to make it possible for users to adapt this factor, if they want to use a different minium inflow capacity based on their model estimations.
Requirements for the Plans XML File
Difference between MobSim and JDEQSim
This implementation is based on the micro-simulation described in the following paper:
Charypar, D., K. Nagel and K.W. Axhausen (2007) An event-driven queue-based microsimulation of traffic flow, Transportation Research Record, 2003, 35-40.Order here.
Some Java specific implementation aspects and performance tests of JDEQSim and parallelEventHandling are described in the following paper:
Waraich, R., D. Charypar, M. Balmer and K.W. Axhausen (2009) Performance improvements for large scale traffic simulation in MATSim, paper presented at the 9th Swiss Transport Research Conference, Ascona, September 2009. Download from here.
Maintenance: G. Lämmel, VSP
MATSim provides the opportunity to model time dependent aspects of the network explicitly. For each link in the network basic parameters (i.e. freespeed, number of lanes and flow capacity) can be varied over the time. So it is possible to model accidents or the like. One particular area for this technique is the modeling of evacuation scenarios.
In the case of an evacuation simulation the network has time dependent attributes. For instance, large-scale inundations or conflagrations do not cover all the endangered area at once.
In MATSim this time varying aspects are modeled as network change events. A network change event modifies parameters of links in the network at predefined time steps. The network change events have to be provided in a XML file to MATSim.
A sample network change event XML file could look like:
<?xml version="1.0" encoding="UTF-8"?>
<networkChangeEvents xmlns="http://www.matsim.org/files/dtd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.matsim.org/files/dtd http://www.matsim.org/files/dtd/networkChangeEvents.xsd"> <networkChangeEvent startTime="03:06:00">
<link refId="12487"/>
<link refId="12489"/>
<link refId="12491"/>
<freespeed type="absolute" value="0.0"/>
</networkChangeEvent></networkChangeEvents>
This change event would set the freespeed of the links 12487, 12489, 12491 to 0 m/s at 03:06 am (all values have to be provided in SI units). These values are valid until the next network change event (if there is any) changes the freespeed of link 12487, 12489, 12491 again. In this example the freespeed would be set to an absolute value. It is also possible to take the old freespeed value and multiply it by a factor. For dividing the old freespeed value by 2, the corresponding line of the network change event XML file would look like:
<freespeed type="scaleFactor" value="0.5"/>
Besides changing the freespeed, one could also change the number of lanes:
<lane type="absolute" value="2.0"/>
Or the flow capacity:
<flowCapacity type="absolute" value="0.0"/>
To make use of the network change events one has to define it in the MATSim config file. Therefore the following two lines have to be added in the network section of the config file:<param name="timeVariantNetwork" value="true" />
<param name="inputChangeEventsFile" value="path_to_ change_events_file" />
Now one has just to start the controller with this config file and the network change events will be applied automatically.
Maintainer: Marcel Rieser
This module contains the definitions for the utility function.
Some help for it should be in the tutorials.
There is also some description in the "scoring function" section of the documentation.
Responsible: C. Dobler, IVT
Analysis of performance and structure of (non parallel) QueueSim shows:
The parallel QueueSim is based on the existing QueueSim and can be used by just adding a new parameter to a scenario configuration file (see below).
First performance measurements show promising results.
Working paper will be published in Q2 2010.

The config option presumably is:
<module name="qsim"> ... <param name="numberOfThreads" value="5"/> </module>
Any number of threads larger than one triggers the use of the parallel version. (??)
If you do not put a "qsim" section into the config file, the system will use the default "simulation" (look there).
"qsim" is what we use for new features such as public transit or signalsystems. "New features" implies "unstable". Use only if you have to.
Also see www.matsim.org/javadoc/org/matsim/ptproject/qsim/package-summary.html
The (exit) flow capacity of a link is:
capacity_value_of_link / capacity_period_of network * flow_capacity_factor
where
The storage capacity of a link is:
(length_of_link * number_of_lanes_of_link / effective_cell_size) * storage_capacity_factor
where
This is most useful if you have something else than cars, for example pedestrians. Let us assume an effective lane with of 0.4m and an effective cell size also of 0.4m. This would lead to a maximum density of 0.4*0.4=0.16persons/m^2, not totally unrealistic.
If, now, a link has an area of 200m^2 and a length of 50m, then it would obtain
number_of_lanes = area / length / effective_lane_width = 200 / 50 / 0.4 = 10
Note that, in the end, the lane width is not used by the dynamics; all the meaning is subsumed in the number of lanes. The storage capacity comes out as
storage_capacity = number_of_lanes * length / effective_cell_size
in the above example
= 10 * 50 / 0.4 = 1250 .
This is, naturally, the same as dividing the 200m^2 of the link by the 0.16persons/m^2.
The effective lane width might be used by the visualization (unclear if this is the case).
Maintainer: Michael Zilske
The roadpricing module provides functionality to simulate different road-pricing scenarios in MATSim.
Documentation can be found at:
Publications using this module:
Maintainer: Dominik Grether
The signal systems module provides functionality to simulate traffic lights with MATSim. It is recommended to use a nightly build that is younger than 04-19-2011, i.e. revision 15081.
The starting point of the documentation is
Note that there are links to continuative documentation at the bottom of the package-summary.html www page.
Nightly builds younger than 04-21-2011 contain a tutorial that shows you how to set up a traffic light scenario. The network and traffic light configuration of the turorial is shown in the slides attached to this page. The network and code can be found in the folder tutorial/unsupported/example90TrafficLights in the nightly build. The code examples are divided into several classes:
Publications using this module:
This was essentially the production of the queue simulation until Nov/2010. The "qsim" was then forked out for further development. Unfortunately, this fork was done somewhat too late, so "simulation" is not exactly the stable version that was used over many years, but something that is already somewhat modified, and was not used very much after that. (Please let us know if you have problems.)
Note that you will get a "simulation" section in the log file even if you have selected a different mobsim (such as qsim or jdqsim).
There used to be an option to start an external mobsim. This still seems to be there but the syntax is a bit awkward:
<module name="controler" > ... <param name="mobsim" value="null" /> </module> <module name="simulation" > <param name="externalExe" value="<path-to-executable>" /> </module>
I.e. you need to specify that you are not using the (queue)Simulation, but then set a parameter inside the (queue)Simulation config block.
A public transport system is simulated and integrated on a fine scale with both the traffic simulation and the behavior of the artificial population.
Agents who use transit determine a route to their destination based on the transit schedule. Transit vehicles are moved on the road network in accordance with the traffic flow model, i.e. they may get stuck in congestion and fail to keep their schedule. Agents getting on and off transit vehicles cause realistic delays.
A transport mode decision model is implemented which allows agents to switch their choice of driving a car or using transit based on the relative utility of the two modes. The disutility of travel time, which this model takes into account, is based on actual travel times taken from the simulation.
See the tutorial. This requires quite some additional input.
M. Rieser, K. Nagel; Combined agent-based simulation of private car traffic and transit; IATBR 2009
Maintainer: Marcel Rieser ("core")
"router" and "travelTimeCalculator" are separate in matsim, so that they can be configured separately. They refer to each other, though.
Maintainer: Michael Zilske (within limits of DFG/MUC project; possibly pt project)
This section defines switches that are used at VSP or when collaborating with VSP. There are experimental and may we withdrawn without notice.
I (kn) am in the process of defining some defaults that everybody at VSP should be using. These can be switched on by:
<module name="vspExperimental" > <param name="vspDefaultsCheckingLevel" value="abort" /> ... </module>
This will make the code abort when these defaults are violated.
The number of vsp defaults will grow over time. This may have the effect that some config file that used to be working for you in the past may not work any more after an svn update. I will try to communicate such changes, but will sometimes fail to do so. In any case, if you encounter an abort because of a vsp defaults violation, please
If you think that you cannot live with these settings, please talk to me.
Since those settings involve all aspects of matsim, they may often be irrelevant to you. Please set them anyways.
Maintainer: Christoph Dobler
There is no "withinday" section in the config file, so there shouldn't be an entry here. It is here for historical reasons. Instead look here (note that this is in the "developer" section of the documentation, i.e. if you are not in the sourceforge playground, you will not get code that is stable from one matsim build to the next).
Dismantler: Michael Zilske
This was an attempt to integrate GIS functionality into matsim.
Has been superceeded by calls to geotools. Please use geotools functionality. Look under the demand generation tutorials for getting some ideas.
World also provides datastructures to assign facilities to links, and links to zones, etc. This functionality is mostly used in initial demand modelling, but is not very straight-forwardly implemented. Should be replaced in the future with some kind of "mappig manager" to manage the mappings between different MATSim objects, like facilities, links, etc.