Student_CafeteriaV2
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
patches-own [ table-number ];;for tables globals[counter_patches ;; for cafe_counter point ;;for break Female_Chairs_Chairs Male_Chairs ] breed [servers server] breed [waiter waiters] breed [servant servants] turtles-own [ ;;for average waiting time Timerr orderitem ] to servent end to setup ca setup-chiars create-turtles students [ set Timerr Ave_time_to_wait ;;setTimerr ticks set shape "person" setxy -3 -14 set color one-of [pink blue] set size 1.5 ] set point 20 ask patches[ setup-table recolor-patch ] create-servant 3[ setxy random-xcor random-ycor set color white set shape "person service" set size 2 ] reset-ticks end to setup-server set-default-shape servers "Person" ask n-of 3 (patches with [pcolor = brown - 12 or pcolor = white]) [sprout-servers 1 [set color 9.9 set size 2]] end to setup-table ;;setting tables if (distancexy (-0.1 * max-pxcor) 12) < 3 [ set pcolor turquoise ] set counter_patches patches with [ (distancexy (-0.1 * max-pxcor) -14) < 3 ] ask counter_patches [ set pcolor white ] if (distancexy (0.6 * max-pxcor) -3) < 0.6 [ set table-number 1 set pcolor violet ] if (distancexy (0.6 * max-pxcor) 3) < 0.6 [ set table-number 3 ] if (distancexy (-0.6 * max-pxcor) -3) < 0.6 [ set table-number 5 set pcolor violet] if (distancexy (-0.6 * max-pxcor) 3) < 0.6 [ set table-number 7 set pcolor violet] end to recolor-patch ;; patch procedure if table-number = 1 [ set pcolor violet ] if table-number = 2 [ set pcolor violet ] if table-number = 3 [ set pcolor violet ] end to go move-turtles ask servant [ rt one-of [-90 0 90] ;; go left, straight, or right forward 1 ] ask turtles with [color = pink or color = blue] [ if ticks >= point or Timerr = 0 [ move-to one-of patches with [pcolor = white] ht ] ] if ticks >= point [stop] tick end to setup-chiars ask patches [set pcolor black] set Female_Chairs_Chairs (patch-set patch 9 2 patch 9 4 patch 9 2 patch 9 -4 patch 9 -2 );;right side female setup ask Female_Chairs_Chairs [set pcolor brown] set Male_Chairs(patch-set patch -10 -4 patch -10 4 patch -10 -2 patch -10 2 );;left side male setup ask Male_Chairs [set pcolor green] end to move-turtles ask turtles [ if color = blue [ lt random 30 rt random 30 fd 2 move-to one-of patches with [pcolor = green]] if color = pink [ lt random 30 rt random 30 fd 2 move-to one-of patches with [pcolor = brown] ] set Timerr Timerr - 1 ] end
There is only one version of this model, created over 7 years ago by Muhammad Ahsan.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Student_CafeteriaV2.png | preview | Preview for 'Student_CafeteriaV2' | over 7 years ago, by Muhammad Ahsan | Download |
This model does not have any ancestors.
This model does not have any descendants.