Skip to content

faq 275677186

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

Compute the total Vehicle Hour of Travel (VHT) from e.g. [6am - 10am] for people going to '''work'

by Alain Tcheukam on 2018-05-06 16:32:10


I would like to ask if there is way to compute the VHT for a selected group of agent e.g.: person (agent) going to work only for performing their activity. Given the "output_event" I am only able to compute it for the whole population (since I don't have information about who is going to work in that particular event). My question is: can I use the "output_plan" (produced at the end of MATSim simulation) ? I am confuse about the plan to use since some iterations produce an "experienced plan" which base on MATSim evolutionary algorithm principle might vary with time during the replanning phase. Thank you in advance for your time and consideration.


Comments: 1


Re: Compute the total Vehicle Hour of Travel (VHT) from e.g. [6am - 10am] for people going to '''work'

by Kai Nagel on 2018-08-05 13:14:20

(1) Our typical answer is that you need to compute this yourself from the events. With your situation, it is a bit involved, since you first need to put all departures into a data structure, and only after the arrival and activity start can you decide which of those went to work. This is the way it works, sorry. There are many similar situations. See here for an example: https://github.com/matsim-org/matsim-code-examples/blob/0.10.x/src/main/java/tutorial/events/carTravelDist/RunEventsHandler.java


(2) In your particular case, it might also be possible to use the experienced plans. I am, however, not sure if it is really so much easier. Also, parsing events (i.e. approach (1)) is the matsim standard approach, so it is more flexible also for other situations.

Clone this wiki locally