-
Notifications
You must be signed in to change notification settings - Fork 182
faq 107387464
by Koen Mommens on 2017-01-16 17:14:15
Is it possible to use the org.matsim.roadpricing.TollFactor interface in the freight contribution? Currently, the freight contribution can be used for the ‘classic’ roadpricing (distance and cordon) via VehicleTypeDependentRoadPricingCalculator. The ‘classic’ roadpricing is limited to one road pricing system. However, for my research, I would need more than one.
Unfortunately TollFactor(){} must implement the inherited abstract method TollFactor.getTollFactor(Id, Id, Id, double). My coding skills are to limited to see whether this can be translated to freight, and how to do it.
Can someone tell me if it would be possible? And how to tackle it?
I thank you in advance
by Kai Nagel on 2017-01-16 19:05:13
Dear Koen,
In theory the class RunRoadPricingUsingTollFactorExample
in the roadpricing contrib should explain how to do it. The idea is to have a "standard" road pricing file, and then to set vehicle-specific factors for that (e.g. trucks paying three times as much as regular vehicles).
A more involved example is GautengControler_subpopulations
in the southafrica playground. This was really the use case that triggered it ... exactly what you say that we needed different tolls by vehicle type.
A challenge to note is that you need the scoring function to be consistent with that. E.g. you might charge a higher toll for trucks, but they might also have a higher value of time. The Gauteng example handles this with a separate GautengScoringFunctionFactory
.
The code could now be simpler than it was at that time. But you will have to program in Java
- the toll factor thing
- the scoring function factory
there is no way around that. In principle you would also have to adjust the router, but this is no longer necessary, see http://www.sciencedirect.com/science/article/pii/S1877050914006887 .
Maybe Johan can help with this as well.
Good luck, best wishes
Kai
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq