faq 161808409 - matsim-org/matsim-code-examples GitHub Wiki
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
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.