- Art
- Astronomy
- Biology
- Selection and Mutation Series
- Ant Patterns
- Bacterial Growth
- Bark Beetles
- Biological Buffer
- Birds Competing For Worms
- Color Bunnies
- Ecosystem - Predator, Prey, and Grass
- Ecosystem - Rabbits and Grass
- Ecosystem - Two Species
- Ecosystem With Predator, Prey, And Grass
- Forest Fire
- Honeycomb Formation
- Termites Perimeter
- Yeast Growth
- Chemistry
- Earth Science
- Mathematics
- Physics
- Social Science
Yeast Growth
Submitted by librarian on Mon, 2006-08-07 14:08. :: Category
WHAT IS IT?
A model of two types of yeast growing on a plate of nutrients.
HOW TO USE IT
For simple operation simply click 'setup' followed by 'start.
THINGS TO NOTICE
What impact does changing the white mutation rate have on the overall population distribution ? The spatial distribution ?
EXPLORATIONS
Attempt to add a graph that shows the distribution of the types of yeast.
Turtle procedures
;; Each patch stores a value for amount of nutrients, color, and number of dead yeast cells.
patches-own [nutrients saved_color dead_yeast]
;; Each turtles stores a value for an advantage amount.
turtles-own [advantage]
;; There are two kinds of turtles: red yeast cells and white yeast cells
breeds [yred ywhite]
;; The go procedure (called by pressing the "go" button)
;; This is the program's main loop.
;; For each turtle, this procedure randomly selects a value between 0 and 99
;; If that value is less than the value of (birth_factor * nutrients * advantage)
;; (birth_factor is a user-specified value on the slider called birth factor)
;; then this turtle give birth to a new turtle to simulate budding.
;; This new bud grows one step away from the parent, gets its variable initialized
;; and then eats.
;; Regardless of whether a turtle has given birth or not, each turtle then
;; checks to see whether it should die and whether it should eat.
to go
if ((random 100) < (birth_factor * nutrients * advantage))
[
hatch
[
seth random 360
fd 1
set_newbud_variables
newbud_eats
]
]
die?
eat?
end
;; The die? procedure (called from within the go procedure or main loop)
;; A turtle should die if the randomly selects a number is less than the user-specified
;; death_rate. (death_rate is a slider value.)
;; If it should die, the turtle stamps its color on the current patch.
;; Then dead yeast count at this patch is incremented by 1 and the turtle dies.
to die?
if (random 100) < (death_rate) [stamp color setdead_yeast dead_yeast + 1 die]
end
;; The eat? procedure
;; A turtle should eat if the randomly selected number is less than the user-specified
;; consumption_rate. (consumption_rate is a slider value.)
;; If it should eat and nutrients are available at the current patch, then the nutrient
;; value of the current patch goes down by 1.
to eat?
if (random 100) < (consumption_rate) [if nutrients > 0 [setnutrients (nutrients - 1)]]
end
;; The set_newbud_variables procedure
;;
to set_newbud_variables
ifelse (((random 100) < white_mutation_rate) or (breed = ywhite))
[
scale-color ywhite (count-turtles-here + dead_yeast) -5 5 setbreed ywhite
setadvantage (1 + (white_growth_advantage / 100))
ifelse (count-yred-here > 0) and (breed - ywhite)
[ht] ;; hide turtle
[st] ;; show turtle
]
[
scale-color red (count-turtles-here + dead_yeast) 0 15
]
end
to newbud_eats
if nutrients > 0
[setnutrients (nutrients - 1) if nutrients < 0 [setnutrients 0]]
end
;; DISPERSE procedure (called by setup-agents observer procedure)
;; moves turtle forward 1 until it reaches an uninhabited patch
to disperse
if count-turtles-here > 1 [fd 1 disperse]
end
Observer procedures
;; SETUP Procedure (called by the button "setup")
;; clears the graphics, turtles, plots, and global variables
;; calls procedures to setup the environment and agents
to setup
ca
ask-turtles [die]
setup-environment
setup-agents
end
;; SETUP-ENVIRONMENT procedure (called by setup procedure)
;; creates patches with values for nutrients, dead yeast cells and color
to setup-environment
ask-patches [setnutrients 10
setdead_yeast 0
setpc black]
end
;; SETUP-AGENTS procedure (called by setup procedure)
;; creates an initial number of red yeast cells with values for advantage and color
;; and disperse them.
to setup-agents
crt initial_number
ask-turtles
[setbreed yred
setadvantage 1
repeat 5 [disperse]
scale-color red count-turtles-here 0 15
]
end
;; INNOCULATE procedure (called by the "innoculate" button)
;; resets the patches' nutrients and number of dead yeast cells
;; at each of the non-white patches sprouts a turtle with color and
;; advantage based on the patches' color.
to innoculate
ask-patches [setnutrients 10
setdead_yeast 0]
ask-patches [
if (pc != black)
[ sprout [
ifelse color = red
[setbreed yred setadvantage 1 scale-color red count-turtles-here 0 15]
[setbreed ywhite setadvantage (1 + (white_growth_advantage / 100)) scale-color ywhite (count-turtles-here + dead_yeast) -5 5 ]
]
]
]
end
;; BRING_EM_BACK procedure (called by the button "show turtles")
;; resets patches' color to the saved color
;; hides white yeast cells that are on the same patch as a red yeast cell
to bring_em_back
ask-patches[
setpc saved_color
]
ask-turtles [if (breed = ywhite) and (count-yred-here > 0) [ht]]
end
;; DIFFUSE_NUTRIENTS procedure (called by the button "diffuse_nutrients")
;; diffuses nutrients to the surrounding patches by the diffusion amount using
;; the value set on the slider called "diffusion amount"
to diffuse_nutrients
diffuse nutrients (diffusion_amount / 100)
end
4745 reads
