-
Notifications
You must be signed in to change notification settings - Fork 179
faq 109132709
by Gerald Richter on 2017-04-28 16:05:20
running nightly MATSim-Build: a3bd8cf
I get an error and the log looks like this:
...
2017-05-03 10:15:06,560 INFO NetworkImpl:152 link # 524288
2017-05-03 10:15:06,597 INFO NetworkImpl:156 node # 262144
2017-05-03 10:15:06,923 INFO ControlerListenerManagerImpl:107 calling notifyStartup on org.matsim.analysis.ScoreStatsControlerListener
2017-05-03 10:15:06,923 INFO ControlerListenerManagerImpl:110 all ControlerStartupListeners called.
2017-05-03 10:15:06,923 INFO ControlerUtils:58 config dump before iterations start
2017-05-03 10:15:06,934 INFO ControlerUtils:62
...
DUMPED CONFIG
...
2017-05-03 10:15:06,959 INFO ControlerUtils:63 Complete config dump done.
2017-05-03 10:15:06,959 INFO ControlerUtils:64 Checking consistency of config...
2017-05-03 10:15:06,960 INFO PlanCalcScoreConfigGroup$ScoringParameterSet:1181 NO OPENING OR CLOSING TIMES DEFINED!
There is no activity type that has an opening *and* closing time (or opening time and late penalty) defined.
This usually means that the activity chains can be shifted by an arbitrary
number of hours without having an effect on the score of the plans, and thus
resulting in wrong results / traffic patterns.
If you are using MATSim without time adaptation, you can ignore this warning.
2017-05-03 10:15:06,961 INFO VspConfigConsistencyCheckerImpl:58 NOT running vsp config consistency check because vsp defaults checking level is set to IGNORE
2017-05-03 10:15:06,962 ERROR MatsimRuntimeModifications:54 Getting uncaught Exception in Thread main
java.lang.NullPointerException
at org.matsim.core.config.consistency.ConfigConsistencyCheckerImpl.checkPlanCalcScore(ConfigConsistencyCheckerImpl.java:56)
at org.matsim.core.config.consistency.ConfigConsistencyCheckerImpl.checkConsistency(ConfigConsistencyCheckerImpl.java:51)
at org.matsim.core.config.Config.checkConsistency(Config.java:228)
at org.matsim.core.controler.ControlerUtils.checkConfigConsistencyAndWriteToLog(ControlerUtils.java:65)
at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:89)
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.run.Controler.run(Controler.java:56)
at org.matsim.run.Controler.main(Controler.java:60)
2017-05-03 10:15:06,963 INFO MatsimRuntimeModifications:58 S H U T D O W N --- start shutdown.
2017-05-03 10:15:06,963 ERROR MatsimRuntimeModifications:60 ERROR --- This is an unexpected shutdown!
2017-05-03 10:15:06,963 ERROR MatsimRuntimeModifications:63 Shutdown possibly caused by the following Exception:
java.lang.NullPointerException
at org.matsim.core.config.consistency.ConfigConsistencyCheckerImpl.checkPlanCalcScore(ConfigConsistencyCheckerImpl.java:56)
at org.matsim.core.config.consistency.ConfigConsistencyCheckerImpl.checkConsistency(ConfigConsistencyCheckerImpl.java:51)
at org.matsim.core.config.Config.checkConsistency(Config.java:228)
at org.matsim.core.controler.ControlerUtils.checkConfigConsistencyAndWriteToLog(ControlerUtils.java:65)
at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:89)
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.run.Controler.run(Controler.java:56)
at org.matsim.run.Controler.main(Controler.java:60)
2017-05-03 10:15:06,964 INFO ControlerListenerManagerImpl:121 calling notifyShutdown on org.matsim.core.controler.corelisteners.EventsHandlingImpl
2017-05-03 10:15:06,964 INFO ControlerListenerManagerImpl:121 calling notifyShutdown on org.matsim.core.controler.corelisteners.DumpDataAtEndImpl
2017-05-03 10:15:06,964 INFO ControlerListenerManagerImpl:126 calling notifyShutdown on org.matsim.analysis.ModeStatsControlerListener
2017-05-03 10:15:06,964 INFO ControlerListenerManagerImpl:126 calling notifyShutdown on org.matsim.analysis.ScoreStatsControlerListener
2017-05-03 10:15:06,965 INFO ControlerListenerManagerImpl:126 calling notifyShutdown on org.matsim.analysis.TravelDistanceStatsControlerListener
2017-05-03 10:15:06,965 INFO ControlerListenerManagerImpl:129 all ControlerShutdownListeners called.
2017-05-03 10:15:06,965 ERROR MatsimRuntimeModifications:78 ERROR --- MATSim unexpectedly terminated. Please check the output or the logfile with warnings and errors for hints.
2017-05-03 10:15:06,965 ERROR MatsimRuntimeModifications:79 ERROR --- results should not be used for further analysis.
2017-05-03 10:15:06,965 INFO MatsimRuntimeModifications:81 S H U T D O W N --- shutdown completed.
2017-05-03 10:15:06,965 ERROR MatsimRuntimeModifications:83 ERROR --- This was an unexpected shutdown! See the log file for a possible reason.
As I have no clue, what about the config might be wrong, where do I start with this information?
Can anybody help?
thanks
by Gerald Richter on 2017-05-03 13:48:44
Although I still have no idea, why this error occurred,
the safest bet for getting a working configuration seems to be
- generate a default config from your MATSim version
- change everything you need with some kind of diff-editor
- stepwise
- check if it still works...
at least this way I got my scenario to simulate.
by Kai Nagel on 2017-05-09 21:02:02
The failing line in the code is
if (c.planCalcScore().getModes().get(TransportMode.pt).getMarginalUtilityOfTraveling() > 0) {
Presumably, the mode parameters for TransportMode.pt
did not exist in your configuration (as constructed by the code), and then this throws a null pointer exception.
Presumably, this happens rarely with other people, since those parameters are set to some value by default, so you must have picked a configuration that erases them.
Still, looks like a bug to me. I added code that hedges against these things being null (which is an allowed state).
---
Overall, I still recommend minimalistic config files, i.e. only copy those lines from the default config that you want to change. Otherwise, you will run into additional problems with MATSim version updates.
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq