BUIC Cafeteria Version 3
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
;Author Name Taif ali ;taifekhann@gamil.com ;version 3 globals [tickCount ] breed [servers server] turtles-own [time-notify arrival-tick timetoserve itemtoorder ] to setup clear-all ask patches [ setup-barcounter] ask patches [ setup-tables] ask patches [ setup-chairs] setupserver setup-students reset-ticks end to setupserver set-default-shape servers "person" ; ask n-of 3 (patches with [pcolor = brown]) [sprout-servers 1 [set color blue set size 3 ]] end to setup-barcounter if pycor > 25 and pycor < 30 [ set pcolor blue] ask patch -23 30 [ set pcolor blue] ask patch 23 30 [ set pcolor blue] end to setup-tables ask patch 24 14 [ set pcolor red] ask patch 24 13 [ set pcolor red] ask patch 24 12 [ set pcolor red] ask patch 24 5 [ set pcolor red] ask patch 24 4 [ set pcolor red] ask patch 24 3 [ set pcolor red] ask patch 24 -14 [ set pcolor red] ask patch 24 -13 [ set pcolor red] ask patch 24 -12 [ set pcolor red] ask patch 24 -5 [ set pcolor red] ask patch 24 -4 [ set pcolor red] ask patch 24 -3 [ set pcolor red] ask patch 13 14 [ set pcolor red] ask patch 13 13 [ set pcolor red] ask patch 13 12 [ set pcolor red] ask patch 13 5 [ set pcolor red] ask patch 13 4 [ set pcolor red] ask patch 13 3 [ set pcolor red] ask patch 13 -14 [ set pcolor red] ask patch 13 -13 [ set pcolor red] ask patch 13 -12 [ set pcolor red] ask patch 13 -5 [ set pcolor red] ask patch 13 -4 [ set pcolor red] ask patch 13 -3 [ set pcolor red] end to setup-chairs ask patch 26 14 [ set pcolor white] ask patch 26 12 [ set pcolor white] ask patch 22 14 [ set pcolor white] ask patch 22 12 [ set pcolor white] ask patch 26 5 [ set pcolor white] ask patch 26 3 [ set pcolor white] ask patch 22 5 [ set pcolor white] ask patch 22 3 [ set pcolor white] ask patch 26 -5 [ set pcolor white] ask patch 26 -3 [ set pcolor white] ask patch 22 -5 [ set pcolor white] ask patch 22 -3 [ set pcolor white] ask patch 26 -14 [ set pcolor white] ask patch 26 -12 [ set pcolor white] ask patch 22 -14 [ set pcolor white] ask patch 22 -12 [ set pcolor white] ask patch 15 14 [ set pcolor white] ask patch 15 12 [ set pcolor white] ask patch 11 14 [ set pcolor white] ask patch 11 12 [ set pcolor white] ask patch 15 5 [ set pcolor white] ask patch 15 3 [ set pcolor white] ask patch 11 5 [ set pcolor white] ask patch 11 3 [ set pcolor white] ask patch 15 -5 [ set pcolor white] ask patch 15 -3 [ set pcolor white] ask patch 11 -5 [ set pcolor white] ask patch 11 -3 [ set pcolor white] ask patch 15 -14 [ set pcolor white] ask patch 15 -12 [ set pcolor white] ask patch 11 -14 [ set pcolor white] ask patch 11 -12 [ set pcolor white] end to setup-students reset-ticks set-default-shape turtles "person" create-turtles totalnoofstudents[ set color one-of [brown pink] set ycor random-ycor set arrival-tick ticks set time-notify responsetime ] ask n-of ( int (orderplacedbyboys / 100 * count turtles with [color = brown ])) turtles [ movetocounter ] ask n-of ( int (orderplacedbygirls / 100 * count turtles with [color = pink ])) turtles [ movetocounter ] end to distinct-student if any? other turtles-here [ fd 2 distinct-student ] end to go proceed-turtles tick if ticks >= 720 [stop] end to proceed-turtles ask turtles with [color = pink ] [ ifelse pcolor != white [continue] [stay] ; [leave] ; if ycor > 25 [ die ] ] end To continue lt random 9 rt random 9 fd 3 end to stay set time-notify time-notify - 1 set label time-notify if time-notify = 0 [ Continue set label "" ] if ticks - arrival-tick > 70[ die ] end to reset-arrival set time-notify responsetime end to movetocounter let targ one-of patches with[pcolor = blue] set label "give order" end
There is only one version of this model, created over 7 years ago by Taif Ali.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.