Skip to content

faq 279248897

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

Events not getting written at the end of last iteration

by Jishnu Narayan on 2018-05-17 14:47:29


Hello,

I am working on a scenario of taxi, pt, car, and bike. However at the end of last iteration, everytime I get an error saying that the output events could not be written and the simulation crashes. The error and the configuration file I use are given below.

ERROR MESSAGE

2018-05-17 16:38:08,643 ERROR DumpDataAtEndImpl:150 writing output events did not work; probably parameters were such that no events were generated in the final iteration org.matsim.core.utils.io.UncheckedIOException: java.nio.file.NoSuchFileException: .\Results for Sioux\output\intermodalExample\ITERS\it.5\5.events.xml.gz at org.matsim.core.controler.corelisteners.DumpDataAtEndImpl.dumpOutputEvents(DumpDataAtEndImpl.java:147) at org.matsim.core.controler.corelisteners.DumpDataAtEndImpl.notifyShutdown(DumpDataAtEndImpl.java:134) at org.matsim.core.controler.ControlerListenerManagerImpl.fireControlerShutdownEvent(ControlerListenerManagerImpl.java:122) at org.matsim.core.controler.AbstractController$1.shutdown(AbstractController.java:89) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:66) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:92) at org.matsim.core.controler.NewControler.run(NewControler.java:75) at org.matsim.core.controler.Controler.run(Controler.java:202) at org.matsim.contrib.av.intermodal.RunTaxiPTIntermodalExample.run(RunTaxiPTIntermodalExample.java:101) at org.matsim.contrib.av.intermodal.RunTaxiPTIntermodalExample.main(RunTaxiPTIntermodalExample.java:47) Caused by: java.nio.file.NoSuchFileException: .\Results for Sioux\output\intermodalExample\ITERS\it.5\5.events.xml.gz at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:99) at sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:278) at java.nio.file.Files.copy(Files.java:1274) at org.matsim.core.controler.corelisteners.DumpDataAtEndImpl.dumpOutputEvents(DumpDataAtEndImpl.java:145) ... 10 more

CONFIG FILE!!!

<?xml version="1.0" ?>
 <!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">
 <config>
 	<module name="dvrp">
 		<param name="mode" value="taxi"/>
 	</module>

 	<module name="taxi">
 		<param name="destinationKnown" value="false"/>
 		<param name="vehicleDiversion" value="false"/>
 		<param name="pickupDuration" value="120"/>
 		<param name="dropoffDuration" value="60"/>
 		<param name="onlineVehicleTracker" value="false"/>
        
 		<param name="breakIfNotAllRequestsServed" value="false"/>
 		<param name="taxisFile" value="taxi_vehicles(25).xml"/>

 		<param name="timeProfiles" value="true"/>
 		<param name="detailedStats" value="true"/>

 		<parameterset type="optimizer">
 			<param name="type" value="RULE_BASED"/>
 			<param name="id" value="example"/>
 			<param name="goal" value="DEMAND_SUPPLY_EQUIL"/>
 			<param name="nearestRequestsLimit" value="40"/>
 			<param name="nearestVehiclesLimit" value="40"/>
 			<param name="cellSize" value="1000"/>
 		</parameterset>
 	</module>

 	<module name="global">
 		<param name="randomSeed" value="4711"/>
 		<param name="coordinateSystem" value="Atlantis"/>
 		<param name="numberOfThreads" value="32"/>
 	</module>
    
 	<module name="parallelEventHandling" >

 		<!-- Estimated number of events during mobsim run. An optional optimization hint for the framework. -->
 		<param name="estimatedNumberOfEvents" value="null"/>

 		<!-- Number of threads for parallel events handler. 0 or null means the framework decides by itself. -->
 		<param name="numberOfThreads" value="5"/>

 		<!-- If enabled, each event handler is assigned to its own thread. Note that enabling this feature disabled the numberOfThreads option! This feature is still experimental! -->
 		<param name="oneThreadPerHandler" value="false"/>

 		<!-- If enabled, it is ensured that all events that are created during a time step of the mobility simulation are processed before the next time step is simulated. E.g. neccessary when within-day replanning is used. -->
 		<param name="synchronizeOnSimSteps" value="true"/>
 	</module>
	
 	<module name="network">
 		<param name="inputNetworkFile" value="network.xml"/>
 	</module>

 	<module name="plans">
 		<param name="inputPlansFile" value="1percentSioux.xml"/>
 	</module>

 	<module name="controler">
 		<param name="outputDirectory" value="./Results for Sioux/output/intermodalExample"/>
 		<param name="firstIteration" value="0"/>
 		<param name="lastIteration" value="5"/>
 		<param name="eventsFileFormat" value="xml"/>
 		<param name="mobsim" value="qsim"/>
 	</module>

 	<module name="qsim">
 		<!-- "start/endTime" of MobSim (00:00:00 == take earliest activity time/ run as long as active vehicles exist) -->
 		<param name="startTime" value="00:00:00"/>
 		<param name="endTime" value="30:00:00"/>
 		<param name="simStarttimeInterpretation" value="onlyUseStarttime"/>
	
 		<param name = "snapshotperiod"	value = "00:00:10"/> <!-- 00:00:00 means NO snapshot writing -->
 	</module>

 	<module name="planCalcScore">
 		<param name="learningRate" value="1.0"/>
 		<param name="BrainExpBeta" value="2.0"/>

 		<param name="lateArrival" value="-18"/>
 		<param name="earlyDeparture" value="-0"/>
 		<param name="performing" value="+6"/>
 		<!--<param name="traveling" value="-6"/>-->
 		<param name="traveling_taxi" value="0"/>
 		<param name="traveling_car" value="-1000"/>
 		<param name="traveling_transit_walk" value="-1000"/>
 		<!--<param name="traveling_pt" value="10"/>-->
 		<param name="waiting" value="-0"/>
		
 		<param name="activityType_0"            value="home"/> <!-- home -->
 		<param name="activityPriority_0"        value="1"/>
 		<param name="activityTypicalDuration_0" value="12:00:00"/>
 		<param name="activityMinimalDuration_0" value="08:00:00"/>
	
 		<param name="activityType_1"            value="work"/> <!-- work -->
 		<param name="activityPriority_1"        value="1"/>
 		<param name="activityTypicalDuration_1" value="08:00:00"/>
 		<param name="activityMinimalDuration_1" value="06:00:00"/>
 		<param name="activityOpeningTime_1"     value="07:00:00"/>
 		<param name="activityLatestStartTime_1" value="09:00:00"/>
 		<param name="activityEarliestEndTime_1" value=""/>
 		<param name="activityClosingTime_1"     value="18:00:00"/>

 		<param name="activityType_2"            value="secondary"/> <!-- shop -->
 		<param name="activityPriority_2"        value="1"/>
 		<param name="activityTypicalDuration_2" value="00:40:00"/>
 		<param name="activityMinimalDuration_2" value="00:10:00"/>
 		<param name="activityOpeningTime_2"     value="08:00:00"/>
 		<param name="activityLatestStartTime_2" value=""/>
 		<param name="activityEarliestEndTime_2" value=""/>
 		<param name="activityClosingTime_2"     value="20:00:00"/>

 	</module>
	
 	<module name="strategy">
 		<param name="maxAgentPlanMemorySize" value="5"/> <!-- 0 means unlimited -->

 		<param name="ModuleProbability_1" value="0.7"/> <!--0.7 -->
 		<param name="Module_1" value="BestScore"/>

 		<param name="ModuleProbability_2" value="0.1"/>   <!--0.1 -->
 		<param name="Module_2" value="ReRoute"/>

 		<param name="ModuleProbability_3" value="0.1"/>  <!--0.1 -->
 		<param name="Module_3" value="TimeAllocationMutator"/>

 		<param name="ModuleProbability_4" value="0.1"/>  <!--0.1 -->
 		<param name="Module_4" value="ChangeTripMode"/>
 	</module>

 	<module name="transit">
 		<param name="useTransit" value="true"/>
 		<param name="transitScheduleFile" value="transitschedule.xml"/>
 		<param name="vehiclesFile" value="transitVehicles.xml"/>
 		<param name="transitModes" value="pt"/>
 	</module>
	
 	<module name="changeMode">
 		<param name="modes" value="pt,car, taxi"/>
 	</module>

 </config>
 

Comments: 1


Re: Events not getting written at the end of last iteration

by Kai Nagel on 2018-05-17 17:19:12

The normal reason is that lastIteration is not a multiple of writeEventsInterval. So if lastIteration is 5, then writeEventsInterval needs to be 1 or 5.

I don't think that this error message will influence the results. But you will also not have an events file in ITERS/it.5/... .

Clone this wiki locally