  In the infectious disease literature, significant effort has been devoted to
studying dynamics at a single scale. For example, compartmental models
describing population-level dynamics are often formulated using differential
equations. In cases where small numbers or noise play a crucial role, these
differential equations are replaced with memoryless Markovian models, where
discrete individuals can be members of a compartment and transition
stochastically. Classic stochastic simulation algorithms, such as Gillespie's
algorithm and the next reaction method, can be employed to solve these
Markovian models exactly. The intricate coupling between models at different
scales underscores the importance of multiscale modelling in infectious
diseases. However, several computational challenges arise when the multiscale
model becomes non-Markovian. In this paper, we address these challenges by
developing a novel exact stochastic simulation algorithm. We apply it to a
showcase multiscale system where all individuals share the same deterministic
within-host model while the population-level dynamics are governed by a
stochastic formulation. We demonstrate that as long as the within-host
information is harvested at a reasonable resolution, the novel algorithm we
develop will always be accurate. Moreover, the novel algorithm we develop is
general and can be easily applied to other multiscale models in (or outside)
the realm of infectious diseases.
