The study of compartmental models, where a population is split into, for example, `Susceptible', `Infected' and `Recovered' compartments in the SIR model, have formed an important theoretical and computational basis for the study of epidemics and design of vaccination campaigns. An increased understanding of contact networks, which detail physical contacts of a sustained duration between individuals in a population (see e.g. [1]}), has been complemented by mathematical results for compartmental epidemic models on networks. One such contribution is the prediction of an epidemic threshold dependent upon the rates of infection and recovery, as well as the contact network topology [2]}, [3]}, [4]}. Many important results concerning the SIR model on networks have been derived by message-passing approaches, also known as the cavity method, including the size and risk of
epidemics on networks with arbitrary degree distributions [5]} and degree correlations [6]}, [7]}. More recently, these methods have been employed to model epidemic mitigation via contact tracing apps [8]} and competing strains of infectious diseases [9]}, [10]}, [11]}. In addition to analytical results, the cavity method provides a set of equations that allows for an efficient parallel numerical implementation, as opposed to direct simulations of the SIR model, which are usually sequential and typically marred by long computation times, scaling with the size and connectivity of the network and the infection rate relative to the recovery rate.
