Ambika's NetLogo Project

Ambika's NetLogo Project preview image

1 collaborator

Default-person A Mahto (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.2.0 • Viewed 239 times • Downloaded 39 times • Run 0 times
Download the 'Ambika's NetLogo Project' modelDownload this modelEmbed this model

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


WHAT IS IT?

This simulation will show how population density will affect how quickly viruses or messages would spread throughout a community.

HOW IT WORKS

If an animal meets another animal and it has a message, the message will be passed on to the other animal as well. You can tell which animal has the message because it will be larger and red in color in contrast to the other animals, which will be white.

HOW TO USE IT

Setup

First, decide which animal you would like. Your choices are butterfly, bug, and turtle. Next, use the slider to change the population size in the community. Then click on "Setup".

Running the Simulation

The "Go once!" button changes the time period by 1 each time you click on it. The other button ("Go forever!") will enable the program to run on its own. It doesn't really run forever. It just runs until all the animals have the message (which can take a long time sometimes).

You might want to change the speed of the ticks to be able to see the changes better.

THINGS TO NOTICE

When you start with a large population, the message spreads faster. This is because with a larger population, it is easier for animals to bump into each other.

Comments and Questions

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

Click to Run Model

turtles-own [ message? ]

to setup
  ; this will set up the simulation
  ; clear the space
  clear-all
  ; create the number of turtles the user asks for
  create-turtles population
  [
    set message? false
    setxy random-xcor random-ycor
  ]
  ; reset the time to zero
  reset-ticks
  ; ask all of the turtles to be size 3 and white
  ; ask all of the turtles to be in a random position
  ; set the turtle shape to the animal that the user asks for
  ask turtles [
    set shape Animal
    set size 3
    set color white
  ]
  ; ask one turtle to change color to red and size to 4
  ; set its message to be true
  ask n-of 1 turtles [
    set color red
    set size 4
    set message? true
  ]
end 

to go
  ask turtles [
    right random ( 90 * one-of [1 -1] ) forward 3
    if any? other turtles-here with [ message? ] [
      set color red
      set size 4
      set message? true
    ]
  ]
  if count turtles with [ message? ] = population [ stop ]
  tick
end 

There is only one version of this model, created over 4 years ago by A Mahto.

Attached files

File Type Description Last updated
Ambika's NetLogo Project.png preview Preview for 'Ambika's NetLogo Project' over 4 years ago, by A Mahto Download

This model does not have any ancestors.

This model does not have any descendants.