bahria student cafe model 3

No preview image

1 collaborator

Default-person Amna Khan (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.2 • Viewed 192 times • Downloaded 14 times • Run 0 times
Download the 'bahria student cafe model 3' 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
  table_patches6
  table_patches7
  ]
breed [males male]
breed [females female]
breed [servers server]
breed [waiters waiter]

to setup
  clear-all
  make-counter
  make-tables
  make-students
  make-servers
  make-waiters
  reset-ticks
end 

to make-counter
  ask patch (0) (max-pycor) [
    ask patches with [ distance myself < 6 ] [
      set pcolor green
    ]
  ]
end 

to make-tables

  set table_patches1 patches with [ pxcor = -8  and pycor = 10 ]
  ask table_patches1 [ set pcolor blue
  ask neighbors4 [ set pcolor red ]
  ]

  set table_patches2 patches with [ pxcor = -8  and pycor = -13 ]
  ask table_patches2 [ set pcolor blue
  ask neighbors4 [ set pcolor red ]
  ]

  set table_patches3 patches with [ pxcor = -8  and pycor = -4 ]
  ask table_patches3 [ set pcolor blue
  ask neighbors4 [ set pcolor red ]
  ]

  set table_patches4 patches with [ pxcor = 9    and pycor = 2 ]
  ask table_patches4 [ set pcolor orange
  ask neighbors4 [ set pcolor brown ]
  ]

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

  set table_patches5 patches with [ pxcor = 11 and pycor = -13]
   ask table_patches5 [ set pcolor orange
      ask neighbors4 [ set  pcolor brown]
  ]
       set table_patches6 patches with [ pxcor = 11 and pycor = -18]
   ask table_patches6 [ set pcolor orange
      ask neighbors4 [ set  pcolor brown]
  ]

   set table_patches7 patches with [ pxcor = 8 and pycor = -13]
   ask table_patches7 [ set pcolor blue
      ask neighbors4 [ set  pcolor red]
  ]
end 

to make-students
  create-males male-students
  [
    set shape "person"
    set color blue - 2
    move-same-students
  ]
  create-females female-students
  [
    set shape "person"
    set color pink - 2
    move-same-students
  ]
end 

to move-same-students
    set size 1
    set heading 0
    setxy (10 + random -22) min-pycor
end 

to make-servers
  create-servers number-of-servers

  [
    set shape "person"
    set color red
    set size 2
    setxy (1 + random 5) (max-pycor - 2)
    set label "servers"
  ]
end 

to make-waiters
  create-waiters number-of-waiters
  [
    set shape "person"
    set color violet
    set size 3
    setxy (-2 + random 5) (max-pycor - 4)
     set label "waiters"
  ]
end 

to go
  ask turtles[
    move-to-empty-one-of table_patches1
    move-to-empty-one-of table_patches2
    move-to-empty-one-of table_patches3
    move-to-empty-one-of table_patches4
    move-to-empty-one-of table_patches5
     move-to-empty-one-of table_patches6
    move-to-empty-one-of table_patches7
  ]
end 

to move-to-empty-one-of [locations]
  move-to one-of neighbors4
end 



There is only one version of this model, created almost 6 years ago by Amna Khan.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.