Open zekechan1 opened 5 years ago
Going through old email. For what is is worth, I fixed this now, and wrote a regression test around it.
What was missing is that all modes need to be explicitly defined for scoring. That is, after the existing
<parameterset type="modeParams">
<param name="mode" value="pt"/>
</parameterset>
one had to add
<parameterset type="modeParams">
<param name="mode" value="walk"/>
</parameterset>
<parameterset type="modeParams">
<param name="mode" value="bike"/>
</parameterset>
<parameterset type="modeParams">
<param name="mode" value="ride"/>
</parameterset>
What comes on top is that this is somewhat inconsistent in the configuration: If one defines modes without a surrounding bracket <parameterset type="scoringParameters">
, then certain modes are pre-defined. If there is such a surrounding bracket, these defaults are cleared. See https://matsim.atlassian.net/browse/MATSIM-995 .
Hi, I tried running "RunMultimodalExample.java" in the "multimodal" package using Eclipse IDE. After updating all file paths (such as for config_multimodal.xml, network etc), everything goes well until it threw 5 errors, each saying: "walk is not part of the valid mode parameters [car, pt]". Can you help please? I've included the error message below. Many thanks, Zeke
Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Error in custom provider, java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt] at org.matsim.contrib.multimodal.MultiModalModule.install(MultiModalModule.java:68) (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.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.multimodal.MultiModalModule) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.name.Named(value=walk) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=108, type=MAPBINDER, keyType=java.lang.String) at org.matsim.core.router.TripRouter.(TripRouter.java:108)
while locating org.matsim.core.router.TripRouter
for field at org.matsim.core.scoring.ScoringFunctionsForPopulation.tripRouter(ScoringFunctionsForPopulation.java:79)
at org.matsim.core.scoring.PlansScoringModule.install(PlansScoringModule.java:10) (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$2 -> org.matsim.core.controler.corelisteners.ControlerDefaultCoreListenersModule -> org.matsim.core.scoring.PlansScoringModule)
while locating org.matsim.core.scoring.ScoringFunctionsForPopulation
for field at org.matsim.core.scoring.PlansScoringImpl.scoringFunctionsForPopulation(PlansScoringImpl.java:47)
at org.matsim.core.scoring.PlansScoringImpl.class(PlansScoringImpl.java:47)
while locating org.matsim.core.scoring.PlansScoringImpl
while locating org.matsim.core.controler.corelisteners.PlansScoring
for the 10th parameter of org.matsim.core.controler.NewControler.(NewControler.java:64)
while locating org.matsim.core.controler.NewControler
at org.matsim.core.controler.NewControlerModule.install(NewControlerModule.java:8) (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$2 -> org.matsim.core.controler.NewControlerModule)
while locating org.matsim.core.controler.ControlerI
Caused by: java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt]
at org.matsim.core.router.costcalculators.RandomizingTimeDistanceTravelDisutilityFactory.createTravelDisutility(RandomizingTimeDistanceTravelDisutilityFactory.java:53)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:106)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:1)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:104)
at com.google.inject.multibindings.MapBinder$RealMapBinder$ValueProvider.get(MapBinder.java:821)
at org.matsim.core.router.TripRouter.(TripRouter.java:111)
at org.matsim.core.router.TripRouter$$FastClassByGuice$$40b051f1.newInstance()
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
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:74)
at org.matsim.core.controler.Controler.run(Controler.java:227)
at org.matsim.contrib.multimodal.RunMultimodalExample.main(RunMultimodalExample.java:49)
2) Error in custom provider, java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt] at org.matsim.contrib.multimodal.MultiModalModule.install(MultiModalModule.java:68) (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.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.multimodal.MultiModalModule) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.name.Named(value=walk) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=108, type=MAPBINDER, keyType=java.lang.String) at org.matsim.core.router.TripRouter.(TripRouter.java:108)
while locating org.matsim.core.router.TripRouter
for field at org.matsim.core.scoring.ScoringFunctionsForPopulation.tripRouter(ScoringFunctionsForPopulation.java:79)
at org.matsim.core.scoring.PlansScoringModule.install(PlansScoringModule.java:10) (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$2 -> org.matsim.core.controler.corelisteners.ControlerDefaultCoreListenersModule -> org.matsim.core.scoring.PlansScoringModule)
while locating org.matsim.core.scoring.ScoringFunctionsForPopulation
for field at org.matsim.core.scoring.ExperiencedPlansServiceImpl.scoringFunctionsForPopulation(ExperiencedPlansServiceImpl.java:18)
while locating org.matsim.core.scoring.ExperiencedPlansServiceImpl
at org.matsim.core.scoring.ExperiencedPlansModule.install(ExperiencedPlansModule.java:10) (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$2 -> org.matsim.core.controler.ControlerDefaultsModule -> org.matsim.core.scoring.ExperiencedPlansModule)
while locating org.matsim.core.scoring.ExperiencedPlansService
for field at org.matsim.core.scoring.PlansScoringImpl.experiencedPlansService(PlansScoringImpl.java:47)
at org.matsim.core.scoring.PlansScoringImpl.class(PlansScoringImpl.java:47)
while locating org.matsim.core.scoring.PlansScoringImpl
while locating org.matsim.core.controler.corelisteners.PlansScoring
for the 10th parameter of org.matsim.core.controler.NewControler.(NewControler.java:64)
while locating org.matsim.core.controler.NewControler
at org.matsim.core.controler.NewControlerModule.install(NewControlerModule.java:8) (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$2 -> org.matsim.core.controler.NewControlerModule)
while locating org.matsim.core.controler.ControlerI
Caused by: java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt]
at org.matsim.core.router.costcalculators.RandomizingTimeDistanceTravelDisutilityFactory.createTravelDisutility(RandomizingTimeDistanceTravelDisutilityFactory.java:53)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:106)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:1)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:104)
at com.google.inject.multibindings.MapBinder$RealMapBinder$ValueProvider.get(MapBinder.java:821)
at org.matsim.core.router.TripRouter.(TripRouter.java:111)
at org.matsim.core.router.TripRouter$$FastClassByGuice$$40b051f1.newInstance()
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
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:74)
at org.matsim.core.controler.Controler.run(Controler.java:227)
at org.matsim.contrib.multimodal.RunMultimodalExample.main(RunMultimodalExample.java:49)
3) Error in custom provider, java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt] at org.matsim.contrib.multimodal.MultiModalModule.install(MultiModalModule.java:68) (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.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.multimodal.MultiModalModule) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.name.Named(value=walk) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=108, type=MAPBINDER, keyType=java.lang.String) at org.matsim.core.router.TripRouter.(TripRouter.java:108)
while locating org.matsim.core.router.TripRouter
for field at org.matsim.core.scoring.ScoringFunctionsForPopulation.tripRouter(ScoringFunctionsForPopulation.java:79)
at org.matsim.core.scoring.PlansScoringModule.install(PlansScoringModule.java:10) (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$2 -> org.matsim.core.controler.corelisteners.ControlerDefaultCoreListenersModule -> org.matsim.core.scoring.PlansScoringModule)
while locating org.matsim.core.scoring.ScoringFunctionsForPopulation
for field at org.matsim.core.scoring.ExperiencedPlansServiceImpl.scoringFunctionsForPopulation(ExperiencedPlansServiceImpl.java:18)
while locating org.matsim.core.scoring.ExperiencedPlansServiceImpl
at org.matsim.core.scoring.ExperiencedPlansModule.install(ExperiencedPlansModule.java:10) (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$2 -> org.matsim.core.controler.ControlerDefaultsModule -> org.matsim.core.scoring.ExperiencedPlansModule)
while locating org.matsim.core.scoring.ExperiencedPlansService
for field at org.matsim.analysis.TravelDistanceStatsControlerListener.experiencedPlansService(TravelDistanceStatsControlerListener.java:12)
while locating org.matsim.analysis.TravelDistanceStatsControlerListener
while locating org.matsim.core.controler.listener.ControlerListener annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=91, type=MULTIBINDER, keyType=)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:198) (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.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.Controler$1 -> com.google.inject.multibindings.Multibinder$RealMultibinder)
while locating java.util.Set
for the 13th parameter of org.matsim.core.controler.NewControler.(NewControler.java:64)
while locating org.matsim.core.controler.NewControler
at org.matsim.core.controler.NewControlerModule.install(NewControlerModule.java:8) (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$2 -> org.matsim.core.controler.NewControlerModule)
while locating org.matsim.core.controler.ControlerI
Caused by: java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt]
at org.matsim.core.router.costcalculators.RandomizingTimeDistanceTravelDisutilityFactory.createTravelDisutility(RandomizingTimeDistanceTravelDisutilityFactory.java:53)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:106)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:1)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:104)
at com.google.inject.multibindings.MapBinder$RealMapBinder$ValueProvider.get(MapBinder.java:821)
at org.matsim.core.router.TripRouter.(TripRouter.java:111)
at org.matsim.core.router.TripRouter$$FastClassByGuice$$40b051f1.newInstance()
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:375)
at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:258)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
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:74)
at org.matsim.core.controler.Controler.run(Controler.java:227)
at org.matsim.contrib.multimodal.RunMultimodalExample.main(RunMultimodalExample.java:49)
4) Error in custom provider, java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt] at org.matsim.contrib.multimodal.MultiModalModule.install(MultiModalModule.java:68) (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.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.multimodal.MultiModalModule) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.name.Named(value=walk) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=108, type=MAPBINDER, keyType=java.lang.String) at org.matsim.core.router.TripRouter.(TripRouter.java:108)
while locating org.matsim.core.router.TripRouter
for field at org.matsim.core.scoring.ScoringFunctionsForPopulation.tripRouter(ScoringFunctionsForPopulation.java:79)
at org.matsim.core.scoring.PlansScoringModule.install(PlansScoringModule.java:10) (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$2 -> org.matsim.core.controler.corelisteners.ControlerDefaultCoreListenersModule -> org.matsim.core.scoring.PlansScoringModule)
while locating org.matsim.core.scoring.ScoringFunctionsForPopulation
for field at org.matsim.core.scoring.ExperiencedPlansServiceImpl.scoringFunctionsForPopulation(ExperiencedPlansServiceImpl.java:18)
while locating org.matsim.core.scoring.ExperiencedPlansServiceImpl
at org.matsim.core.scoring.ExperiencedPlansModule.install(ExperiencedPlansModule.java:10) (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$2 -> org.matsim.core.controler.ControlerDefaultsModule -> org.matsim.core.scoring.ExperiencedPlansModule)
while locating org.matsim.core.scoring.ExperiencedPlansService
Caused by: java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt]
at org.matsim.core.router.costcalculators.RandomizingTimeDistanceTravelDisutilityFactory.createTravelDisutility(RandomizingTimeDistanceTravelDisutilityFactory.java:53)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:106)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:1)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:104)
at com.google.inject.multibindings.MapBinder$RealMapBinder$ValueProvider.get(MapBinder.java:821)
at org.matsim.core.router.TripRouter.(TripRouter.java:111)
at org.matsim.core.router.TripRouter$$FastClassByGuice$$40b051f1.newInstance()
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
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:74)
at org.matsim.core.controler.Controler.run(Controler.java:227)
at org.matsim.contrib.multimodal.RunMultimodalExample.main(RunMultimodalExample.java:49)
5) Error in custom provider, java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt] at org.matsim.contrib.multimodal.MultiModalModule.install(MultiModalModule.java:68) (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.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.core.controler.AbstractModule$4 -> com.google.inject.util.Modules$OverrideModule -> org.matsim.contrib.multimodal.MultiModalModule) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.name.Named(value=walk) while locating org.matsim.core.router.RoutingModule annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=108, type=MAPBINDER, keyType=java.lang.String) at org.matsim.core.router.TripRouter.(TripRouter.java:108)
while locating org.matsim.core.router.TripRouter
for field at org.matsim.core.scoring.ScoringFunctionsForPopulation.tripRouter(ScoringFunctionsForPopulation.java:79)
at org.matsim.core.scoring.PlansScoringModule.install(PlansScoringModule.java:10) (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$2 -> org.matsim.core.controler.corelisteners.ControlerDefaultCoreListenersModule -> org.matsim.core.scoring.PlansScoringModule)
while locating org.matsim.core.scoring.ScoringFunctionsForPopulation
Caused by: java.lang.NullPointerException: walk is not part of the valid mode parameters [car, pt]
at org.matsim.core.router.costcalculators.RandomizingTimeDistanceTravelDisutilityFactory.createTravelDisutility(RandomizingTimeDistanceTravelDisutilityFactory.java:53)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:106)
at org.matsim.core.router.NetworkRoutingProvider.get(NetworkRoutingProvider.java:1)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)
at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:104)
at com.google.inject.multibindings.MapBinder$RealMapBinder$ValueProvider.get(MapBinder.java:821)
at org.matsim.core.router.TripRouter.(TripRouter.java:111)
at org.matsim.core.router.TripRouter$$FastClassByGuice$$40b051f1.newInstance()
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:120)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
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:74)
at org.matsim.core.controler.Controler.run(Controler.java:227)
at org.matsim.contrib.multimodal.RunMultimodalExample.main(RunMultimodalExample.java:49)
5 errors at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470) at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110) 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:74) at org.matsim.core.controler.Controler.run(Controler.java:227) at org.matsim.contrib.multimodal.RunMultimodalExample.main(RunMultimodalExample.java:49)