-
Notifications
You must be signed in to change notification settings - Fork 180
faq 118259713
by Lichen Luo on 2017-10-30 01:10:53
Dear all,
I met a problem while intending to simulate a mixed traffic project(taxi and car) with robotaxi example, that described briefly as:
org.matsim.core.population.routes.GenericRouteImpl cannot be cast to org.matsim.core.population.routes.NetworkRoute
I follow the instruction with Mixed traffic to modify , and even have tried scenario.getConfig().qsim().setMainModes(Arrays.asList("car","taxi")) and config.plansCalcRoute().setNetworkModes(Arrays.asList("car","taxi")).
And i just don't know if there is other something need to be configure with "taxi" mode.
Please find the configure file and error log information below and I am very appreciated for your helping!
2017-10-30 09:51:41,673 ERROR QSim:314 got exception while cleaning up java.lang.NullPointerException at org.matsim.core.mobsim.qsim.qnetsimengine.QNetsimEngine.afterSim(QNetsimEngine.java:251) at org.matsim.core.mobsim.qsim.QSim.cleanupSim(QSim.java:311) at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:243) at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120) at org.matsim.core.controler.AbstractController$8.run(AbstractController.java:199) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:231) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:195) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:154) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:121) at org.matsim.core.controler.AbstractController.access$0(AbstractController.java:119) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:91) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:99) at org.matsim.core.controler.NewControler.run(NewControler.java:79) at org.matsim.core.controler.Controler.run(Controler.java:205) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.run(RunRobotaxiExample.java:60) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.main(RunRobotaxiExample.java:54) 2017-10-30 09:51:41,683 INFO AbstractController$6:222 ### ITERATION 0 fires after mobsim event 2017-10-30 09:51:41,684 INFO ControlerListenerManagerImpl:248 calling notifyAfterMobsim on org.matsim.analysis.LegTimesControlerListener 2017-10-30 09:51:41,680 INFO Gbl:185 Thread performance: Thread=class org.matsim.core.events.SimStepParallelEventsManagerImpl$ProcessEventsRunnable0 cpu-time=0.0sec 2017-10-30 09:51:41,680 ERROR AbstractController:210 Mobsim did not complete normally! afterMobsimListeners will be called anyway. java.lang.ClassCastException: org.matsim.core.population.routes.GenericRouteImpl cannot be cast to org.matsim.core.population.routes.NetworkRoute at org.matsim.core.mobsim.qsim.agents.PopulationAgentSource.insertVehicles(PopulationAgentSource.java:107) at org.matsim.core.mobsim.qsim.agents.PopulationAgentSource.insertAgentsIntoMobsim(PopulationAgentSource.java:96) at org.matsim.core.mobsim.qsim.QSim.createAgents(QSim.java:271) at org.matsim.core.mobsim.qsim.QSim.prepareSim(QSim.java:256) at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:220) at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120) at org.matsim.core.controler.AbstractController$8.run(AbstractController.java:199) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:231) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:195) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:154) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:121) at org.matsim.core.controler.AbstractController.access$0(AbstractController.java:119) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:91) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:99) at org.matsim.core.controler.NewControler.run(NewControler.java:79) at org.matsim.core.controler.Controler.run(Controler.java:205) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.run(RunRobotaxiExample.java:60) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.main(RunRobotaxiExample.java:54) 2017-10-30 09:51:41,695 INFO LegTimesControlerListener:50 [0] average trip (probably: leg) duration is: 0 seconds = 00:00:00 2017-10-30 09:51:41,695 INFO ControlerListenerManagerImpl:248 calling notifyAfterMobsim on org.matsim.contrib.taxi.util.stats.TaxiStatsDumper 2017-10-30 09:51:41,872 INFO ControlerListenerManagerImpl:248 calling notifyAfterMobsim on org.matsim.contrib.taxi.util.TaxiSimulationConsistencyChecker 2017-10-30 09:51:41,873 INFO ControlerListenerManagerImpl:248 calling notifyAfterMobsim on null 2017-10-30 09:51:41,873 INFO ControlerListenerManagerImpl:251 [it.0] all ControlerAfterMobsimListeners called. 2017-10-30 09:51:41,873 INFO MatsimRuntimeModifications:58 S H U T D O W N --- start shutdown. 2017-10-30 09:51:41,874 INFO ControlerListenerManagerImpl:121 calling notifyShutdown on org.matsim.core.controler.corelisteners.EventsHandlingImpl 2017-10-30 09:51:41,873 ERROR MatsimRuntimeModifications:54 Getting uncaught Exception in Thread main java.lang.ClassCastException: org.matsim.core.population.routes.GenericRouteImpl cannot be cast to org.matsim.core.population.routes.NetworkRoute at org.matsim.core.mobsim.qsim.agents.PopulationAgentSource.insertVehicles(PopulationAgentSource.java:107) at org.matsim.core.mobsim.qsim.agents.PopulationAgentSource.insertAgentsIntoMobsim(PopulationAgentSource.java:96) at org.matsim.core.mobsim.qsim.QSim.createAgents(QSim.java:271) at org.matsim.core.mobsim.qsim.QSim.prepareSim(QSim.java:256) at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:220) at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120) at org.matsim.core.controler.AbstractController$8.run(AbstractController.java:199) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:231) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:195) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:154) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:121) at org.matsim.core.controler.AbstractController.access$0(AbstractController.java:119) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:91) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:99) at org.matsim.core.controler.NewControler.run(NewControler.java:79) at org.matsim.core.controler.Controler.run(Controler.java:205) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.run(RunRobotaxiExample.java:60) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.main(RunRobotaxiExample.java:54) 2017-10-30 09:51:41,874 ERROR MatsimRuntimeModifications:60 ERROR --- This is an unexpected shutdown! 2017-10-30 09:51:41,874 ERROR MatsimRuntimeModifications:63 Shutdown possibly caused by the following Exception: java.lang.ClassCastException: org.matsim.core.population.routes.GenericRouteImpl cannot be cast to org.matsim.core.population.routes.NetworkRoute at org.matsim.core.mobsim.qsim.agents.PopulationAgentSource.insertVehicles(PopulationAgentSource.java:107) at org.matsim.core.mobsim.qsim.agents.PopulationAgentSource.insertAgentsIntoMobsim(PopulationAgentSource.java:96) at org.matsim.core.mobsim.qsim.QSim.createAgents(QSim.java:271) at org.matsim.core.mobsim.qsim.QSim.prepareSim(QSim.java:256) at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:220) at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120) at org.matsim.core.controler.AbstractController$8.run(AbstractController.java:199) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:231) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:195) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:154) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:121) at org.matsim.core.controler.AbstractController.access$0(AbstractController.java:119) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:91) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:99) at org.matsim.core.controler.NewControler.run(NewControler.java:79) at org.matsim.core.controler.Controler.run(Controler.java:205) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.run(RunRobotaxiExample.java:60) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.main(RunRobotaxiExample.java:54) 2017-10-30 09:51:41,877 INFO ControlerListenerManagerImpl:121 calling notifyShutdown on org.matsim.core.controler.corelisteners.DumpDataAtEndImpl 2017-10-30 09:51:41,877 INFO ControlerListenerManagerImpl:126 calling notifyShutdown on org.matsim.analysis.ModeStatsControlerListener 2017-10-30 09:51:41,880 INFO ControlerListenerManagerImpl:126 calling notifyShutdown on org.matsim.analysis.ScoreStatsControlerListener 2017-10-30 09:51:41,881 INFO ControlerListenerManagerImpl:126 calling notifyShutdown on org.matsim.analysis.TravelDistanceStatsControlerListener 2017-10-30 09:51:41,883 INFO ControlerListenerManagerImpl:126 calling notifyShutdown on org.matsim.contrib.taxi.util.stats.TaxiStatsDumper 2017-10-30 09:51:41,890 INFO ControlerListenerManagerImpl:129 all ControlerShutdownListeners called. 2017-10-30 09:51:41,890 ERROR MatsimRuntimeModifications:78 ERROR --- MATSim unexpectedly terminated. Please check the output or the logfile with warnings and errors for hints. 2017-10-30 09:51:41,890 ERROR MatsimRuntimeModifications:79 ERROR --- results should not be used for further analysis. 2017-10-30 09:51:41,890 INFO MatsimRuntimeModifications:81 S H U T D O W N --- shutdown completed. 2017-10-30 09:51:41,890 ERROR MatsimRuntimeModifications:83 ERROR --- This was an unexpected shutdown! See the log file for a possible reason. Exception in thread "main" java.lang.ClassCastException: org.matsim.core.population.routes.GenericRouteImpl cannot be cast to org.matsim.core.population.routes.NetworkRoute at org.matsim.core.mobsim.qsim.agents.PopulationAgentSource.insertVehicles(PopulationAgentSource.java:107) at org.matsim.core.mobsim.qsim.agents.PopulationAgentSource.insertAgentsIntoMobsim(PopulationAgentSource.java:96) at org.matsim.core.mobsim.qsim.QSim.createAgents(QSim.java:271) at org.matsim.core.mobsim.qsim.QSim.prepareSim(QSim.java:256) at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:220) at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:120) at org.matsim.core.controler.AbstractController$8.run(AbstractController.java:199) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:231) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:195) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:154) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:121) at org.matsim.core.controler.AbstractController.access$0(AbstractController.java:119) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:91) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:99) at org.matsim.core.controler.NewControler.run(NewControler.java:79) at org.matsim.core.controler.Controler.run(Controler.java:205) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.run(RunRobotaxiExample.java:60) at org.matsim.contrib.av.robotaxi.run.RunRobotaxiExample.main(RunRobotaxiExample.java:54)
Best regards,
Luo
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq