Bahria_Cafe_Model_V1_Aamir_Sultan

Bahria_Cafe_Model_V1_Aamir_Sultan preview image

1 collaborator

Default-person aamir sultan (Author)

Tags

cosmose 

Tagged by aamir sultan 10 months ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.3 • Viewed 76 times • Downloaded 6 times • Run 0 times
Download the 'Bahria_Cafe_Model_V1_Aamir_Sultan' 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

patches-own
[
  tables
  chairs
]

to clear
  clear-all
end 

to setup
  clear-all
  ask patches
  [
    set pcolor white
  ]
  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                   ;; Male Or Femail
    set size 1.5
  ]
  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

    ]
end 

to move-turtles
  ask turtles
  [
    right random 360
    fd 1
   ; set energy energy - 1
    ; pen-down
  ]
end 

to setup-tables

  let x pxcor
  let y pycor

  ;============================= Tables 1================================================

  ask patches with [pxcor >  -15 and pxcor < -11 and pycor =  1 ]

      [
       set pcolor brown
       ]
  ask patches with [pxcor >  -15 and pxcor < -11 and pycor =  0 ]

      [
       set pcolor brown
       ]

  ;============================= Chair 1================================================

   ask patches with [pxcor >  -15 and pxcor < -11 and pycor =  3 ]

      [
       set pcolor brown
       ]
  ask patches with [pxcor >  -15 and pxcor < -11 and pycor =  -2 ]

      [
       set pcolor brown
       ]
    ask patches with [pxcor >  -11 and pxcor < -9 and pycor =  1 ]

      [
       set pcolor brown
       ]
   ask patches with [pxcor >  -17 and pxcor < -15 and pycor =  1 ]

      [
       set pcolor brown
       ]

  ;=================================Table 2============================================
  ask patches with [pxcor >  -7 and pxcor < -3 and pycor =  1 ]

      [
       set pcolor red
       ]
  ask patches with [pxcor >  -7 and pxcor < -3 and pycor =  0 ]

      [
       set pcolor red
       ]
  ;=================================Chair 2============================================
 ask patches with [pxcor >  -7 and pxcor < -3 and pycor =  3 ]

      [
       set pcolor red
       ]
  ask patches with [pxcor >  -7 and pxcor < -3 and pycor =  -2 ]

      [
       set pcolor red
       ]



  ;===============================Table 3==============================================
    ask patches with [pxcor >  1 and pxcor < 5 and pycor =  1 ]

      [
       set pcolor orange
       ]
  ask patches with [pxcor >  1 and pxcor < 5 and pycor =  0 ]

      [
       set pcolor orange
       ]
  ;==========================Chair3 ==============================================
   ask patches with [pxcor >  1 and pxcor < 5 and pycor =  3 ]

      [
       set pcolor orange
       ]
  ask patches with [pxcor >  1 and pxcor < 5 and pycor =  -2 ]

      [
       set pcolor orange
       ]

  ;=============================Table 4================================================
    ask patches with [pxcor >  9 and pxcor < 13 and pycor =  1 ]

      [
       set pcolor blue
       ]
  ask patches with [pxcor >  9 and pxcor < 13 and pycor =  0 ]

      [
       set pcolor blue
       ]
  ;; ===========================Chair 4 ==========================================
   ask patches with [pxcor >  9 and pxcor < 13 and pycor =  3 ]

      [
       set pcolor blue
       ]
  ask patches with [pxcor >  9 and pxcor < 13 and pycor =  -2 ]

      [
       set pcolor blue
       ]
end 

There is only one version of this model, created 10 months ago by aamir sultan.

Attached files

File Type Description Last updated
Bahria_Cafe_Model_V1_Aamir_Sultan.png preview Preview for 'Bahria_Cafe_Model_V1_Aamir_Sultan' 10 months ago, by aamir sultan Download

This model does not have any ancestors.

This model does not have any descendants.