Emotional contagion in metro emergencies
Model was written in NetLogo 6.4.0
•
Viewed 4 times
•
Downloaded 0 times
•
Run 0 times
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
turtles-own [emotion appraisal b susceptibility official-regulation] to setup clear-all create-turtles N [ setxy random-xcor random-ycor set shape "person" set color white set official-regulation R set size 0.5] ask n-of sensitive turtles [set susceptibility 1.2] ask n-of neutral turtles with [susceptibility != 1.2] [set susceptibility 1] ask n-of firm turtles with [susceptibility != 1.2 and susceptibility != 1][set susceptibility 0.8] ask turtles [set appraisal susceptibility * (log(1 + random 9) 10)] ask turtles [set emotion appraisal] ask turtles with [emotion = 0][set color white] ask turtles with [emotion <= 0.4 and emotion > 0][set color green] ask turtles with [emotion > 0.4 and emotion <= 0.8][set color yellow] ask turtles with [emotion > 0.8 and emotion <= 1][set color red] ask turtles with [susceptibility = 1.2][set b 0.6 + random-float 0.4] ask turtles with [susceptibility = 1][set b 0.4 + random-float 0.2] ask turtles with [susceptibility = 0.8][set b random-float 0.4] reset-ticks end to go while [ticks <= arrival-tick] [ask turtles [ifelse (b * (susceptibility * (log (1 + sum sort [emotion] of turtles-here) 10)) + (1 - b) * appraisal) <= 1[set emotion (b * (susceptibility * (log (1 + sum sort [emotion] of turtles-here) 10)) + (1 - b) * appraisal)] [set emotion 1]] check-color ask turtles with [color = green][if xcor <= -6 [facexy -8 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = green][if xcor > -6 and xcor <= -2 [facexy -4 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = green][if xcor > -2 and xcor <= 2 [facexy 0 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = green][if xcor > 2 and xcor <= 6 [facexy 4 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = green][if xcor > 6 [facexy 8 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = yellow][if xcor <= -6 [facexy -8 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = yellow][if xcor > -6 and xcor <= -2 [facexy -4 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = yellow][if xcor > -2 and xcor <= 2 [facexy 0 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = yellow][if xcor > 2 and xcor <= 6 [facexy 4 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = yellow][if xcor > 6 [facexy 8 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = red][if xcor <= -6 [facexy -8 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] ask turtles with [color = red][if xcor > -6 and xcor <= -2 [facexy -4 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] ask turtles with [color = red][if xcor > -2 and xcor <= 2 [facexy 0 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] ask turtles with [color = red][if xcor > 2 and xcor <= 6 [facexy 4 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] ask turtles with [color = red][if xcor > 6 [facexy 8 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] if official? [ask turtles [set emotion emotion * (1 - official-regulation)]] tick ] if random 100 <= P * 100 [ask turtles-on (patch-set patch -8 1 patch -4 1 patch 0 1 patch 4 1 patch 8 1) [die]] ifelse official? [ask turtles [set emotion emotion * (1 - official-regulation)]] [ask turtles [ifelse (b * (susceptibility * (log (1 + sum sort [emotion] of turtles-here) 10)) + (1 - b) * appraisal) <= 1 [set emotion (b * (susceptibility * (log (1 + sum sort [emotion] of turtles-here) 10)) + (1 - b) * appraisal)] [set emotion 1]]] check-color ask turtles with [color = white][if xcor <= -6 [facexy -8 1 fd random-float 1]] ask turtles with [color = white][if xcor > -6 and xcor <= -2 [facexy -4 1 fd random-float 1]] ask turtles with [color = white][if xcor > -2 and xcor <= 2 [facexy 0 1 fd random-float 1]] ask turtles with [color = white][if xcor > 2 and xcor <= 6 [facexy 4 1 fd random-float 1]] ask turtles with [color = white][if xcor > 6 [facexy 8 1 fd random-float 1]] ask turtles with [color = green][if xcor <= -6 [facexy -8 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = green][if xcor > -6 and xcor <= -2 [facexy -4 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = green][if xcor > -2 and xcor <= 2 [facexy 0 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = green][if xcor > 2 and xcor <= 6 [facexy 4 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = green][if xcor > 6 [facexy 8 1 rt asin random-float (1 / 2) lt asin random-float (1 / 2) fd random-float 1]] ask turtles with [color = yellow][if xcor <= -6 [facexy -8 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = yellow][if xcor > -6 and xcor <= -2 [facexy -4 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = yellow][if xcor > -2 and xcor <= 2 [facexy 0 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = yellow][if xcor > 2 and xcor <= 6 [facexy 4 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = yellow][if xcor > 6 [facexy 8 1 rt asin random-float ((sqrt 3) / 2) lt asin random-float ((sqrt 3) / 2) fd random-float 2]] ask turtles with [color = red][if xcor <= -6 [facexy -8 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] ask turtles with [color = red][if xcor > -6 and xcor <= -2 [facexy -4 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] ask turtles with [color = red][if xcor > -2 and xcor <= 2 [facexy 0 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] ask turtles with [color = red][if xcor > 2 and xcor <= 6 [facexy 4 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] ask turtles with [color = red][if xcor > 6 [facexy 8 1 rt asin random-float 1 lt asin random-float 1 fd random-float 3]] tick end to check-color ask turtles with [emotion = 0][set color white] ask turtles with [emotion <= 0.4 and emotion > 0][set color green] ask turtles with [emotion > 0.4 and emotion <= 0.8][set color yellow] ask turtles with [emotion > 0.8 and emotion <= 1][set color red] end
There is only one version of this model, created 2 days ago by Ying Zhang.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Emotional contagion in metro emergencies.png | preview | Preview for 'Emotional contagion in metro emergencies' | 2 days ago, by Ying Zhang | Download |
This model does not have any ancestors.
This model does not have any descendants.