Timber Company
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
THINGS TO NOTICE
(suggested things for the user to notice while running the model)
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
turtles-own [myplant myharvest] patches-own [height] globals [totalplanted totalharvested totalfeet totalprofit totalhours] to setup clear-all ask patches [set pcolor brown set height 0] ;; all patches are brown ask n-of number_of_trees patches [set pcolor green set height random 35] ;; patches with a random height between 1-35 are green let planters workers_to_plant * planting_rate let harvesters workers_to_harvest * harvesting_rate let NumTurtles planters if harvesters > planters [set NumTurtles harvesters] show NumTurtles create-turtles NumTurtles ;; create turtles based on the sliders and input boxes on the interface [set size 3 setxy random-xcor random-ycor set color 37 set myharvest harvesting_rate / workers_to_harvest set myplant planting_rate / workers_to_plant ] set-default-shape turtles "person lumberjack" reset-ticks end to go set totalplanted 0 set totalharvested 0 set totalfeet 0 tick ;; tick every step if ticks >= 350 [stop] ;; grow ask patches[ if pcolor = green [set height height + ( 1.25 )] ;; if the patches are green (trees), set their random height (between 1-35) to grow 1ft ] ;;harvest ask turtles[ repeat myharvest[ let tree one-of patches with [height >= 30] if tree = nobody [stop] move-to tree set pcolor brown set totalfeet totalfeet + height set height 0 set totalharvested totalharvested + 1] ] ;;plant ask turtles[ repeat myplant[ let dirt one-of patches with [pcolor = brown] if dirt = nobody [stop] move-to dirt set pcolor green set height 1 set totalplanted totalplanted + 1] ] set totalprofit (hours_to_plant * workers_to_plant * wage * totalplanted) - (hours_to_harvest * workers_to_harvest * wage * totalharvested) - (totalplanted * cost_of_seedling) + (totalharvested * 600) + (totalfeet - totalharvested * 30) * (20) show totalprofit set totalhours (hours_to_harvest * harvesting_rate) + (hours_to_plant * planting_rate) end
There is only one version of this model, created over 10 years ago by Trevor Cickovski.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
ODD.docx | word | ODD Documentation for Timber Company | over 10 years ago, by Trevor Cickovski | Download |
Timber Company.png | preview | Preview for 'Timber Company' | over 10 years ago, by Trevor Cickovski | Download |
This model does not have any ancestors.
This model does not have any descendants.