Skip to main content
. Author manuscript; available in PMC: 2015 Apr 7.
Published in final edited form as: Simulation. 2014 Apr 1;90(4):460–484. doi: 10.1177/0037549714526947

Algorithm 3.

Procedure MakePathogens

Input: population V, pathogen prevalences {Pk}k=1..p
Output: {Ak}k=1..p
1 A1 = A2 = ... Ap =
2 foreach k in 1... p do
3     foreach vi in V do
4         tfkB(v), identifying the pathogen-k class of vi in Domain(Pk).
5         τ := pk;t the corresponding pathogen-k prevalence rate in Range(Pk).
6         if Random(0, 1) < τ then
7             Ak := Ak ∪ {vi}
8 return {Ak}k=1..p