Student_Cafeteria
Model was written in NetLogo 6.0.3
•
Viewed 85 times
•
Downloaded 5 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 [ table-number ];;for tables globals[counter_patches ;; for cafe_counter point ;;for break Female_Chairs_Chairs Male_Chairs ] turtles-own [ ;;for average waiting time Timerr ] to setup ca setup-chiars create-turtles students [ set Timerr Ave_time ;;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 ] reset-ticks 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 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 almost 6 years ago by Muhammad Ahsan.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Student_Cafeteria.png | preview | Preview for 'Student_Cafeteria' | almost 6 years ago, by Muhammad Ahsan | Download |
This model does not have any ancestors.
This model does not have any descendants.