Research Article

Modelling the Transmission Dynamics of Tuberculosis in the Ashanti Region of Ghana

Algorithm 1

Pseudocode of Gillespie’s SSA for the stochastic SEIR model with demography.
Input: , , , , , , , ,
Output: number of individuals within each compartment over time (52 time points) for different simulation runs, respectively
(1)Set initial values of the input variables at
(2)Compute rates of all the 7 possible events and the overall total rate for each simulation run based on initial values
(3)Determine next event using a uniform random generator and update the time to next event from exponential distribution at rate for each simulation run
(4)Select the next event to occur with a probability proportional to each event’s rate in step 2
(5)Update the rates and repeat steps 2 to 4 till the final time , and stop the simulation runs, respectively