Skip to content

faq 29229099

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

How to generate MATSim input from VISUM input?

by Kai Nagel on 2015-06-04 13:10:48


Comments: 1


Re: How to generate MATSim input from VISUM input?

by Kai Nagel on 2015-06-04 13:26:43

Here, I will assume that both the network and the OD matrices are available from VISUM.

The following for the time being assumes that you will use some Java programming to address the problem.

Network

For the VISUM network, there is a VisumNetworkReader in the main distribution.  You can search in the playgrounds for examples of how to use this; there is no other code example right now.

Since MATSim is based on coordinates, it is as well possible to ignore the VISUM network and use some other network instead, for example based on OpenStreetMap.

Initial demand

For the VISUM matrices, there is a VisumMatrixReader in the main distribution.  You can search in the playgrounds for examples of how to use this; there is no other code example right now.

When converting the matrices to MATSim input, it is probably easiest to convert each trip of the OD matrix to a separate MATSim dummy agent.  Activity types at the beginning and end of each trip could just be "dummy", or maybe given by the "Quelle Ziel Gruppen" given by the VISUM model.

For the general technique to generate such an initial population, see matsim.org/javadoc → main distribution → RunPOnePersonPopulationGenerator,  RunPPopulationGenerator,  RunZPopulationGenerator.

Recall that MATSim uses coordinates for each activity's location.  That is, the zones behind the OD matrix need to be converted to coordinates.  For this, not all trips starting or ending in a zone should be assigned to the same coordinate, since this will lead to spurious congestion.  Two possible solutions:

  • Optimally, the polygon shape of each zone is known.  Then, a possible approach would be to find a random coordinate inside that zone.  For an example, see matsim.org/javadoc → main distribution → RunDemandGenerationFromShapefileExample .
  • If the polygon shapes of a zone is not known, but its "centroid" coordinate is known, an approach that still works is to "smear" the coordinates a bit around that coordinate.
Clone this wiki locally