-
Notifications
You must be signed in to change notification settings - Fork 180
faq 111250600
by Renan Grace on 2017-08-11 08:31:16
Hi all,
We are attempting to incorporate 's pseudosimulation contrib into our model to speed up the run times. Our model uses a close variant of 's events based pt router contrib for public transport.
I am running into problems however with a custom replanning strategy we use (a variant of 's parkAndRide functionality from the vsp playground). The config refers to the strategy as per the below:
<param name="strategyName" value="au.gov.vic.mabm.parkandride.replanning.PnrStrategyProvider"/>
In the pseudosimulation.replanning.DistributedPlanStrategyTranslationAndRegistration class, I have added the following lines:
SupportedMutators.put("au.gov.vic.mabm.parkandride.replanning.PnrStrategyProvider", PnrStrategyProvider.class);
SupportedMutatorGenes.put("au.gov.vic.mabm.parkandride.replanning.PnrStrategyProvider", new Character('L'));
I have also tried some variants of this (removing package names). But I keep getting an error similar to the below.
Caused by: java.lang.RuntimeException: You specified something which looks like a class name as a strategy, but the class could not be found.
at org.matsim.core.replanning.StrategyManagerModule.install(StrategyManagerModule.java:69)
Caused by: java.lang.ClassNotFoundException: au.gov.vic.mabm.parkandride.replanning.PnrStrategyProviderPSIM
The parkandride strategy I am trying to add is fairly simple, it just puts "parkAndRide" activities in between home and work with a car and pt leg, and then ReRoutes the plan.
Any ideas why this might be happening? Any advice will be very greatly appreciated.
Thanks in advance.
Renan.
by Pieter Fourie on 2017-08-15 02:56:34
Dear Renan
Thanks for bringing this to my attention! time for me to do some upkeep. will get back to you.
best
Pieter
by Kai Nagel on 2017-09-02 10:22:54
Renan, to me this looks like it is not finding your class file. If this is the problem, you need to find out where your system thinks that the java root is (or, plural, where the java roots are). But maybe I am wrong, in the end it is Pieter's code.
by Pieter Fourie on 2018-03-27 08:53:28
hi this is now finally working. The process doesn't rely on a dictionary anymore to modify existing plan strategies, so should work if your strategy works with default controler
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq