-
Notifications
You must be signed in to change notification settings - Fork 182
faq 108993165
by Enoch Lee on 2017-04-19 15:55:22
In the reality, the bus and tram may shares road with passenger cars.
As the instruction of , I defined the following:
1) Some link on the network with allowed mode (car, pt), or only pt
2) For the plans, some agents are having 'pt' as leg mode.
3) I defined a vehicle file with vehicles which ID is equal to the person ID, for every person, but there is another vehicle definition as transitVehicles.xml, which includes tram and two types of train.
4) The config is set as the demonstration did.
However, it throws the following exception:
Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:
1) A binding to org.matsim.core.router.RoutingModule annotated with @com.google.inject.name.Named(value=pt) was already configured at org.matsim.core.router.TripRouterModule.install(TripRouterModule.java:65) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.Controler$1 -> org.matsim.core.controler.ControlerDefaultsModule -> org.matsim.core.router.TripRouterModule).
at org.matsim.core.router.TripRouterModule.install(TripRouterModule.java:70) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.Controler$1 -> org.matsim.core.controler.ControlerDefaultsModule -> org.matsim.core.router.TripRouterModule)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:232)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:236)
at org.matsim.core.controler.Injector.createInjector(Injector.java:72)
at org.matsim.core.controler.Controler.run(Controler.java:192)
at NetworkFromSaturn.CreateRandomPlan.main(CreateRandomPlan.java:80)
I have read a few use cases in MATSim, like pt-tutorial but none of them combines the passenger car network with the public transit network. Therefore, how do we actually model the interaction on the road between public transit mode and car? If we would like to create a bus only link, what is the procedure to create it?
by Marcel Rieser on 2017-04-19 20:46:52
Don't use pt
as allowed mode on the links. pt
is the mode the passengers use. The transit vehicles should use modes like train
, bus
, tram
or something similar.
Based on your description, it looks like you tried to assign pt
to the transit vehicles, but as it is already used for the transit passengers, MATSim complains.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq