Agnew's Snowplow Problem

Agnew's Snowplow Problem preview image

1 collaborator

Default-person Roy Wright (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.0.2 • Viewed 310 times • Downloaded 34 times • Run 0 times
Download the 'Agnew's Snowplow Problem' 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

breed [plows plow]
plows-own [ distance-traveled ]
patches-own [ snow ]

to setup
  clear-all
  ask patches [
    set snow starting-snow
  ]
  snow-color
  set-default-shape plows "default"
  create-plows number [
    set color red
    setxy 0 0
    set heading (random 4) * 90
  ]
  reset-ticks
end 

to go
  snow-fall
  snow-color
  ask plows [
    move
  ]
  tick
end 

to snow-fall
  ask patches [
    set snow snow + 1
  ]
end 

to snow-color
  ask patches [
    set pcolor scale-color gray snow 0 (contrast * plow-rate)
  ]
end 

to move
  set snow (snow - plow-rate)
  if snow < 1 [
    set snow 0
    set pcolor black
    if (pxcor mod street-spacing = 0) and (pycor mod street-spacing = 0) and (random 100 < turning-frequency) [
      rt (random 2) * 90
      lt (random 2) * 90
    ]
    fd 1
    set distance-traveled distance-traveled + 1
  ]
end 

There are 3 versions of this model.

Uploaded by When Description Download
Roy Wright over 6 years ago --fixed-- Download this version
Roy Wright over 6 years ago - Download this version
Roy Wright over 6 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Agnew's Snowplow Problem.png preview Preview for 'Agnew's Snowplow Problem' over 6 years ago, by Roy Wright Download

This model does not have any ancestors.

This model does not have any descendants.