MATSim Extensions

Archive Website

Please note that this website (archive.matsim.org) is no longer maintained and is only available for looking up older information. You find up-to-date information about MATSim at www.matsim.org.

Introduction

The default MATSim releases contain all the functionality typically used to model agent behavior and simulate traffic. But sometimes, this just is not enough. The MATSim Extensions provide additional functionality for specific tasks, and can be used along MATSim. MATSim Extensions gives an overview of the currently available extensions. Please note that these extensions are usually provided and maintained by single persons from the community, and thus long-term support may vary from the default MATSim release.

Downloading Extensions

All extensions come as a compressed zip-file. You can either download the last stable release of an extension to be used together with the stable release of MATSim, or you can download a so-called "nightly build"—an automatically created, but untested and probably unstable version of the extension.

  • You can download the stable releases of extensions from SourceForge.
  • Likely unstable nightly builds can be downloaded from our nightly builds directory.
  • Make sure to also download MATSim itself. The extensions cannot be used without MATSim.

Using Extensions on the Command Line

Once you've downloaded an extension and MATSim, unzip the extension and place the extension's directory inside the MATSim directory, next to the libs directory. The file/directory structure should look similar to the following example:

matsim/
+ MATSim.jar
+ libs/
| + <lots of .jar files>
+ extension1/
| + extension1.jar
+extension2/
| + extension2.jar
| + libs/       <-- not all extensions contain additional libs
| | + <one or more .jar files>

Then, start your simulation with the extension.jar-file on the classpath along the MATSim jar-file, e.g:

java -Xmx512m -cp MATSim.jar:extension1/extension1.jar:extension2/extension2.jar org.matsim.run.Controler myConfig.xml

On Windows, use ; instead of : to separate the different jar-files.

Using Extensions in Eclipse

Unzip the downloaded extension and place the extension's directory in your eclipse project. Then, add the extension's jar-file to the Java Build Path in Eclipse's Project Settings.

Starting from Maven

Still a bit crazy feels the following variant:
mvn -f ~/git/matsim/pom.xml --projects playgrounds/kai/ --also-make install -DskipTests
mvn -f ~/git/matsim/playgrounds/kai/pom.xml exec:java -Dexec.mainClass="playground.kai.otfvis.TransitControler" -Dexec.args="config.xml"
The first line uses our "global" pom to install playgrounds/kai plus all necessary dependencies (that is what the --also-make means). The second line then starts a specific main in my playground. This is a rather slow variant, but it has the advantage that it automatically pulls new versions of everything.

Documentation about Specific Extensions

Extensions are developed and documented by their maintainers. Not all extensions are listed below; see the list of available extensions for their description and documentation.