Skip to content

Call generation config file

Samuel Ridler edited this page Apr 19, 2024 · 6 revisions

The simulation can either use a calls csv file using <calls>calls.csv</calls> under simConfig/simFiles in a sim config (e.g. sim_config.xml), or the calls can be generated based on parameters in a call generation config file using <callGenConfig>gen_config.xml</callGenConfig>. For an example of such a file, see JEMSS/data/cities/auckland/models/1/calls/reps/train/gen_config.xml.

Below explains the contents of the call generation config file:

<genConfig>
	<mode>calls</mode>

	<!-- number of call sets to be generated, here we use 30 replications -->
	<numCallsFiles>30</numCallsFiles>

	<!-- where calls files will be written to file (if they are written, which is controlled by sim_config.xml) -->
	<outputPath>output</outputPath>
	
	<sim>
		<!-- time (in days) after which calls will start being generated, usually leave this as 0.0 -->
		<startTime>0.0</startTime>

		<!-- earliest time (in days) that last call will arrive -->
		<minLastCallArrivalTime>1 + 14 + 0.1</minLastCallArrivalTime>
		
		<callDistributions>
			<!-- distribution for duration between call arrivals, below is for 280 calls per day -->
			<interarrivalTime seed="1217248832">Exponential(1/280)</interarrivalTime>

			<!-- priority/urgency of calls, below is for 57% high, 24.5% medium, and 18.5% low priority -->
			<priority seed="199894915">Categorical([0.57, 0.245, 0.185])</priority>

			<!-- delay (in days) between call arrival and ambulance dispatch,
			below is for normal distribution with 50 seconds mean and standard deviation 0 -->
			<dispatchDelay seed="293110701">Normal(50/60/60/24, 0)</dispatchDelay>

			<!-- on-scene or treatment duration (in days), below is for 12 minutes average -->
			<onSceneDuration seed="2023374599">Exponential(12/60/24)</onSceneDuration>

			<!-- probability that transport to hospital is required, below is for 80% probability -->
			<transport seed="1427137433">Bernoulli(0.8)</transport>

			<!-- duration (in days) that ambulance spends upon reaching hospital for patient handover -->
			<handoverDuration seed="1330644641">Exponential(12/60/24)</handoverDuration>
		</callDistributions>
		
		<!-- call spatial density distribution, should be a raster with WGS84 coordinates -->
		<callDensityRaster cellSeed="1442623348" cellLocSeed="1963951879">
			<filename>$jemssDir/data/cities/auckland/data/population density/census 2013/rasters/urban/1/auckland-urban-pop-densit-40m.tif</filename>
		</callDensityRaster>
	</sim>
</genConfig>

The statistical distributions used above like Exponential and Normal are provided by Distributions.jl, through which many other distributions are available.

Clone this wiki locally