JackieNg-[team-composition-mitigation]-project-EECS 472

No preview image

1 collaborator

Default-person Jacqueline Ng (Author)

Tags

(This model has yet to be categorized with any tags)
Model group MAM-2016 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0-M6 • Viewed 283 times • Downloaded 32 times • Run 0 times
Download the 'JackieNg-[team-composition-mitigation]-project-EECS 472' modelDownload this modelEmbed this model

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


WHAT IS IT?

This mitigation model of team composition illustrates how active interventions can improve the overall team dynamics among study subjects in one of Human Exploration Research Analog (HERA) campaigns. HERA is a part of the NASA Flight Analogs Project (FAP), which conducts research utilizing ground-based facilities that provide simulation scenarios and environments analogous to those encountered during exploration missions.

Because the study subjects are subjected to isolation, confinement and remote conditions during the entire mission exploration, such extreme environmental conditions may have a negative impact on positive affective ties, negative affective ties, informational ties and behavioral ties.

Accordingly, mitigations, such as coaching, mentoring, therapy and other team-building activities can help improve relationship ties between members. That said, the clear trade-off of any of these activities is the cost (time) involved of designing these interventions. As a result, we see a trade-off between the threshold level of tie strength and the cost/time involved.

HOW IT WORKS

The model implements interventions to improve the strength of the four ties comprising team dynamics.

As in the team composition model, each tick represents 5 minutes during the HERA campaign. At each tick, team members are assigned to a teaming episode, according to the “HERA playbook” of scheduled tasks for each of the four members. If team members are in a teaming episode together, then their ties are updated according to their own member attributes, their teammate’s attributes, as well as the task attributes. If any one of their tie strengths does not meet a certain threshold over a certain tracking or monitoring period, then a targeted mitigation effort is imposed. The size of the mitigation effort is determined by the benefit of this effort, and the threshold level of tie strength desired.

HOW TO USE IT

Click the SETUP button to start the HERA campaign. Click GO ONCE to observe one tick during the campaign. Click GO indefinitely to run through the entire campaign. You may wish to use GO ONCE button for the first few steps to get a better sense of how the parameters affect the different ties.

Visualization Controls

DISPLAYN controls which type of ties (i.e., positive affect, negative affect, informational or behavioral) plots at each tick. To toggle between the different ties, use the DISPLAYN dropdown to select the type of tie to plot, and then click REFRESH.

Intervention Parameters

There are four intervention parameters. The parameter, COST, determines the amount of dollars (time) spent on each mitigation effort. The number of mitigation efforts required will be determined by the tie strength over a certain number of ticks, NUM-PERIODS, the random BENEFIT of each mitigation effort, as well as the THRESHOLD level of tie strength desired.

Plots

TIE STRENGTH for each study subject (FE, CMD, MS1 and MS2) plots the tie strength of the specific study subject and each of her teammates.

TEAM TIE STRENGTH plots the team tie strength at the team level for the entire team.

Monitors

There are monitors for the mitigation costs associated with each study subject (FE, CMD, MS1, MS2) and each tie type (i.e., positive affect, negative affect, informational or behavioral). These monitors update every time there is a mitigation effort.

THINGS TO NOTICE

In the model, mitigation costs vary for each study subject and each tie type. The mitigation costs will also vary by each run, since there is some uncertainty regarding the effectiveness of the mitigation effort.

THINGS TO TRY

In the model, try moving the sliders for the intervention parameters to see how these changes impact the mitigation costs and the overall tie strength relationships.

EXTENDING THE MODEL

It is possible that the relative impact of mitigation efforts may lessen if many efforts are designed simultaneously. The model can be extended to recommend the best mitigation effort given the threshold level of tie strength desired and current tracking of tie strength for each tie type.

RELATED MODELS

A related model is the team composition observation model that tracks evolving team dynamics among the HERA study subjects, without any active mitigation attempts.

Comments and Questions

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

Click to Run Model

globals [
 imported-jobs ;;an indicator whether the csv data file import was successful
 time ;;tracks the simulation time in minutes, while every tick represents five minutes.
 temp-color-store
 task-slot-1-full
 task-slot-2-full
 task-slot-3-full
 task-slot-4-full
 t-list
 i ;;index for while loops for plotting
 team-pa
 team-na
 team-in
 team-be
]

links-own [
 paffect ;;positive affect values for each link, ranging [0,1]
 naffect ;;negative affect values for each link, ranging [0,1]
 inform ;;instrumental: informational values for each link, ranging [0,1]
 behave ;;instrumental: behavioral values for each link, ranging [0,1]
 ;;creates data storing lists for each type of link
 pa-list
 na-list
 in-list
 be-list
 last-task-update
 pintervene ;; cumulative intervention cost for positive affect
 nintervene ;; cumulative intervention cost for negative affect
 iintervene ;; cumulative intervention cost for informational ties
 bintervene ;; cumulative intervention cost for behavioral ties
 pintervene-list
 nintervene-list
 iintervene-list
 bintervene-list
 patrack-list
 natrack-list
 intrack-list
 betrack-list
]

extensions[csv]

breed [astronauts astronaut]
astronauts-own [
 role
 ;;individual differences collected from HERA
 values
 decision-making-style
 psychological-collectivism
 openness
 conscientiousness
 extraversion
 agreeableness
 neuroticism
 emotional-experience
 emotional-expression
 self-monitoring
 positive-response-to-stress
 suppression
 reappraisal
 education-level
 gender
 age
 working-memory
 general-cognitive-functioning
 social-desirability
]

breed [jobs job]
;;have a task importer  where things you want to knwo about a job are defined and set
;;make a csv first column is when task is introduced, task duration, four columns for each hera member
;;comment code
jobs-own[
 start-time
 duration
 assigned-to-CMD
 assigned-to-FE
 assigned-to-MS1
 assigned-to-MS2
 teaming-episode
 ;;task variables
 degree-of-self-leadership
 leadership-distribution
 goal-interdependence
 workload
 mts
 task-switching
 virtuality
 skill-differentiation
 team-size
 current?
]

;; Routine for the ABM Simulation setup

to setup
  clear-all
  set time 0
  setup-agents
  setup-links
  reset-ticks
  set imported-jobs False
  import-jobs
  set t-list list 0 0
  ask links [
  set pa-list list 0 0.5
  set na-list list 0 0.15
  set in-list list 0 0.5
  set be-list list 0 0.6
  set patrack-list list 0 0.5
  set natrack-list list 0 0.15
  set intrack-list list 0 0.5
  set betrack-list list 0 0.6
  set paffect 0.5 ;; initialize paffect at time 0
  set naffect 0.15 ;; initialize naffect at time 0
  set inform 0.5 ;; initialize inform at time 0
  set behave 0.6 ;; initialize behave at time 0
  set pintervene-list list 0 0
  set nintervene-list list 0 0
  set iintervene-list list 0 0
  set bintervene-list list 0 0
  ]
  refresh
end 

;;Creates the four agents for the model: CMD, FE, MS1, MS2

to setup-agents
  create-astronauts 1 [
    set role "CMD"
    set shape "astronaut"
    set size 4
    set color white
    set xcor 0
    set ycor 9
    ;;individaul difference variables
    set values 4.4
    set decision-making-style 5.3
    set psychological-collectivism 5.9
    set openness 4.5
    set conscientiousness 4.1
    set extraversion 3.3
    set agreeableness 4.3
    set neuroticism 2.3
    set emotional-experience 0
    set emotional-expression 0
    set self-monitoring 4.6
    set positive-response-to-stress 0
    set suppression 3.5
    set reappraisal 7
    set education-level 1
    set gender 1
    set age 1
    set working-memory 0
    set general-cognitive-functioning 0
    set social-desirability 0
  ]
  ask patch 1 5 [
    set plabel "CMD"
  ]
  create-astronauts 1 [
    set role "FE"
    set shape "astronaut"
    set size 4
    set color white
    set xcor 0
    set ycor -9
    ;;individaul difference variables
    set values 5.1
    set decision-making-style 5.3
    set psychological-collectivism 7
    set openness 4.7
    set conscientiousness 5
    set extraversion 4.6
    set agreeableness 4.5
    set neuroticism 1.0
    set emotional-experience 0
    set emotional-expression 0
    set self-monitoring 3.1
    set positive-response-to-stress 0
    set suppression 3.5
    set reappraisal 7
    set education-level 1
    set gender 1
    set age 0
    set working-memory 0
    set general-cognitive-functioning 0
    set social-desirability 0
  ]
  ask patch 0.3 -5 [
    set plabel "FE"
  ]
  create-astronauts 1 [
    set role "MS1"
    set shape "astronaut"
    set size 4
    set color white
    set xcor -9
    set ycor 0
    ;;individaul difference variables
    set values 4.4
    set decision-making-style 5.0
    set psychological-collectivism 5.4
    set openness 3.4
    set conscientiousness 4.1
    set extraversion 3.3
    set agreeableness 4.3
    set neuroticism 2.3
    set emotional-experience 0
    set emotional-expression 0
    set self-monitoring 3.1
    set positive-response-to-stress 0
    set suppression 3.5
    set reappraisal 7
    set education-level 1
    set gender 1
    set age 1
    set working-memory 0
    set general-cognitive-functioning 0
    set social-desirability 0
  ]
  ask patch -5 0 [
    set plabel "MS1"
  ]
  create-astronauts 1 [
    set role "MS2"
    set shape "astronaut"
    set size 4
    set color white
    set xcor 9
    set ycor 0
    ;;individaul difference variables
    set values 3.8
    set decision-making-style 5.3
    set psychological-collectivism 5.7
    set openness 3.4
    set conscientiousness 3.9
    set extraversion 4.0
    set agreeableness 4.2
    set neuroticism 1.4
    set emotional-experience 0
    set emotional-expression 0
    set self-monitoring 3.5
    set positive-response-to-stress 0
    set suppression 2.5
    set reappraisal 4.2
    set education-level 1
    set gender 1
    set age 1
    set working-memory 0
    set general-cognitive-functioning 0
    set social-desirability 0
  ]
  ask patch 6 0 [
    set plabel "MS2"
  ]
end 

;; Creates the setup for all links for the model

to setup-links
  ;ask all turtles to create a link to every other turtle that's not itself
  ask astronauts with [who != 0][
    create-link-to turtle 0
  ]
  ask astronauts with [who != 1][
    create-link-to turtle 1
  ]
  ask astronauts with [who != 2][
    create-link-to turtle 2
  ]
  ask astronauts with [who != 3][
    create-link-to turtle 3
  ]
  ask links [
   ;;set color rgb 255 0 0
   set color approximate-hsb 0 90 70
   set shape "curvy"
   set thickness 0.2
  ]
end 

to update-paffect
  ask links [set paffect (paffect ^ decay-pa ) ;;time decay of ties
    ]
  ask jobs with [hidden? = false] [
    if (assigned-to-cmd = 1 and assigned-to-fe = 1) [pa-teaming 0 1 who pa-teaming 1 0 who]
    if (assigned-to-cmd = 1 and assigned-to-ms1 = 1) [pa-teaming 0 2 who pa-teaming 2 0 who]
    if (assigned-to-cmd = 1 and assigned-to-ms2 = 1) [pa-teaming 0 3 who pa-teaming 3 0 who]
    if (assigned-to-fe = 1 and assigned-to-ms1 = 1) [pa-teaming 1 2 who pa-teaming 2 1 who]
    if (assigned-to-fe = 1 and assigned-to-ms2 = 1) [pa-teaming 1 3 who pa-teaming 3 1 who]
    if (assigned-to-ms1 = 1 and assigned-to-ms2 = 1) [pa-teaming 2 3 who pa-teaming 3 2 who]
    ]
  ask links [

   ;; update CMD links for interventions
   let k 1
   while [k < 4] [
   if time > Num-Periods * 5 [
     if sum [patrack-list] of link 0 k < Threshold [
       set paffect paffect + random-float Benefit
       set pintervene pintervene + Cost
     ]
   ]

   set k (k + 1)
   ]

   ;; update FE links for interventions
   let l 0
   while [l < 4] [
   ifelse l != 1 [

   if time > Num-Periods * 5 [
     if sum [patrack-list] of link 1 l < Threshold [
       set paffect paffect + random-float Benefit
       set pintervene pintervene + Cost
     ]
   ]

   set l (l + 1)]

   [set l (l + 1)]
   ]

   ;; update MS1 links for interventions
   let m 0
   while [m < 4] [
   ifelse m != 2 [
   if time > Num-Periods * 5 [
     if sum [patrack-list] of link 2 m < Threshold [
       set paffect paffect + random-float Benefit
       set pintervene pintervene + Cost
     ]
   ]

   set m (m + 1)]

   [set m (m + 1)]
   ]

   ;; update MS2 links for interventions
   let n 2
   while [n > -1] [
   if time > Num-Periods * 5 [
     if sum [patrack-list] of link 3 n < Threshold [
       set paffect paffect + random-float Benefit
       set pintervene pintervene + Cost
     ]
   ]

   set n (n - 1)
   ]
  if paffect > 1 [set paffect 1]
  if paffect < 0 [set paffect 0]

  set pa-list lput paffect pa-list ;;adds new paffect value to the end of the list
  set patrack-list lput paffect patrack-list
  if length patrack-list > Num-Periods [set patrack-list but-first patrack-list]
  set pintervene-list lput pintervene pintervene-list ;;adds new positive intervention value to the end of the list
  ]
end 

to update-naffect
  ask links [set naffect (naffect ^ decay-na) ;;time decay of ties
  ]
  ask jobs with [hidden? = false] [
    if (assigned-to-cmd = 1 and assigned-to-fe = 1) [na-teaming 0 1 who na-teaming 1 0 who]
    if (assigned-to-cmd = 1 and assigned-to-ms1 = 1) [na-teaming 0 2 who na-teaming 2 0 who]
    if (assigned-to-cmd = 1 and assigned-to-ms2 = 1) [na-teaming 0 3 who na-teaming 3 0 who]
    if (assigned-to-fe = 1 and assigned-to-ms1 = 1) [na-teaming 1 2 who na-teaming 2 1 who]
    if (assigned-to-fe = 1 and assigned-to-ms2 = 1) [na-teaming 1 3 who na-teaming 3 1 who]
    if (assigned-to-ms1 = 1 and assigned-to-ms2 = 1) [na-teaming 2 3 who na-teaming 3 2 who]
    ]
  ask links [

;; update CMD links for interventions
   let k 1
   while [k < 4] [
   if time > Num-Periods * 5 [
     if sum [natrack-list] of link 0 k > Threshold [
       set naffect naffect - random-float Benefit
       set nintervene nintervene + Cost
     ]
   ]

   set k (k + 1)
   ]

   ;; update FE links for interventions
   let l 0
   while [l < 4] [
   ifelse l != 1 [

   if time > Num-Periods * 5 [
     if sum [natrack-list] of link 1 l > Threshold [
       set naffect naffect - random-float Benefit
       set nintervene nintervene + Cost
     ]
   ]

   set l (l + 1)]

   [set l (l + 1)]
   ]

   ;; update MS1 links for interventions
   let m 0
   while [m < 4] [
   ifelse m != 2 [

   if time > Num-Periods * 5 [
     if sum [natrack-list] of link 2 m > Threshold [
       set naffect naffect - random-float Benefit
       set nintervene nintervene + Cost
     ]
   ]
   set m (m + 1)]

   [set m (m + 1)]
   ]

   ;; update MS2 links for interventions
   let n 2
   while [n > -1] [
   if time > Num-Periods * 5 [
     if sum [natrack-list] of link 3 n > Threshold [
       set naffect naffect - random-float Benefit
       set nintervene nintervene + Cost
     ]
   ]

   set n (n - 1)
   ]

 if naffect > 1 [set naffect 1]
 if naffect < 0 [set naffect 0]

 set na-list lput naffect na-list ;;adds new naffect value to the end of the list
 set natrack-list lput naffect natrack-list
 if length natrack-list > Num-Periods [set natrack-list but-first natrack-list]
  set nintervene-list lput nintervene nintervene-list ;;adds new nintervene value to the end of the list
  ]
end 

to update-inform
  ask links [set inform (inform ^ decay-in) ;;time decay of ties
  ]
  ask jobs with [hidden? = false] [
    if (assigned-to-cmd = 1 and assigned-to-fe = 1) [in-teaming 0 1 who in-teaming 1 0 who]
    if (assigned-to-cmd = 1 and assigned-to-ms1 = 1) [in-teaming 0 2 who in-teaming 2 0 who]
    if (assigned-to-cmd = 1 and assigned-to-ms2 = 1) [in-teaming 0 3 who in-teaming 3 0 who]
    if (assigned-to-fe = 1 and assigned-to-ms1 = 1) [in-teaming 1 2 who in-teaming 2 1 who]
    if (assigned-to-fe = 1 and assigned-to-ms2 = 1) [in-teaming 1 3 who in-teaming 3 1 who]
    if (assigned-to-ms1 = 1 and assigned-to-ms2 = 1) [in-teaming 2 3 who in-teaming 3 2 who]
    ]
  ask links [

   ;; update CMD links for interventions
   let k 1
   while [k < 4] [
   if time > Num-Periods * 5 [
     if sum [intrack-list] of link 0 k < Threshold [
       set inform inform + random-float Benefit
       set iintervene iintervene + Cost
     ]
   ]
   set k (k + 1)
   ]

   ;; update FE links for interventions
   let l 0
   while [l < 4] [
   ifelse l != 1 [

   if time > Num-Periods * 5 [
     if sum [intrack-list] of link 1 l < Threshold [
       set inform inform + random-float Benefit
       set iintervene iintervene + Cost
     ]
   ]

   set l (l + 1)]

   [set l (l + 1)]
   ]

   ;; update MS1 links for interventions
   let m 0
   while [m < 4] [
   ifelse m != 2 [

   if time > Num-Periods * 5 [
     if sum [intrack-list] of link 2 m < Threshold [
       set inform inform + random-float Benefit
       set iintervene iintervene + Cost
     ]
   ]

   set m (m + 1)]

   [set m (m + 1)]
   ]

   ;; update MS2 links for interventions
   let n 2
   while [n > -1] [
   if time > Num-Periods * 5 [
     if sum [intrack-list] of link 3 n < Threshold [
       set inform inform + random-float Benefit
       set iintervene iintervene + Cost
     ]
   ]
   set n (n - 1)
   ]

  if inform > 1 [set inform 1]
  if inform < 0 [set inform 0]

  set in-list lput inform in-list ;;adds new informational value to the end of the list
  set intrack-list lput inform intrack-list
  if length intrack-list > Num-Periods [set intrack-list but-first intrack-list]
  set iintervene-list lput iintervene iintervene-list ;;adds new informational intervention value to the end of the list
  ]
end 

to update-behave
  ask links [set behave (behave ^ decay-be) ;;time decay of ties
  ]
  ask jobs with [hidden? = false] [
    if (assigned-to-cmd = 1 and assigned-to-fe = 1) [be-teaming 0 1 who be-teaming 1 0 who]
    if (assigned-to-cmd = 1 and assigned-to-ms1 = 1) [be-teaming 0 2 who be-teaming 2 0 who]
    if (assigned-to-cmd = 1 and assigned-to-ms2 = 1) [be-teaming 0 3 who be-teaming 3 0 who]
    if (assigned-to-fe = 1 and assigned-to-ms1 = 1) [be-teaming 1 2 who be-teaming 2 1 who]
    if (assigned-to-fe = 1 and assigned-to-ms2 = 1) [be-teaming 1 3 who be-teaming 3 1 who]
    if (assigned-to-ms1 = 1 and assigned-to-ms2 = 1) [be-teaming 2 3 who be-teaming 3 2 who]
    ]
  ask links [

  ;; update CMD links for interventions
  let k 1
   while [k < 4] [
   if time > Num-Periods * 5 [
     if sum [betrack-list] of link 0 k < Threshold [
       set behave behave + random-float Benefit
       set bintervene bintervene + Cost
     ]
   ]

   set k (k + 1)
   ]

   ;; update FE links for interventions
   let l 0
   while [l < 4] [
   ifelse l != 1 [

;;   set betrack-list lput behave betrack-list
;;   if length betrack-list > Num-Periods [set betrack-list but-first betrack-list]
   if time > Num-Periods * 5 [
     if sum [betrack-list] of link 1 l < Threshold [
       set behave behave + random-float Benefit
       set bintervene bintervene + Cost
;;       show replace-item 4 [betrack-list] of link 1 l behave
     ]
   ]

   set l (l + 1)]

   [set l (l + 1)]
   ]

   ;; update MS1 links for interventions
   let m 0
   while [m < 4] [
   ifelse m != 2 [

   if time > Num-Periods * 5 [
     if sum [betrack-list] of link 2 m < Threshold [
       set behave behave + random-float Benefit
       set bintervene bintervene + Cost
;;       show replace-item 4 [betrack-list] of link 2 m behave
     ]
   ]

   set m (m + 1)]

   [set m (m + 1)]
   ]

   ;; update MS2 links for interventions
   let n 2
   while [n > -1] [
   if time > Num-Periods * 5 [
     if sum [betrack-list] of link 3 n < Threshold [
       set behave behave + random-float Benefit
       set bintervene bintervene + Cost
     ]
   ]

   set n (n - 1)
   ]
if behave > 1 [set behave 1]
if behave < 0 [set behave 0]

set be-list lput behave be-list ;;adds new behavioral value to the end of the list
set betrack-list lput behave betrack-list
if length betrack-list > Num-Periods [set betrack-list but-first betrack-list]
set bintervene-list lput bintervene bintervene-list ;;adds new behavioral intervention value to the end of the list
  ]
end 

to pa-teaming [part1 part2 jobnum] ;;updates teaming for two participants. Cmd = 0, Fe = 1, Ms1 = 2, Ms2 = 3. part1 = perciever, part2 = percieved, jobnum = who of the job being called
    ask link part1 part2 [
      set paffect ( paffect    ;;previous tie value including decay over time
         + scale-pa ;;weight for scaling amount of change on each time step
         * (([      0.09 * values + 0.15 * decision-making-style + 0.2 * psychological-collectivism + 0.02 * openness + 0.15 * conscientiousness + 0.2 * extraversion + 0.52 * agreeableness - 0.5 * neuroticism + 0.31 * emotional-experience + 0.46 * emotional-expression + 0.22 * self-monitoring + 0.6 * positive-response-to-stress + 0.23 * reappraisal - 0.1 * education-level - 0.01 * gender + 0.19 * age + 0.15 * general-cognitive-functioning + 0.35 * social-desirability   ] of turtle part1);;attributes of perciever
         +([        0.09 * values + 0.15 * decision-making-style + 0.2 * psychological-collectivism + 0.02 * openness + 0.15 * conscientiousness + 0.2 * extraversion + 0.52 * agreeableness - 0.5 * neuroticism + 0.31 * emotional-experience + 0.46 * emotional-expression + 0.22 * self-monitoring + 0.6 * positive-response-to-stress + 0.23 * reappraisal - 0.1 * education-level - 0.01 * gender + 0.19 * age + 0.15 * general-cognitive-functioning + 0.35 * social-desirability      ] of turtle part2);;attributes of percieved
         +([        0.6 * goal-interdependence - 0.15 * workload - 0.4 * mts - 0.4 * virtuality + 0.15 * team-size      ] of turtle jobnum));;attributes of the task
           )
    ]
end 

to na-teaming [part1 part2 jobnum] ;;updates teaming for two participants. Cmd = 0, Fe = 1, Ms1 = 2, Ms2 = 3. part1 = perciever, part2 = percieved, jobnum = who of the job being called
  ask link part1 part2 [
      set naffect ( naffect    ;;previous tie value including decay over time
         + scale-na ;;weight for scaling amount of change on each time step
         * (([      0 - 0.16 * values - 0.15 * decision-making-style - 0.4 * psychological-collectivism - 0.15 * openness + 0.15 * conscientiousness + 0.56 * neuroticism - 0.12 * emotional-experience - 0.27 * emotional-expression - 0.6 * positive-response-to-stress + 0.46 * suppression + 0.23 * reappraisal - 0.44 * education-level - 0.41 * gender - 0.42 * age + 0.4 * general-cognitive-functioning      ] of turtle part1);;attributes of perciever
         +([        0 - 0.16 * values - 0.15 * decision-making-style - 0.4 * psychological-collectivism - 0.15 * openness + 0.15 * conscientiousness + 0.56 * neuroticism - 0.12 * emotional-experience - 0.27 * emotional-expression - 0.6 * positive-response-to-stress + 0.46 * suppression + 0.23 * reappraisal - 0.44 * education-level - 0.41 * gender - 0.42 * age + 0.4 * general-cognitive-functioning     ] of turtle part2);;attributes of percieved
         +([        0.05 * goal-interdependence + 0.15 * workload + 0.15 * mts + 0.15 * virtuality + 0.09 * team-size      ] of turtle jobnum));;attributes of the task
           )
    ]
end 

to in-teaming [part1 part2 jobnum] ;;updates teaming for two participants. Cmd = 0, Fe = 1, Ms1 = 2, Ms2 = 3. part1 = perciever, part2 = percieved, jobnum = who of the job being called
  ask link part1 part2 [
      set inform ( inform    ;;previous tie value including decay over time
         + scale-in ;;weight for scaling amount of change on each time step
         * (([      0.11 * values + 0.15 * decision-making-style + 0.25 * openness + 0.26 * conscientiousness + 0.3 * extraversion + 0.25 * agreeableness + 0.22 * neuroticism + 0.15 * emotional-expression - 0.15 * self-monitoring + 0.15 * positive-response-to-stress - 0.4 * suppression + 0.4 * reappraisal + 0.33 * education-level + 0.29 * age + 0.23 * general-cognitive-functioning   ] of turtle part1);;attributes of perciever
         +([        0.11 * values + 0.15 * decision-making-style + 0.25 * openness + 0.26 * conscientiousness + 0.3 * extraversion + 0.25 * agreeableness + 0.22 * neuroticism + 0.15 * emotional-expression - 0.15 * self-monitoring + 0.15 * positive-response-to-stress - 0.4 * suppression + 0.4 * reappraisal + 0.33 * education-level + 0.29 * age + 0.23 * general-cognitive-functioning     ] of turtle part2);;attributes of percieved
         +([        0.85 * goal-interdependence + 0.6 * workload + 0.4 * mts - 0.6 * virtuality + 0.15 * skill-differentiation + 0.15 * team-size      ] of turtle jobnum));;attributes of the task
           )
    ]
end 

to be-teaming [part1 part2 jobnum] ;;updates teaming for two participants. Cmd = 0, Fe = 1, Ms1 = 2, Ms2 = 3. part1 = perciever, part2 = percieved, jobnum = who of the job being called
  ask link part1 part2 [
      set behave ( behave    ;;previous tie value including decay over time
         + scale-be ;;weight for scaling amount of change on each time step
         * (([      0 - 0.13 * values + 0.32 * psychological-collectivism + 0.46 * conscientiousness + 0.38 * extraversion + 0.28 * agreeableness - 0.37 * neuroticism + 0.15 * self-monitoring + 0.6 * positive-response-to-stress + 0.4 * reappraisal - 0.16 * age + 0.6 * working-memory + 0.09 * general-cognitive-functioning     ] of turtle part1);;attributes of perciever
         +([        0 - 0.13 * values + 0.32 * psychological-collectivism + 0.46 * conscientiousness + 0.38 * extraversion + 0.28 * agreeableness - 0.37 * neuroticism + 0.15 * self-monitoring + 0.6 * positive-response-to-stress + 0.4 * reappraisal - 0.16 * age + 0.6 * working-memory + 0.09 * general-cognitive-functioning     ] of turtle part2);;attributes of percieved
         +([        0 - 0.4 * degree-of-self-leadership + 0.6 * goal-interdependence + 0.6 * workload + 0.4 * mts - 0.4 * virtuality + 0.6 * skill-differentiation - 0.15 * team-size     ] of turtle jobnum));;attributes of the task
           )
    ]
end 

to do-plotting
  set-current-plot "Tie Strength of CMD"
  clear-plot
  set-current-plot-pen "CMD -> FE"
  set i 0
  ask link 0 1 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
  set-current-plot-pen "CMD -> MS1"
  set i 0
  ask link 0 2 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
  set-current-plot-pen "CMD -> MS2"
  set i 0
  ask link 0 3 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]

  set-current-plot "Tie Strength of MS1"
  clear-plot
  set-current-plot-pen "MS1 -> CMD"
  set i 0
  ask link 2 0 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
  set-current-plot-pen "MS1 -> MS2"
  set i 0
  ask link 2 3 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
  set-current-plot-pen "MS1 -> FE"
  set i 0
  ask link 2 1 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]

  set-current-plot "Tie Strength of MS2"
  clear-plot
  set-current-plot-pen "MS2 -> CMD"
  set i 0
  ask link 3 0 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
  set-current-plot-pen "MS2 -> MS1"
  set i 0
  ask link 3 2 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
  set-current-plot-pen "MS2 -> FE"
  set i 0
  ask link 3 1 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]

  set-current-plot "Tie Strength of FE"
  clear-plot
  set-current-plot-pen "FE -> CMD"
  set i 0
  ask link 1 0 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
  set-current-plot-pen "FE -> MS1"
  set i 0
  ask link 1 2 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
  set-current-plot-pen "FE -> MS2"
  set i 0
  ask link 1 3 [
     while [i < length t-list] [
       if (displayn = "Positive affect") [plotxy item i t-list item i pa-list]
       if (displayn = "Negative affect") [plotxy item i t-list item i na-list]
       if (displayn = "Informational ties") [plotxy item i t-list item i in-list]
       if (displayn = "Behavioral ties") [plotxy item i t-list item i be-list]
       set i (i + 1)
     ]]
end 


;;refreshes the display for the model based on the chooser values

to refresh
  ;;displays current tasks, hides non-current tasks. Repositions all tasks into correct task-slots
  ask jobs with [(teaming-episode = 1) and (hidden? = false) and not((start-time <= time) and (start-time + duration > time))] [
    if (ycor = -15) [set task-slot-1-full 0]
    if (ycor = -12) [set task-slot-2-full 0]
    if (ycor = -9) [set task-slot-3-full 0]
    if (ycor = -6) [set task-slot-4-full 0]
    hide-turtle
  ]
  ask jobs with [(hidden? = true) and (teaming-episode = 1) and (start-time <= time) and (start-time + duration > time)] [
    ifelse (task-slot-1-full = 0) [
      set ycor -15
      set task-slot-1-full 1]
    [ifelse (task-slot-2-full = 0) [
      set ycor -12
      set task-slot-2-full 1]
    [ifelse (task-slot-3-full = 0) [
      set ycor -9
      set task-slot-3-full 1]
    [if (task-slot-4-full = 0) [
      set ycor -6
      set task-slot-4-full 1]]]]
    show-turtle
  ]
  ;;colors astronauts based upon the current tasks
  ask astronauts [set color white]
  ask jobs with [(hidden? = false) and (teaming-episode = 1)] [
    set temp-color-store color
    if (assigned-to-cmd = 1) [ask astronaut 0 [set color temp-color-store]]
    if (assigned-to-fe = 1) [ask astronaut 1 [set color temp-color-store]]
    if (assigned-to-ms1 = 1) [ask astronaut 2 [set color temp-color-store]]
    if (assigned-to-ms2 = 1) [ask astronaut 3 [set color temp-color-store]]
  ]
  ;;displays the correct type of ties
  if (displayn = "Positive affect") [ask links [set color approximate-hsb (paffect * 140) 90 70]]
  if (displayn = "Negative affect")[ask links [set color approximate-hsb (naffect * 140) 90 70]]
  if (displayn = "Informational ties")[ask links [set color approximate-hsb (inform * 140) 90 70]]
  if (displayn = "Behavioral ties")[ask links [set color approximate-hsb (behave * 140) 90 70]]
  ;;displays the current time
  ask patch 15 15 [
    set plabel time
  ]
  do-plotting
end 


;; The main simulation routine for the program

to go
  ;;steps forward in model time
  update-paffect
  update-naffect
  update-inform
  update-behave
  set team-pa team-scale-pa * (([paffect] of link 0 1 + [paffect] of link 0 2 + [paffect] of link 0 3 + [paffect] of link 1 0 + [paffect] of link 1 2 + [paffect] of link 1 3 + [paffect] of link 2 0 + [paffect] of link 2 1 + [paffect] of link 2 3 + [paffect] of link 3 0 + [paffect] of link 3 1 + [paffect] of link 3 2) / 12)
  set team-na team-scale-na * (([naffect] of link 0 1 + [naffect] of link 0 2 + [naffect] of link 0 3 + [naffect] of link 1 0 + [naffect] of link 1 2 + [naffect] of link 1 3 + [naffect] of link 2 0 + [naffect] of link 2 1 + [naffect] of link 2 3 + [naffect] of link 3 0 + [naffect] of link 3 1 + [naffect] of link 3 2) / 12)
  set team-in team-scale-in * (([inform] of link 0 1 + [inform] of link 0 2 + [inform] of link 0 3 + [inform] of link 1 0 + [inform] of link 1 2 + [inform] of link 1 3 + [inform] of link 2 0 + [inform] of link 2 1 + [inform] of link 2 3 + [inform] of link 3 0 + [inform] of link 3 1 + [inform] of link 3 2) / 12)
  set team-be team-scale-be * (([behave] of link 0 1 + [behave] of link 0 2 + [behave] of link 0 3 + [behave] of link 1 0 + [behave] of link 1 2 + [behave] of link 1 3 + [behave] of link 2 0 + [behave] of link 2 1 + [behave] of link 2 3 + [behave] of link 3 0 + [behave] of link 3 1 + [behave] of link 3 2) / 12)
  set time (time + 5) ;;time stored in five minute increments (one twelth of an hour)
  set t-list lput time t-list ;;adds the new time to the end of the t-list
  refresh
  tick
end 


;; A subroutine for importing jobs from csv

to import-jobs
  ;; open a file on the system
  let filename "runData.csv"
  file-open filename

  ;; parses the file
  let header csv:from-row file-read-line
  while [ not file-at-end? ] [
    let items csv:from-row file-read-line
    create-jobs 1 [
      ;; not visible until (ticks = start-time)
      hide-turtle

      ;; make the tasks have a box shape
      set shape "box"
      set size 3

      set start-time item 4 items
      set duration item 6 items
      set assigned-to-MS1 item 9 items
      set assigned-to-FE item 10 items
      set assigned-to-CMD item 11 items
      set assigned-to-MS2 item 12 items
      set teaming-episode item 13 items
      ;;indepedent variables of each task
      set degree-of-self-leadership item 14 items
      set leadership-distribution item 15 items
      set goal-interdependence item 16 items
      set workload item 17 items
      set mts item 18 items
      set task-switching item 19 items
      set virtuality item 20 items
      set skill-differentiation item 21 items
      set team-size item 22 items

      set xcor 15
      set ycor 0
    ]
  ]
  ;; import complete, so close the file
  file-close
  set imported-jobs true
end 

to-report link-paffects
  report [(list self paffect)] of links
end 

to-report link-naffects
  report [(list self naffect)] of links
end 

to-report link-inform
  report [(list self inform)] of links
end 

to-report link-behave
  report [(list self behave)] of links
end 

to-report link-pintervene
  report [(list self pintervene)] of links
end 

to-report link-nintervene
  report [(list self nintervene)] of links
end 

to-report link-iintervene
  report [(list self iintervene)] of links
end 

to-report link-bintervene
  report [(list self bintervene)] of links
end 

There is only one version of this model, created over 9 years ago by Jacqueline Ng.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.