Skip to content

faq 161808409

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

Introduce pt fare in scoring

by harisbal on 2018-01-29 18:53:48


Hello,

I'm trying to figure out what's the best approach to implement a single fare for all transit modes, regardless journey distance or time.

I'm thinking of implementing the SumScoringFunction.MoneyScoring class but I'm not sure how to move on. Any suggestions?

Thanks a lot


Comments: 1


Re: Introduce pt fare in scoring

by Marcel Rieser on 2018-01-29 19:15:48

You could listen on PersonEntersVehicleEvent, make sure it is a pt vehicle (the easiest way to do this is to collect the pt vehicle ids by listening to TransitDriverStartsEvent), and then create a new MoneyEvent.

If I'm not mistaken, the default scoring function (see CharyparNagelScoringFunctionFactory) collects these money events an converts them with the marginalUtilityOfMoney to a utility term.

Clone this wiki locally