Bahria cafe model V3 by Junaid khan 012
Model was written in NetLogo 6.0.2
•
Viewed 376 times
•
Downloaded 20 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
patches-own [ tables chairs ] to clear clear-all end to setup clear-all ask patches [ set pcolor black ] 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 setup-chairs ] 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 Green ] ask turtles [ setxy random-xcor random-ycor set shape "person" ] end ; <<<<<<<<<<<<<<<<<<<<<<<<<< Tables procedure now >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> to setup-tables let x pxcor let y pycor ; Cafe Left counter service disk at coordinates below ;============================================================================= ask patches with [pxcor > -21 and pxcor < -3 and pycor = 10 ] [ set pcolor brown ] ask patches with [pxcor = -4 and pycor > 10 and pycor < 21 ] [ set pcolor brown ] ; Cafe Right counter service disk at coordinates below ;============================================================================= ask patches with [pxcor > 3 and pxcor < 21 and pycor = 10 ] [ set pcolor brown ] ask patches with [pxcor = 4 and pycor > 10 and pycor < 21 ] [ set pcolor brown ] ; From Top-left to right table no 1 at coordinates below ;============================================================================= ask patches with [pxcor > -3 and pxcor < 1 and pycor = 1 ] [ set pcolor red ] ask patches with [pxcor > -3 and pxcor < 1 and pycor = 0 ] [ set pcolor red ] ; From Top-left to right table no 2 at coordinates below ;============================================================================= ask patches with [pxcor > 1 and pxcor < 5 and pycor = 1 ] [ set pcolor red ] ask patches with [pxcor > 1 and pxcor < 5 and pycor = 0 ] [ set pcolor red ] ; From Top-left to right table no 3 at coordinates below ;============================================================================= ask patches with [pxcor > 5 and pxcor < 9 and pycor = 1 ] [ set pcolor red ] ask patches with [pxcor > 5 and pxcor < 9 and pycor = 0 ] [ set pcolor red ] ; From Top-left to right table no 4 at coordinates below ;============================================================================= ask patches with [pxcor > 9 and pxcor < 13 and pycor = 1 ] [ set pcolor red ] ask patches with [pxcor > 9 and pxcor < 13 and pycor = 0 ] [ set pcolor red ] ; From Bottom-left to right table no 1 at coordinates below ;============================================================================= ask patches with [pxcor > -3 and pxcor < 1 and pycor = -9 ] [ set pcolor red ] ask patches with [pxcor > -3 and pxcor < 1 and pycor = -10 ] [ set pcolor red ] ; From Bottom-left to right table no 2 at coordinates below ;============================================================================= ask patches with [pxcor > 1 and pxcor < 5 and pycor = -9 ] [ set pcolor red ] ask patches with [pxcor > 1 and pxcor < 5 and pycor = -10 ] [ set pcolor red ] ; From Bottom-left to right table no 3 at coordinates below ;============================================================================= ask patches with [pxcor > 5 and pxcor < 9 and pycor = -9 ] [ set pcolor red ] ask patches with [pxcor > 5 and pxcor < 9 and pycor = -10 ] [ set pcolor red ] ; From Bottom-left to right table no 4 at coordinates below ;============================================================================= ask patches with [pxcor > 9 and pxcor < 13 and pycor = -9 ] [ set pcolor red ] ask patches with [pxcor > 9 and pxcor < 13 and pycor = -10 ] [ set pcolor red ] end ; <<<<<<<<<<<<<<<<<<<<<<<<< chairs procedure now >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> to setup-chairs ; chairs arround Top-left table no 1 at below coordinates ============= ; upside chairs--------------------------------------------------------- ask patches with [pxcor > -3 and pxcor < 1 and pycor = 3 ] [ set pcolor green ] ; downside chairs------------------------------------------------------ ask patches with [pxcor > -3 and pxcor < 1 and pycor = -2 ] [ set pcolor green ] ; chairs arround Top-left table no 2 at below coordinates ============== ; upside chairs--------------------------------------------------------- ask patches with [pxcor > 1 and pxcor < 5 and pycor = 3 ] [ set pcolor green ] ; downside chairs-------------------------------------------------- ask patches with [pxcor > 1 and pxcor < 5 and pycor = -2 ] [ set pcolor green ] ; chairs arround Top-left table no 3 at below coordinates ============== ; upside chairs--------------------------------------------------------- ask patches with [pxcor > 5 and pxcor < 9 and pycor = 3 ] [ set pcolor green ] ; downside chairs-------------------------------------------------- ask patches with [pxcor > 5 and pxcor < 9 and pycor = -2 ] [ set pcolor green ] ; chairs arround Top-left table no 4 at below coordinates ============== ; upside chairs--------------------------------------------------------- ask patches with [pxcor > 9 and pxcor < 13 and pycor = 3 ] [ set pcolor green ] ; downside chairs-------------------------------------------------- ask patches with [pxcor > 9 and pxcor < 13 and pycor = -2 ] [ set pcolor green ] ; chairs arround Bottom-left table no 1 at below coordinates ============ ; upside chairs---------------------------------------------------------- ask patches with [pxcor > -3 and pxcor < 1 and pycor = -7 ] [ set pcolor green ] ; downside chairs----------------------------------------------------- ask patches with [pxcor > -3 and pxcor < 1 and pycor = -12 ] [ set pcolor green ] ; chairs arround Bottom-left table no 2 at below coordinates ============ ; upside chairs---------------------------------------------------------- ask patches with [pxcor > 1 and pxcor < 5 and pycor = -7 ] [ set pcolor green ] ; downside chairs----------------------------------------------------- ask patches with [pxcor > 1 and pxcor < 5 and pycor = -12 ] [ set pcolor green ] ; chairs arround Bottom-left table no 3 at below coordinates ============ ; upside chairs---------------------------------------------------------- ask patches with [pxcor > 5 and pxcor < 9 and pycor = -7 ] [ set pcolor green ] ; downside chairs----------------------------------------------------- ask patches with [pxcor > 5 and pxcor < 9 and pycor = -12 ] [ set pcolor green ] ; chairs arround Bottom-left table no 4 at below coordinates ============ ; upside chairs---------------------------------------------------------- ask patches with [pxcor > 9 and pxcor < 13 and pycor = -7 ] [ set pcolor green ] ; downside chairs----------------------------------------------------- ask patches with [pxcor > 9 and pxcor < 13 and pycor = -12 ] [ set pcolor green ] end
There is only one version of this model, created over 6 years ago by Junaid khan.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Bahria cafe model V3 by Junaid khan 012.png | preview | Preview for 'Bahria cafe model V3 by Junaid khan 012' | over 6 years ago, by Junaid khan | Download |
Bahria cafe model version 3 experiment 2-table.csv | data | bahria cafe model behavior spcace expirment 2 | over 6 years ago, by Junaid khan | Download |
Bahria cafe model version 3 experiment 3-table.csv | data | bahria cafe model behavior space experiment 3 | over 6 years ago, by Junaid khan | Download |
ODD Bahria cafe model.pdf | ODD for Bahria student cafeteria model | over 6 years ago, by Junaid khan | Download | |
odd-bahria-cafe (3).pdf | ODD for Bahria student cafeteria model V3 | over 6 years ago, by Junaid khan | Download | |
V3.2.PNG | png | bahria cafe model behavior space experiment 2 for model v3 | over 6 years ago, by Junaid khan | Download |
V3.3.PNG | png | bahria cafe model behavior space experiment 3 for model v3 | over 6 years ago, by Junaid khan | Download |
This model does not have any ancestors.
This model does not have any descendants.