How interupts kill productivity

How interupts kill productivity preview image

1 collaborator

Default-person Xavier Bronlet (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 68 times • Downloaded 3 times • Run 0 times
Download the 'How interupts kill productivity' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Info tab cannot be displayed because of an encoding error

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

Globals [color-area x-pos y-pos area unread-email project-remaining-effort new-mail task-done productivity time]


turtles-own [ project-work  e-mail-to-read ]

patches-own [ complexity]

to Setup

  clear-all
  set-default-shape turtles "person"
  create-turtles 1
  [
    setxy 0 0
    set color gray + 2
    set size 2

  ]
  reset-ticks
  Create-Area
  Set project-remaining-effort 100
  Set time 1
  Set task-done 0
end 

to Go

  if task-done != 100 [work

  if E-mail [
  set new-mail random 2 * random (Email-frequency + 1)
  set unread-email unread-email + new-mail
  receive-mail
  ] tick
    if task-done = 100 [ Project-Completed]
  ]
End


To work
ifelse unread-email < email-limit [
   ask turtles [
   let target-patch min-one-of (patches in-radius 25 with [pcolor = green]) [distance myself]
   ifelse target-patch != nobody  [
    face target-patch
        fd 1
        set time time + 1
     if pcolor = green [
        ask target-patch [
          if Random Task-complexity + 1 = 1 [

            set pcolor black
            set task-done task-done + 1
            set productivity task-done / time
          ]
      ]]][
      stop
      ]

]
  ]
  [ask turtles [
   loop [
    if unread-email = 0 [ stop ]

   let target-patch min-one-of (patches in-radius 25 with [pcolor = red]) [distance myself]
   if target-patch != nobody  [
    face target-patch
      fd 1
        set time time + 1
    if pcolor = red [
    ask target-patch [
      if Random Email-complexity + 1 = 1 [
              set pcolor white
              set unread-email unread-email - 1]]
          set productivity task-done / time
  ]]]]]
end 


To receive-mail



  loop [
    ifelse new-mail = 0 [ stop ]
    [ask turtles [
      let target-patch min-one-of (patches in-radius 25 with [pcolor = white]) [distance myself]
   if target-patch != nobody  [
    ask target-patch [
      set pcolor red]]
      set new-mail new-mail - 1
    ]]]
end 

To Project-Completed

  ask patch 3 -8 [
  set plabel "Project completed"
  set plabel-color white]

End

to Create-Area

  set color-area green
  set x-pos ( x-pos - 12)
  Drawing-area

  set color-area white
  set x-pos ( x-pos + 15)
  Drawing-area

  ask patch -5 11 [
  set plabel "Project progress"
    set plabel-color white]

  ask patch 8 11 [
  set plabel "Mail box"
    set plabel-color white]
end 

to Drawing-area
  set area patches with [ pxcor >= x-pos and pxcor <= ( x-pos + 9 ) and
                          pycor >= y-pos and pycor <= (y-pos + 9 ) ]

  ask area [
    set pcolor color-area                                                 ;; assigns color green (without demand) - color red (with demand)  -  color white (demand does not work)
    ]

  ask patches with [ ( pcolor != green and pcolor != white ) ] [ set pcolor sky ]
end 

There is only one version of this model, created over 1 year ago by Xavier Bronlet.

Attached files

File Type Description Last updated
How interupts kill productivity.png preview Preview for 'How interupts kill productivity' over 1 year ago, by Xavier Bronlet Download

This model does not have any ancestors.

This model does not have any descendants.