-
Notifications
You must be signed in to change notification settings - Fork 179
faq 80642071
by Rolando Armas on 2016-08-29 09:50:59
Hey, friends!
I have an issue trying to run matsim-0.8.0. I have my toy-network and initial plans. Config file settings are
<config>
<module name="network">
<param name="inputNetworkFile" value="./examples/equil/network.xml" />
</module>
<module name="plans">
<param name="inputPlansFile" value="./examples/equil/plans100.xml" />
</module>
<module name="controler">
<param name="outputDirectory" value="./output/example5" />
<param name="firstIteration" value="0" />
<param name="lastIteration" value="10" />
<param name="eventsFileFormat" value="xml" />
</module>
<module name="qsim">
<param name="snapshotperiod" value="00:01:00" />
</module>
<module name="planCalcScore" >
<param name="lateArrival" value="-18" />
<param name="earlyDeparture" value="-0" />
<param name="performing" value="+6" />
<param name="traveling" value="-6" />
<param name="waiting" value="-0" />
<param name="activityType_0" value="h" /> <!-- home -->
<param name="activityTypicalDuration_0" value="12:00:00" />
<param name="activityType_1" value="w" /> <!-- work -->
<param name="activityTypicalDuration_1" value="08:00:00" />
<param name="activityOpeningTime_1" value="07:00:00" />
<param name="activityLatestStartTime_1" value="09:00:00" />
<param name="activityClosingTime_1" value="18:00:00" />
</module>
<module name="strategy">
<param name="maxAgentPlanMemorySize" value="5" /> <!-- 0 means unlimited -->
<param name="ModuleProbability_1" value="0.9" />
<param name="Module_1" value="ChangeExpBeta" />
<param name="ModuleProbability_2" value="0.1" />
<param name="Module_2" value="ReRoute" />
<param name="ModuleProbability_3" value="0.1" />
<param name="Module_3" value="TimeAllocationMutator" />
</module>
</config>
When I try to run my controler method:
String configfile="./input/config.xml"; Config config = ConfigUtils.createConfig(); ConfigUtils.loadConfig(config, configfile); //config.controler().setLastIteration(0); Scenario scenario = ScenarioUtils.createScenario(config); Controler controler = new Controler(scenario); controler.getConfig().controler().setOverwriteFileSetting( true ? OutputDirectoryHierarchy.OverwriteFileSetting.overwriteExistingFiles : OutputDirectoryHierarchy.OverwriteFileSetting.failIfDirectoryExists ); controler.run();
I get the next output:
INFO LegTimesControlerListener:50 [0] average trip (probably: leg) duration is: 0 seconds = 00:00:00
2016-08-29 18:42:07,497 INFO ControlerListenerManagerImpl:248 calling notifyAfterMobsim on null
2016-08-29 18:42:07,497 INFO ControlerListenerManagerImpl:251 [it.0] all ControlerAfterMobsimListeners called.
2016-08-29 18:42:07,497 INFO AbstractController$4:163 ### ITERATION 0 fires scoring event
2016-08-29 18:42:07,497 INFO ControlerListenerManagerImpl:183 calling notifyScoring on org.matsim.core.scoring.PlansScoringImpl
2016-08-29 18:42:07,498 INFO NewScoreAssignerImpl:36 it: 0 msaStart: null
2016-08-29 18:42:07,499 INFO ControlerListenerManagerImpl:194 [it.0] all ControlerScoringListeners called.
2016-08-29 18:42:07,499 INFO AbstractController$5:171 ### ITERATION 0 fires iteration end event
2016-08-29 18:42:07,499 INFO ControlerListenerManagerImpl:160 calling notifyIterationEnds on org.matsim.core.controler.corelisteners.EventsHandlingImpl
2016-08-29 18:42:07,500 INFO EventsManagerImpl:161 removing Event-Handler: org.matsim.core.events.algorithms.EventWriterXML
2016-08-29 18:42:07,500 INFO EventsManagerImpl:161 removing Event-Handler: org.matsim.core.events.algorithms.EventWriterXML
2016-08-29 18:42:07,500 INFO ControlerListenerManagerImpl:160 calling notifyIterationEnds on org.matsim.core.scoring.PlansScoringImpl
2016-08-29 18:42:07,500 INFO ControlerListenerManagerImpl:167 calling notifyIterationEnds on org.matsim.counts.CountsControlerListener
2016-08-29 18:42:07,500 INFO ControlerListenerManagerImpl:167 calling notifyIterationEnds on org.matsim.analysis.ScoreStatsControlerListener
2016-08-29 18:42:07,500 INFO ScoreStatsControlerListener:185 -- avg. score of the executed plan of each agent: NaN
2016-08-29 18:42:07,501 INFO ScoreStatsControlerListener:186 -- avg. score of the worst plan of each agent: NaN
2016-08-29 18:42:07,501 INFO ScoreStatsControlerListener:187 -- avg. of the avg. plan score per agent: NaN
2016-08-29 18:42:07,501 INFO ScoreStatsControlerListener:188 -- avg. score of the best plan of each agent: NaN
Apparently the initial plans are not properly configured. However the same configuration run fine in matsim-0.6.0.!
Anybody knows what is happened?
Thanks!
by Kai Nagel on 2016-08-30 19:30:36
Oh, I see. It has to be loadScenario
, not createScenario
. The latter just creates an empty scenario based on the config, but makes no effort to load it. So you are running an empty simulation. (Should that be an error? Maybe, but for many tasks being able to run empty scenarios is rather convenient.)
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq