bahriaa uni Cafeteria 1

 bahriaa uni Cafeteria 1 preview image

This model is seeking new collaborators — would you please help?

1 collaborator

Default-person Abdullah yousaf (Author)

Tags

cosmose 

Tagged by Abdullah yousaf 3 months ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.0.2 • Viewed 62 times • Downloaded 0 times • Run 0 times
Download the ' bahriaa uni Cafeteria 1' 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 [
  student_patches
  counter_patches
  table_patches1
  table_patches2
  table_patches3
  table_patches4
  table_patches5
  tablem-x tablem-y
  tablef-x tablef-y
  female
  male
  ]
breed [persons person]
breed [waiters waiter]
persons-own[ time_to_leave]

to setup
  clear-all
  setup-tabels
  make-student
  reset-ticks
end 

to make-student
 create-persons n--students
  [
    choose-sex                   ;; become a man or a woman
    set size 1.5
    setxy 16 0.5
    set shape "person"
    set time_to_leave random 2
  ]
end 

to choose-sex  ;; turtle procedure
  set color one-of [pink blue]
end 

to go
  ask persons[
 lt random 30
  rt random 30
  fd 0.1
    setxy random-pxcor random-pycor
 ask persons with [color = blue and xcor >= tablem-x + 5 and ycor >= tablem-y + 5]
  [ stop
     fd 0]

  ask persons with [color = pink and xcor >= tablef-x + 5 and ycor >= tablef-y + 5 ]
  [ stop fd 0]
  ]
  tick
end 

to  setup-tables

    ask patch -13 66
   [
     set pcolor yellow
   ]
end 

to setup-tabels
  ask patches [ set pcolor white ]


  set table_patches1 patches with [ pxcor = 11  and pycor = -8 ]
  ask table_patches1 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]

   set table_patches4 patches with [ pxcor = -1    and pycor = -13]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]

  set table_patches4 patches with [ pxcor = 7    and pycor = -8 ]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]

  set table_patches4 patches with [ pxcor = 9    and pycor = -8 ]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]


   set table_patches4 patches with [ pxcor = -5    and pycor = -13]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]

  set table_patches4 patches with [ pxcor = -5    and pycor = -13]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]
   set table_patches4 patches with [ pxcor = -3    and pycor = -13]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]


   set table_patches4 patches with [ pxcor = -13    and pycor = 0]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]

  set table_patches4 patches with [ pxcor = -11    and pycor = -0]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]
   set table_patches4 patches with [ pxcor = -9    and pycor = 0]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]

   set table_patches4 patches with [ pxcor = 2    and pycor = 1]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]

  set table_patches4 patches with [ pxcor = 5   and pycor = 1]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]
   set table_patches4 patches with [ pxcor = -9    and pycor = 0]
  ask table_patches4 [ set pcolor pink
  ask neighbors4 [ set pcolor pink ]
  ]
end 

There is only one version of this model, created 3 months ago by Abdullah yousaf.

Attached files

File Type Description Last updated
bahriaa uni Cafeteria 1.png preview Preview for ' bahriaa uni Cafeteria 1' 3 months ago, by Abdullah yousaf Download

This model does not have any ancestors.

This model does not have any descendants.