-
Couldn't load subscription status.
- Fork 207
faq 70123545
by Amit Agarwal on 2016-06-27 18:15:21
Hello all,
2016-06-27 16:48:42,353 ERROR ParallelPersonAlgorithmRunner$ExceptionHandler:163 Thread PersonPrepareForSim.0 died with exception while handling events.
org.matsim.core.router.TripRouter$UnknownModeException: unregistered main mode mtw: does not pertain to [pt, car, ride, walk, bike, undefined]
at org.matsim.core.router.TripRouter.calcRoute(TripRouter.java:161)
at org.matsim.core.router.PlanRouter.run(PlanRouter.java:84)
at org.matsim.population.algorithms.PersonPrepareForSim.run(PersonPrepareForSim.java:114)
at org.matsim.population.algorithms.ParallelPersonAlgorithmRunner$PersonAlgoThread.run(ParallelPersonAlgorithmRunner.java:144)
at java.lang.Thread.run(Thread.java:745)
Regards,
Harsha K
Researcher
Fields of View
by Amit Agarwal on 2016-06-27 18:27:33
Dear Harsha K,
Your steps looks fine, however, see the additional steps.
- Qsim and router both need to be informed about the multiple modes.
config.qsim().setMainModes(Arrays.asList("car","bike"));
config.plansCalcRoute().setNetworkModes(Arrays.asList("car","bike"));
- By default, car is congested (main) mode and pt, bike, walk, others are teleported. Thus, as long as these settings are not overridden, following error may show up.
Error in custom provider, java.lang.RuntimeException: there was already a module set when trying to set network routing module for mode bike: [LegRouterWrapper: mode=bike; delegate=org.matsim.core.router.old.TeleportationLegRouter@2e6a8155]
while locating org.matsim.core.router.TripRouterModule$RealTripRouterProvider
while locating org.matsim.core.router.TripRouter
To avoid it, just set any teleportation parameter as follows.
config.plansCalcRoute().setTeleportedModeSpeed("pt", 20);
Hopefully, this will fix your problems.
by Harsha on 2016-06-28 15:22:16
Hi Amit,
Thank you very much! This had definitely solved the problem.
Just to clarify, I am also guessing that I can use only one mode at a time in the Network by default and will have to use the "multimode" module in contrib if I am to use multiple modes for my simulation on the same network, i.e. car, bike, pt, customCar, etc.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq