Service access model - 1
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
Proximity to health services has been shown to be a key factor determining outcomes for a range of public health issues. Modelling travel time to health care using GIS has become a common of planning tool for identifying populations remote from health services and to support better transport and infrastructure planning. This model automates and simplifies some of the processes required for conducting raster based travel time analysis and allows a degree of interactivity and adaptability supporting the rapid exploration of multiple travel time scenarios through altering continuous variables such travel speed and add discrete factors such as flood barriers, new roads or service providers. Based on a land cover raster grid the model implements a chamfer metric cost-distance algorithm to calculate an accumulated cost grid. This example incorperates GIS layers of roads, rivers and vegetation from a district in West Timor (Indonesia) however it is relatively easy to substitute your own data.
HOW IT WORKS
The model uses a base land cover grid with each patch allocated a road type, vegetation cover of water course size. The model then allocates each land cover a value attribute of the number of seconds it takes to pass through. Destination points are manually added to the grid. A chamfer algorithm is used to calculate the travel time from any point on the base grid to the closest destination point.
HOW TO USE IT
The model can be used with and without underlying GIS data. Screen videos showing the model usage are available here:
https://rohanfisher.wordpress.com/modelling-access-to-services/
Without GIS Data.
Start exploring the model with the 'center target' switch set to 'on' and the 'Use-GIS' switch set to 'off'. This demonstrates the default Chamfer algorithm cost distance output using a constant travel speed for every patch to a single point and will result in a concentric distance gradation.
To run the model; (1) set the netlogo speed slider to the fastest setting (far right) (2) press 'Set-Up' then (3) go.
You can experiment with the basic cost distance output by 'drawing' onto the surface additional tragets, roads or barriers using the following buttons:
- Placing-target allows you to add new target (destination) points.
- Place road allows you to draw new roads lines.
- Place barrier allows you to draw new barriers to travel - ie a damaged or cut road. The barrier value slider allows you to choose the new cost value to (travel time in seconds) draw onto the travel surface.
Note only one of these feature drawing buttons should be depressed at any one time else you will be drawing multiple conflicting features with every mouse click.
With GIS data.
To run the model with 'real world' spatial data set the 'Use-GIS' switch to 'on'. This uses example GIS road and land cover data to attribute each patch a default travel speed. Turn the 'center target' switch to 'off' and the 'use-shp' switch to on. The 'use-shp' switch loads a vector shape file of destination points (health centers). 'Set-Up' the model again with the new data input settings. You will see a shade relief topographic display of a region in Indonesia with Roads (red-Yellow), rivers (Blue) and vegetation (forest:green, scrub:light green, grass:light brown) and four destination points.
Pressing 'go' will result in a classified' travel time display show remoteness 'zones' from target access points from close (>15min:dark blue) to remote (>2 hours:Red).
It is possible to experiment with a range of alternative travel scenario settings:
- Walking chooser allows you to pick how an agent is able to travel across country without transport infrastructure. Default is walking, assisted takes twice as long, stretcher 5 times.
- Time-of-day chooser allows you to select between day and night. Night time travel is 20% slower.
- Weather chooser allows you to select between clear, rainy and flooding. Rainy makes more streams impassable and slows travel by 10%. Flooding makes all stream impassable and slows travel by 30%
- Use road-speeds allows you to alter the default road travel speeds using the primary, secondary and local road sliders.
After altering the travel scenario settings use the reset or set-up button to reinitialise the model before running it again.
In addition to changing scenario settings it is possible to draw new destination points, roads and barriers as already described. If you add new destination points and want to test them using alternative travel time scenarios use the 'Save-Target' button to store them and use the 'reset' button, not the set-up, button to reinitialise the model.
Additional functions
The 'Continuous colour' button transforms the default GIS output from travel time Zones to a continuous colour scale.
The 'View GIS layer' button shows the base GIS layer coloured by travel speed.
A timer at the bottom right of the model shows the an estimate of the 'Time to go' before the model has completed a run. The value will appear as 0 until the model has completed one pass.
THINGS TO TRY
Run the model using multiple variable settings with of multiple model runs ‘Behavior Space’ and output each run as an image file to produce matrix or travel time scenarios. An example of this is shown in the accompanying paper: https://ij-healthgeographics.biomedcentral.com/articles/10.1186/s12942-017-0086-8
Use your own GIS base data. It is relatively easy to test this model with alternative GIS data sets. The current model uses a one GIS 'land cover' layer with four vegetation types (values 1-4), five stream size classes (values 101-105) and three road classes (values 201-203). These land cover attributes are then reclassified to travel cost in seconds within the model. This is described in more detail in the accompanying paper.
Add additional travel scenario buttons changing the cost distance attributes.
Think about the model not only in terms of travel to a service but also the time it would take a service to reach any pint within the model. Whilst in the developed world most service access is calculated using transport networks in disaster response settings it is often necessary for emergency services to travel off-networks to reach effected areas.
EXTENDING THE MODEL
Alternative cost distance transform algorithms could be applied to increase the spread and accuracy of the resulting output calculations.
This model is a proof concept with regards to the implementation of a cost distance analysis within an open-source ABM platform to facilitate more open an participatory engagement in this form of access and infrastructure planning modelling. It is intended that this model be modified to fit locally relevant service access and travel issues. The parameters included in this model are as a guide only, Netlogo makes it easy to change the interface and code to alter travel time scenario possibilities.
CREDITS AND REFERENCES
This model is described in detail in the paper: Interactive, open source, travel time scenario modelling:
Fisher, R. & Lassa, J., 2017. Interactive, open source, travel time scenario modelling: tools to facilitate participation in health service access analysis. International Journal of Health Geographics, 16(1)
Available here: https://ij-healthgeographics.biomedcentral.com/articles/10.1186/s12942-017-0086-8
If you mention this model please use the citations above.
A description to the distance transform method used is available here: https://www.spatialanalysisonline.com/HTML/index.html?cost_distance.htm
COPYRIGHT AND LICENSE
Copyright 2016 Rohan Fisher.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Comments and Questions
extensions [palette gis] globals [a1 b1 c1 scan minldm ldm1 ldm2 ldm3 ldm4 ldm5 ldm6 ldm7 ldm8 ldm9 ldm10 ldm11 ldm12 ldm13 d0 x y covergis a b c d f mx target-data iteration time scan-time time-to-go] patches-own [ dist cost costs is-land-patch costgis cover saved-target fin-dist] breed [bar bars] breed [road1 roads1] breed [road2 roads2] breed [road3 roads3] breed [dest dests] breed [scanner scanners] to set-up clear-all set-gis set c min-pxcor + 2 set d min-pycor + 2 set a max-pxcor - 2 set b max-pycor - 2 set a1 0.9866 set b1 1.4141 set c1 2.2062 ask patch c b [sprout-scanner 1 [set color yellow set size 8 set heading 180]] set scan 1 set iteration 0 reset-ticks end to go if ticks = 0 [reset-timer] if use-gis and ticks < 2 [set-cost] if scan = 5 [chkend] ask turtles with [color = yellow] [fd 1 chk-scan] if not any? scanner [ ask patches [set fin-dist dist ] set-zcolor ask patches with [dist = 999999] [set dist -1] set-pcolor if use-gis [set-zcolor] stop ] if scan = 1 [ask turtles [foward-scan]] if scan = 2 [ask turtles [back-scan]] if scan = 3 [ask turtles [top-scan]] if scan = 4 [ask turtles [bot-scan]] if scan >= 2 [set time-to-go (scan-time - timer)] tick end to set-gis ask patches [set cost 5 set dist 999999] if center-target [ask patches [if (pxcor = 0 and pycor = 0) [set dist 0] ]] ask patches with [dist = 999999] [set pcolor blue] ;;load landcover layer set covergis gis:load-dataset "data/landcover.asc" if use-gis [gis:apply-raster covergis cover make-rivers set-cost] gis:set-world-envelope (gis:envelope-of covergis) ask patches [ ifelse (cost <= 0) or (cost >= 0) [ set is-land-patch 1 ] [ set cost 60 ] ] ; NaN fix ;;import shape file for destination points if use-shp [ set target-data gis:load-dataset "data/ponec.shp" foreach gis:feature-list-of target-data [gis:set-drawing-color white gis:fill ? 2.0 ask patches gis:intersecting target-data [set dist 0 ] ]] ;;display shaded landcover image if use-gis [import-pcolors-rgb "data/LandCover_png.png" ask patches with [dist = 0] [sprout-dest 1 [set shape "cylinder" set size 10 set color white]]] end ;; set default cost value for each patch based on land cover type, ie the amount of time it takes to cross a patch in seconds;;;;;;;;;;;;; to set-cost ask patches with [cover = 1] [set cost 180] ask patches with [cover = 2] [set cost 90] ask patches with [cover = 3] [set cost 60] ask patches with [cover = 4] [set cost 240] ask patches with [cover = 101] [set cost 90] ask patches with [cover = 102] [set cost 90] ask patches with [cover = 103] [set cost 90] ask patches with [cover = 104] [set cost 90] ask patches with [cover = 105] [set cost 99999] ask patches with [cover = 201] [set cost 3] ask patches with [cover = 202] [set cost 7] ask patches with [cover = 203] [set cost 18] ;; set cost value with optionalsettings if (walking = "Assisted") [ask patches [if cover < 5 [set cost cost * 2]]] if (walking = "Stretcher") [ask patches [if cover < 5 [set cost cost * 5]]] if (time-of-day = "Night") [ask patches [set cost cost * 1.2]] if (weather = "Rainy") [ask patches [if cover = 104 or cover = 103 [set cost 99999]] ask patches [set cost cost * 1.1]] if (weather = "Flooding") [ask patches [if cover = 104 or cover = 103 or cover = 102 or cover = 101 [set cost 99999]] ask patches [set cost cost * 1.3]] if use-road-speeds [ask patches [ if (cover = 201) [set cost (180 / Pimary-Road)] if (cover = 202) [set cost (180 / Secondary-Road)] if (cover = 203) [set cost (180 / Local-Road)]]] end ;;;;;;;;;;;;;;;;;;; Chamfer scans ;;;;;;;;;;;;;;;;;;; to foward-scan set d0 ([dist] of patch-here) set LDM1 (C1 * cost + ([dist] of patch-at -1 2)) set LDM2 (C1 * cost + ([dist] of patch-at -2 1)) set LDM3 (C1 * cost + ([dist] of patch-at -2 -1)) set LDM4 (C1 * cost + ([dist] of patch-at -1 -2)) set LDM5 (B1 * cost + ([dist] of patch-at -1 1)) set LDM6 (B1 * cost + ([dist] of patch-at -1 -1)) set LDM7 (A1 * cost + ([dist] of patch-at -1 0)) set LDM8 (A1 * cost + ([dist] of patch-at 0 -1)) set LDM9 (0 + ([dist] of patch-at 0 0)) set minldm min (list ldm1 ldm2 ldm3 ldm4 ldm5 ldm6 ldm7 ldm8 ldm9) set dist min (list d0 minldm ) end to back-scan set d0 ([dist] of patch-here) set LDM1 (C1 * cost + ([dist] of patch-at 1 -2)) set LDM2 (C1 * cost + ([dist] of patch-at 2 -1)) set LDM3 (C1 * cost + ([dist] of patch-at 2 1)) set LDM4 (C1 * cost + ([dist] of patch-at 1 2)) set LDM5 (B1 * cost + ([dist] of patch-at 1 -1)) set LDM6 (B1 * cost + ([dist] of patch-at 1 1)) set LDM7 (A1 * cost + ([dist] of patch-at 1 0)) set LDM8 (A1 * cost + ([dist] of patch-at 0 1)) set LDM9 (0 + ([dist] of patch-at 0 0)) set minldm min (list ldm1 ldm2 ldm3 ldm4 ldm5 ldm6 ldm7 ldm8 ldm9) set dist min (list d0 minldm) end to top-scan set d0 ([dist] of patch-here) set LDM1 (C1 * cost + ([dist] of patch-at -1 2)) set LDM2 (C1 * cost + ([dist] of patch-at -2 1)) set LDM3 (C1 * cost + ([dist] of patch-at 2 1)) set LDM4 (C1 * cost + ([dist] of patch-at 1 2)) set LDM5 (B1 * cost + ([dist] of patch-at -1 1)) set LDM6 (B1 * cost + ([dist] of patch-at 1 1)) set LDM7 (A1 * cost + ([dist] of patch-at -1 0)) set LDM8 (A1 * cost + ([dist] of patch-at 0 1)) set LDM9 (0 + ([dist] of patch-at 0 0)) set minldm min (list ldm1 ldm2 ldm3 ldm4 ldm5 ldm6 ldm7 ldm8 ldm9) set dist min (list d0 minldm ) end to bot-scan set d0 ([dist] of patch-here) set LDM1 (C1 * cost + ([dist] of patch-at -1 -2)) set LDM2 (C1 * cost + ([dist] of patch-at -2 -1)) set LDM3 (C1 * cost + ([dist] of patch-at 2 -1)) set LDM4 (C1 * cost + ([dist] of patch-at 1 -2)) set LDM5 (B1 * cost + ([dist] of patch-at 1 -1)) set LDM6 (B1 * cost + ([dist] of patch-at -1 -1)) set LDM7 (A1 * cost + ([dist] of patch-at 1 0)) set LDM8 (A1 * cost + ([dist] of patch-at 0 -1)) set LDM9 (0 + ([dist] of patch-at 0 0)) set minldm min (list ldm1 ldm2 ldm3 ldm4 ldm5 ldm6 ldm7 ldm8 ldm9) set dist min (list d0 minldm) end ;; change scan direction to chk-scan if ycor = d and scan = 1 [set f (f + 1) setxy (c + f) b ] if xcor = a and scan = 1 [set f 0 setxy a d set heading 0 set scan 2 set scan-time (timer * 4) ] if ycor = b and scan = 2 [set f (f + 1) setxy (a - f) d ] if xcor = c and scan = 2 [set f 0 setxy c b set heading 90 set scan 3 set scan-time (timer * 2)] if xcor = a and scan = 3 [set f (f + 1) setxy c (b - f) ] if ycor = d and scan = 3 [set f 0 setxy a d set heading 270 set scan 4 ] if xcor = c and scan = 4 [set f (f + 1) setxy a (d + f) ] if ycor = b and scan = 4 [ set time timer die] end ;;;;;;;;;;;;;;;;;;;;;;;;;;Drawing destination target points, new roads and barriers;;;;;;;;;;;;;;;;;;;;; ;; darwing a new destination point to place-target if (mouse-down?) [ ask patch mouse-xcor mouse-ycor [sprout-dest 1 [set dist 0 ask patches in-cone 3 360 [set pcolor black] die]]] end ;; drawing a new barrier to place-barrier if (mouse-down?) [ ask patch mouse-xcor mouse-ycor [sprout-bar 1 [ set color green set cost (Barrier-value * 60) set pcolor green ask patches in-cone 2 360 [ set cost (Barrier-value * 60) set pcolor green ] die]]] end ;; drawing a new road to place-road if (mouse-down?) [ ask patch mouse-xcor mouse-ycor [ set pcolor red ifelse use-gis [ if (Road-Type = "Primary") [set cover 201] if (Road-Type = "Secondary") [set cover 202] if (Road-Type = "Local") [set cover 203]] [set cost 2]]] end ;; icrease the width of rivers so the act as impermeable barriers - place roads over river. To make-rivers ask patches with [cover = 201] [sprout-road1 1] ask patches with [cover = 202] [sprout-road2 1] ask patches with [cover = 203] [sprout-road3 1] ask patches with [cover = 101] [sprout-bar 1[ ask patches in-cone 1 360 [set cover 101 ] die]] ask patches with [cover = 102] [sprout-bar 1[ ask patches in-cone 1 360 [set cover 102 ] die]] ask patches with [cover = 103] [sprout-bar 1[ ask patches in-cone 1 360 [set cover 103 ] die]] ask patches with [cover = 104] [sprout-bar 1[ ask patches in-cone 1 360 [set cover 104 ] die]] ask patches with [cover = 105] [sprout-bar 1[ ask patches in-cone 1 360 [set cover 105 ] die]] ask road1 [ask patch-here [set cover 201] die] ask road2 [ask patch-here [set cover 202] die] ask road3 [ask patch-here [set cover 203] die] end ;;;;;;;;;;;;;;;;;;;;Displaying model output;;;;;;;;;;;;;;;;;;;;;;; ;;Display base GIS data to view-gis-layer ask patches [ set pcolor palette:scale-gradient palette:scheme-colors "Divergent" "Spectral" 7 cost 1 300 ] ask patches with [dist = 0] [sprout-dest 1 [set shape "cylinder" set size 15 set color white]] end ;;Display out-put as continous colour to set-pcolor ask patches [ set pcolor palette:scale-gradient palette:scheme-colors "Divergent" "Spectral" 9 dist (mx) 0] ask patches with [dist = 0] [sprout-dest 1 [set shape "cylinder" set size 7 set color white]] end ;;Display output as travel time zones to set-zcolor ask patches [let mint (dist / 60) if (fin-dist / 60) >= 0 and (fin-dist / 60) < 15 [set pcolor 103] if (fin-dist / 60) > 15 and (fin-dist / 60) < 30 [set pcolor 94] if (fin-dist / 60) > 30 and (fin-dist / 60) < 60 [set pcolor green ] if (fin-dist / 60) > 60 and (fin-dist / 60) < 99 [ set pcolor yellow ] if (fin-dist / 60) > 90 and (fin-dist / 60) < 121 [ set pcolor orange ] if (fin-dist / 60) > 120 and (fin-dist / 60) < 99999 [ set pcolor red ] ] ask patches with [dist = 0] [sprout-dest 1 [set shape "cylinder" set size 7 set color white]] set mx ((median [dist] of patches) * 2) if use-gis [set mx ((standard-deviation [dist] of patches) * 2)] if (use-gis and (weather = "Rainy" or weather = "Flooding" ))[set mx mean ([dist] of patches) ] end ;;;;;;;;;;;;;;;;;;;;Restting the model with saved destination targets;;;;;;;;;;;;;;;;;;;;;;; to clear set time 0 set time-to-go 0 set-gis set scan 1 set mx 0 set f 1 clear-turtles ask patch c b [sprout-scanner 1 [set color yellow set size 15 set heading 180]] reset-ticks ask patches with [ saved-target = 100] [set dist 0] set-zcolor end to chkend clear-turtles set-zcolor end
There is only one version of this model, created over 8 years ago by Rohan Fisher.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Fisher_Lassa_2017_Interactive, open source, travel time senario modelling.pdf | Journal article providing background to this work and describing the model. | over 8 years ago, by Rohan Fisher | Download | |
Model-1.zip | data | This contains the nlogo and all associated data files to run the model. | over 8 years ago, by Rohan Fisher | Download |
Service access model - 1.png | preview | Preview for 'Service access model - 1' | over 8 years ago, by Rohan Fisher | Download |
This model does not have any ancestors.
This model does not have any descendants.