Standing Ovation
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 [ kack ayakta? arkaya ] globals [ nufus basla bitir oran-ayakta kalkanlar ] to setup clear-all clear-output spawn-by-row ;;show count turtles ask n-of cokbegenen turtles [ set color red set kack 0 ] ask turtles [ set label kack ] reset-ticks end to go ilklerkalksin set basla count turtles with [color = green] gorvekalk set bitir count turtles with [color = green] if basla = bitir [ stop ] tick end to ilklerkalksin ask turtles [ if kack = 0 [ set color yellow set ayakta? true ] ] end to gorvekalk ask turtles [ let oy ycor let ondeayakta count other turtles with [color = yellow and ycor > oy] let goru ondeayakta if yanabakma? = true [ let ayniayakta count other turtles with [color = yellow and ycor = oy] set goru goru + ayniayakta ] if arkaya = 1 [ let arkaayakta count other turtles with [color = yellow and ycor < oy] set goru goru + arkaayakta ] ;;show ayakta if goru >= kack [ set color yellow set ayakta? true ] ] set kalkanlar count turtles with [color = yellow] set oran-ayakta kalkanlar / nufus end to spawn-by-row ; get the intervals let h-int world-width / number let v-int world-height / sira set nufus number * sira ; Get a range of horizontal and vertical coordinates, starting at half ; of the interval value from the minimum x coordinate let h-vals ( range ( min-pxcor + h-int / 2 ) max-pxcor h-int ) let v-vals ( range ( min-pycor + v-int / 2 ) max-pycor v-int ) ; Create an empty list to build into let possible-coords [] ; For each possible vertical value, map all horizontal values in order and ; combine these into an ordered list starting at the lowest px and py coords foreach v-vals [ v -> set possible-coords ( sentence possible-coords map [ i -> (list i v) ] h-vals ) ] ; Use the number of readers to sublist the possible coordinates, and ; create a turtle at each of the coordinate combinations left. foreach possible-coords [ coords -> create-turtles 1 [ setxy item 0 coords item 1 coords set SIZE 2 set shape "square" set color green set kack random nufus + 1 let tef random 100 if tef < arkayabak [set arkaya 1 ] ] ] end
There are 2 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Standing Ovation.png | preview | Preview for 'Standing Ovation' | over 5 years ago, by Tevfik Uyar | Download |
This model does not have any ancestors.
This model does not have any descendants.