Project Spatram

Project Spatram preview image

1 collaborator

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.2.2 • Viewed 11 times • Downloaded 0 times • Run 0 times
Download the 'Project Spatram' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

extensions [
  gis
  gis csv]

breed [residents resident]

turtles-own [
  personal-risk
  tick-bite-status
]

patches-own [
  landuse
  agent-count
  tick-bite-risk
]

globals
[
  landuse-list
  landuse-dataset
  shape-dataset
  precipitation
  temperature
  output-file
  bite-count
  residents-bite-count
]

to setup
   clear-all
   set-patch-size 5; this sets patch size to be smaller
   resize-world -50 49 -50 49; this sets world to 100 x 100 patches
   setup-environment
   setup-agents
   set bite-count 0
   set residents-bite-count 0
   reset-ticks
   file-close-all
end 

to setup-environment
  set landuse-dataset gis:load-dataset "data/Bilthoven/bilt_ascii.asc"
  gis:set-world-envelope (gis:envelope-of landuse-dataset)
  gis:apply-raster landuse-dataset landuse
  ask patches [
    if landuse = 20 [set pcolor orange set tick-bite-risk 0.05]; residential
    if landuse = 60 [set pcolor green set tick-bite-risk 0.85]; forest
    if landuse = 61 [set pcolor yellow set tick-bite-risk 0.4]; dunes
    if landuse = 62 [set pcolor grey set tick-bite-risk 0.2]; other
    ]
  set shape-dataset gis:load-dataset "data/Bilthoven/Bilt_shape.shp"
  gis:set-drawing-color white
  gis:draw shape-dataset 1
end 

to setup-agents
  create-residents initial-number-residents
  ask residents [move-to one-of patches with [landuse = 20]
    set color blue set shape "person"
    set personal-risk random-float 1
    set tick-bite-status false
  ]
end 

to go
  patch-agent-count
  ;set daily weather values
  file-open "data/Bilthoven/precip_bilt.csv"
  if file-at-end? [stop]
  let weather csv:from-row file-read-line
  set precipitation item 0 weather
  set temperature item 1 weather


  ;set tick bites
  ask turtles [
    set tick-bite-status false
  ]

  ;set the move
  tick-bite
  count-bites
  plot-bite-count


  ;create ASCII file
  if ticks = 300 [
    set output-file gis:patch-dataset agent-count
    gis:store-dataset output-file "data/output_ascii.asc"
  ]
  tick
end 

to tick-bite
  ask turtles [
    let patch-risk [tick-bite-risk] of patch-here
    if personal-risk < patch-risk [
      set tick-bite-status true
    ]
  ]
end 

to count-bites
  set bite-count bite-count + count turtles with [tick-bite-status = True]
  set residents-bite-count residents-bite-count + count residents with [tick-bite-status = True]
end 

to patch-agent-count
  ask patches [
    set agent-count (agent-count + count turtles-here)
  ]
end 

to plot-bite-count
  set-current-plot "Accumulated Tick Bites"
  plot bite-count
  plot residents-bite-count
end 

There is only one version of this model, created 24 days ago by Irene Caroline Sihombing.

Attached files

File Type Description Last updated
Project Spatram.png preview Preview for 'Project Spatram' 24 days ago, by Irene Caroline Sihombing Download

This model does not have any ancestors.

This model does not have any descendants.