We provide nightly builds of MATSim for download. These builds are are not official releases of MATSim, but are automatically created each night after the code has passed some tests to ensure a certain minimal quality standard. The nightly builds of MATSim require additional libraries to run, which are also provided for download in a separate package, as they do not change that often.
Initial setup to use a MATSim nightly build
Using a nightly build of MATSim is as simple as following these 3 steps:
- Download the current MATSim jar-file (
- Download the current collection of required 3rd-party libraries into the same directory as the MATSim jar-file (
- Unzip the collection of 3rd-party libraries, you should then get a directory
libswith several jar-files inside.
Now you can run MATSim by specifying the jar-file as classpath, e.g.:
java -cp MATSim_r####.jar org.matsim.run.Controler
If the directory
libs is in the same directory as the MATSim jar-file, the libraries are found automatically and must not be added to the classpath manually.
Updating to a newer MATSim nightly build
If you are already using a nightly build of MATSim, it is in most cases sufficient to just replace the nightly MATSim jar-file with a newer version, as the libraries do no change that often.
Running the nightly build as a shell script
The above provides an easy way to run MATSim as a shell script. For example:
(1) Write a shell script named, say, "myControler":
#!/bin/bash -xev java -Xmx2000m -cp <path-to-matsim-jar>/MATSim_rXXXX.jar org.matsim.run.Controler $*
(2) Start this shell script from whereever you are as
Clearly, if you know how to set your PATH variable, you can use that mechanism.
(3) The filename root (for input/output files) is where you are, that is, networks/plans/etc. can be referenced, say, as
<param name="inputNetworkFile" value="./network.xml" />
<param name="inputPlansFile" value="./plans2000.xml" />
This makes working with MATSim considerably easier in many situations.