# Bahria cafe model V2 by Junaid khan 012

Model was written in NetLogo 6.0.2
•
Viewed 45 times
•
Downloaded 3 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 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 ; <<<<<<<<<<<<<<<<<<<<<<<<<< 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 3 months ago by Junaid khan.

## Attached files

File | Type | Description | Last updated | |
---|---|---|---|---|

Bahria cafe model V2 by Junaid khan 012.png | preview | Preview for 'Bahria cafe model V2 by Junaid khan 012' | 3 months ago, by Junaid khan | Download |

Bahria cafe model version 2 experiment 1 for model v2-table.csv | data | bahria cafe model behavior space experiment 21for model v2 | 3 months ago, by Junaid khan | Download |

Bahria cafe model version 2 experiment 2 for model v2-table.csv | data | bahria cafe model behavior space experiment 2 for model v2 | 3 months ago, by Junaid khan | Download |

odd-bahria-cafe (2).pdf | ODD for Bahria student cafeteria model V2 | 3 months ago, by Junaid khan | Download | |

v2.01.PNG | png | bahria cafe model behavior space experiment 1 for model v2 | 3 months ago, by Junaid khan | Download |

v2.02.PNG | png | bahria cafe model behavior space experiment 2 for model v2 | 3 months ago, by Junaid khan | Download |

This model does not have any ancestors.

This model does not have any descendants.