Bahria_Cafe_Model_V3_Aamir_Sultan
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 [ tables chairs ] to clear clear-all end to setup clear-all ask patches [ set pcolor white ] setup-turtles setup-patches setup-waiters reset-ticks end to go ;setup-turtles move-turtles tick end to setup-turtles ; create-turtles with different number by slider create-turtles Initial-Students [ choose-sex ;; become a man or a woman set size 1.5 ;; be easier to see ] ask turtles [ setxy random-xcor random-ycor set shape "person" ] end to choose-sex ;; turtle procedure set color one-of [pink blue] end to setup-patches ask patches [ setup-tables ] end to move-turtles ask turtles [ right random 360 fd 1 ; set energy energy - 1 ; pen-down ] end to setup-waiters ; create-waiters with different number by slider create-turtles waiters [ set size 1.5 ;; be easier to see set color yellow ;;Yellow color for waiters ] ask turtles [ setxy random-xcor random-ycor set shape "person" ] end ; <<<<<<<<<<<<<<<<<<<<<<<<<< Tables procedure now >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> to setup-tables let x pxcor let y pycor ; Cafe Counter ;============================================================================= ask patches with [pxcor > -5 and pxcor < 9 and pycor = 10 ] [ set pcolor black ] ask patches with [pxcor > -3 and pxcor < 7 and pycor = 12 ] [ set pcolor black ] ask patches with [pxcor = -4 and pycor > 10 and pycor < 21 ] [ set pcolor black ] ask patches with [pxcor = 8 and pycor > 10 and pycor < 21 ] [ set pcolor black ] ;============================= Tables 1================================================ ask patches with [pxcor > -15 and pxcor < -11 and pycor = 1 ] [ set pcolor brown ] ask patches with [pxcor > -15 and pxcor < -11 and pycor = 0 ] [ set pcolor brown ] ;============================= Chair 1================================================ ask patches with [pxcor > -15 and pxcor < -11 and pycor = 3 ] [ set pcolor brown ] ask patches with [pxcor > -15 and pxcor < -11 and pycor = -2 ] [ set pcolor brown ] ask patches with [pxcor > -11 and pxcor < -9 and pycor = 1 ] [ set pcolor brown ] ask patches with [pxcor > -17 and pxcor < -15 and pycor = 1 ] [ set pcolor brown ] ;=================================Table 2============================================ ask patches with [pxcor > -7 and pxcor < -3 and pycor = 1 ] [ set pcolor red ] ask patches with [pxcor > -7 and pxcor < -3 and pycor = 0 ] [ set pcolor red ] ;=================================Chair 2============================================ ask patches with [pxcor > -7 and pxcor < -3 and pycor = 3 ] [ set pcolor red ] ask patches with [pxcor > -7 and pxcor < -3 and pycor = -2 ] [ set pcolor red ] ;===============================Table 3============================================== ask patches with [pxcor > 1 and pxcor < 5 and pycor = 1 ] [ set pcolor orange ] ask patches with [pxcor > 1 and pxcor < 5 and pycor = 0 ] [ set pcolor orange ] ;==========================Chair3 ============================================== ask patches with [pxcor > 1 and pxcor < 5 and pycor = 3 ] [ set pcolor orange ] ask patches with [pxcor > 1 and pxcor < 5 and pycor = -2 ] [ set pcolor orange ] ;=============================Table 4================================================ ask patches with [pxcor > 9 and pxcor < 13 and pycor = 1 ] [ set pcolor blue ] ask patches with [pxcor > 9 and pxcor < 13 and pycor = 0 ] [ set pcolor blue ] ;; ===========================Chair 4 ========================================== ask patches with [pxcor > 9 and pxcor < 13 and pycor = 3 ] [ set pcolor blue ] ask patches with [pxcor > 9 and pxcor < 13 and pycor = -2 ] [ set pcolor blue ] ;===========================table 5================================================== ask patches with [pxcor > -15 and pxcor < -11 and pycor = -9 ] [ set pcolor pink ] ask patches with [pxcor > -15 and pxcor < -11 and pycor = -10 ] [ set pcolor pink ] ;=========================Chair 5 ============================================ ask patches with [pxcor > -15 and pxcor < -11 and pycor = -7 ] [ set pcolor pink ] ask patches with [pxcor > -15 and pxcor < -11 and pycor = -12 ] [ set pcolor pink ] ;=============================table 6================================================ ask patches with [pxcor > -7 and pxcor < -3 and pycor = -9 ] [ set pcolor black ] ask patches with [pxcor > -7 and pxcor < -3 and pycor = -10 ] [ set pcolor black ] ; ==============================Charir 6 ==================================== ask patches with [pxcor > -7 and pxcor < -3 and pycor = -7 ] [ set pcolor black ] ; downside chairs----------------------------------------------------- ask patches with [pxcor > -7 and pxcor < -3 and pycor = -12 ] [ set pcolor black ] ;============================table 7================================================= ask patches with [pxcor > 1 and pxcor < 5 and pycor = -9 ] [ set pcolor brown ] ask patches with [pxcor > 1 and pxcor < 5 and pycor = -10 ] [ set pcolor brown ] ;==========================Chair 7 ========================================== ask patches with [pxcor > 1 and pxcor < 5 and pycor = -7 ] [ set pcolor brown ] ask patches with [pxcor > 1 and pxcor < 5 and pycor = -12 ] [ set pcolor brown ] ;================================Table 8============================================= ask patches with [pxcor > 9 and pxcor < 13 and pycor = -9 ] [ set pcolor blue ] ask patches with [pxcor > 9 and pxcor < 13 and pycor = -10 ] [ set pcolor blue ] ;=================================Chair 8 ====================================== ask patches with [pxcor > 9 and pxcor < 13 and pycor = -7 ] [ set pcolor blue ] ; downside chairs----------------------------------------------------- ask patches with [pxcor > 9 and pxcor < 13 and pycor = -12 ] [ set pcolor blue ] end
There is only one version of this model, created over 7 years ago by aamir sultan.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Bahria_Cafe_Model_V3_Aamir_Sultan.png | preview | Preview for 'Bahria_Cafe_Model_V3_Aamir_Sultan' | over 7 years ago, by aamir sultan | Download |
This model does not have any ancestors.
This model does not have any descendants.