Pseudocode for SIR simulation on micrograph