matsim-scenarios / matsim-berlin

The MATSim Open Berlin Scenario
GNU General Public License v2.0
36 stars 135 forks source link

Error in berlin scenario #114

Closed khzannat closed 2 months ago

khzannat commented 11 months ago

I am running the Berlin scenario for the 1pc sample. I started with the config available for 1pc sample. However, I am having the following error every time I am running it. To resolve the following error I have also added controler.addOverridingModule(new SwissRailRaptorModule()); but it's not helping me to resolve the issue. Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/BindingAlreadySet]: RoutingModule annotated with @Named("pt") was bound multiple times.

Bound at: 1 : SwissRailRaptorModule.install(SwissRailRaptorModule.java:30) _ installed by: Modules$CombinedModule -> Modules$CombinedModule -> AbstractModule$4 -> Modules$OverrideModule -> AbstractModule$4 -> Modules$OverrideModule -> AbstractModule$4 -> Modules$OverrideModule -> SwissRailRaptorModule 2 : TripRouterModule.install(TripRouterModule.java:66) _ installed by: Modules$CombinedModule -> Modules$CombinedModule -> AbstractModule$4 -> Modules$OverrideModule -> Controler$2 -> ControlerDefaultsModule -> TripRouterModule

Learn more: https://github.com/google/guice/wiki/BINDING_ALREADY_SET

1 error

====================== Full classname legend:

AbstractModule$4: "org.matsim.core.controler.AbstractModule$4" Controler$2: "org.matsim.core.controler.Controler$2" ControlerDefaultsModule: "org.matsim.core.controler.ControlerDefaultsModule" Modules$CombinedModule: "com.google.inject.util.Modules$CombinedModule" Modules$OverrideModule: "com.google.inject.util.Modules$OverrideModule" Named: "com.google.inject.name.Named" RoutingModule: "org.matsim.core.router.RoutingModule" SwissRailRaptorModule: "ch.sbb.matsim.routing.pt.raptor.SwissRailRaptorModule" TripRouterModule: "org.matsim.core.router.TripRouterModule"

End of classname legend:

at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:568)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:163)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:239)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:244)
at org.matsim.core.controler.Injector.createInjector(Injector.java:74)
at org.matsim.core.controler.Controler.run(Controler.java:247)
at org.matsim.run.RunBerlinScenario.main(RunBerlinScenario.java:95)