-
Notifications
You must be signed in to change notification settings - Fork 182
faq 51675152
by Muhammad Ihsan on 2016-03-18 20:00:26
Would you mind if I ask, how can I assign different modes to different speed? I had emailed Dr. Michael Zilske and his response was to do this steps:
"
- Having “fast” agents do all their trips with a “car-fast” mode, and your “slow” agents do all their trips with a “car-slow” mode.
- declare these modes in several places: The router needs to know that these are “network based” modes, so you have to tell it about them. This is done in the “networkModes” attribute of the router configuration.
- The other place is in the traffic flow simulation itself. This is in the “qsim” section of the configuration. This has to know that “car-fast” and “car-slow” are so-called “main modes”, which are simulated on the network and can be in congestion etc.
- give the two modes different speeds. You can assign differnt “default vehicle types” to different modes, so you would assign a fast vehicle type to the fast mode and a slow one to the slow mode.
- enable passing.
"
I had done step 1 until 3, but my progress had stuck in step 4, which is assigning different modes to different "default vehicle types".
I have read the MATSim-book manual on config, searched elements in full-config file, and have not found any configuration that mentions default vehicle types speed. Am I missing something, or should I try different approach?
by Kai Nagel on 2016-03-30 07:44:00
Dear Muhammad,
The MATSim book says something about this in Section 11.1, also see http://matsim.org/docs/userguide . I can see two options for your case:
- Define each vehicle individually: vehiclesSource = fromVehiclesData . Will need a long vehicles file.
- Use a short Java script. This is what MZ refers to in your point 4 above. See
RunMobsimWithMultipleModeVehiclesExample
, e.g. from http://matsim.org/javadoc→ main distribution.
Hope this helps, let us know.
Best wishes, Kai
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq