Skip to content

faq 51675152

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

How to assign different modes to different speed?

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:
"

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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?

 


Comments: 1


Re: How to assign different modes to different speed?

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:

  1. Define each vehicle individually: vehiclesSource = fromVehiclesData .  Will need a long vehicles file.
  2. 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

Clone this wiki locally