, , , , - . , ( , , , ) - ( , " " " - ).
, ( SIR): , "", , , → , .. , , , , , ; , → , , !
:
-- nummsgs, number of "messages" received this time step
-- compartment (susceptible, infected or recovered)
. :
for each individual:
if individual.compartment != infected:
continue
for each neighbor of the individual:
neighbor.nummsgs += 1
if (random number says so):
individual.compartment = recovered
for each individual:
if individual.compartment != susceptible:
continue
maybe (depending on random number & nummsgs):
individual.compartment = infected
for each individual:
individual.nummsgs = 0
, -, ( , ).