Matsim Network Writer Defaults
When writing to a MATSim network XML format the following defaults are considered:
The coordinate reference system default determines how geographic information is persisted and possibly transformed compared to the source network, whereas the mode mapping defaults determine how each (predefined) planit mode in the source network is mapped to a Matsim mode.
Coordinate reference system default
In Python the user can influence the coordinate reference system the Matsim network is persisted in by providing a
destination country via .settings.set_country(+)
.
If the user does not set a country explicitly, the writer falls back to the coordinate reference system of the source network. So, there does not exist a fixed default, but the default is dependent on the source network being persisted.
Mode mapping defaults
MATSim in its most commonly used form only supports two types of modes; car and public transport, where the latter can potentially be subdivided in more specific modes. However, MATSim was not built for multi-modal transport and as a result its modes are somewhat awkwardly defined:
- When no modes are defined, it is assumed only “car” is allowed on a link
- Public transport modes can be added with any descriptor, e.g., all as “pt”, or “bus”,“train”, etc.
- Defined public transport modes need to be made known to MATSim in the transit module.
Some more information from the MATSim website on this topic can be found here https://matsim.atlassian.net/wiki/spaces/MATPUB/pages/83099693/Transit+Tutorial
In Planit we support the most straightforward way of mode mapping by default, where we map all but some modes to MATSim mode “car”, the exceptions being public transport modes, these are all mapped to MATSim mode “pt”, finally, bicycle and pedestrian which are excluded from the mapping since MATSim has no support for those modes and they cannot be modelled as “car”.
PLANit (predefined) road mode | Planit mode activated by default | Mapped MATSim mode |
---|---|---|
PredefinedMode.PEDESTRIAN |
NO | N/A |
PredefinedModeType.BICYCLE |
NO | N/A |
PredefinedModeType.MOTOR_BIKE |
YES | “car” |
PredefinedModeType.CAR |
YES | “car” |
PredefinedModeType.GOODS_VEHICLE |
YES | “car” |
PredefinedModeType.HEAVY_GOODS_VEHICLE |
YES | “car” |
PredefinedModeType.LARGE_HEAVY_GOODS_VEHICLE |
YES | “car” |
PredefinedModeType.BUS |
YES | “pt” |
In case the railway parser is activated, the following rail based modes are mapped/activated by default as follows
PLANit (predefined) road mode | PLANit mode activated by default | Mapped MATSim mode |
---|---|---|
PredefinedModeType.SUBWAY |
YES | “pt” |
PredefinedModeType.TRAM |
YES | “pt” |
PredefinedModeType.TRAIN |
YES | “pt” |