0% found this document useful (0 votes)
4 views1 page

Code for Citizen Rebellion Dynamics

The document describes a model where citizens have a propensity to rebel that can shift based on the number of rebels and detained citizens within their sphere of influence, and where each citizen calculates a detainment influence based on citizens within their sphere of influence that are detained.

Uploaded by

Joe
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Code for Citizen Rebellion Dynamics

The document describes a model where citizens have a propensity to rebel that can shift based on the number of rebels and detained citizens within their sphere of influence, and where each citizen calculates a detainment influence based on citizens within their sphere of influence that are detained.

Uploaded by

Joe
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Extra Code

ask (patch-set [sphere_influence] of (one-of (citizens with [not informant? and not detained?])))
[set pcolor pink]
to propensity_shift
ask citizens with [not informant?] [
if (count_rebels > count_detained) [
let n ((count_rebels - count_detained) / count citizens-on sphere_influence)
set propensity_to_rebel ((rebellion_factor * n * (1 - propensity_to_rebel)) +
propensity_to_rebel)
]
]
end
to calc_detainment_influence
ask citizens [set detainment_influence (count (citizens-on sphere_influence) with [detained?] /
count (citizens-on sphere_influence))]
end

You might also like