Skip to content

faq 109688868

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

Relationship between travel disutility, routing and scoring

by Renan Grace on 2017-05-29 05:14:36


Hi all,

I think I am not fully understanding the interplay between travel disutility, routing and scoring. If someone who has a better understanding could clarify for me that would be very much appreciated. My question is a general one, but I find it useful to use the logic in the roadpricing contrib to frame the question.

The roadpricing contrib has:

  • an events handler which keeps track of the total tolls paid by each agent during an iteration (CalcPaidToll.class)
  • a listener which, at the end of an iteration, processes all the PersonMoneyEvents applicable for each agent (RoadPricingControlerListener.class)
  • a travel disutility implementation which extends the 'normal' travel disutility to include the toll, plus a random component (TravelDisutilityIncludingToll.class)
  • A router that uses the above travel disutility to calculate the least cost paths through the network (RoadPricingNetworkRouting.class).

I understand that the router uses the travel disutility during replanning to generate new routes for the agents to try out. However, I can see from the book and also my own experimenting that travel disutility also contributes to scoring. I can also see from the org.matsim.core.scoring.SumScoringFunction (plus my own experimenting) that PersonMoneyEvents also contribute to scoring.

So my question is: if we add the toll to both the travel disutility and then also process a PersonMoneyEvent, shouldn't that toll be contributing to the score twice, and hence double counting? I am sure that's not the case but I'd like to understand why. I think the problem is that I am not quite clear on the exact mechanism that allows changes in the travel disutility to flow through to the overall score.

We are attempting to apply differential boarding and transfer penalties by pt submode (bus, train, tram) to improve the realism of our public transport routing, and we need a better understanding of the above in order to make sure we execute that properly.

Any light anyone can shed on the above would be greatly appreciated.

Regards,

Renan.


Comments: 1


Re: Relationship between travel disutility, routing and scoring

by Dominik Ziemke on 2017-05-30 09:10:33

Dear Renan,

you are right that your question is a quite general one – and the answer to your question is (with or without consideration of tolls) in principle the same.

As far as I see, your descriptions are up to your question fully correct. You are right that an agent computes a travel disutility (that may contain tolls as a component) when they compute a route. You are also right about scoring (which may also contain a toll component).

The decisive characteristic of the simulation, which is also the answer to your question, is the emergent nature of the simulation. An agent has some information on travel times (and potentially expected tools) when computing a route, but has not put this plan "into practice". It is only a plan that has not yet been simulated.

After the simulation the agent "knows" more. This is when scoring is performed. The agent may have spent more time in congestion than "expected". And in the roadpricing example, they may also have spent more money on tolls than "expected", for instance, if tolls are time-of-day-dependent and the agent has passed a tolled road segment later then "expected".

Regrads,

Dominik

Clone this wiki locally