Composting
Model was written in NetLogo 6.2.0
•
Viewed 59 times
•
Downloaded 8 times
•
Run 0 times
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
turtles-own [ ready-timer ] globals [ lettuce-molecules microorganism-molecules lettuce_index ] breed [ lettuces lettuce ] breed [ microorganisms microorganism ] breed [ waters water ] breed [ oxygens oxygen ] breed [ carbons carbon ] breed [ nitrogens nitrgoen ] to setup clear-all set-default-shape turtles "circle" set lettuce-molecules 160 create-lettuces lettuce-molecules ask lettuces [ set color green ] ask lettuces [ set xcor 0 + random 5 set ycor 0 + random 5 ] set microorganism-molecules 20 if water-molecules > 45 or water-molecules < 60 or oxygen-molecules > 5 [ set microorganism-molecules 2 ] create-microorganisms microorganism-molecules ask microorganisms [ set color red ] ask microorganisms [ set shape "square" ] ask microorganisms [ setxy random-xcor random-ycor ] ;;set water-molecules 25 create-waters water-molecules if water-molecules > 45 or water-molecules < 60 [ ask waters [ set color blue ] ask waters [ setxy random-xcor random-ycor ] ] ;;set oxygen-molecules 25 create-oxygens oxygen-molecules if oxygen-molecules > 5 [ ask oxygens [ set color yellow ] ask oxygens [ setxy random-xcor random-ycor ] ] ;;set carbon-molecules 25 ;;create-carbons carbon-molecules ;;ask carbons [ set color grey ] ;;ask carbons [ setxy random-xcor random-ycor ] ;;set nitrogen-molecules 25 ;;create-nitrogens nitrogen-molecules ;;ask nitrogens [ set color orange ] ;;ask nitrogens [ setxy random-xcor random-ycor ] reset-ticks end to setup-molecules [c] set ready-timer 0 set color c setxy random-xcor random-ycor end to go ask microorganisms [ move let food one-of lettuces-here if food != nobody [ ask food [ die ] ] ;;if water-molecules > 45 or water-molecules < 60 or oxygen-molecules > 5 [ set microorganism-molecules 1 ] ] tick end to move set lettuce_index 1 loop [ ifelse lettuce lettuce_index != nobody [ face lettuce lettuce_index fd 1 stop ] [ set lettuce_index lettuce_index + 1 ] ] end
There is only one version of this model, created over 3 years ago by Hsiao Yang.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Composting.png | preview | Preview for 'Composting' | over 3 years ago, by Hsiao Yang | Download |
This model does not have any ancestors.
This model does not have any descendants.