Bahria University Cafeteria1 (UPDATED)

Bahria University Cafeteria1 (UPDATED) preview image

1 collaborator

Default-person Aleeza Safdar (Author)

Tags

(This model has yet to be categorized with any tags)
Model group cosmose | Visible to everyone | Changeable by the author
Model was written in NetLogo 6.0.3 • Viewed 169 times • Downloaded 12 times • Run 0 times
Download the 'Bahria University Cafeteria1 (UPDATED)' modelDownload this modelEmbed this model

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

globals
[
  seats1
  seats2
  trg

]
turtles-own [wait-count]

to setup
  ca
 create-turtles students
  [
    set wait-count wait-time
    ;;set wait-count ticks
      set shape "person"
    setxy -16 16
     set color one-of [pink blue]
    set size 1.5

  ]
  set trg 2000

  setup-seats
  setup-path


  reset-ticks
end 

to go


    move-turtles

 ask turtles [


    if ticks >= trg or wait-count = 0


    [ move-to one-of patches with [pcolor = grey]


  ]
  ]
  if ticks >= trg

  [display user-message ("waiting time over") stop]




     tick
  ;;if ticks >= 100 [stop]
end 

to setup-path
  ask patch -16 16 [set pcolor grey]
  ask patch -15 16 [set pcolor grey]
  ask patch -16 15  [set pcolor grey]
  ask patch -15 15 [set pcolor grey]
  ask patch -16 14 [set pcolor grey]
  ask patch -15 14 [set pcolor grey]
  ask patch -16 13 [set pcolor grey]
  ask patch -15 13 [set pcolor grey]
  ask patch -16 12 [set pcolor grey]
  ask patch -15 12 [set pcolor grey]
  ask patch -16 11 [set pcolor grey]
  ask patch -15 11 [set pcolor grey]
  ask patch -16 10 [set pcolor grey]
  ask patch -15 10 [set pcolor grey]
  ask patch -16 9 [set pcolor grey]
  ask patch -15 9 [set pcolor grey]
  ask patch -16 8 [set pcolor grey]
  ask patch -15 8 [set pcolor grey]
   ask patch -16 7 [set pcolor grey]
  ask patch -15 7[set pcolor grey]
  ask patch -14 8[set pcolor grey]
  ask patch -14 7 [set pcolor grey]
  ask patch -13 7 [set pcolor grey]
  ask patch -13 8 [set pcolor grey]
   ask patch -12 8 [set pcolor grey]
  ask patch -11 8 [set pcolor grey]
   ask patch -12 7 [set pcolor grey]
  ask patch -11 7 [set pcolor grey]
end 

to setup-seats
  ask patches [set pcolor black]
 ask patches with [pxcor > -11 and pxcor < 11 and pycor > -13 and pycor < 9] [set pcolor pink]
  ;;ask patches with [(pxcor = 7 or pxcor = 8 or pxcor = -7 or pxcor = -8) and (pycor > 8 and pycor < 12)][set pcolor brown]


ask patches with [pxcor > -8 and pxcor < 8 and pycor > -10 and pycor < 6][set pcolor brown]

ask patches with [pxcor > -7 and pxcor < 7 and pycor > -9 and pycor < 5][set pcolor 114]

  ;;ask patch -9 9 [set pcolor blue]

  set seats1 (patch-set patch 8 1 patch 8 4 patch 8 -5 patch 8 -8 patch 8 -2  patch -8 -8 patch -8 -5 patch -8 4 patch -8 -2 patch -8 1 )

 ask seats1 [set pcolor white]
  set seats2(patch-set   patch -6 -10  patch -6 6  patch 3 -10  patch -3 -10 patch 0 6 patch 0 -10  patch -3 6  patch 3 6
    patch 6 -10 patch 6 6 )
  ask seats2 [set pcolor 63]
end 

to move-turtles

  ask turtles
  [
 if color = blue
 [


      move-to one-of patches with [pcolor = white]]


 ;; boys will sit on white chairs
if color = pink

   [

     move-to one-of patches with [pcolor = 63]

  ]
    set wait-count wait-count - 1
  ]


  ;; grils will sit on green chairs
end 

There is only one version of this model, created over 6 years ago by Aleeza Safdar.

Attached files

File Type Description Last updated
Bahria University Cafeteria1 (UPDATED).png preview Preview for 'Bahria University Cafeteria1 (UPDATED)' over 6 years ago, by Aleeza Safdar Download
ODD1.docx word ODD over 6 years ago, by Aleeza Safdar Download

This model does not have any ancestors.

This model does not have any descendants.