## Abstract

The duration, type and structure of connections between individuals in real-world populations play a crucial role in how diseases invade and spread. Here, we incorporate the aforementioned heterogeneities into a model by considering a dual-layer static–dynamic multiplex network. The static network layer affords tunable clustering and describes an individual’s permanent community structure. The dynamic network layer describes the transient connections an individual makes with members of the wider population by imposing constant edge rewiring. We follow the edge-based compartmental modelling approach to derive equations describing the evolution of a susceptible–infected–recovered epidemic spreading through this multiplex network of individuals. We derive the basic reproduction number, measuring the expected number of new infectious cases caused by a single infectious individual in an otherwise susceptible population. We validate model equations by showing convergence to pre-existing edge-based compartmental model equations in limiting cases and by comparison with stochastically simulated epidemics. We explore the effects of altering model parameters and multiplex network attributes on resultant epidemic dynamics. We validate the basic reproduction number by plotting its value against associated final epidemic sizes measured from simulation and predicted by model equations for a number of set-ups. Further, we explore the effect of varying individual model parameters on the basic reproduction number. We conclude with a discussion of the significance and interpretation of the model and its relation to existing research literature. We highlight intrinsic limitations and potential extensions of the present model and outline future research considerations, both experimental and theoretical.

## Introduction

The continual design and development of mathematical models describing epidemic processes on large, complex populations improves our understanding of how diseases and individuals behave during an epidemic, and how preventative measures can be implemented for the greater good. With ever-increasing computational power, models can incorporate increasingly complex features, and model predictions may become more valuable. Nonetheless, any model must tread a careful balance between capturing observed real-world complexity and enabling calculations and conclusions to be drawn with ease. The ultimate epidemiological model must therefore incorporate the behavioural and structural features which significantly influence disease dynamics, whilst being analytically tractable.

Social heterogeneity describes the propensity for a social group to be diverse in character or content and is an important determinant when studying the dynamics and control of infectious diseases (Arthur et al. 2017). In a social group, heterogeneity encompasses many descriptive elements, such as variations in individuals’ behaviour or in susceptibility across group members. In network theory, social heterogeneity can also describe variations in the *types* of connections an individual makes. For example, an individual can be connected to other individuals in distinct groups, such as workplace or community groups.

Structured populations with multiple connection types are well described by multiplex networks, where a population of individuals partakes in multiple network *layers*. Each network layer describes a specific type of interaction between members of the population, and network structure in one layer is allowed overlap with network structure in another layer. A pair of individuals in a multiplex network can share more than one connection. In a multiplex network, an individual is present in every network layer, but may or may not partake in connections in individual network layers.

Existing multiplex modelling studies have shown that single-layer approximations or aggregations of multiplex networks are not accurate enough to describe the epidemic process (Diakonova et al. 2016; Zhuang et al. 2017; Gomez et al. 2013; Cozzo et al. 2013), and further that an epidemic can spread on a multiplex network even if the individual layers are well below their respective epidemic thresholds (Zhao et al. 2014). A global cascades model generalised for multiplex networks was used to show that multiplexes are more vulnerable to global cascades than single-layer networks (Brummitt et al. 2012). These studies highlight the importance of accounting for heterogeneity in connection type by considering multiplex network models.

Another determinant of infectious disease dynamics is heterogeneity in the structural connections between individuals, within a single type of connection. Real-world networks often exhibit community structure, with a high density of connections within communities and a low density of connections between communities. They are also considered to exhibit other structural characteristics such as network transitivity or clustering, described in social network theory as the propensity for an individual to be connected to a friend of a friend (Newman 2003).

Community structure has been shown to affect disease dynamics on single-layered (uniplex) networks, where on average, epidemics occurring on networks with community structure exhibit greater variance in final epidemic size, a greater number of small, local outbreaks that do not develop into epidemics and higher variance in the duration of the epidemic (Salathé and Jones 2010). Network quality functions able to detect community structure in multiplex networks have been developed (Mucha et al. 2010). Further, results such as the large graph limit of a susceptible–infected–recovered (SIR) epidemic process on a dynamic multilayer network, where one network layer represents community links and another represents connections in healthcare settings, have been derived (Jacobsen et al. 2016).

In network models, increased clustering is generally considered to slow an epidemic by increasing the epidemic threshold (Miller 2009). However, this relationship is not always monotonic. Higher clustering in a multiplex study of information propagation led to an increase in the epidemic threshold and a decrease in final epidemic size (Zhuang and Yagan 2016). Increased clustering in a study of Watt’s threshold model generalised for a multiplex network comprised of clustered network layers led to a decrease in the probability of a global cascade and its size (Zhuang et al. 2017). However, the authors also discovered a critical threshold for the average degree, above which clustering was shown to *facilitate* global cascades (Zhuang et al. 2017). A uniplex network study found that simultaneously increasing clustering and the variance of the degree distribution led to an increase in final epidemic size (Volz et al. 2011). Moreover, clustering can lead to correlations where high-degree individuals are more likely to connect with other high-degree individuals. It is clear that the effect of clustering is complex and should be considered in the design of network models.

In epidemiology it is also important to consider heterogeneity across contact *duration*. In human populations, links between individuals may be long-lasting (persistent), e.g. between an infant child and their caregiver; temporary (transient), e.g. between workplace colleagues; or more short-lived (fleeting), e.g. between strangers coming into close proximity on public transport. In a study using a year’s mobile phone data as a proxy for the structure and dynamics of a large social network, researchers found that persistent links tend to be reciprocal and are more common for individuals with low degree and high clustering (Hidalgo and Rodriguez-Sickert 2008). Many network-based studies in the past have considered fully static network structures and hence solely investigate the effects of persistent connections between individuals, see Keeling and Eames (2005) for a review of differing approaches.

Later studies of epidemic processes on networks have incorporated persistent *and* transient connections into their models by imposing rewiring rules on static networks. Rewiring rules considered include spatially constrained rewiring (Rattana et al. 2014), random link activation and deletion (Taylor et al. 2012; Sélley et al. 2015; Kiss et al. 2012) and temporary link deactivation (Tunc et al. 2013; Shkarayev et al. 2014). On the other hand, epidemic processes with fleeting contact duration can be well described via the mass action model, which assumes all pairs of individuals contact one another at the same rate, the mean-field social heterogeneity model (also known as the degree-based mean-field model), which generalises the mass action model by allowing for variations in contact rate across the population, and the dynamic fixed- and dynamic variable-degree models, where edges are swapped at a given rate, or edges are broken and created at given rates, respectively (Miller and Volz 2013; Miller et al. 2012).

Here, we suppose that static and dynamic connections *coexist* in any complex population. We aim to derive a network model describing an SIR epidemic process spreading through a population where each individual has two types of connections: persistent links to individuals in their household, constituting a static network layer with community structure, and transient connections to strangers in the wider population, where all such edges rewire at a constant rate, constituting a dynamic network layer with conserved degrees.

In what follows, we utilise the edge-based compartmental modelling (EBCM) approach (Volz 2008; Miller 2011, 2014; Miller et al. 2012), deriving equations which describe the time evolution of classical quantities of interest, where the underlying dual-layered static–dynamic network has heterogeneity in contact type, contact duration, and contact structure. We derive the associated basic reproduction number \(R_0\), following the next-generation matrix approach (Diekmann et al. 2009). We describe the implementation of the EBCM model and of statistically correct Gillespie simulations of the epidemic process (Gillespie 1976). The new model is validated, firstly by showing that collapsing either the static or dynamic network layers leads model equations to converge to existing equivalent model equations, and secondly by comparing the dynamics predicted by model equations to those from exact simulations. We explore how various combinations of model parameters and network layers influence global dynamics, uncover behavioural regimes that the model can achieve for specific combinations of infection and rewiring rates, and show that our derived \(R_0\) behaves as expected. The paper concludes with a discussion of potential implications of the work as well as possible extensions.

## Methods

Our solutions are based on the class of undirected random graphs (networks). Each node is a member of a random number of static lines (2-vertex cliques), static triangles (3-vertex cliques) and dynamic lines (2-vertex cliques). The probability that a node has *s* static line stubs, *t* static triangle *corners* and *d* dynamic line stubs is described by the probability mass function \(p_{s,t,d}\). The model captures network structure using the probability generating function (PGF)

When differentiating PGF (1), we use superscripts such that \(g^{(x)}\) denotes the first (partial) derivative of *g* with respect to *x* and \(g^{(y,y)}\) denotes the second (partial) derivative of *g* with respect to *y*. Equation (1) can be used to calculate useful properties of the multiplex network. For example, \(M_\mathrm{s}\), the expected number of static line stubs that belong to a randomly selected individual, \(M_\mathrm{t}\), the expected number of static triangle corners that belong to a randomly selected individual, and \(M_\mathrm{d}\), the expected number of dynamic line stubs that belong to a randomly selected individual, are calculated as follows:

We consider a basic SIR compartmental model. Infections occur across edges on the static network layer at a constant rate \(\beta _{\mathrm{s}}\), whilst infections occur across edges on the dynamic network layer at a constant rate \(\beta _{\mathrm{d}}\). Infected individuals recover at a constant rate \(\gamma \). Once recovered, a node cannot be reinfected, and can no longer transmit infection to its neighbours. A comprehensive list of model variables and parameters is given in Table 1.

### Edge-Based Compartmental Model Derivation

We follow the edge-based compartmental modelling approach by considering the fate of a randomly selected test node *u*, which is prevented from transmitting infection. This assumption is a useful tool that eliminates conditional probability arguments that would need to be considered otherwise (Miller et al. 2012). It does not introduce any approximation. At time zero, infection is introduced to a fraction \(\rho \) of the population chosen uniformly at random, comprising the initial condition of the system. We assume that the test node *u* is a member of *s* static line stubs, *t* static triangle corners and *d* dynamic line stubs. Then the probability that *u* is susceptible is \((1-\rho )\theta _{2}^{s}\theta _{3}^{t}\theta _{4}^{d}\), where \(\theta _{2}\) is the probability that a random line (2-clique) on the static network layer has not transmitted infection to the test node, \(\theta _{3}\) is the probability that neither of the other nodes in a random triangle on the static network layer has transmitted infection to the test node, and \(\theta _{4}\) is the probability that a random *stub* connected to *u* on the dynamic network layer has never been involved in transmitting infection to the test node. Assuming we are able to calculate \(\theta _{2}\), \(\theta _{3}\) and \(\theta _{4}\) as functions of time, we are able to calculate the proportion of susceptible individuals *S* as a function of time. Given *S*(*t*), we use \(I(t)=1-S(t)-R(t)\) and \(\dot{R}(t)=\gamma I(t)\) to calculate *I*(*t*) and *R*(*t*), completing the system.

#### Considering \(\theta _{2}\)

We divide \(\theta _{2}\) into \(\phi _\mathrm{S}\), \(\phi _\mathrm{I}\) and \(\phi _\mathrm{R}\), the probabilities that a random neighbour along a line on the static network layer has not transmitted infection to *u*, and is susceptible, infected or recovered, respectively. The probability the neighbour has not transmitted infection to *u* is \(\theta _{2}=\phi _\mathrm{S}+\phi _\mathrm{I}+\phi _\mathrm{R}\), and \((1-\theta _{2})\) is the probability that it has transmitted infection to *u*. The fluxes between these quantities are shown in Fig. 1. The fluxes from \(\phi _\mathrm{I}\) to \(\phi _\mathrm{R}\) and from \(\phi _\mathrm{I}\) to \((1-\theta _{2})\) are proportional to one another. Both \(\phi _\mathrm{R}\) and \((1-\theta _{2})\) are equal to zero at time zero since we assume that no infection or recovery events can occur prior to time zero. By integrating the relation \(\frac{\mathrm{d}\phi _\mathrm{R}}{\mathrm{d}t}=\frac{\gamma }{\beta _{\mathrm{s}}} \frac{\mathrm{d}(1-\theta _{2})}{\mathrm{d}t}\), and using the initial condition \(\phi _\mathrm{R}(0)=(1-\theta _{2}(0))=0\), we find the relation

Next, we must calculate an expression for \(\phi _\mathrm{S}\). Consider the number of static line stubs attached to an individual that we reach by following a randomly chosen static line. Similarly, consider the number of static triangle corners attached to an individual reached by following a randomly chosen static triangle edge, and the number of dynamic line stubs attached to an individual we reach by following a randomly chosen dynamic line. Following edges in this way means we are more likely to arrive at an individual with a higher degree, in direct proportion to that individual’s degree (Meyers et al. 2006). The random number of such lines and triangle corners is described by the *excess degree distribution*, and we calculate the associated probability density functions for each edge type as follows. Denote \(q_{s-1,t,d}\propto sp_{s,t,d}\) as the probability of there being \((s-1)\) static line stubs, *t* triangle corners and *d* dynamic line stubs connected to a susceptible node that we reach by following a static line, not counting the line by which we arrived. Similarly, denote \(r_{s,t-1,d}\propto tp_{s,t,d}\) as the probability that if we follow a triangle edge to a susceptible node, there are *s* static line stubs, \((t-1)\) triangle corners and *d* dynamic line stubs connected to that node, not counting the triangle edge by which we arrived, and \(w_{s,t,d-1}\propto dp_{s,t,d}\) as the probability that if we follow a dynamic edge to a susceptible node, there are *s* static line stubs, *t* triangle corners and \((d-1)\) dynamic line stubs connected to that node, not counting the dynamic edge by which we arrived.

From above, we note that the probability that there are *s* static line stubs, *t* triangle corners and *d* dynamic line stubs attached to a random neighbour of *u* across a static line (not counting the line it was reached across) is \(q_{s-1,t,d}\propto sp_{s,t,d}\). A neighbour reached by following a static line connected to *u* is susceptible with probability \((1-\rho )\theta _{2}^{s-1}\theta _{3}^{t}\theta _{4}^{d}\) (recall that *u* cannot transmit infection), where *s*, *t* and *d* are realisations of the excess degree distribution. We calculate \(\phi _\mathrm{S}\) by multiplying the probability that a random neighbour across a static line has (*s*, *t*, *d*) neighbours, with the probability the random neighbour is susceptible, summing over all possible values of (*s*, *t*, *d*), and dividing by \(M_\mathrm{s}=g^{(x)}(1,1,1)\), the expected number of static lines a randomly selected node belongs to. We find

From the original definition of \(\theta _{2}\) we have

We are now able to calculate an expression for \(\theta _{2}\) using Eqs. (2)–(4), and noting from Fig. 1 that \(\dot{\theta _{2}}=-\beta _{\mathrm{s}} \phi _\mathrm{I}\):

#### Considering \(\theta _{3}\)

Since \(\theta _{3}\) denotes the probability that neither of the other nodes in a triangle has transmitted infection to the test node, we must divide \(\theta _{3}\) into six quantities \(\phi _\mathrm{SS}\), \(\phi _\mathrm{SI}\), \(\phi _\mathrm{SR}\), \(\phi _\mathrm{II}\), \(\phi _\mathrm{IR}\) and \(\phi _\mathrm{RR}\) in order to consider all possible disease status combinations for two individuals. For example, \(\phi _\mathrm{SI}\) denotes the probability that one triangle neighbour of *u* is susceptible, whilst the other is infectious, and neither has transmitted infection to *u*. The flux between the various compartments can be seen in Fig. 2. There is no simple relation between \(\phi _\mathrm{RR}\) and \(\theta _{3}\), so we take a different approach than before. We start with \(\dot{\theta _{3}}\), which satisfies

To calculate elements in the right-hand side of (6), we must first obtain an expression for \(\phi _\mathrm{SS}\), the probability that both neighbours in a triangle are still susceptible. Under the assumption that no transmission events have occurred in the triangle, the probability that a *single* triangle neighbour of *u* is susceptible is

where \(M_\mathrm{t}\) is the expected number of static triangle corners belonging to a randomly chosen individual. Since we require both triangle neighbours of *u* to be susceptible, we have

We choose *A* to denote the rate at which a single triangle neighbour of *u* becomes infected from *outside* the triangle. From Fig. 2 we know that \(\frac{\mathrm{d}\phi _\mathrm{SS}}{\mathrm{d}t}=-2A\phi _\mathrm{SS}\), which implies \(A=-\frac{\mathrm{d}\phi _\mathrm{SS}}{\mathrm{d}t}/2\phi _\mathrm{SS}\). To arrive at an explicit formula for *A*, we begin by calculating \(\frac{\mathrm{d}\phi _\mathrm{SS}}{\mathrm{d}t}\) via the chain rule:

We know that \(\left( g^{(y)}(1,1,1) \right) '=0\), since \(g^{(y)}(1,1,1)=\sum _{s,t,d}tp_{s,t,d} \in \mathbb {R}\). Hence

Next, we calculate \(\left( g^{(y)}(\theta _{2},\theta _{3},\theta _{4}) \right) '\ \) using \(\frac{\mathrm {d}g(x,y,z)}{\mathrm {d}t}=\frac{\partial g}{\partial x}\frac{\mathrm {d}x}{\mathrm {d}t}+\frac{\partial g}{\partial y}\frac{\mathrm {d}y}{\mathrm {d}t} +\frac{\partial g}{\partial z}\frac{\mathrm {d}z}{\mathrm {d}t}\) to obtain

Thus we have

Using \(A=-\frac{\mathrm{d}\phi _\mathrm{SS}}{\mathrm{d}t}/2\phi _\mathrm{SS}\) and some simplification, we find an explicit formula for *A*:

Now we are ready to calculate equations for \(\phi _\mathrm{SI}\), \(\phi _\mathrm{II}\) and \(\phi _\mathrm{IR}\). We also require \(\phi _\mathrm{SR}\), but do not require a formula for \(\phi _\mathrm{RR}\). Using the flow diagram in Fig. 2, we have

#### Considering \(\theta _{4}\)

To take into account the dynamic rewiring of edges, we introduce \(\theta _{4}=\psi _\mathrm{S}+\psi _\mathrm{I}+\psi _\mathrm{R}\), where \(\psi _\mathrm{I}\) denotes the probability that a random dynamic stub belonging to the test node *u* has never been involved in transmitting infection to *u*, and is *currently connected* to an infectious node. Other important assumptions with respect to dynamic-edge rewiring are the following: we assume that when one partnership ends, a new partnership forms immediately, neglecting any between-partner period, and we assume that edges break at rate \(\eta \). The flux between the various compartments of interest can be seen in Fig. 3.

Previously, \(\phi _\mathrm{S}\) (which corresponds to \(\psi _\mathrm{S}\) in this subsection) was calculated explicitly as the probability that the neighbour is susceptible. With dynamic-edge rewiring, an edge that previously transmitted infection may later become connected to a susceptible node, so the previous calculation of \(\phi _\mathrm{S}\) does not apply here. To find \(\psi _\mathrm{S}\), we need to calculate the probability that a *newly formed* edge connects to a susceptible, infectious or recovered individual. We call these probabilities \(\pi _\mathrm{S}\), \(\pi _\mathrm{I}\) and \(\pi _\mathrm{R}\) and note that they are equivalent to the probabilities that a randomly chosen dynamic stub belongs to a node in each disease compartment. The flux between these probabilities can be seen in Fig. 4.

First, we calculate the values \(\pi _\mathrm{S}\), \(\pi _\mathrm{I}\) and \(\pi _\mathrm{R}\), beginning with \(\pi _\mathrm{S}\). If we select a dynamic stub at random, the probability that it belongs to an individual partaking in *s* static lines, *t* triangles and *d* dynamic stubs is \(dp_{s,t,d}/M_\mathrm{\mathrm{d}}\), where \(M_\mathrm{d}=g^{(z)}(1,1,1)\) is the expected number of dynamic edges that a random individual belongs to. At time zero, infection is introduced at random to a proportion \(\rho \) of the population. Thus the probability of any node being susceptible at time zero is \((1-\rho )\). The probability of a node with degree (*s*, *t*, *d*) being susceptible after some time, given that it was susceptible at time zero, is \(\theta _{2}^{s}\theta _{3}^{t}\theta _{4}^{d}\). Hence \(\pi _\mathrm{S}=(1-\rho )\sum _{s,t,d}p_{s,t,d}d\theta _{2}^{s} \theta _{3}^{t}\theta _{4}^{d}/M_\mathrm{d}\), with the summation taken over all degree possibilities described by the probability mass function \(p_{s,t,d}\). Stubs belonging to infected nodes become stubs belonging to recovered nodes at rate \(\gamma \); hence, \(\dot{\pi _\mathrm{R}}=\gamma \pi _\mathrm{I}\), and \(\pi _\mathrm{I}=1-\pi _\mathrm{S}-\pi _\mathrm{R}\). The equation for \(\pi _\mathrm{S}\) can be condensed using PGF (1), so we have

To complete the system we need to calculate the flux \(B\psi _\mathrm{S}\) from \(\psi _\mathrm{S}\) to \(\psi _\mathrm{I}\) by solving a differential equation for \(\psi _\mathrm{S}\). *B* describes the rate at which a susceptible dynamic-edge neighbour *v* of *u* becomes infected from outside the dynamic edge joining *u* and *v*. Consider a random test node *u* and a random dynamic-edge neighbour *v* of *u*, at some time *t*. Let \(\zeta \) denote the probability that the two stubs joining *u* and *v* have not previously been involved in transmitting infection to *u* or to *v*, prior to the \(u-v\) edge forming. The probability that *v* is susceptible and that *u*’s stub has not previously transmitted to *u* is \(\zeta (1-\rho )\theta _{2}^{s}\theta _{3}^{t} \theta _{4}^{d-1}\), where *s* is the number of static lines *v* partakes in, *t* is the number of triangles *v* partakes in, and *d* is the dynamic line stub degree of *v*. Since we do not know the values (*s*, *t*, *d*) for *v*, we must consider all possible combinations of degrees. The probability of a randomly chosen dynamic stub belonging to a node with degree (*s*, *t*, *d*) is \(dp_{s,t,d}/g^{(z)}(1,1,1)\). We conclude that

To calculate the derivative of \(\psi _\mathrm{S}\), we first consider the derivative of \(\zeta \). This is given by subtracting the rate at which such edges break, \(\eta \zeta \), from the rate at which such edges form, \(\eta \theta _{4}^{2}\) (one \(\theta _{4}\) for *u*’s stub and one for *v*’s stub). We have

We have an expression for \(\dot{\zeta }\), so the derivative of \(\psi _\mathrm{S}\) can be found via the chain rule:

with simplifications achieved by utilising \(\pi _\mathrm{S}=(1-\rho )\theta _{4}g^{(z)}(\theta _{2}, \theta _{3},\theta _{4})/g^{(z)}(1,1,1)\) and \(\psi _\mathrm{S}=\zeta (1-\rho )g^{(z)}(\theta _{2}, \theta _{3},\theta _{4})/g^{(z)}(1,1,1)\). From Fig. 3 we have \(\dot{\psi _\mathrm{S}}=\eta \theta _{4}\pi _\mathrm{S}-\eta \psi _\mathrm{S}-B\psi _\mathrm{S}\), so we calculate the flux between compartments \(\psi _\mathrm{S}\) and \(\psi _\mathrm{I}\) using the rate

The \(\psi _\mathrm{S}\) to \(\psi _\mathrm{I}\) flux is the product of \(\psi _\mathrm{S}\), the probability that a random dynamic stub has not transmitted infection to the test node *u* and is currently connected to a susceptible node, with rate *B*, the rate that a neighbouring susceptible node *v* becomes infected from outside the dynamic edge, given that the stub has not transmitted and connects *u* to a susceptible node. Following the flow diagram in Fig. 3, we have the differential equations

#### Population-Level Equations

We began the EBCM derivation by considering the probability of a randomly selected test node *u* (which is prevented from transmitting infection) being susceptible as \(\theta _{2}^{s}\theta _{3}^{t}\theta _{4}^{d}\), given that the node has degree (*s*, *t*, *d*). Since we have calculated formulae for \(\theta _{2}\), \(\theta _{3}\) and \(\theta _{4}\), we can derive population-level equations describing the proportion of the population in each disease compartment at each point in time:

Equations (1)–(23) form a complete system describing an SIR epidemic spreading across a dual-layer multiplex network consisting of a static network layer constructed from line stubs and triangle corners and a dynamic network layer constructed from line stubs only, where edges rewire and degrees are conserved.

### Deriving the Basic Reproduction Number \(R_{0}\)

The basic reproduction number \(R_{0}\) is defined as the average number of infections caused by a single infectious individual, early in an epidemic process, in an otherwise susceptible population. In the model, a multiplex network structure is generated using three distinct edge distributions (static line stubs, static triangle corners and dynamic line stubs). To compute \(R_{0}\) we must consider the average number of infections caused across each type of edge, whilst also considering the type of edge that the infection was originally *received* across. With 3 edge types, this constitutes 9 values, grouped together to form the next-generation matrix

where matrix element \(G_{ij}\) describes the average number of infections caused across edges of type *j*, where the infector *received* infection across an edge of type *i*. Following the next-generation matrix approach (Diekmann et al. 2009), the value of \(R_{0}\) is found via the leading eigenvalue of the matrix \(\varvec{G}\), or equivalently, the eigenvalue with greatest magnitude. We note that the matrix \(\varvec{G}\) defined here is the transpose of the next-generation matrix as defined in Diekmann et al. (2009). However, this discrepancy does not affect the eigenvalues or therefore the value \(R_{0}\).

To find \(R_{0}\), we begin by deriving expressions for values in the first column of \(\varvec{G}\). Firstly, consider the non-diagonal matrix entries \(G_{ts}\) and \(G_{ds}\). We want to compute the expected number of infection events occurring across static lines, when individuals contracted infection across a triangle edge or a dynamic line. In both cases, we require the expected static line stub degree, multiplied by the expected number of infections caused across a *single* static line attached to the infectious individual. Say the expected static line stub degree is denoted \(\langle k_\mathrm{s} \rangle \). Now we require the expected number of infections caused across a single static edge attached to an infectious individual, in an otherwise susceptible population. A single static edge joining a susceptible and an infectious individual, in an otherwise susceptible population, has two event possibilities: a single recovery, or a single infection. Denote *X* as the random variable describing the number of infection events occurring across a single static line joining a susceptible to an infectious individual, in an otherwise susceptible population. Using the expectation formula, and since there can only be zero or one infection events occurring across such an edge, we find the expected number of infections across a static line joining a susceptible to an infectious individual simply as \(\mathbb {P}(X=1)\). The probability of a single infection occurring across such a static edge, prior to any recovery, is \(\frac{\beta _{\mathrm{s}}}{\beta _{\mathrm{s}} +\gamma }\). Thus we can say that \(G_{ts}=G_{ds}=\langle k_\mathrm{s}\rangle \frac{\beta _{\mathrm{s}}}{\beta _{\mathrm{s}}+\gamma }\).

Finally, we calculate an expression for the diagonal matrix element \(G_{ss}\), by multiplying the expected *excess* static line stub degree, denoted \(\langle s\rangle \), by the expected number of infections caused across a single static line joining a susceptible individual to an infectious individual in an otherwise susceptible population. Following the same argument for \(G_{ts}\) and \(G_{ds}\), we compute the expected number of infection events for \(G_{ss}\) as \(\frac{\beta _{\mathrm{s}}}{\beta _{\mathrm{s}}+\gamma }\), and we obtain \(G_{ss}=\langle s\rangle \frac{\beta _{\mathrm{s}}}{\beta _{\mathrm{s}}+\gamma }\).

Next we derive expressions for the values \(G_{st}\), \(G_{tt}\) and \(G_{dt}\) in the second column of the matrix \(\varvec{G}\). We firstly consider the non-diagonal elements \(G_{st}\) and \(G_{dt}\). Both \(G_{st}\) and \(G_{dt}\) are calculated by multiplying the expected triangle *corner* degree, denoted \(\langle k_\mathrm {t}\rangle \), by the expected number of infection events caused within a *single* triangle attached to an infectious node in an otherwise susceptible population. In a single triangle comprised of two susceptible individuals attached to an infectious individual, there are a finite number of infection event possibilities: either no further infections occur (the infectious individual recovers), one infection event occurs, or two infection events occur. Define *Y* as the random variable describing the number of infection events within such a triangle. Using the expectation formula, we find the expected number of infection events within a triangle comprised of two susceptible individuals and an infective, in an otherwise susceptible population, as \(\mathbb {P}(Y=1)+2\cdot \mathbb {P}(Y=2)\). To continue, we must compute the probabilities \(\mathbb {P}(Y=1)\) and \(\mathbb {P}(Y=2)\) explicitly. \(\mathbb {P}(Y=1)\) describes the probability that the original infective infects *one* out of two triangle neighbours. In this case, either one of the two susceptible neighbours can become infectious, and both infectious triangle members must then recover, so that it is impossible for any more than one infection event to occur. In a triangle comprised of a single infective and two susceptible nodes, there are four distinct nodal orders in which a single infection event is followed by the recovery of both infectious nodes. We find

Considering \(\mathbb {P}(Y=2)\) is more complex, as there are two distinct ways in which two infection events can occur in a triangle between an infective and two susceptible individuals. Firstly, the original infective can infect both of its triangle neighbours consecutively, prior to any recovery events. The probability of both triangle infection events occurring in succession is given by \(\left( \frac{2\beta _{\mathrm{s}}}{2\beta _{\mathrm{s}}+\gamma }\right) \left( \frac{2\beta _{\mathrm{s}}}{2\beta _{\mathrm{s}}+2\gamma }\right) =\left( \frac{2\beta _{\mathrm{s}}}{2\beta _{\mathrm{s}}+\gamma }\right) \left( \frac{\beta _{\mathrm{s}}}{\beta _{\mathrm{s}}+\gamma }\right) \). Secondly, the original infective can cause two triangle infections via *three* consecutive events. In this case, the originally infectious triangle member firstly infects one susceptible triangle neighbour at rate \(\frac{2\beta _{\mathrm{s}}}{2\beta _{\mathrm{s}}+\gamma }\). The triangle is now comprised of two infectious individuals attached to a single susceptible individual. The second event to occur is a recovery of either the original infector or its first infectee, occurring at rate \(\frac{2\gamma }{2\beta _{\mathrm{s}}+2\gamma } =\frac{\gamma }{\beta _{\mathrm{s}}+\gamma }\). The triangle is now comprised of a susceptible, an infective, and a recovered individual, in an otherwise susceptible population. Following the recovery event, the final event is an infection of the remaining susceptible triangle member, occurring at rate \(\frac{\beta _{\mathrm{s}}}{\beta _{\mathrm{s}}+\gamma }\). The probability of all three events occurring in succession is thus \(\frac{2\beta _{\mathrm{s}}}{2\beta _{\mathrm{s}}+\gamma }\left( \frac{\gamma }{\beta _{\mathrm{s}} +\gamma }\right) \left( \frac{\beta _{\mathrm{s}}}{\beta _{\mathrm{s}}+\gamma }\right) \).

In the latter case of an infection, followed by a recovery, followed by another infection within a triangle originally composed of an infective and two susceptible individuals in an otherwise susceptible population, the original infector may not be directly involved in every single infection event. However, for the purposes of deriving \(R_{0}\), we say that the original infector *caused* these infections, regardless of the order in which triangle members recover and infect one another.

Since there are two distinct ways in which two infections can take place within a triangle comprised of an infective and two susceptible individuals, we take the sum of both individual probabilities to obtain \(\mathbb {P}(Y=2)\):

We find the expected number of infection events within a triangle comprised of two susceptible individuals and an infective, in an otherwise susceptible population, as

Then we have \(G_{st}=\langle k_\mathrm {t}\rangle \frac{2\beta _{\mathrm {s}}}{2\beta _{\mathrm {s}}+\gamma }\left[ 2-\left( \frac{\gamma }{\beta _{\mathrm {s}}+\gamma } \right) ^{2}\right] =G_{dt}\), where \(\langle k_\mathrm {t}\rangle \) denotes the expected static triangle *corner* degree. Finally, we have \(G_{tt}=\langle t\rangle \frac{2\beta _{\mathrm{s}}}{2\beta _{\mathrm{s}}+\gamma } \left[ 2-\left( \frac{\gamma }{\beta _{\mathrm{s}}+\gamma }\right) ^{2}\right] \), where \(\langle t\rangle \) denotes the expected *excess* static triangle corner degree.

We conclude by deriving elements from the third column of \(\varvec{G}\), starting with non-diagonal matrix elements \(G_{sd}\) and \(G_{td}\). In both cases, we multiply the expected dynamic line stub degree, denoted \(\langle k_\mathrm{d}\rangle \), by the expected number of infection events occurring across a single dynamic line stub attached to an infectious individual, in an otherwise susceptible population.

The probability of a dynamic stub attached to an infective in an otherwise susceptible population transmitting infection *at least once* is \(\frac{\beta _{\mathrm{d}}}{\beta _{\mathrm{d}}+\gamma }\). If such an infection occurs, the I–S pairing becomes an I–I pairing with a dynamic edge joining the two individuals. The probability of a dynamic I–I edge rewiring, prior to any recovery event, is \(\frac{\eta }{\eta +\gamma }\). We can assume that any I–I edge rewires to become an I–S edge in the limit of large population size, since we are early on in an epidemic process, and we began with an otherwise susceptible population. The probability that an infectious dynamic stub infects its new susceptible neighbour is \(\frac{\beta _{\mathrm{d}}}{\beta _{\mathrm{d}}+\gamma }\). This rewiring and infecting process can occur an arbitrary number of times in the model. The expected number of infections of this type can be calculated by taking the sum

by the geometric series, and where *r* is defined as \(\frac{\eta \beta _{\mathrm{d}}}{(\eta +\gamma )(\beta _{\mathrm{d}}+\gamma )}\), the probability of an infectious individual’s dynamic-edge rewiring, followed immediately by its dynamic stub infecting the new (susceptible) neighbour across the rewired edge. We obtain the matrix values \(G_{sd}=\langle k_\mathrm{d}\rangle \frac{\beta _{\mathrm{d}}}{\beta _{\mathrm{d}}+\gamma }\left( \frac{1}{1-r}\right) =G_{td}\).

Finally, we compute \(G_{dd}\), defined as the expected number of infections caused across dynamic edges, where the infector received infection across a dynamic edge itself. Firstly, consider the *single* dynamic I–I edge which originally infected our individual. The probability of the edge rewiring, leaving our infective in an I–S dynamic-edge pairing, is \(\frac{\eta }{\eta +\gamma }\). The probability of the infectious dynamic stub infecting the new susceptible neighbour is \(\frac{\beta _{\mathrm{d}}}{\beta _{\mathrm{d}}+\gamma }\). Thus the probability that the dynamic stub which originally contracted infection infects \(\ge n\) individuals is \(r^{n}\), where \(r=\frac{\eta \beta _{\mathrm{d}}}{(\eta +\gamma ) (\beta _{\mathrm{d}}+\gamma )}\). We compute the expected number of infections of this type by taking the sum of \(r^{n}\) for \(n=1\):\(\infty \)

by the geometric series. Now consider the remaining dynamic edges associated with our infectious individual. We require the expected number of infections caused by a single edge of this type. Using the same argument as for \(G_{sd}\) and \(G_{td}\), we find the expected number of infections caused by one dynamic edge attached to our infectious individual as \(\frac{\beta _{\mathrm{d}}}{\beta _{\mathrm{d}}+\gamma } \left( \frac{1}{1-r}\right) \). Thus we find \(G_{dd}=\frac{r}{1-r}+\langle d\rangle \frac{\beta _{\mathrm{d}}}{\beta _{\mathrm{d}}+\gamma } \left( \frac{1}{1-r}\right) \), where \(\langle d\rangle \) is the expected excess dynamic line stub degree.

In detail, the next-generation matrix \(\varvec{G}\) takes the form

where \(\langle k_\mathrm{s}\rangle \), \(\langle k_\mathrm{t}\rangle \) and \(\langle k_\mathrm{d}\rangle \) denote the expected static line stub, static triangle *corner* and dynamic line stub degrees, \(\langle s\rangle \), \(\langle t\rangle \) and \(\langle d\rangle \) denote the expected *excess* static line stub, static triangle *corner* and dynamic line stub degrees, and \(r=\frac{\eta \beta _{\mathrm{d}}}{(\eta +\gamma )(\beta _{\mathrm{d}}+\gamma )}\). The basic reproduction number \(R_{0}\) is the eigenvalue of next-generation matrix (24) with greatest magnitude.

### Model Implementation

A variable-order stiff differential equation solver (*ode15s* in the MATLAB environment) was used to solve all relevant systems of equations. Initial conditions were specified, consisting of appropriate degree distributions and parameters for each edge-based compartmental model type, and of a user-specified end time for the computation.

Solutions to Eqs. (1)–(23) were found using both interdependent and independent distributions for the three edge types. For interdependent distributions, a single probability distribution governed the distribution of *pairs* of edge stubs, and additional model parameters \((p_{s}+p_{t}+p_{d})\equiv 1\) were used to distribute each pair of stubs into: two static line stubs (with probability \(p_{s}\)), a single static triangle corner (with probability \(p_{t}\)) or two dynamic line stubs (with probability \(p_{d}\)). In such cases we used a negative binomial distribution for pairs of edge stubs with parameters *p* and *r* describing the probability of success in a single trial and the number of trial successes, respectively, where the distribution itself is generated by \(g_{nb}(x;r,p)=(\frac{p}{1-(1-p)x})^r\) and models the number of failures before a specified number of successes is reached in a series of identical, independent Bernoulli trials. We also utilised a discrete homogeneous distribution for pairs of edge stubs where all individuals had identical degree. For independent distributions, we used three separate binomial distributions for the number of static line stubs, static triangle corners and dynamic line stubs.

### Simulation Implementation

To test the validity of solutions to Eqs. (1)–(23), found in the MATLAB environment, Gillespie simulations (Gillespie 1976) were implemented to produce statistically correct trajectories of SIR epidemic processes occurring on equivalent static–dynamic multiplex networks. Prior to each simulation, static and ‘dynamic’ adjacency matrices were generated according to a configuration model approach, described as follows: for a population of *N* individuals, three vectors of length *N* were generated to record the number of static line stubs, static triangle corners and dynamic line stubs associated with each individual, according to user-specified degree distributions provided to the script. The script ensured that the total number of static line stubs was even, the total number of dynamic line stubs was even, and that the total number of static triangle corners was a multiple of three.

Firstly, the static network layer was generated using vectors containing the number of static line stubs and triangle corners each individual partook in. Pairs of static line stubs and triples of static triangle corners were selected at random. Provided potential static lines and triangles did not generate self-loops (where an individual is joined to itself with an edge) or double edges (where an edge exists more than once within the static network layer), they were added to the static adjacency matrix. The *unmatched* static line stubs and static triangle corners lists were updated, and the process continued until all static line stubs and triangle corners were successfully matched.

Secondly, the initial structure of the dynamic network layer was generated using the vector storing the number of dynamic line stubs each individual partook in. Pairs of dynamic line stubs were selected at random. Provided a potential dynamic edge did not generate a self-loop or a double edge within the dynamic network layer, it was added to the dynamic adjacency matrix. Successfully paired dynamic stubs were removed from the *unmatched* stubs list, and the process continued until all dynamic line stubs were successfully matched.

The nature of this configuration model approach meant that the wiring processes for the static and dynamic network layers may have had to be restarted multiple times in order to achieve final network structures. Once all static line stubs, static triangle corners and dynamic line stubs had been wired up, the configuration process was complete. Although the script prevented double edges from occurring within each network layer, it was possible for double edges to occur *across* the network layers, i.e. for two individuals to share both a static and a dynamic connection simultaneously.

Given static and dynamic adjacency matrices describing the multiplex network structure, simulated epidemic processes were implemented. In each Gillespie simulation, \(\rho N\) initially infectious individuals were selected at random from the population. At each time step, a vector of length \((N+1)\) described the state transition rate (infection or recovery) for all *N* individuals, followed by a single edge swapping rate, \(\frac{\eta M}{2}\), where \(M:=\) total number of edges in the dynamic network layer. Inter-event times followed an exponential distribution with scale parameter \(\frac{1}{R}\), where \(R:=\) the sum of the rates vector at the current time step. Each event occurring was either an infection, a recovery or an edge swap. Uniformly distributed random numbers were generated at each time step to determine the next event to occur. When an edge swap event occurred, the script selected two dynamic edges at random, ensuring that all four nodes involved in these edges were unique. The script also ensured that the proposed new dynamic edges did not already exist within the dynamic network layer. Given these conditions, an edge swap occurred and the Gillespie process continued. The process terminated once the user-specified end time was reached.

## Results

In what follows, we assess the validity of Eqs. (1)–(23) and of the basic reproduction number \(R_{0}\), obtained via next-generation matrix (24). We firstly consider two extreme cases of the multiplex model: when either the static or the dynamic network layers are negligible (close to zero). In such cases, we show that predictions made by Eqs. (1)–(23) resolve to predictions made by existing uniplex EBCM equations. When the full multiplex model is considered, with static and dynamic network elements present, there exists no basis for comparison other than generating exact simulations of the epidemic process. To this end, we utilise Gillespie simulations to demonstrate the validity of Eqs. (1)–(23) in predicting the epidemic process for a number of multiplex network configurations. By solely considering the predictions of Eqs. (1)–(23), we explore the consequences of varying individual model parameters and of considering various combinations of model parameters \((p_{s}+p_{t}+p_{d})\equiv 1\), governing the contributions of each edge type. Further, we explore the contributions of each edge type and how the resulting final epidemic size is altered within a systematic consideration of combinations of model parameters \(\beta _{\mathrm{s}}\), \(\beta _{\mathrm{d}}\) and \(\eta \). Finally, we test the performance of the derived basic reproduction number \(R_{0}\) in predicting the outcome of an epidemic and we explore variations in the value of \(R_{0}\) and the associated final epidemic size predicted by Eqs. (1)–(23) when altering the rate of rewiring, the extent of clustering and the average degree in the multiplex model.

### Model Convergence to Existing Uniplex Model Equations

#### Model Without Dynamic Layer

When the dynamic component of the dual-layer static–dynamic multiplex is removed, the model reduces to describe an SIR epidemic on a static uniplex network generated by lines and triangles. Biologically speaking, this reduced model tracks the epidemic as it spreads across persistent connections in a population with community structure. The EBCM approach has been followed to derive equations describing an SIR epidemic on such a network (Volz et al. 2011).

By comparing predictions made by uniplex model equations in Volz et al. (2011) with those of multiplex model equations (1)–(23) when dynamic network elements are close to zero, we were able to test the multiplex model’s convergence (Fig. 5). Excellent agreement was observed between multiplex model equations where dynamic network elements are negligible, uniplex model equations (Volz et al. 2011) and Gillespie simulated epidemics on equivalent multiplex networks, for a number of scenarios with varying forces of infection.

#### Model Without Static Layer

When the static component of the dual-layer static–dynamic multiplex is removed, the model describes an SIR epidemic on a dynamic uniplex network generated by lines, where edges rewire at constant rate \(\eta \) and degrees are conserved. Biologically, the reduced model describes an epidemic spreading through a population where connections between pairs of individuals are temporary, but the number of connections an individual partakes in remains fixed. The EBCM approach was followed to derive equations describing an SIR epidemic spreading on such a network in Miller et al. (2012).

Excellent agreement was observed between predictions made by Eqs. (1)–(23) when static network elements are close to zero, output from the dynamic fixed-degree derivation in Miller et al. (2012) and Gillespie simulations describing the SIR epidemic and edge rewire processes occurring simultaneously on equivalent multiplex networks, for a number of set-ups with varying forces of infection (Fig. 6).

### Model Validation by Comparison with Simulation

We have observed excellent agreement between multiplex model predictions, uniplex model predictions and Gillespie simulated epidemics in extreme cases where either static or dynamic network elements are negligible (Figs. 5, 6). When multiplex network elements are non-negligible, static and dynamic network layers coexist in the model. In such cases, Gillespie simulated epidemics become the sole basis for assessing the validity of multiplex model equations (1)–(23).

A number of comparisons have been made between multiplex model predictions and Gillespie simulations when static and dynamic network elements coexist (Figs. 7, 8). Excellent agreement was observed for a number of comparisons with various average degrees (imposed via negative binomial parameters *p* and *r*, describing the distribution governing pairs of edge stubs) and various levels of clustering (imposed by varying parameter \(p_{t}\) with the constraint \((p_{s}+p_{t}+p_{d})\equiv 1\)) (Fig. 7). Excellent agreement was also observed for a number of comparisons with various combinations of the multiplex model’s infection parameters \(\beta _{\mathrm{s}}\) and \(\beta _{\mathrm{d}}\) (Fig. 8).

### A Brief Exploration of Parameter Spaces

Having observed excellent agreement between simulated epidemic processes and equivalent predictions made by multiplex model equations, we investigated the effects of varying single parameters on the dynamics of epidemics predicted by Eqs. (1)–(23). In total, 9 individual model parameters were varied systematically, whilst all (or the majority of) other parameters were held constant (Fig. 9). Across all parameters being varied, an identical baseline parameter set was utilised, with the resulting prediction made by Eqs. (1)–(23) plotted in black to enable ease of comparison between different parameter scenarios.

This brief exploration highlights the effect that increasing or decreasing a single parameter has on the global dynamics of an SIR epidemic spreading across a dual-layer static–dynamic multiplex. Larger values of *p*, where *p* describes the probability of success in a single Bernoulli trial, generate a negative binomial distribution with smaller average degree and a reduction in variance, slowing the epidemic’s spread. Larger values of *r*, where *r* denotes the number of successful Bernoulli trials that must be reached before the experiment is stopped, led the epidemic to spread more rapidly due to an increase in average degree and variance of the negative binomial distribution for pairs of edge stubs. Varying the rewiring rate \(\eta \) led to less pronounced differences, where larger values of \(\eta \) led to a slight increase in the speed at which the epidemic spread through the population. Increasing a single infection parameter \(\beta _{\mathrm{s}}\) or \(\beta _{\mathrm{d}}\) leads to an increase in the rate of epidemic spread. Altering the parameter \(\rho \) means changing the number of individuals who are infectious at the start of an epidemic process. Increasing the value of \(\rho \) leads to changes in the shape of the curve *I*(*t*), describing the prevalence of infection at time *t*, and to the epidemic process finishing sooner. Altering the values \(p_{s}\), \(p_{t}\) and \(p_{d}\), with the constraint \((p_{s}+p_{t}+p_{d})\equiv 1\), demonstrates the range of dynamics that can be achieved using a fixed distribution for pairs of edge stubs with additional parameters to distribute edge pairs into three edge types. Baseline infection parameters are used across all three panels, thus \(\beta _{\mathrm{s}}=0.05<0.2=\beta _{\mathrm{d}}\), meaning that an increase in the proportion of dynamic edges leads to an increase in the speed of the epidemic, whilst any increase in the proportion of static edges leads to a decrease in the rate of epidemic spread.

### Contribution of Network Layers via \((p_{s}+p_{t}+p_{d})\equiv 1\)

When degree distributions are interdependent, the parameters \((p_{s}+p_{t}+p_{d})\equiv 1\) afford the ability to investigate the effects on epidemic dynamics of altering the proportion of edges of each type. Previously, we observed changes in the dynamics of *I*(*t*), caused by altering the contributions of each edge type (Fig. 9), where \(\beta _{\mathrm{d}}>\beta _{\mathrm{s}}\), rewiring was slow, and pairs of edge stubs were governed by a negative binomial distribution.

In this multiplex setting, increasing the force of infection on one network layer effectively reduces the force of infection on remaining network layers. Thus the value of parameters \(\beta _{\mathrm{s}}\), \(\beta _{\mathrm{d}}\) and \(\eta \), and the ratios between them, bias the effect of varying model parameters \(p_{s}\), \(p_{t}\) and \(p_{d}\). To take this into account, we allowed parameters \(\beta _{\mathrm{s}}\), \(\beta _{\mathrm{d}}\) and \(\eta \) to take three distinct values (specifically \(\beta _{\mathrm{s}}\in [0.55,0.6,0.65]\), \(\beta _{\mathrm{d}}\in [\frac{\beta _{\mathrm{s}}}{2},\beta _{\mathrm{s}},2\beta _{\mathrm{s}}]\) and \(\eta \in [0.01,1,100]\)), and we considered all 27 combinations of their values, before varying the contributions of each edge type and recording the final epidemic size predicted by Eqs. (1)–(23) in each case (Fig. 10). This approach enabled isolation of the effects of changing single infection or rewiring parameters and exploration of the contributions made by various combinations of edge proportions \(p_{s}\), \(p_{t}\) and \(p_{d}\) in distinct parameter settings.

Increasing the proportion of triangle corners via \(p_{t}\) consistently led to decreases in final epidemic size, suggesting that clustering slows the epidemic process regardless of the choice of parameters \(\beta _{\mathrm{s}}\), \(\beta _{\mathrm{d}}\) and \(\eta \) (Fig. 10). Generally, increasing the value of \(\eta \) resulted in an increase in final epidemic size when comparing identical edge contributions. Likewise, increasing the value of infection parameters \(\beta _{\mathrm{s}}\) or \(\beta _{\mathrm{d}}\) led to an increase in final epidemic size. Dependant on the combination of parameters \(\beta _{\mathrm{s}}\), \(\beta _{\mathrm{d}}\) and \(\eta \), different behavioural regimes emerge, indicated by the orientation of colours and the direction in which they change in individual panels. We observe that a single edge proportion can have a more or less dominant effect on the outcome, dependent on the particular parameter set. For example, when \(\eta =0.01\) and \(\beta _{\mathrm{s}}=0.55=\beta _{\mathrm{d}}\), changing the proportion of dynamic edges \(p_{d}\) has little effect on the final epidemic size. However, when \(\eta =100\), \(\beta _{\mathrm{s}}=0.65\) and \(\beta _{\mathrm{d}}=1.3\), altering the parameter \(p_{d}\) leads to more extreme changes in final epidemic size, a result of \(\beta _{\mathrm{d}}\) dominating \(\beta _{\mathrm{s}}\) and an increased rate of dynamic-edge rewiring.

### Validation of Basic Reproduction Number \(R_{0}\)

Next-generation matrix \(\varvec{G}\) (24) and the value \(R_{0}\) can be validated by testing to see if the final epidemic size is disturbed as \(R_{0}\) exceeds the epidemic threshold (\(R_{0}=1\)). When the basic reproduction number is subthreshold (\(R_{0}<1\)), the associated epidemic process is expected to ‘die-out’. However, when \(R_{0}>1\) the epidemic is expected to take hold and spread within a population.

For a number of set-ups, we recorded the final epidemic size predicted by Eqs. (1)–(23), the final epidemic size of a single Gillespie simulation of the same process and the associated \(R_{0}\) value (Fig. 11). To obtain a suitable range of \(R_{0}\) values we systematically increased \(\beta _{\mathrm{s}}=\beta _{\mathrm{d}}\) from subthreshold values, whilst all other parameters were held constant. Independent binomial distributions were used for static line stubs, static triangle corners and dynamic line stubs. In Gillespie simulations where \(R_{0}>1\), we imposed an additional constraint requiring the number of infectives to reach at least ten times the initial number of infected individuals; otherwise, a new Gillespie simulation was implemented. As \(R_{0}\) exceeded the epidemic threshold, the final epidemic size predicted by model equations (1)–(23) and from individual simulations increased rapidly, suggesting the derivation of the next-generation matrix \(\varvec{G}\) and associated \(R_{0}\) is rigorous.

We plotted \(R_{0}\) and the associated final epidemic size predicted by Eqs. (1)–(23) for a number of scenarios to investigate the impact on their values of varying specific multiplex network attributes (rewiring, clustering and average degree) and to explore the relationship between \(R_{0}\) and final epidemic size (Fig. 12). Varying the rewiring rate \(\eta \) demonstrates that \(R_{0}\) and the associated final epidemic size increase with the value of \(\eta \). Varying \(\eta \) can also move the system below or above the epidemic threshold \(R_{0}=1\). However, there is a limit to this relationship; as \(\eta \) increases above 20, the changes in \(R_{0}\) and final epidemic size are negligible. We have seen previously that larger values of \(p_{t}\) result in smaller final epidemic sizes, suggesting that increased clustering slows epidemic processes on multiplex networks (Fig. 10). Here, we find that increasing \(p_{t}\) leads to decreases in both \(R_{0}\) and the associated final epidemic size (Fig. 12). The relationship between \(p_{t}\) and final epidemic size appears to be linear. For smaller \(p_{t}\) the curve with \(R_{0}\) appears to be linear, but as \(p_{t}\) tends towards its maximal value, the reduction in \(R_{0}\) increases.

An increase in average degree \(\langle k\rangle \), where pairs of edge stubs follow a negative binomial distribution, led to increases in \(R_{0}\) and final epidemic size (Fig. 12). The relationship between \(\langle k\rangle \) (negative binomial) and \(R_{0}\) appears to be linear. However, the relationship between \(\langle k\rangle \) and final epidemic size differs. The final epidemic size increases at a faster rate above some critical average degree, say \(\langle k\rangle =12\). A similar pattern emerges in the relationship between the average degree, \(R_{0}\) and final epidemic size when pairs of edge stubs follow a discrete homogeneous distribution. This is not surprising, as we saw previously that the relationship between \(R_{0}\) and final epidemic size is nonlinear (Fig. 11). However, these results show that small average degrees make it hard for the epidemic to take hold in the population. Potentially, this is a result of the multiplex network becoming divided into more than one connected component, meaning the disease can get trapped within smaller subpopulations of individuals, limiting its effect.

## Discussion

We have proposed a model describing the time evolution of an SIR epidemic spreading through a population of individuals in a multiplex network consisting of two layers: a static network layer representing persistent human connections and a dynamic network layer representing temporary human interactions made outside of a typical household. The model incorporates heterogeneity in the structure, type and duration of connections between individuals, and the number of model equations remains fixed regardless of population size. We designed the multiplex model to afford control of network transitivity (clustering), on the static layer only, by generating the associated network structure using a combination of 2-vertex and 3-vertex cliques, referred to here as static lines and triangles. The dynamic network layer was generated via a single distribution for 2-vertex cliques. Following the EBCM approach (Miller 2014), we obtained expressions for time-evolving quantities of interest, such as the infectious proportion of the population *I*(*t*). We have also applied the next-generation matrix method (Diekmann et al. 2009) to compute the basic reproduction number \(R_{0}\), a measure of the expected number of infections a typical infectious individual will cause during an epidemic.

Multiplex model equations (1)–(23) were validated, first by testing convergence of epidemic dynamics to predictions made by existing uniplex edge-based compartmental model equations, when either network layer (static or dynamic) was eliminated, and second by comparing full model (with static and dynamic elements) predictions to the dynamics of corresponding statistically correct Gillespie simulations (Gillespie 1976).

The multiplex model’s parameter space was explored by varying individual parameters and plotting the resulting epidemic dynamics, and by mapping the outcome on final epidemic size of having various proportions of each edge type when considering different combinations of model parameters \(\beta _{\mathrm{s}}\), \(\beta _{\mathrm{d}}\) and \(\eta \). The basic reproduction number \(R_{0}\), found via the leading eigenvalue of next-generation matrix \(\varvec{G}\) (24), was validated by demonstrating that continually incrementing infection parameters \(\beta _{\mathrm{s}}\) and \(\beta _{\mathrm{d}}\), with all else held constant, led to a rapid increase in final epidemic size as \(R_{0}\) exceeded its epidemic threshold. Finally, we explored the effect on \(R_{0}\) and the associated final epidemic size predicted by Eqs. (1)–(23) of altering specific multiplex network attributes governing the rate of rewiring, the extent of clustering and the average degree.

Our unique contribution towards the literature is a model with a combination of static *and* dynamic network elements, derived by combining the EBCM approach to modelling an SIR epidemic on a static network with tunable clustering (Volz et al. 2011) with the EBCM approach to modelling an SIR epidemic on a dynamic fixed-degree network (Miller et al. 2012), under the framework of a dual-layer multiplex network.

The EBCM approach allows us to model variations in contact structure, contact type and contact duration simultaneously. Modelling such heterogeneities via EBCM provides an opportunity to investigate the effects of heterogeneities observed in real-world networks (Perry-Smith and Shalley 2003; Komurov and White 2007; Vernon and Keeling 2009), alongside consideration of common network attributes such as clustering and degree distributions. EBCM also affords a huge reduction in the number of equations required to track the epidemic, compared with full simulation.

This work progresses the drive to derive population models that capture reasonable levels of complexity and heterogeneity whilst exhibiting a tractable number of equations. By providing a clear and concise ‘walkthrough’ to deriving and validating our desired model, we hope that future researchers are inspired to build on these results by designing and implementing novel models, modelling approaches and computational algorithms.

The work here extends previous research following the edge-based compartmental modelling approach. Prior EBCM approaches derived model equations describing the SIR epidemic process on wholly static or wholly dynamic uniplex networks. For example, EBCM has been utilised to describe the SIR epidemic on static actual-degree configuration model (CM) networks (Miller et al. 2012), static CM networks with tunable clustering (Volz et al. 2011) and static expected degree mixed Poisson (MP) networks (Miller et al. 2012).

Dynamic uniplex networks have also been considered via the EBCM approach. Namely, CM networks with mean-field social heterogeneity (edges are broken and rewired at a very fast rate, meaning all pairs of individuals contact each other at the same rate, and edge durations are fleeting), dynamic fixed-degree CM networks (edges are rewired, but edge durations are finite), dormant contact CM networks (existing edges are broken and remain dormant for some time, before being re-established), MP networks with mean-field social heterogeneity (fleeting edge duration) and dynamic variable-degree MP networks (finite edge duration) (Miller et al. 2012).

Existing modelling approaches incorporating heterogeneity include the consideration of an epidemic with two ‘levels’ of mixing between individuals (but no network structure) (Ball et al. 1997), and the later considerations of epidemic processes occurring on structured populations with two levels of mixing (Zhang et al. 2015), and with two routes of transmission (Zhao et al. 2014). Recently, the EBCM approach was used to derive equations describing an SIR epidemic process with non-sexual and sexual transmission routes, a characteristic of diseases such as Ebola and Zika (Miller 2017).

Other modelling approaches have incorporated dynamicity of connections between individuals (and hence heterogeneity in contact duration) by, e.g. considering an SIR epidemic on a network with intermittent social distancing, where susceptible individuals break links with infectious individuals for some time \(t_{b}\), after which the connection is re-established (Valdez et al. 2013). Another approach considered the effects of constrained rewiring during an SIS epidemic, whereby susceptible individuals cut links to infectious individuals regardless of distance, and rewire to a susceptible individual within a given radius, where the nodes of the network were embedded in Euclidean space (Rattana et al. 2014).

Research considering the large graph limit of an SIR epidemic on a dynamic multilayer network affords heterogeneity in contact type and in contact duration by allowing individual network layers to contain either activating or de-activating edges and by allowing edges in different layers to correspond to different types of contacts (Jacobsen et al. 2016). Although Jacobsen et al. (2016) consider the SIR epidemic spreading on a multiplex network, including providing a dual-layer multiplex example where edge types correspond to community and healthcare contacts, they do not consider any fully static network components.

There are a number of adaptations that can be made to the proposed model. The model considers a heterogeneous contact structure between *N* individuals. However, the locations of *N* individuals are not taken into account. Real-world networks occur in space (Barthélemy 2011), and thus, it is important to investigate the effects of considering node locations. In this study, we have chosen to disregard the spatial locations of individuals. A more realistic model of an SIR epidemic spreading on a multiplex network of individuals would be achieved by embedding the locations of each individual into Euclidean space. Even more complex models could consider dynamic node locations or a combination of static and dynamic node locations.

Another potential adaptation is considering weighted network connections. In the proposed model, all connections are considered to be unweighted or equivalently to share equal weight (homogeneity). The model could be adapted by, e.g. making the weight of each connection proportional to the Euclidean distance between the two node locations (given spatial embedding), by imposing a distribution of connection weights or by assigning weights at random. Then, the probability of contracting disease across a connection can be made proportional to the weight of that connection.

In the present model, the population of *N* individuals is fixed. We do not consider the effect of flux in or out of the population, e.g. by births, deaths or migration events. An important next step is to adapt the model presented here to consider in- and outflow of members of the population or at least to consider whether such in- and outflows significantly influence disease dynamics.

Another model limitation concerns the assumptions made surrounding edge rewire events on the dynamic network layer. Here, we assume that when one partnership ends, a new partnership forms immediately. Thus, given a nonzero degree on the dynamic network layer, individuals remain connected to strangers from the wider population (via dynamic network connections) at all times. In reality, the fleeting connections an individual makes with strangers are temporary, and individuals can remain disconnected from these connections for some time. An improvement to the model could thus be achieved by allowing for gaps to occur between partnerships by implementing the dormant contact approach on the dynamic network layer [e.g. see section 3.3 of Miller et al. (2012), Valdez et al. (2013), Shkarayev et al. (2014) and Tunc et al. (2013)]. The immediate implication of such an approach is a more accurate model in relation to observed human behaviours. However, the dynamics of the epidemic process will be slowed, especially if the duration of the gap (in time) between partnerships is comparable to or longer than the typical time it takes to transmit infection to a partner. Alternative rules for edge dynamicity can also be considered, such as constrained rewiring (Rattana et al. 2014) and edge activation and deletion (Jacobsen et al. 2016; Sélley et al. 2015; Taylor et al. 2012). Other model adaptations include allowing for tunable clustering on all network layers (and thus imposing two edge distributions on each network layer), implementing more complex distributions governing the degrees of each node and biasing initially infectious individuals instead of selecting them at random.

The multiplex model affords tunable clustering on the static network layer by generating its contact structure using a distribution of line stubs and a distribution of triangle corners. However, the configuration model wiring process requires that any two individuals share at most one connection within a single network layer. Double edges can occur across network layers (i.e. when the same edge is present in both network layers), but not within them. This constraint greatly reduces the possibilities for placing triangles suitably into the network, meaning the configuration process is slowed down and the extent of clustering that can be achieved is reduced. Greater control over clustering could be achieved by adapting the model to allow for overlapping triangles (and either allowing double edges to occur in single network layers, or amalgamating any double edges that occur into single edges, or doubly weighted edges).

Other than making adaptations to the proposed model, there are a number of tests and analyses which are beyond the scope of this work. Firstly, a comprehensive exploration of the entire parameter space would elucidate the behavioural ‘envelope’ of the model and uncover any parameter regions where the model poorly predicts the SIR epidemic process, compared with simulation. A more thorough understanding of the impact of degree and degree heterogeneity on the relationship between parameters and system behaviour will require consideration of additional edge distributions with various levels of heterogeneity and average degrees. Secondly, the model’s utility can be investigated by using real-world data from historical epidemics or similar processes, e.g. livestock herd contact tracing data or Twitter data tracking the prevalence of a hashtag over time. Using real data, model parameters could be estimated using Bayesian estimation techniques and the resulting model predictions compared with prior knowledge of what occurred. The basic reproduction number \(R_{0}\) can be tested in the same way.

This work considers an SIR compartmental model under the guise of a disease spreading through a networked population. Thought must be given to what other real-world processes can be well described by the SIR compartmental model, such as opinion formation, rumour spreading or uptake of fashion trends. Further, a two-layer multiplex like the proposed model could be used to investigate the dynamics of two *interacting* SIR-type processes, such as a physical disease spreading process occurring on one network layer in combination with a disease awareness process occurring on the opposing network layer, using similar approaches to those of Funk et al. (2009) and Li et al. (2015).

Future research can build on these observations by considering similar modelling approaches that account for compartmental models other than the SIR type. For example, the SIS model (describing infections that do not confer lasting immunity, such as the common cold) and the SEIR model (describing infections with incubation periods, where individuals have contracted a disease but are not yet infectious and hence are in the ‘exposed’ disease state) are not considered here. Modelling an SEIR infection may require simple adaptation of the existing EBCM approach. However, consideration of an SIS-type epidemic process requires an altogether new modelling approach. A key assumption of the present approach is the consideration of all neighbours of the test node *u* as being independent. Attempting to impose this assumption would prevent modelling of SIS dynamics, a consequence which is discussed in Miller and Kiss (2014) and Miller et al. (2012).

Experiments that can be performed to improve and inform future modelling approaches include: quantifying the levels of heterogeneity in existing populations, including behavioural and structural heterogeneity, gaining a deeper understanding of the biological processes underlying disease spreading processes, improving on existing algorithmic and analytic approaches and fostering closer relations between modellers and practitioners, in order to maximise the benefits arising from research.

## References

Arthur RF, Gurley ES, Salje H, Bloomfield LSP, Jones JH (2017) Contact structure, mobility, environmental impact and behaviour: the importance of social forces to infectious disease dynamics and disease ecology. Philos Trans R Soc B 372(1719):20160454

Ball F, Mollison D, Scalia-Tomba G (1997) Epidemics with two levels of mixing. Ann Appl Probab 7:46–89

Barthélemy M (2011) Spatial networks. Phys Rep 499(1):1–101

Brummitt CD, Lee K-M, Goh K-I (2012) Multiplexity-facilitated cascades in networks. Phys Rev E 85(4):045102

Cozzo E, Banos RA, Meloni S, Moreno Y (2013) Contact-based social contagion in multiplex networks. Phys Rev E 88(5):050801

Diakonova M, Nicosia V, Latora V, Miguel MS (2016) Irreducibility of multilayer network dynamics: the case of the voter model. New J Phys 18(2):023010

Diekmann O, Heesterbeek JAP, Roberts MG (2009) The construction of next-generation matrices for compartmental epidemic models. J R Soc Interface. https://doi.org/10.1098/rsif.2009.0386

Funk S, Gilad E, Watkins C, Jansen VAA (2009) The spread of awareness and its impact on epidemic outbreaks. Proc Natl Acad Sci 106(16):6872–6877

Gillespie DT (1976) A general method for numerically simulating the stochastic time evolution of coupled chemical reactions. J Comput Phys 22(4):403–434

Gomez S, Diaz-Guilera A, Gomez-Gardenes J, Perez-Vicente CJ, Moreno Y, Arenas A (2013) Diffusion dynamics on multiplex networks. Phys Rev Lett 110(2):028701

Hidalgo CA, Rodriguez-Sickert C (2008) The dynamics of a mobile phone network. Physica A 387(12):3017–3024

Jacobsen KA, Burch MG, Tien JH, Rempała GA (2016) The large graph limit of a stochastic epidemic model on a dynamic multilayer network. arXiv preprint arXiv:1605.02809

Keeling MJ, Eames KTD (2005) Networks and epidemic models. J R Soc Interface 2(4):295–307

Kiss IZ, Berthouze L, Taylor TJ, Simon Péter L (2012) Modelling approaches for simple dynamic networks and applications to disease transmission models. Proc R Soc A 468:1332–1355

Komurov K, White M (2007) Revealing static and dynamic modular architecture of the eukaryotic protein interaction network. Mol Syst Biol 3(1):110

Li W, Tang S, Fang W, Guo Q, Zhang X, Zheng Z (2015) How multiple social networks affect user awareness: the information diffusion process in multiplex networks. Phys Rev E 92(4):042810

Meyers LA, Newman MEJ, Pourbohloul B (2006) Predicting epidemics on directed contact networks. J Theor Biol 240(3):400–418

Miller JC (2009) Percolation and epidemics in random clustered networks. Phys Rev E 80(2):020901

Miller JC (2011) A note on a paper by Erik Volz: SIR dynamics in random networks. J Math Biol 62(3):349–358

Miller JC (2014) Epidemics on networks with large initial conditions or changing structure. PLoS ONE 9(7):e101421

Miller JC (2017) Mathematical models of SIR disease spread with combined non-sexual and sexual transmission routes. Infect Dis Model. https://doi.org/10.1016/j.idm.2016.12.003

Miller JC, Kiss IZ (2014) Epidemic spread in networks: existing methods and current challenges. Math Model Nat Phenom 9(2):4–42

Miller JC, Volz EM (2013) Model hierarchies in edge-based compartmental modeling for infectious disease spread. J Math Biol 67(4):869–899

Miller JC, Slim AC, Volz EM (2012) Edge-based compartmental modelling for infectious disease spread. J R Soc Interface 9(70):890–906

Mucha PJ, Richardson T, Macon K, Porter MA, Onnela J-P (2010) Community structure in time-dependent, multiscale, and multiplex networks. Science 328(5980):876–878

Newman MEJ (2003) The structure and function of complex networks. SIAM Rev 45(2):167–256

Perry-Smith JE, Shalley CE (2003) The social side of creativity: a static and dynamic social network perspective. Acad Manag Rev 28(1):89–106

Rattana P, Berthouze L, Kiss IZ (2014) Impact of constrained rewiring on network structure and node dynamics. Phys Rev E 90(5):052806

Salathé M, Jones JH (2010) Dynamics and control of diseases in networks with community structure. PLoS Comput Biol 6(4):e1000736

Sélley F, Besenyei Á, Kiss IZ, Simon PL (2015) Dynamic control of modern, network-based epidemic models. SIAM J Appl Dyn Syst 14(1):168–187

Shkarayev MS, Tunc I, Shaw LB (2014) Epidemics with temporary link deactivation in scale-free networks. J Phys A Math Theor 47(45):455006

Taylor M, Taylor TJ, Kiss IZ (2012) Epidemic threshold and control in a dynamic network. Phys Rev E 85(1):016103

Tunc I, Shkarayev MS, Shaw LB (2013) Epidemics in adaptive social networks with temporary link deactivation. J Stat Phys 151(1–2):355–366

Valdez LD, Macri PA, Braunstein LA (2013) Temporal percolation of a susceptible adaptive network. Physica A 392(18):4172–4180

Vernon MC, Keeling MJ (2009) Representing the UK’s cattle herd as static and dynamic networks. Proc R Soc Lond B Biol Sci 276(1656):469–476

Volz E (2008) SIR dynamics in random networks with heterogeneous connectivity. J Math Biol 56(3):293–310

Volz EM, Miller JC, Galvani A, Meyers LA (2011) Effects of heterogeneous and clustered contact patterns on infectious disease dynamics. PLoS Comput Biol 7(6):e1002042

Zhang C, Zhou S, Miller JC, Cox IJ, Chain BM (2015) Optimizing hybrid spreading in metapopulations. Sci Rep. https://doi.org/10.1038/srep09924

Zhao D, Li L, Peng H, Luo Q, Yang Y (2014) Multiple routes transmitted epidemics on multiplex networks. Phys Lett A 378(10):770–776

Zhuang Y, Yağan O (2016) Information propagation in clustered multilayer networks. IEEE Trans Netw Sci Eng 3(4):211–224

Zhuang Y, Arenas A, Yağan O (2017) Clustering determines the dynamics of complex contagions in multiplex networks. Phys Rev E 95(1):012312

## Acknowledgements

Rosanna C. Barnard acknowledges funding from the Engineering and Physical Sciences Research Council, EP/M506667/1. Joel C. Miller was funded by the Global Good Fund through the Institute for Disease Modeling. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

## Author information

### Affiliations

### Corresponding author

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

### Cite this article

Barnard, R.C., Kiss, I.Z., Berthouze, L. *et al.* Edge-Based Compartmental Modelling of an SIR Epidemic on a Dual-Layer Static–Dynamic Multiplex Network with Tunable Clustering.
*Bull Math Biol* **80, **2698–2733 (2018). https://doi.org/10.1007/s11538-018-0484-5

Received:

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s11538-018-0484-5

### Keywords

- Heterogeneity
- Epidemiology
- Clustering
- Edge-based compartmental modelling
- Multiplexity