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.