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

JackieNg-[team-composition]-project-EECS 472 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 248 times • Downloaded 28 times • Run 0 times
Download the 'JackieNg-[team-composition]-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 model of team composition illustrates how team dynamics develop and evolve among study subjects in one of the 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.

A campaign is defined as one integrated protocol with one primary mission scenario consisting of multiple missions. Currently, HERA represents an analog for simulation of isolation, confinement and remote conditions of mission exploration scenarios.

The specific campaign in this model is a 30-day duration test of four female study subjects. Therefore, this is a model of how the configuration of specific member and task attributes determines the emergence of team dynamics.

HOW IT WORKS

The model measures affective and instrumental ties, each with two components. Affective ties consist of positive and negative affective ties and instrumental ties consist of informational (knowledge) and behavioral (productive) ties. Therefore, there are four types of ties captured in this model. In addition, since ties are not symmetric between individuals, e.g., individuals have differences that impact others' perceptions of them, we account for the directionality of ties among the members.

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, on the other hand, team members are not in a teaming episode together, then we decay the relative strength of their ties using an exponential decay or "half-life" function.

The number of ongoing teaming episode tasks in the model are distinguished by colored boxes. Moreover, if members are part of the same teaming episode, they will be coded the same color, and the same color as the task they are currently engaged in.

Lastly, the roles of the four study subjects is Flight Engineer (FE), Commander (CMD), Mission Specialist 1 (MS1) and Mission Specialist 2 (MS2).

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.

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.

THINGS TO NOTICE

One thing to notice as the model runs is how tie strength changes for each study subject throughout time, due to a specific teaming episode or specific team member, for instance.

THINGS TO TRY

This model has three parameters that determine how ties are updated each tick. In particular, SCALE-PA, SCALE-NA, SCALE-INF and SCALE-BE determine the weight (impact) that each tick has on tie strength for positive affect, negative affect, informational tie, and behavioral tie, respectively, whenever team members are engaged in a teaming episode together.

Also, DECAY-PA, DECAY-NA, DECAY-INF and DECAY-BE determine the rate of decay (e.g., exponential decay parameter) that each tick has on tie strength for positive affect, negative affect, informational tie, and behavioral tie, respectively, whenever team members are not in a teaming episode together.

Lastly, TEAM-SCALE-PA, TEAM-SCALE-NA, TEAM-SCALE-INF and TEAM-SCALE-BE determine the weight that dyadic ties (relationships) among the team members impact team level dynamics for positive affect, negative affect, informational ties and behavioral ties, respectively.

EXTENDING THE MODEL

A possible extension would be adding moderators into the model to determine how interactions between individual attributes or between individual and task attributes, impact tie strength and team dynamics.

Another possible extension would be adding a decay function to account for the decreasing strength/impact of member and task attributes on tie strength over longer teaming episodes.

RELATED MODELS

A related model is the mitigation model that uses "interventions", measured in Cost/intervention, to improve the strength of "weaker ties" among members.

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 ;;need to implement
]

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 know 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 paffect 0.5
  set naffect 0.15
  set inform 0.5
  set behave 0.6
  ]
  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 [
   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
  ]
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 [
   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
  ]
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 [
   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
  ]
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 [
   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
  ]
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 

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

Attached files

File Type Description Last updated
JackieNg-[team-composition]-project-EECS 472.png preview Preview for 'JackieNg-[team-composition]-project-EECS 472' about 9 years ago, by Jacqueline Ng Download

This model does not have any ancestors.

This model does not have any descendants.