Next Article in Journal
Function-Centered Modeling of Complex Non-Physical Systems: An Exploratory GTST-MLD Application to an Unstructured System for Transformative Change
Previous Article in Journal
Comparison of PID Controller Settings for an Active Bearing Support Controlled Using the LabVIEW Software Environment
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Basic Reproduction Number for Petri Net Models: A Next-Generation Matrix Approach

1
School of Mathematical and Statistical Sciences, Arizona State University, 901 S. Palm Walk, Tempe, AZ 85287-1804, USA
2
School of Life Sciences, Arizona State University, Tempe, AZ 85281-5000, USA
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2025, 15(23), 12827; https://doi.org/10.3390/app152312827
Submission received: 11 October 2025 / Revised: 14 November 2025 / Accepted: 18 November 2025 / Published: 4 December 2025

Featured Application

This work can be utilized by bio-mathematicians, epidemiologists, and other researchers to calculate the basic reproduction number (R0) for the Petri Net system they are modeling, helping them understand the dynamics of an outbreak.

Abstract

The basic reproduction number ( R 0 ) is an epidemiological metric that represents the average number of new infections caused by a single infectious individual in a completely susceptible population. The methodology for calculating this metric is well-defined for numerous model types, including, most prominently, Ordinary Differential Equations (ODEs). The basic reproduction number is used in disease modeling to predict the potential of an outbreak and the transmissibility of a disease, as well as by governments to inform public health interventions and resource allocation for controlling the spread of diseases. A Petri Net (PN) is a directed bipartite graph where places, transitions, arcs, and the firing of the arcs determine the dynamic behavior of the system. Petri Net models have been an increasingly used tool within the epidemiology community. However, no generalized method for calculating R 0 directly from PN models has been established. Thus, in this paper, we establish a generalized computational framework for calculating R 0 directly from Petri Net models. We adapt the next-generation matrix method to be compatible with multiple Petri Net formalisms, including both deterministic Variable Arc Weight Petri Nets (VAPNs) and stochastic continuous-time Petri Nets (SPNs). We demonstrate the method’s versatility on a range of complex epidemiological models, including those with multiple strains, asymptomatic states, and nonlinear dynamics. Crucially, we numerically validate our framework by demonstrating that the analytically derived R 0 values are in strong agreement with those estimated from simulation data, thereby confirming the method’s accuracy and practical utility.

1. Introduction

Petri Nets are a promising modeling framework for infectious disease systems that are difficult for standard Ordinary Differential Equation (ODE) models [1,2,3]. Petri Net models are easily visualized as causal network diagrams, and their modular structure can be scaled to large spatial models [4]. They can also integrate continuous-time models of disease spread with discrete-time events such as policy changes or interventions. Numerous studies have explored the use of Petri Nets to represent and analyze SIR models, highlighting their potential for modular and large-scale modeling of disease dynamics [2,5,6,7,8,9].
However, Petri Nets have lacked a generalized method for deriving the basic reproduction number, R 0 . In epidemiology, the basic reproduction number ( R 0 ) refers to the expected number of new cases that one infected individual will cause in a population where the entire population is susceptible [10,11]. As such, R 0 is a fundamental concept in mathematical epidemiology for all communicable diseases. While the Next Generation Matrix (NGM) framework is standard for ODEs, its adaptation to Petri Nets is not yet widely established. Concurrent with our work [12], Segovia has also proposed a formal adaptation of the next-generation matrix method to Petri Nets, focusing on a geometric interpretation of the matrix entries [2]. Our paper further advances this emerging topic by establishing a universal, computationally-oriented framework that offers distinct contributions. Compared to the geometric interpretation [2], our framework provides a higher degree of formalization for complex models through a direct method, a wider range of applications, and a more comprehensive verification method. Specifically, our approach is demonstrated on both traditional Stochastic Petri Nets (SPNs) and, crucially, the more flexible Variable Arc Weight Petri Nets (VAPNs). This VAPN compatibility (which can be applied to a wider range of models, such as those in Section 4.6) enables our framework to compactly model complex, nonlinear dynamics that are challenging for path-based methods. Furthermore, we provide, to our knowledge, the first robust numerical verification of an NGM Petri Net framework (Section 5), confirming its accuracy and practical utility.
The inability to directly calculate R 0 for Petri Nets limits their analytical utility and poses a significant barrier to the broader adoption of the modular construction of large-scale, mechanistic models of infectious disease spread. An accurate calculation of R 0 is therefore crucial for understanding the potential spread of an infectious disease and informing public health interventions [13]. Analyzing R 0 can give insights into the future dynamics of a particular disease based on how its value depends on the specific parameters, subpopulations, and constants that characterize the system at hand. Researchers calculate R 0 in models to assess transmission dynamics, compare scenarios, and evaluate the effectiveness of control measures such as vaccination or social behavior [13].
Applying the NGM method for calculating R 0 within the framework of Petri Nets requires insights bridging the gap between mechanistic model structure and formal spectral analysis. Mathematical treatments of R 0 via the next-generation matrix method have been outlined by Diekmann [11,14,15] and Van den Driessche [16]. Although other approaches exist for calculating R 0 , such as stability analysis of the disease-free equilibrium (DFE) [16], the direct definition from survival functions [17], and estimation from final size relations [18], the next-generation method is one of the most commonly used for ODE models [13].
In this paper, we show how to define and characterize the transition and transmission matrices necessary to calculate R 0 in Petri Nets. Among the various formulations of the NGM method, the computational approach introduced by Diekmann et al. [11,14,15] is uniquely well-suited for implementation in Petri Nets, as it explicitly constructs the next-generation matrix from compartmental transitions, which naturally aligns with the token flow and transition structure of Petri Nets. This compatibility enables a direct mapping from Petri Net dynamics to the linearized infection and transition matrices necessary for calculating R 0 .
We demonstrate the applicability and generality of this approach across a range of epidemiological models, including classical structures such as the SIRS, SEEIR models, a compartmental COVID-19 model with various infected compartments, and a model featuring a nonlinear infection term. These examples collectively illustrate how the Diekmann formulation, adapted to Petri Nets, enables the rigorous and automated computation of R 0 in Petri Nets, supporting their use across a broader spectrum of infectious disease modeling.
A premise of this work is that epidemiological models originally formulated as systems of ODEs can be systematically represented as Petri Nets, allowing for a more modular and visual approach to modeling. There are two main methodologies for mapping from PNs to ODEs that facilitate this translation. The first, commonly used for Stochastic Petri Nets (SPNs), maps the system based on mass-action principles. In this approach, outlined by Baez and Biamonte [19], the state variables (compartments) of the ODE system correspond to the places in the PN, and each term in the differential equations, representing an infection or recovery event, corresponds to a transition governed by a stochastic rate. The second method maps ODEs to a deterministic Variable Arc Weight Petri Net (VAPN). Here, the entire mathematical expression for the rate of change between two compartments can be directly encoded as a functional arc weight on the arc connecting the corresponding places. Both the SPN and VAPN have been numerically verified for the SIRS system [1]. Our framework is intentionally designed to be compatible with both of these ODE to PN mapping formalisms. By demonstrating that our method for determining R 0 for Petri Nets yields equivalent R 0 values for PN models derived from either method, we ensure its broad applicability and relevance to the wider epidemiological modeling community.
The remainder of the paper is structured as follows. In Section 2, we introduce the Petri Net formalism and discuss two approaches for using PNs to implement Susceptible–Infectious–Recovered (SIR) models. One approach uses deterministic, discrete-time PNs with variable arc weights, and the other uses stochastic, continuous-time PNs with constant arc weights representing the mass action of interactions among individuals in the compartments. Section 3 presents our NGM framework for Petri Nets. In Section 4, we demonstrate the broad applicability of this framework through a series of case studies on diverse and complex epidemiological models. Finally, a key contribution of this work is presented in Section 5, which provides a robust numerical verification of our framework. By simulating the Petri Net models directly and applying established statistical methods to the output data, we demonstrate a strong concordance between our analytically derived R 0 and the epidemiologically observed R 0 from simulations, thereby validating the accuracy of our approach.

2. A Brief Overview of Petri Nets

A Petri Net graph, or Petri Net structure, is a weighted bipartite graph [20] defined as an n-tuple ( P , T , A , w , x ) where:
  • P is the finite set of places (one type of vertex in the graph).
  • T is the finite set of transitions (the other type of vertex in the graph).
  • A is the set of arcs (edges) from places to transitions and from transitions to places in the graph A ( P × T ) ( T × P ) .
  • w: A → {1, 2, 3, …} is the weight function on the arcs.
  • x is a marking of the set of places P; x i = [ x ( p 1 ) , x ( p 2 ) , , x ( p n ) ] N n is the row vector associated with x. The term x i refers to marking of x at state i. Note that x 0 is the initial state (also known as marking).
Tokens are assigned to places, with the initial assignment being the initial marking. The number of tokens assigned to a place is an arbitrary non-negative integer, but it does not necessarily have an upper bound. A transition t j T in a Petri Net is said to be enabled if x ( p i ) w ( p i , t j ) for all p i I ( t j ) , where I ( t j ) is the set of input arcs from places to t j . This allows us to define the state transition function, f : N n × T N n , of Petri Net ( P , T , A , w , x ) is defined for transition t j T if and only if x ( p i ) w ( p i , t j ) for all p i I ( t j ) . If f ( x , t j ) is defined, then we set x = f ( x , t j ) , where x ( p i ) = x ( p i ) w ( p i , t j ) + w ( t j , p i ) , i = 1 , , n . In simple terms, a transition is enabled if the number of tokens in all places connected to that transition via an incoming arc is greater than or equal to the arc weight for the respective arc connected to the transition.
An important point to note is that there may be multiple possible PN representations for a given ODE model because there are choices in how to implement the PN model. The most common mapping method involves mapping ODEs to Stochastic Petri Nets (SPNs), as outlined by Baez and Biamonte [19]. An alternative method is to map the ODE to a Variable Arc Weight Petri Net (VAPN) [1]. Variable arc weight Petri Nets can have arc weights that depend on parameters, the number of tokens in places at specific times, and time. VAPNs allow for arc weights to be defined as functions that change over time, which can be linear or nonlinear. This method is deterministic and invertible, allowing for potentially lower computational requirements in parameter fitting and simulations, but it is novel and not yet widely used.
The inclusion of VAPNs is a key feature of our framework’s generality. While SPNs excel at modeling mass-action kinetics, VAPNs can represent complex, nonlinear transmission functions (such as frequency-dependent or behavior-driven rates) as single, functional arc weights. This allows for more elegant and compact models. Specifically, VAPNs can directly model mechanisms that are not based on mass-action principles, a limitation of traditional SPNs. As we will demonstrate, our method of identifying the arcs that contribute to the F and V matrices works intrinsically on these functional weights, a task not explicitly addressed by methods tailored to the constant-rate transitions of traditional SPNs.

3. Next-Generation Matrix for Petri Nets

We first review the next-generation method for ODEs before demonstrating how it can be applied to PNs.

3.1. Next-Generation Matrix for Ordinary Differential Equations

The Next-Generation Matrix (NGM) is a standard and widely-used technique in mathematical epidemiology for calculating R 0 from compartmental models. For additional methods for calculating R 0 , see [21]. The method for calculating R 0 via the NGM laid out by Diekmann et al. [11,14,15] defines R 0 as the spectral radius of the next-generation matrix. Specifically, two matrices (the transmission and transition matrices) are defined to calculate R 0 , starting with T, which is defined as the transmission matrix. The transmission matrix outlines the production of new infections. Where elements within the matrices describe how people move from non-infected compartments to infected compartments. Next, they define Σ as the transition matrix, which describes the state changes that occur when individuals move to other infected compartments, die, or become immune. To then find R 0 we take the dominant eigenvalue of ( T Σ 1 ) yielding R 0 = φ ( T Σ 1 ) .
Alternatively, van den Driessche and Watmough [16] outline a similar definition of R 0 . Let x = ( x 1 , , x n ) t , with each x i 0 , be the number of individuals in each compartment. Let n be the number of compartments, with the first m compartments being the infected compartments. We define X s as the set of all disease-free states such that X s = { x 0 | x i = 0 , i = 1 , , m } . Then we define the transmission matrix, matrix F i ( x ) , to be the rate of appearance of new infections in compartment i. We use two matrices V i + ( x ) and V i ( x ) to describe the rate of transfer of individuals into compartment i by all other means and the rate of transfer of individuals out of compartment i, respectively. From V i + ( x ) and V i ( x ) , we get the transition matrix, V i = V i ( x ) V i + ( x ) . The disease model itself has non-negative initial conditions with the system of equations following
x i ˙ = f i ( x ) = F i ( x ) V i ( x ) , i = 1 , n .
While some of these assumptions are trivial when modeled in Petri Nets, others, such as derivations, require closer inspection. For reference, we state the five mathematical assumptions here exactly as they are given in van den Driessche and Watmough [16], followed by brief comments. We will cover these assumptions for Petri Nets in the following Section 3.2.
(1)
If x 0 , then F i , V i + , V i 0 for i = 1 , , n . Each subsequent function x i ˙ represents a transfer of individuals, thus they are all non-negative.
(2)
If x i = 0 then V i = 0 . In particular, if x X s , then V i = 0 for i = 1 , , m . If a compartment is empty, then there can be no transfer of individuals out of the compartment.
(3)
F i = 0 if i > m . No infectious population enters a non-infectious compartment.
(4)
If x X s then F i ( x ) = 0 and V i + ( x ) = 0 for i = 1 , , m . This states that if the population is disease-free, it stays disease-free. Meaning no density-independent infectious population immigrates in. This becomes important when dealing with patch models, as seen in Section 4.7.
(5)
If F ( x ) is set to zero, then all eigenvalues of D f ( x 0 ) have negative real parts, where D f ( x 0 ) is the derivative [ f i x j ] evaluated at the disease free equilibrium (DFE), x 0 .
These assumptions enable the proof of Lemma 1 from van den Driessche and Watmough [16]. Using Lemma 1, van den Driessche and Watmough subsequently prove that φ ( F V 1 ) = R 0 .

3.2. Constructing the Next-Generation Matrix for Petri Nets

Since many of the papers we draw on for examples below use the van den Driessche and Watmough notation, we will lay out the Next-Generation Matrix for Petri Nets (NGMPN) following similar notation. To help visualize some of the concepts outlined in this process, Figure 1 will be used as a basic VAPN model with non-infected places ( N 1 , N 2 ) and infected places ( I 1 , I 2 , I 3 ). Examples using SPNs will be provided in the Case Studies section under in the first two model examples. This process of separating disease transmission dynamics from other state transitions within the infected population is conceptually similar to the framework of ‘Kermack–McKendrick module’ proposed by [2]. In that work, the Petri Net is partitioned into ‘susceptible’, ‘infection-process’, and ‘infection’ modules, where the F matrix is derived from the infection-process module and the V matrix is derived from the infection module. Our approach implements this separation by identifying specific arcs and transitions corresponding to new infections ( F i ( x ) ) versus those representing recovery, death, or movement between infected states ( V i ( x ) ). It is important to note that, as with any R 0 calculation in any modeling formalism (including ODEs), the modeler must first define the set of infected places or compartments. This is a necessary prerequisite of the epidemiological modeling process itself. Our framework’s “intuitiveness” lies in how, given this standard partition of places, the F and V matrices can be directly and systematically constructed by identifying the specific arcs that cross this partition, as we will formally define.
In a Petri Net, places are the nodes that hold tokens, representing subpopulations or the state of the system. Then, for the purpose of our framework, it is helpful to think of places in Petri Nets the same way that you might think about compartments in ODEs. Note that in systems biology a “compartment” in a Petri Net is a way to group related places and transitions within a larger Petri Net [22]. Then, we assume we have a Petri Net model for a disease that fits the definition of VAPN or SPN outlined in Section 2. Assume that each transition can fire once per time step. This assumption does not lead to a loss of generality because the framework’s core calculation relies on the rate of change in token flow, which applies to both the functional arc weights in deterministic VAPNs and the continuous-time firing rates in SPNs. The “time step” serves as a conceptual unit for a state update rather than a rigid constraint on the model’s dynamics. Define the total number of infected places in the Petri Net model as Q. Thus, the infected places are defined as I 1 , I 2 , , I Q . As a note, we define all places as P and they are labeled P 1 , , P L , where L is the total number of places and Q L . We define t N as a transition with an input arc coming from a non-infected place and an output arc going to an infected place. With w ( t N j , , k , I i ) being the sum of all arcs weights j , , k from arcs going from non-infected places going to an infected place I i for VAPN or the net sum of all rate equations j , , k for arcs from transitions with input arcs from non-infected places and output arcs going to infected places I i for SPN. Let x = ( x 1 , , x n ) t , with each x i 0 , be the number of tokens in each place, which is the Petri Net equivalent of population in each compartment in an ODE. Then we define F i ( x ) to be the rate at which tokens move into infected places. For the variable arc weight PN, this rate refers to the arc weights.
The following provides the clear formal algorithm for distinguishing new infection arcs (F) from other state change arcs (V). First, let the set of all places be partitioned into infected places, P I , and non-infected places, P N . We then define an infection transition t T as any transition that has at least one input arc from a place in P N and at least one output arc to a place in P I . Let the set of all such infection transitions be T i n f . From this formal definition, we construct the matrices F and V:
  • For F: For any infected place p i P I , we define F i ( x ) as the rate of all new infections entering p i , which is the net inflow from all infection transitions t j T i n f . The matrix F ( x ) is composed of these F i ( x ) terms.
  • For V: Conversely, V i ( x ) represents the net rate of all other transfers affecting place p i . This is calculated as the rate of all outflows from p i (to any place) minus the rate of all inflows to p i from other infected places p k P I .
The matrices in Equations (2) and (3) provide the operational method for calculating these conceptual rates. Then F i ( x ) is represented in matrix form by
F 1 , , T ( x ) = w ( t N j , , k , I 1 ) w ( t N j , , k , I 1 ) w ( t N j , , k , I 1 ) w ( t N j , , k , I 2 ) w ( t N j , , k , I 2 ) w ( t N j , , k , I 2 ) w ( t N j , , k , I T ) w ( t N j , , k , I T ) w ( t N j , , k , I T ) ) .
Examining Figure 1, we observe that the parameters of the PN that correspond to the F matrix entries are outlined in red. This is continued in all the other Petri Net models in this paper to facilitate easier identification of elements by inspection. For F 1 the element w ( t N j , , k , I 1 ) = β 1 . For F 2 the element w ( t N j , , k , I 2 ) = β 2 . For F 3 no transmission occurs directly into place I 3 , so the element w ( t N j , , k , I 3 ) = 0 . Thus
F 1 , 2 , 3 ( x ) = β 1 β 1 β 1 β 2 β 2 β 2 0 0 0 .
We define w ( I i , t j , , k ) as the summation of arc weights of output arcs from infected place I i to transitions t j , , k for VAPNs and the summation of rate equations of all arcs between infected place I i to transitions t j , , k . In other words, this represents adding up all arcs leaving the infected place I i . We define w ( t I i , I j ) as the arc weights of arcs from transition to infected places where the arcs leading into the transition come from infected place I i , and this arc weight is equal to the arc weight of the arc from t I i to I j . Lastly, we define w ( t N m , , N l , I j ) as the sum of the arc weights of arcs from transitions t N m , , N l to infected place I j , where these transitions have no arcs leading into them. We define V i ( x ) to be the arc weight of tokens leaving infected place i and V i + ( x ) to be the arc weight of tokens going into infected place i outside of coming from non-infected places. In terms of what the terms V i ( x ) and V i + ( x ) represent, it is the rate of people leaving the infected place i and the rate of people going into infected place i from anything other than coming from non-infected places, respectively. These terms combine to yield, V i ( x ) = V i ( x ) V i + ( x ) . For Petri Nets, this can be expressed through the matrix
V 1 , , T ( x ) = w ( I 1 , t j , , k ) w ( t N m , , N l , I 1 ) w ( t I 2 , I 1 ) w ( t I T , I 1 ) w ( t I 1 , I 2 ) w ( I 2 , t j , , k ) w ( t N m , , N l , I 2 ) w ( t I T , I 2 ) w ( t I 1 , I T ) w ( t I 2 , I T ) w ( I T , t j , , k ) w ( t N m , , N l , I T ) .
Examining Figure 1, we observe that the elements used in V are outlined in green. This is continued in all the other Petri Net models in this paper to facilitate easier identification of elements that fit in V by inspection. For V 1 the elements w ( I 1 , t j , , k ) = γ 1 , w ( t N m , , N l , I 1 ) = 0 , w ( t I 2 , I 1 ) = 0 , and w ( t I 3 , I 1 ) = 0 . For V 2 the elements w ( t I 1 , I 2 ) = 0 , w ( I 2 , t j , , k ) = γ 2 , w ( t N m , , N l , I 2 ) = 0 , and w ( t I 3 , I 2 ) = 0 . For V 3 the elements w ( t I 1 , I T ) = δ 1 , w ( t I 2 , I 3 ) = δ 2 , w ( I 3 , t j , , k ) = ε , and w ( t N m , , N l , I 3 ) = 0 . Thus,
V 1 , 2 , 3 ( x ) = γ 1 0 0 0 γ 2 0 δ 1 δ 2 ε .
The disease free equilibrium (DFE) for a system with L places is defined as ( P 1 * , , P L * ), the state at which the system remains free of the disease. For the Petri Nets, the DFE can be found by first setting the token level of all infected places to zero. Then, the arc weights of arcs into and out of a given non-infected place P i are summed, with the arc weights of arcs going out of P i being multiplied by −1. The resulting expression from these steps is then set to zero. From here, a system of equations is formed that can be solved for P 1 * , , P L * . Additionally, the total population, usually denoted as N, is defined as N + ε , where N is the summation of tokens in all places, and ε is the error from rounding in a discrete token level Petri Net. In a continuous token level Petri Net, ε = 0 . The difference in total population between N and N + ε becomes relevant when performing actual simulations of models, rather than when finding R 0 using the NGMPN method. From here, a system of equations is formed where the DFE token levels labeled for each non-infected place can be solved for.
Once these F i ( x ) , V i ( x ) , and DFE values are obtained, they are then converted into the respective F (the transmission matrix) and V (the transition matrix) Jacobian matrix by finding the rate of change with respect to I 1 for column one, I 2 for column two, …, I T for column T, at the DFE, for the respective arc weights defined as functions. Note that Petri Nets can be in discrete or continuous time. Thus, the rate of change would be the difference quotient or derivative, respectively.
Then, using the Petri Net-based F and V values, the same Next-Generation Matrix steps of finding the inverse of V and finding the dominant eigenvalues of F V 1 can be done to find the Petri Net R 0 . If the values of F , V , and the DFE of two systems are equal, then the resulting R 0 values are equal. However, the way parameters interact within an ODE model and a PN model differ. We will demonstrate the process in detail, providing various examples with different functionalities.
Addressing the assumptions (A1)–(A5) made in van den Driessche and Watmough [16], we interpret them for Petri Nets.
(A1)
If a place P i contains a non-negative number of tokens t i 0 , then the number of tokens that can be added to or removed from any place by any transition is non-negative. Specifically, if a transition t j is enabled (based on its input places and corresponding markings), the number of tokens removed from the input places and added to the output places must be non-negative. By definition of Petri Nets, the assumption is inherently preserved across all Petri Net structures. This is due to the stipulation that the number of tokens in each place must remain non-negative at all times. Additionally, transitions in a Petri Net operate in a manner that ensures the non-negativity of tokens, effectively maintaining this essential characteristic.
(A2)
If the marking of a place P i is zero (i.e., t i = 0 ), then no transition can consume tokens from place P i . Specifically, if a place is empty (i.e., no tokens are present in the corresponding place), no transition can have it as an input. This ensures that no “removal” of individuals (tokens) from an empty place occurs. Again, the definition of Petri Net preserves this assumption for all Petri Nets, as a transition can not fire if an input place has less tokens than the corresponding arc weight. If a place has no tokens (individuals), no transition can remove tokens from that place.
(A3)
If place P i corresponds to a non-infectious place, then no transition can place tokens into this place from a transition that represents infection occurring or remaining. No transition should be able to fire that would place tokens into non-infectious places from a transition that represents infection occurring or remaining.
(A4)
If the marking of a place P i indicates a disease-free population (i.e., there are no tokens representing infected individuals in this marking), then no transition can fire that would result in tokens (representing infected individuals) being moved to an infected place. If a place has a disease-free marking, no transitions can place tokens in it that correspond to infected individuals (i.e., no “infection” transition should have this place as an output if it is currently disease-free).
(A5)
If F ( x ) is set to 0, then all eigenvalues of the Jacobian of the infected subsystem at the DFE have negative real parts. In terms of the Petri Nets, this means that when no new infections occur, that means all transitions transferring tokens from non-infected to infected places are disabled, the marking of every infected place will asymptotically decay to zero. Formally, let the state vector be partitioned as x = ( x I , x S ) , where x I are the infected places and x S are the non-infected places. Define the infected subsystem as x ˙ I = F I ( x I , x S ) V I ( x I , x S ) , where F I collects all token inflows into infected places from non-infected places and V I collects all other token flows (recoveries, deaths, or transfers among infected places). Then, at the DFE x 0 , with F I ( x 0 ) = 0 , the Jacobian matrix
A = D x I ( F I V I ) | x = x 0 = D x I V I ( x 0 )
must be Hurwitz, which means all eigenvalues have strictly negative real parts. Note that D is the derivative operator. Equivalently, D x I V I ( x 0 ) should be a nonsingular M-matrix, ensuring that small perturbations in the infected places decay over time. In terms of a biological application, this assumption guarantees that in the absence of new infections, any initial infection will die out, preserving the disease-free equilibrium.

4. Case Studies

We have selected a range of ODE and corresponding PN example models to demonstrate how the Next-Generation Matrix for Petri Nets approach to determining R 0 works. Each model either adds additional compartments/places or introduces new dynamics, providing a range of examples for people to draw on if they wish to implement the NGMPN in a new model.

4.1. SIRS

We start with a simple example of an S I R S system, a slight variation in the Kermack–McKendrick model [23]. This shows a straightforward application of the NGMPN process for a foundational epidemiological model. The compartments S, I, and R represent susceptible, infected, and recovered, respectively. The parameters of this system β , δ , and γ represent the rate of re-susceptibility, rate of infection, and rate of recovery, respectively. The SIRS system is described by the following system of equations:
       d S d t = β S I + δ R ,
    d I d t = β S I γ I ,
d R d t = γ I δ R .
The ODE system can be mapped into two Petri Net models: one with variable arc weights and minimal arcs, yielding Figure 2a, and another using the methods outlined by Baez and Biamonte [19], yielding Figure 2b.
The first step in finding the R 0 of the PN systems in Figure 2 is to obtain the Disease Free Equilibrium (DFE) by setting the token levels to zero in the infected places, setting the net arc weight of non-infected places to 0, and solving for the token values in non-infected places ( S * , I * , R * ) = ( S * , 0 , 0 ) , where S * = N . Where N = S + I + R or the sum of the entire population. Then the transmission matrix starts with finding F i ( x ) , which can be found by looking at the arc weights of arcs going into the infected compartments as shown in Equation (2). These arcs are outlined in red in Figure 2. Note that i refers to the corresponding infected compartment, which we have numbered. For this example, the I compartment is 1. From here we find w ( t N j , , k , I 1 ) = β S I for the VAPN in Figure 2a and w ( t N j , , k , I 1 ) = 2 β S I β S I for the SPN in Figure 2b. Thus,
F 1 ( x ) = β S I ,
for the Petri Net layout as depicted in Figure 2a, and
F 1 ( x ) = 2 β S I β S I .
for the Petri Net layout as depicted in Figure 2b. From this, we find the rate of change with respect to the infected place I, and we evaluate it at the DFE to have
F = β N .
for both layouts. For the transition matrix, we start with V , and we look at arc weights of arcs leaving the infected places as shown in Equation (3). These arcs are outlined in green in Figure 2. The terms w ( I 1 , t j , , k ) = γ I and w ( t N m , , N l = 0 for both the VAPN in Figure 2a and the SPN in Figure 2b. Thus yielding for both layouts
V 1 ( x ) = γ I .
We then find the rate of change with respect to the infected place I and evaluate at the DFE. From this, we find the inverse:
V = γ , V 1 = 1 γ .
Now that we have the F and V matrices, we can find R 0 by multiplying them and then determining the dominant eigenvalue we get,
R 0 = φ F V 1 = β N γ .
This R 0 value of both layouts of β N γ is analytically equivalent to the ODE R 0 value.

4.2. SEIR

This second example introduces an exposed compartment for diseases with delayed onset. Cooke laid out a version of the model Cooke in 1966 [24]. The additional compartment E represents exposed individuals, usually meaning a person is infected with a disease but cannot infect others yet. The parameters Π , β , μ , η , and α represent the birth/immigration rate, the infection rate, the death/emigration rate, the onset of infectiousness/symptoms rate, and the recovery rate, respectively. The SEIR system is described by the following system of equations:
    d S d t = Π β S I μ S ,
     d E d t = β S I η E μ E ,
         d I d t = η E α I μ I ,
d R d t = α I μ R .
The Equations (7)–(10) are mapped to a VAPN (Figure 3a) and stochastic Petri Net (Figure 3b).
To find the R 0 of the PN systems in Figure 3 we follow the same procedure outlined in Section 4.1, we first obtain the DFE. By setting the infected tokens to zero and solving for the non-infected steady state, we obtain ( S * , E * , I * , R * ) = ( Π μ , 0 , 0 , 0 , 0 ) . Then, the matrix F i ( x ) can be found by examining the arc weights of arcs entering the infected compartments, outlined in red in Figure 3, as shown in Equation (2). Note that i refers to the corresponding infected compartment and the corresponding row in the matrix, which we have numbered. For this example, the E compartment is 1 and the I compartment is 2. The terms for the VAPN in Figure 3a within F 1 are found by inspection to be w ( t N j , , k , I 1 ) = β S I and within F 2 to be w ( t N j , , k , I 1 ) = 0 . Similarly the terms for the SPN in Figure 3b within F 1 are found by inspection to be w ( t N j , , k , I 1 ) = β S I and within F 2 to be w ( t N j , , k , I 1 ) = β S I β S I = 0 . Thus,
F 1 , 2 ( x ) = β S I β S I 0 0 ,
for VAPN as shown in Figure 3a, and
F 1 , 2 ( x ) = β S I β S I β S I β S I β S I β S I ,
for the stochastic PN as shown in Figure 3b.
As E is our first infected compartment and I is the second, we find the rate of change with respect to E in the first column and I in the second column, and evaluate at the DFE. This gives the same result for both Petri Net options:
F = 0 β Π μ 0 0 .
For V , we look at the weights of arcs leaving the infected places and transitioning from one infected place to another, as outlined in green in Figure 3. Then for V 1 the terms w ( I 1 , t j , , k ) = η E + μ E , w ( t N m , , N l = 0 , I 1 ) , and w ( t I 2 , I 1 ) = 0 . For V 2 the terms w ( t I 1 , I 2 ) = η E , w ( I 2 , t j , , k ) = α I + μ I , and w ( t N m , , N l , I 2 ) = 0 . Both V 1 and V 2 are the same for the VAPN and SPN in Figure 3a and Figure 3b respectively. Thus,
V 1 , 2 ( x ) = η E + μ E 0 η E α I + μ I .
Next, we find the rate of change with respect to the infected place E in the first column and I in the second column, and we evaluate it at the DFE. From this, we find the inverse to give
V = η + μ 0 η α + μ , V 1 = 1 η + μ 0 α ( η + μ ) ( α + μ ) 1 α + μ .
Now that we have the F and V matrices, we can find R 0 by multiplying them and then determining the dominant eigenvalue. Thus,
R 0 = φ F V 1 = β Π η μ ( α + μ ) ( η + μ ) .
This is analytically the same R 0 expression that can be derived for the ODE using the next-generation matrix method. This demonstrates a key strength of our framework, which is its ability to extract the fundamental epidemiological dynamics relevant to R 0 irrespective of the specific Petri Net formalism used for implementation, whether deterministic VAPNs or stochastic SPNs.

4.3. SEEIR

This third example introduces parallel paths of infected compartments. The model and subsequent R 0 value were outlined by Diekmann [15]. The parameters μ , β , p , v 1 , v 2 , and γ represent birth/death rate, transmission rate, rate of exposure to infection, rate of becoming infectious for E 1 , rate of becoming infectious for E 2 , and rate of recovery, respectively. The SEEIR system is described by the following system of equations:
        d S d t = μ N β S I N μ S ,
         d E 1 d t = p β S I N v 1 E 1 μ E 1 ,
           d E 2 d t = ( 1 p ) β S I N v 2 E 2 μ E 2 ,
          d I d t = v 1 E 1 + v 2 E 2 γ I μ I ,
d R d t = γ I μ R .
The Equations (11)–(15) are mapped to a variable arc weight Petri Net to yield Figure 4. We will analyze only the Variable Arc Weight Petri Net (VAPN) implementation going forward, for brevity, as it is the more novel approach. The corresponding SPN models would be analyzed using the same principles, relying on the net sum of continuous-time rate equations for each transition, as demonstrated for the SEIR model, yielding identical final F and V matrices at the DFE.
The first step in finding the R 0 of the PN system in Figure 4 is to obtain the DFE by setting the token levels of the infected places to zero, setting the net arc weight of non-infected places to 0, and solving for the token values at the non-infected places ( S * , E 1 * , E 2 * , I * , R * ) = ( S * , 0 , 0 , 0 , 0 ) . Note that since N = S + E 1 + E 2 + I + R , S * = N , where N is the total population. Then, the matrix F i ( x ) can be found by examining the arc weights of arcs entering the infected compartments of E 1 , E 2 , and I, as shown in Equation (2). Note that i refers to the corresponding infected compartment and the corresponding row in the matrix, which we have numbered. For this example, the E 1 compartment is 1, the E 2 compartment is 2, and the I compartment is 3.
F 1 , 2 , 3 ( x ) = p β S I N p β S I N p β S I N ( 1 p ) β S I N ( 1 p ) β S I N ( 1 p ) β S I N 0 0 0 .
From this, we find the rates of change with respect to E 1 in the first column, E 2 in the second column, I in the third column, and we evaluate them at the DFE to give
F = 0 0 p β 0 0 ( 1 p ) β 0 0 0 .
For V , we analyze the Petri net to determine arcs leaving infected places as shown in Equation (3). This yields
V 1 , 2 , 3 ( x ) = v 1 E 1 + μ E 1 0 0 0 v 2 E 2 + μ E 2 0 v 1 E 1 v 2 E 2 γ I + μ I .
We then find the rate of change with respect to the infected place I, and evaluate at the DFE. From this we find the inverse to give
V = v 1 + μ 0 0 0 v 2 + μ 0 v 1 v 2 γ + μ , V 1 = 1 v 1 + μ 0 0 0 1 v 2 + μ 0 v 1 ( v 1 + μ ) ( γ + μ ) v 2 ( v 2 + μ ) ( γ + μ ) 1 γ + μ .
Now that we have F and V matrices, we can find R 0 by multiplying and finding the dominant eigenvalue. Thus
R 0 = φ F V 1 = p v 1 v 1 + μ + ( 1 p ) v 2 v 2 + μ β γ + μ .
This is analytically the same R 0 expression found in Equation 2.10 of [15].

4.4. SVEIR

While R 0 is the average number of secondary infections produced by a single infectious individual introduced into a completely susceptible population [15], there is also the notion of effective reproduction number of R e which is the average number of secondary infections produced by a single infectious individual at a specific point in time (t) [25]. With this in mind, we move to an extension of the SEIR model by Bugalia et al. with a compartment for Vaccinated individuals V and N is the sum of all compartments [26]. With the compartment V we can look at the effective reproduction number when vaccination and non-pharmaceutical interventions are occurring. The parameters β t , ξ t , γ , and φ represent the contact rate of individuals (time dependent), vaccination rate (time dependent), the disease re-susceptibility rate, and the vaccine re-susceptibility rate, respectively. The parameters α , and δ represent the recovery rate of infected individuals and disease death rate, respectively. The vaccine efficacy is described as 1 σ where vaccinated people are infected at the rate σ β t . The SVEIR system is described by the following system of equations:
         d S d t = S N β t I + γ R ξ t S + φ V
       d V d t = V N σ β t I + ξ t S φ V
        d E d t = β t I ( S N + σ V N ) α E
     d I d t = α E ( α + δ ) I
d R d t = α E γ R
The Equations (17)–(20) are mapped to a VAPN in Figure 5.
The steps for finding the effective reproduction number R e of the PN systems remains the same as the reproduction number for ODEs if Lemma 1 from van den Driessche and Watmough [16] holds true. If the assumptions we laid out for Petri Nets (A1–A5) also hold true for our Petri Net model, we then find the effective reproduction number for Petri Nets in the same method as we would for the reproduction number. Thus, we first obtain the DFE by setting the infected places token levels to zero, setting the net arc weight of non-infected places to 0, and solving for the token values at the non-infected places ( S * , V * , E * , I * , R * ) = ( N φ φ + ξ t , N ξ t φ + ξ t , 0 , 0 , 0 ) . Note that since N = S + V + E + I + R , S * + V * = N , where N is the total population. Then, the matrix F i ( x ) can be found by examining the arc weights of arcs entering the infected compartments of E and I, as shown in Equation (2). Note that i refers to the corresponding infected compartment and the corresponding row in the matrix, which we have numbered. For this example, the E compartment is 1 and the I compartment is 2. Thus,
F 1 , 2 ( x ) = β t I ( S N + σ V N ) β t I ( S N + σ V N ) 0 0 ,
for VAPN as shown in Figure 5.
We then find the rate of change with respect to E in the first column and I in the second column, and evaluate at the DFE, yielding
F = 0 β t ( φ + σ ξ t φ + ξ t ) 0 0 .
For V , we find arcs coming out of infected places, outlined in green to help. This yields
V 1 , 2 ( x ) = α E 0 α E ( α + δ ) I .
We then find the rate of change with respect to the infected place I, and evaluate at the DFE. From this we find the inverse to give
V = α 0 α α + δ , V 1 = 1 α 0 1 α + δ 1 α + δ .
With the F and V matrices in hand, we can find R 0 . Thus,
R 0 = φ F V 1 = φ β t α + δ ( φ + σ ξ t φ + ξ t ) β t α + δ ( φ + σ ξ t φ + ξ t ) α α + δ = β t α + δ ( φ + σ ξ t φ + ξ t )
This is analytically the same R e expression found in Bugalia et al. [26]. Note that as the vaccine efficacy increases, vaccine rate increases, or contact rate decreases, the effective reproduction number decreases.

4.5. Basic COVID-19 Model

The next example was laid out as a basic COVID-19 model to aid in forecasting once the appropriate compartments for the disease had been identified [27]. This example introduces more complex equations for F, involving additional interactions in V, and applies it to a specific disease. By applying our method to a compartmental COVID-19 model, we demonstrate its practical utility in analyzing contemporary and complex epidemiological challenges, where multiple infectious states with varying transmission dynamics play a crucial role. The compartments S , E , I a , I s , I h , and R represent susceptible, exposed, infected asymptomatic, infected symptomatic, infected hospitalized, and recovered, respectively. The parameters β a , β S , and β h represent the rates of infection due to asymptomatic, symptomatic, and hospitalized individuals, respectively. The parameters σ , r , γ a , γ s , φ S , δ s , γ h , and δ h represent rate of becoming infectious, the percentage of asymptomatic people, rate of recovery for asymptomatic infected, rate of recovery for symptomatic infected, rate of hospitalization of symptomatic, death rate of symptomatic, rate of recovery for hospitalized and death rate of hospitalized, respectively. The Basic COVID-19 system is described by the following system of equations:
       d S d t = β a I a + β S I S + β h I h N S ,
         d E d t = β a I a + β S I S + β h I h N S σ E ,
d I a d t = r σ E γ a I a ,
           d I S d t = ( 1 r ) σ E ( φ s + γ s + δ s ) I s ,
     d I h d t = φ s I s ( γ h + δ h ) I h ,
     d R d t = γ a I a + γ s I s + γ h I h .
The Equations (21)–(26) are mapped to a variable arc weight Petri Net to yield Figure 6.
From Figure 6, we can see that there are four infected places ( E , I a , I S , I h ) which are the first, second, third, and fourth infected compartments, respectively. Our resulting F and V matrices will therefore be four by four. The disease free equilibrium is given by ( S * , E * , I a * , I s * , I h * , R * ) = ( S * , 0 , 0 , 0 , R * ) . We defined N = S + E + I a + I S + I h + R , so N * = S * + R * . By inspecting the PN model, we see that the term β a I a + β S I S + β h I h N S is the only way the Susceptible place leads to an infected place. The transmission matrix starts with the resulting F using Equation (2) is
F 1 , 2 , 3 , 4 ( x ) = β a I a + β S I S + β h I h N S β a I a + β S I S + β h I h N S β a I a + β S I S + β h I h N S β a I a + β S I S + β h I h N S 0 0 0 0 0 0 0 0 0 0 0 0 .
Taking the partial derivative with respect to E , I a , I S , I h for the first, second, third, and fourth columns, respectively, gives us
F = 0 β a S * N * β S S * N * β h S * N * 0 0 0 0 0 0 0 0 0 0 0 0 ,
where S * , N * are the S , N values at the DFE.
For V, the transition matrix, we start by finding V based on the arc weights between infected places and the arc weights leaving the infected places as shown in Equation (3). Thus,
V 1 , 2 , 3 , 4 ( x ) = σ E 0 0 0 r σ E γ a I a 0 0 ( 1 r ) σ E 0 φ S I S + γ S I S + δ S I S 0 0 0 φ S I S γ h I h + δ h I h .
Then, taking the partial derivative with respect to E , I a , I S , I h for the first, second, third, and fourth columns, respectively, gives us
V = σ 0 0 0 r σ γ a 0 0 ( 1 r ) σ 0 φ S + γ S + δ S 0 0 0 φ S γ h + δ h .
Hence,
R 0 = φ ( F V 1 ) = β a r γ a + β s ( 1 r ) φ s + γ s + δ s + β h ( 1 r ) φ s ( φ s + γ s + δ s ) ( γ h + δ h ) S * N * .
The values for the Petri Net F and V are equivalent to those values for the ODE F and V, and the resulting R 0 matches the R 0 for the ODE system in the Gumel paper [27] seen in Equations (2) and (3).

4.6. Nonlinear System

The paper by Rohith et al. [28] involves nonlinear compartment-to-compartment dynamics. These types of dynamics are more applicable when considering the social aspects of disease spread, drug pharmacokinetics, or disease cell spread within an individual. The analysis of the nonlinear system underscores the robustness of the NGMPN framework, demonstrating its applicability even when departing from standard mass-action assumptions to incorporate more realistic, behavior-driven transmission dynamics. The parameters μ , β , α , σ , and γ represent the birth/death rate, the per capita contact rate, the psychological or inhibitory effect, the rate of infectiousness, and the recovery rate, respectively. The nonlinear system is described by the following system of equations:
     d S d t = μ β S I 1 + α I 2 μ S ,
      d E d t = β S I 1 + α I 2 σ E μ E ,
    d I d t = σ E γ I μ I ,
d R d t = γ I μ R .
From Figure 7 we can see that there are two infected places ( E , I ) . Thus, our resulting F and V matrices will be two by two. Then, from inspecting the PN model, we see that β S I 1 + α I 2 is the only way that the new infected population enters. Thus the resulting F is
F 1 , 2 ( x ) = β S I 1 + α I 2 β S I 1 + α I 2 0 0 .
Then, finding the DFE of the PN system to be ( S * , E * , I * , R * ) = ( 1 , 0 , 0 , 0 ) . We then take the partial derivative of each element of F 1 , 2 with respect to E , I for the first and second columns, respectively, to give the transmission matrix F,
F = 0 β 0 0 .
For the transition matrix V, we start by finding V based on the arc weights between infected places and the arc weights leaving the infected places, yielding
V 1 , 2 ( x ) = σ E + μ E 0 σ E γ I + μ I .
Then, taking the partial derivative with respect to E , I for the first and second column gives us
V = σ + μ 0 σ γ + μ .
Then we find the inverse of V,
V 1 = 1 σ + μ 0 σ ( σ + μ ) ( γ + μ ) 1 γ + μ .
Then with the values of F and V 1 we can find the dominant eigen value of ( F V 1 ) :
R 0 = ϱ ( F V 1 ) = σ β ( σ + μ ) ( γ + μ ) ,
which is the same R 0 value found in the Rohith paper [28]. This nonlinear example, with its functional transmission term of β S I 1 + α I 2 represented by a single arc in Figure 7, perfectly illustrates the strength of our framework in handling VAPN models. A geometric, path-summing method based on constant-rate transitions would be difficult to apply to such a compact representation.

4.7. Patch System Overview

The paper “Multi-patch and multi-group epidemic models: a new framework” by Bichara and Iggidr [29] presents a multi-patch and multi-group model for infectious disease transmission. The model accommodates interactions occurring across an arbitrary number of patches and groups where the infection propagates. The compartments S i , E i , I i , R i still represent susceptible, exposed, infected, and recovered, respectively, just now for patch i. Similarly, the parameters Π , β , μ , η , υ , γ , and δ represent birth/immigration, rate of infection, natural death rate, loss of immunity rate, rate of becoming infectious, rate of recovery, and rate of disease-related death, respectively. The parameter β is a patch specific term, while Π , μ , η , υ , γ , and δ are group specific terms. People of group i spend on average some time in patch j, j = 1 , , n . The susceptible, exposed, infected, and recovered populations of group i spend m i j , n i j , p i j , and q i j proportions of time in patch j for j = 1 , , n . The ODEs are outlined as
d S i d t = Π i j = 1 n β j m i j S i k = 1 u p k j I k k = 1 u ( m k j S k + n k j E k + p k j I k + q k j R k ) μ i S i + η i R i ,
d E i d t = j = 1 n β j m i j S i k = 1 u p k j I k k = 1 u ( m k j S k + n k j E k + p k j I k + q k j R k ) υ i E I μ i E i ,    
d I i d t = υ i E I γ i I i δ i I i μ i I i ,                    
d R i d t = γ i I i η i R i μ i R i .                       

Two Patch System

We take the ODEs from Bichara and Iggidr [29] Equations (31)–(34) and lay them out explicitly for two patches and two groups. Although the ODE and corresponding PN model are only applicable to this small patch and group size, this model can be extended to any size, with the interactions between any two given patches being equivalent to the system laid out below. The multi-patch model highlights the scalability of our approach to spatially structured populations, providing a tool to investigate the impact of geographic factors and population mobility on disease spread. The Two Patch system is described by the following system of equations:
d S 1 d t = Π 1 β 1 m 11 S 1 p 11 I 1 + p 21 I 2 ( m 11 S 1 + n 11 E 1 + p 11 I 1 + q 11 R 1 ) + ( m 21 S 2 + n 21 E 2 + p 21 I 2 + q 21 R 2 ) + β 2 m 12 S 1 p 12 I 1 + p 22 I 2 ( m 12 S 1 + n 12 E 1 + p 12 I 1 + q 12 R 1 ) + ( m 22 S 2 + n 22 E 2 + p 22 I 2 + q 22 R 2 ) μ 1 S 1 + η 1 R 1 ,
d S 2 d t = Π 2 β 1 m 21 S 2 p 11 I 1 + p 21 I 2 ( m 11 S 1 + n 11 E 1 + p 11 I 1 + q 11 R 1 ) + ( m 21 S 2 + n 21 E 2 + p 21 I 2 + q 21 R 2 ) + β 2 m 22 S 2 p 12 I 1 + p 22 I 2 ( m 12 S 1 + n 12 E 1 + p 12 I 1 + q 12 R 1 ) + ( m 22 S 2 + n 22 E 2 + p 22 I 2 + q 22 R 2 ) μ 2 S 2 + η 2 R 2 ,
d E 1 d t = β 1 m 11 S 1 p 11 I 1 + p 21 I 2 ( m 11 S 1 + n 11 E 1 + p 11 I 1 + q 11 R 1 ) + ( m 21 S 2 + n 21 E 2 + p 21 I 2 + q 21 R 2 ) + β 2 m 12 S 1 p 12 I 1 + p 22 I 2 ( m 12 S 1 + n 12 E 1 + p 12 I 1 + q 12 R 1 ) + ( m 22 S 2 + n 22 E 2 + p 22 I 2 + q 22 R 2 ) υ 1 E 1 μ 1 E 1 ,
d E 2 d t = β 1 m 21 S 2 p 11 I 1 + p 21 I 2 ( m 11 S 1 + n 11 E 1 + p 11 I 1 + q 11 R 1 ) + ( m 21 S 2 + n 21 E 2 + p 21 I 2 + q 21 R 2 ) + β 2 m 22 S 2 p 12 I 1 + p 22 I 2 ( m 12 S 1 + n 12 E 1 + p 12 I 1 + q 12 R 1 ) + ( m 22 S 2 + n 22 E 2 + p 22 I 2 + q 22 R 2 ) υ 2 E 2 μ 2 E 2 ,
d I 1 d t = υ 1 E 1 γ 1 I 1 δ 1 I 1 μ 1 I 1 ,
d I 2 d t = υ 2 E 2 γ 2 I 2 δ 2 I 2 μ 2 I 2 ,
d R 1 d t = γ 1 I 1 η 1 R 1 μ 1 R 1 ,    
d R 2 d t = γ 2 I 2 η 2 R 2 μ 2 R 2 .     
From Figure 8 we find there are two infected places (E, I) per patch. Thus, with two patches, our resulting F and V matrices will be four by four.
To simplify, we define
Θ 1 = β 1 m 11 S 1 p 11 I 1 + p 21 I 2 ( m 11 S 1 + n 11 E 1 + p 11 I 1 + q 11 R 1 ) + ( m 21 S 2 + n 21 E 2 + p 21 I 2 + q 21 R 2 ) , Θ 2 = β 2 m 12 S 1 p 12 I 1 + p 22 I 2 ( m 12 S 1 + n 12 E 1 + p 12 I 1 + q 12 R 1 ) + ( m 22 S 2 + n 22 E 2 + p 22 I 2 + q 22 R 2 ) , Θ 3 = β 1 m 21 S 2 p 11 I 1 + p 21 I 2 ( m 11 S 1 + n 11 E 1 + p 11 I 1 + q 11 R 1 ) + ( m 21 S 2 + n 21 E 2 + p 21 I 2 + q 21 R 2 ) , Θ 4 = β 2 m 22 S 2 p 12 I 1 + p 22 I 2 ( m 12 S 1 + n 12 E 1 + p 12 I 1 + q 12 R 1 ) + ( m 22 S 2 + n 22 E 2 + p 22 I 2 + q 22 R 2 ) .
Then we obtain the DFE by setting the infected places token levels to zero, setting the net arc weight of non-infected places to 0, and solving for the non-infected places token values ( S 1 * , S 2 * , E 1 * , E 2 * , I 1 * , I 2 * , R 1 * , R 2 * ) = ( Π 1 μ 1 , Π 2 μ 2 , 0 , 0 , 0 , 0 , 0 , 0 ) . Then the matrix F by looking at the arc weights of arcs going into the infected compartments, giving us
F 1 , 2 , 3 , 4 ( x ) = Θ 1 + Θ 2 Θ 1 + Θ 2 Θ 1 + Θ 2 Θ 1 + Θ 2 Θ 3 + Θ 4 Θ 3 + Θ 4 Θ 3 + Θ 4 Θ 3 + Θ 4 0 0 0 0 0 0 0 0 .
Finding the rate of change with respect to the infected states and evaluating at the DFE yields
F = 0 0 β 1 m 11 p 11 S 1 m 11 S 1 + m 21 S 2 + β 2 m 12 p 12 S 1 m 12 S 1 + m 22 S 2 β 1 m 11 p 12 S 1 m 11 S 1 + m 21 S 2 + β 2 m 12 p 22 S 1 m 12 S 1 + m 22 S 2 0 0 β 1 m 21 p 11 S 2 m 11 S 1 + m 21 S 2 + β 2 m 22 p 12 S 2 m 12 S 1 + m 22 S 2 β 1 m 21 p 21 S 2 m 11 S 1 + m 21 S 2 + β 2 m 22 p 22 S 2 m 12 S 1 + m 22 S 2 0 0 0 0 0 0 0 0 .
For V , we find arcs leaving the infected places and transitioning between infected places, yielding
V 1 , 2 , 3 , 4 ( x ) = υ 1 E 1 + μ 1 E 1 0 0 0 0 υ 2 E 2 + μ 2 E 2 0 0 υ 1 E 1 0 γ 1 I 1 + δ 1 I 1 + μ 1 I 1 0 0 υ 2 E 2 0 γ 2 I 2 + δ 2 I 2 + μ 2 I 2 .
We then find the rate of change with respect to the infected place I, and evaluate at the DFE. From this, we find the inverse to give
V = υ 1 + μ 1 0 0 0 0 υ 2 + μ 2 0 0 υ 1 0 γ 1 + δ 1 + μ 1 0 0 υ 2 0 γ 2 + δ 2 + μ 2 , V 1 = 1 υ 1 + μ 1 0 0 0 0 1 υ 2 + μ 2 0 0 υ 1 ( υ 1 + μ 1 ) ( γ 1 + δ 1 + μ 1 ) 0 1 γ 1 + δ 1 + μ 1 0 0 υ 2 ( υ 2 + μ 2 ) ( γ 2 + δ 2 + μ 2 ) 0 1 γ 2 + δ 2 + μ 2 .
Now that we have F and V matrices, we can find R 0 by multiplying and determining the dominant eigenvalue. Thus,
R 0 = φ F · V 1 = φ β 1 m 11 p 11 S 1 m 11 S 1 + m 21 S 2 + β 2 m 12 p 12 S 1 S 1 m 12 + S 2 m 22 υ 1 υ 1 + μ 1 γ 1 + δ 1 + μ 1 β 1 m 11 p 12 S 1 m 11 S 1 + m 21 S 2 + β 2 m 12 p 22 S 1 S 1 m 12 + S 2 m 22 υ 2 υ 2 + μ 2 γ 2 + δ 2 + μ 2 β 1 m 11 p 11 S 1 m 11 S 1 + m 21 S 2 + β 2 m 12 p 12 S 1 S 1 m 12 + S 2 m 22 γ 1 + δ 1 + μ 1 β 1 m 11 p 12 S 1 m 11 S 1 + m 21 S 2 + β 2 m 12 p 22 S 1 S 1 m 12 + S 2 m 22 γ 2 + δ 2 + μ 2 β 1 m 21 p 11 S 2 m 11 S 1 + m 21 S 2 + β 2 m 22 p 12 S 2 S 1 m 12 + S 2 m 22 υ 1 υ 1 + μ 1 γ 1 + δ 1 + μ 1 β 1 m 21 p 21 S 2 m 11 S 1 + m 21 S 2 + β 2 m 22 p 22 S 2 S 1 m 12 + S 2 m 22 υ 2 υ 2 + μ 2 γ 2 + δ 2 + μ 2 β 1 m 21 p 11 S 2 m 11 S 1 + m 21 S 2 + β 2 m 22 p 12 S 2 S 1 m 12 + S 2 m 22 γ 1 + δ 1 + μ 1 β 1 m 21 p 21 S 2 m 11 S 1 + m 21 S 2 + β 2 m 22 p 22 S 2 S 1 m 12 + S 2 m 22 γ 2 + δ 2 + μ 2 0 0 0 0 0 0 0 0 .
The dominant eigenvalue for this particular system is an incredibly long algebraic expression. However, with the F and V matrices matching that of the system outlined in the paper [29] and subsequently for two patches and two groups in Equations (35)–(42), the resulting R 0 coming from the dominant eigenvalue will be equal.

4.8. SIR Vector-Borne Model

The outline of the original ODE system, as described by Wedajo et al. [30], is based on the SIR Malaria model. However, the structure of this model can be taken more broadly to represent a simple example of vector-borne disease modeling. The SIR vector-borne model demonstrates the adaptability of our method to different modes of transmission, extending its applicability from directly transmitted diseases to complex vector-host systems. The compartments S h , I h , R h , S v , and I v represent susceptible humans, infected humans, recovered humans, susceptible vectors, and infected vectors, respectively. Note that in a vector-borne model, the vector’s infected compartments are considered general infected compartments for purposes of calculating R 0 . The vector for Malaria in the original model is mosquitoes. The parameters Π , β h v , μ h , δ , α , σ , Λ , β v h , and μ v represent birth/immigration of humans, the rate of infected vectors infecting humans, human natural death rate, the rate of infected humans immigrating, the rate of infected humans emigrating, the recovery rate, the birth/immigration rate of the vector, the rate of infected humans infecting vectors, and natural vector death rate, respectively. The SIR Vector-borne system is described by the following system of equations:
d S h d t = Π β h v S h I v μ h S h ,
d I h d t = β h v S h I v + δ I h ( α + σ + μ h ) I h ,
d R h d t = σ I h μ h R h ,
d S v d t = Λ β v h S v I h μ v S v ,
d I v d t = β v h S v I h μ v I v .
From Figure 9 we determine that there are two infected places ( I H , I v ) per patch. Then, F and V matrices will be two by two.
First, we obtain the DFE by setting the infected places token levels to zero, setting the net arc weight of non-infected places to 0, and solving for the non-infected places token values, ( S h * , S v * , I h * , I v * , R h * ) = ( Π μ h , Λ μ v , 0 , 0 , 0 ) . Then the matrix F is obtained by looking at the arc weights of arcs going into the infected compartments, giving us
F 1 , 2 ( x ) = β h v S h I v β h v S h I v β v h S v I h β v h S v I h .
Then we find the rate of change with respect to I h in the first column and I v in the second column, and plugging in the DFE to give
F = 0 β h v Π μ h β v h Λ μ v 0 .
For V , we look at arc weights of arcs leaving the infected places and transitioning from one infected place to another, yielding
V 1 , 2 ( x ) = α I h + μ h I h + σ I h δ I h 0 0 μ v I v .
We then find the rate of change with respect to the infected place I, and evaluate at the DFE. From this, we find the inverse to give
V = α + μ h + σ δ 0 0 μ v , V 1 = 1 α + μ h + σ δ 0 0 1 μ v .
Then the F and V matrices, allow us to determine R 0 . Thus,
R 0 = φ F · V 1 = ( β h v Π μ h μ v · β v h Λ ( μ v ) ( α + μ h + σ δ ) ) .
Some of the parameters are renamed in the layout of the ODE model in Equations (43)–(47) versus the original [30]. With this parameter renaming, the resulting R 0 value equals the exact R 0 expression in the Wedajo paper.

5. Numerical Verification

This section presents the numerical verification of the algebraic R 0 expressions derived from our framework. This validation is performed by comparing the analytical R 0 , found using the NGMPN method, to a numerically estimated R 0 derived from simulation output. We specifically focus on simulation output from the deterministic Variable Arc Weight Petri Net (VAPN) formalism. The VAPN’s ability to be numerically convergent with standard ODEs has been systematically studied, establishing it as a valid, deterministic PN implementation for this type of comparison [1]. Therefore, our numerical verification scheme is a direct, deterministic comparison, for which RRMSE is the most appropriate measure of error. While our NGMPN framework also applies to stochastic SPN models, numerical validation with SPN models would involve stochastic analysis, which would be suitable for future work. The numerical results presented offer an independent validation of our R 0 expression.
To achieve this validation, we conducted simulations of the Petri Net model using GPenSim, a general-purpose Petri Net simulator. GPenSim allows for close representation of ODE systems in Petri Nets [1]. By implementing the VAPN and analyzing the output of these simulations, specifically the progression of the susceptible and infectious populations under various parameter sets, we can numerically estimate the R 0 exhibited by the simulated system. This analysis is independent of any algebraic R 0 methods that look at the parent system. The subsequent results will demonstrate the concordance between the R 0 value obtained through algebraic methods and the R 0 value inferred from the GPenSim simulation outcomes, thereby verifying the accuracy and reliability of our analytical expression. To illustrate this, we compare the R 0 values obtained algebraically from the systems with those derived through various methods of analyzing the resulting simulation data. The comparison is made via the relative root mean square error (RRMSE).
The Petri Net models and ODE models have been defined and run for a range of parameters. For models SIRS Section 4.1 and the Nonlinear model Section 4.6, error surfaces were found for the R 0 values depending on three of the parameters. The R 0 values from the VAPN system are found directly from the resulting simulation data using the R package “R0: Estimation of R0 and Real-Time Reproduction Number from Epidemics” Version:1.3-1 library from Boelle and Obadia [31,32]. The Maximum Likelihood (ML) [33] method within the package was utilized to estimate R 0 from the simulation time series. This estimated R 0 is then compared to the analytically derived R 0 value from our NGMPN method. The error is quantified using RRMSE. We find strong agreement in numerical terms because the Petri Net R 0 calculations achieve RRMSE values consistently below 1–2% for biologically plausible parameter sets, as shown in Figure 10 and Figure 11. While the R packages [31,32] can produce confidence intervals (CIs) for stochastic data, our primary validation here is a deterministic-to-deterministic comparison, making RRMSE the most direct and rigorous metric for goodness of fit.
The algebraic expression using the NGM and NGMPN for the SIRS Section 4.1 systems is R 0 = β N γ . The following Figure 10 compares the algebraic expression with that found from applying the attack rate method within the R library to the resulting simulation data across parameter values. For the Nonlinear system in Section 4.6, the algebraic expression of R 0 using the NGM and NGMPN is R 0 = ϱ ( F V 1 ) = σ β ( σ + μ ) ( γ + μ ) . Since R 0 includes the parameters β , γ , and σ , these will be used as the parameters for comparing R 0 values across a range for each.
As shown in Figure 11, the Petri Net implementation of the nonlinear model produces R 0 values that closely match the algebraic solution, with RRMSE consistently below 0.1% for most parameter sets and below 1% for all parameter sets. This high level of agreement demonstrates the accuracy and numerical stability of the NGMPN method, even in the presence of nonlinear transmission and recovery terms. These results support the validity of the approach for more complex and mechanistically detailed epidemiological models.

6. Discussion and Conclusions

In this work, we devised a formal framework for finding the basic reproduction number R 0 within systems modeled by Petri Nets. This framework draws upon well-established methodologies employed in the analysis of ODE models. The relevance of applying R 0 in the context of Petri Nets is particularly pronounced, given the increasing utilization of Petri Nets in epidemiological modeling to depict more intricate and dynamic scenarios of disease spread. These scenarios encompass multi-compartment models, spatially distributed populations, and frameworks that incorporate social and nonlinear dynamics. Our approach builds on the next-generation matrix method, which is well understood within the realm of ODEs. Our results extend the definition of R 0 to Petri Nets by interpreting token transitions and arc weights in a manner that aligns with the underlying epidemiological processes. As seen in Section 3.2, by focusing on a formal, algorithmic identification of arcs corresponding to new infections, F, contrasted with other transitional changes, V, our framework offers a direct path to calculating R 0 . This formal clarity enables the ’by-inspection’ application and color-coding in our figures, which provides a direct visual representation of our method’s partition logic.
The primary contributions of our paper are threefold. First, we provide a clear and formalism–agnostic operational framework for constructing the NGM. It applies directly to Petri Nets regardless of their structure, and we demonstrate its effectiveness on both traditional SPNs and the more flexible VAPNs. Second, we apply this method to a wide range of complex, contemporary models, including multi-strain COVID-19 and multi-patch systems. Lastly, we offer the first, to our knowledge, numerical validation of an NGMPN method, showing that our analytical results align precisely with R 0 values estimated from simulation data. This validation is a crucial step in ensuring that these theoretical tools are reliable for practical application in epidemiological modeling.
In parallel to the work performed by [2], we demonstrate that the NGM methodology can be effectively employed in the context of Petri Nets by first defining relevant matrices that represent the rate of infection, F, and the rate of removal or transition out of compartments, V. Subsequently, we compute the dominant eigenvalue of the product of F V 1 . This approach is consistent with established NGM techniques for ODE frameworks, resulting in a robust mechanism for quantifying the basic reproduction number when applied to Petri Nets. The examples we laid out, including models such as SIRS, SVEIR, SEEIR, Basic COVID-19, Nonlinear, Patch, and SIR Vector-borne, serve to illustrate the versatility of this methodology across a spectrum of disease dynamics characterized by various place to transition structures and arc weights.
A primary challenge encountered in adapting the NGM framework to Petri Nets pertains to effectively translating the compartmental structures and transition rates—typically articulated through arc weights and token movement—into a form compatible with the mathematical formulations employed in the NGM. Nevertheless, once the transition and removal rates are contextualized in terms of Petri Net parameters using Diekmann’s approach [15], the ensuing process of calculating R 0 becomes straightforward and closely parallels that utilized for ODEs. This provides a robust and generalizable method for scrutinizing disease dynamics in models based on Petri Nets.
Moreover, the framework afforded by Petri Nets enables the integration of more complex features that are often challenging to model using traditional ODE approaches. These features include variable parameters, discrete events, and nonlinear transitions [3]. The SVEIR model in Section 4.4 demonstrates how this framework naturally extends beyond the static R 0 to calculate the time-dependent effective reproduction number R e , incorporating features like vaccination rates [16,25]. Such flexibility renders Petri Nets a compelling tool for accurately representing real-world epidemiological systems that exhibit complex interactions and dependencies, including co-infections, varying transmission rates, and spatial heterogeneity in disease dissemination.
The proposed method maintains practical limitations that also limit other methods of R 0 , including those used for ODEs. These practical challenges persist in their application to extensive or highly intricate Petri Nets. Specifically, the computational demands associated with calculating the dominant eigenvalue of large matrices can be substantial, particularly when addressing large-scale disease models that encapsulate numerous compartments. Again, these problems currently exist with all methods of algebraic R 0 formulation, but they should be noted. Additionally, considerations pertaining to the discrete nature of token movement in Petri Nets may necessitate careful deliberation when modeling diseases characterized by continuous dynamics. For SPNs in particular, the deterministic R 0 = 1 threshold has known explanatory limitations, as it does not fully capture the probability of stochastic fadeout where an outbreak dies out by chance even if R 0 > 1 , especially with small initial numbers of infected individuals. This “gap” between the deterministic threshold and stochastic behavior can be bridged by considering the system’s scale. As demonstrated numerically in [1], SPN models show numerical convergence to their corresponding deterministic ODE and VAPN counterparts as the total population size is rescaled to larger values. While not a theoretical proof, this numerical convergence indicates that the deterministic R 0 derived from our framework is at minimum a practical approximation for the limit for the stochastic process. Therefore, while our R 0 value does not predict stochastic fadeout in small populations, it remains the crucial and accurate metric for predicting the mean, large-scale outbreak potential of the stochastic system. A more systematic analysis of the probabilistic behavior around this R 0 = 1 threshold for different population scales is an important area for future investigation.
Future work may be directed towards enhancing computational techniques to accommodate larger and more intricate systems, as well as exploring the application of this method to empirical epidemiological data. Overall, this work contributes to bridging the divide between traditional ODE-based modeling approaches and Petri Net frameworks, thereby providing a more comprehensive toolkit for understanding and predicting disease propagation across various contexts.

Author Contributions

Conceptualization: T.R., B.S. and P.J.; Methodology: T.R.; Software, T.R.; Validation: T.R.; Formal Analysis: T.R.; Investigation: T.R.; Resources: T.R.; Data Curation: T.R.; Writing—original draft preparation: T.R.; Writing—review and editing, T.R., B.S. and P.J.; Visualization: T.R.; Supervision, B.S. and P.J.; Project Administration: B.S. and P.J.; Funding Acquisition: B.S. and P.J. All authors have read and agreed to the published version of the manuscript.

Funding

Trevor Reckell is partially supported by NIH grant DMS-1615879. Petar Jevtić and Beckett Sterner are supported by NIH grant 5R01GM131405-02.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data and code used to produce data used in this paper is available in the publicly accessible repository GitHub at https://github.com/trevorreckell/NGMPN (accessed on 10 October 2025).

Acknowledgments

Generative AI was used solely to resolve technical R and LaTeX errors, refine the discussion section, and identify specific introduction citations. Generative AI was not used in any of the methodology, scientific content, or analysis.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Reckell, T.; Sterner, B.; Jevtić, P.; Davidrajuh, R. A Numerical Comparison of Petri Net and Ordinary Differential Equation SIR Component Models. arXiv 2024, arXiv:2407.10019v2. [Google Scholar] [CrossRef]
  2. Segovia, C. Petri nets in epidemiology. J. Math. Biol. 2025, 91, 40. [Google Scholar] [CrossRef]
  3. Peleg, M.; Rubin, D.; Altman, R.B. Using Petri net tools to study properties and dynamics of biological systems. J. Am. Med. Inform. Assoc. 2005, 12, 181–199. [Google Scholar] [CrossRef]
  4. Chiaradonna, S.; Jevtić, P.; Sterner, B. MPAT: Modular Petri Net Assembly Toolkit. SoftwareX 2024, 28, 101913. [Google Scholar] [CrossRef]
  5. Bahi-Jaber, N.; Pontier, D. Modeling transmission of directly transmitted infectious diseases using colored stochastic Petri nets. Math. Biosci. 2003, 185, 1–13. [Google Scholar] [CrossRef]
  6. Peng, L.; Xie, P.; Tang, Z.; Liu, F. Modeling and analyzing transmission of infectious diseases using generalized stochastic petri nets. Appl. Sci. 2021, 11, 8400. [Google Scholar] [CrossRef]
  7. Kong, J.; Yu, W.; Hao, F. A CPN-based information propagation model in Online Social Networks. In Proceedings of the 2021 20th International Conference on Ubiquitous Computing and Communications (IUCC/CIT/DSCI/SmartCNS), London, UK, 20–22 December 2021; pp. 323–330. [Google Scholar] [CrossRef]
  8. Connolly, S.; Gilbert, D.; Heiner, M. From Epidemic to Pandemic Modelling. Front. Syst. Biol. 2022, 2, 861562. [Google Scholar] [CrossRef]
  9. Libkind, S.; Baas, A.; Halter, M.; Patterson, E.; Fairbanks, J.P. An algebraic framework for structured epidemic modelling. Philos. Trans. R. Soc. A 2022, 380, 20210309. [Google Scholar] [CrossRef]
  10. Dietz, K. The estimation of the basic reproduction number for infectious diseases. Stat. Methods Med. Res. 1993, 2, 23–41. [Google Scholar] [CrossRef] [PubMed]
  11. Diekmann, O.; Heesterbeek, J.A.P.; Metz, J.A.J. On the definition and the computation of the basic reproduction ratio R0 in models for infectious diseases in heterogeneous populations. J. Math. Biol. 1990, 28, 365–382. [Google Scholar] [CrossRef] [PubMed]
  12. Reckell, T.; Sterner, B.; Jevtić, P. The Basic Reproduction Number for Petri Net Models: A Next-Generation Matrix Approach. arXiv 2025. [Google Scholar] [CrossRef]
  13. Delamater, P.L.; Street, E.J.; Leslie, T.F.; Yang, Y.T.; Jacobsen, K.H. Complexity of the basic reproduction number (R0). Emerg. Infect. Dis. 2019, 25, 1–4. [Google Scholar] [CrossRef]
  14. Diekmann, O.; Heesterbeek, J.A.P. Mathematical Epidemiology of Infectious Diseases: Model Building, Analysis and Interpretation; John Wiley & Sons: Hoboken, NJ, USA, 2000; Volume 5. [Google Scholar]
  15. Diekmann, O.; Heesterbeek, J.; Roberts, M.G. The construction of next-generation matrices for compartmental epidemic models. J. R. Soc. Interface 2010, 7, 873–885. [Google Scholar]
  16. Van den Driessche, P.; Watmough, J. Reproduction numbers and sub-threshold endemic equilibria for compartmental models of disease transmission. Math. Biosci. 2002, 180, 29–48. [Google Scholar] [CrossRef] [PubMed]
  17. Hethcote, H.W. The mathematics of infectious diseases. SIAM Rev. 2000, 42, 599–653. [Google Scholar] [CrossRef]
  18. Brauer, F.; Van den Driessche, P.; Wu, J. Mathematical Epidemiology; Lecture Notes in Mathematics; Springer: Berlin/Heidelberg, Germany, 2008; Volume 1945. [Google Scholar] [CrossRef]
  19. Baez, J.C.; Biamonte, J. Quantum techniques for stochastic mechanics. arXiv 2012, arXiv:1209.3632. [Google Scholar]
  20. Cassandras, C.G.; Lafortune, S. Introduction to Discrete Event Systems; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
  21. Martcheva, M. An Introduction to Mathematical Epidemiology; Texts in Applied Mathematics; Springer: New York, NY, USA, 2015; Volume 61. [Google Scholar] [CrossRef]
  22. Heiner, M.; Koch, I.; Will, J. Standardised Petri nets for systems and synthetic biology. In Transactions on Computational Systems Biology XI; Springer: Berlin/Heidelberg, Germany, 2009; pp. 38–60. [Google Scholar]
  23. Kermack, W.O.; McKendrick, A.G. A contribution to the mathematical theory of epidemics. Proc. R. Soc. Lond. Ser. A Contain. Pap. A Math. Phys. Character 1927, 115, 700–721. [Google Scholar]
  24. Cooke, K.L. Functional differential equations close to differential equations. Bull. Amer. Math. Soc. 1966, 72, 285–288. [Google Scholar]
  25. Cori, A.; Ferguson, N.M.; Fraser, C.; Cauchemez, S. A new framework and software to estimate time-varying reproduction numbers during epidemics. Am. J. Epidemiol. 2013, 178, 1505–1512. [Google Scholar] [CrossRef]
  26. Bugalia, S.; Tripathi, J.P.; Wang, H. Estimating the time-dependent effective reproduction number and vaccination rate for COVID-19 in the USA and India. Math. Biosci. Eng. 2023, 20, 4673–4689. [Google Scholar]
  27. Gumel, A.B.; Iboi, E.A.; Ngonghala, C.N.; Elbasha, E.H. A primer on using mathematics to understand COVID-19 dynamics: Modeling, analysis and simulations. Infect. Dis. Model. 2021, 6, 148–168. [Google Scholar] [CrossRef] [PubMed]
  28. Rohith, G.; Devika, K. Dynamics and control of COVID-19 pandemic with nonlinear incidence rates. Nonlinear Dyn. 2020, 101, 2013–2026. [Google Scholar] [CrossRef] [PubMed]
  29. Bichara, D.; Iggidr, A. Multi-patch and multi-group epidemic models: A new framework. J. Math. Biol. 2018, 77, 107–134. [Google Scholar] [CrossRef]
  30. Wedajo, A.; Bole, B.K.; Koya, P.R. Analysis of SIR mathematical model for malaria disease with the inclusion of infected immigrants. IOSR J. Math. 2018, 14, 10–21. [Google Scholar]
  31. Obadia, T.; Haneef, R.; Boëlle, P.Y. The R0 package: A toolbox to estimate reproduction numbers for epidemic outbreaks. BMC Med. Inform. Decis. Mak. 2012, 12, 147. [Google Scholar] [CrossRef]
  32. Boelle, P.Y.; Obadia, T. R0: Estimation of R0 and Real-Time Reproduction Number from Epidemics. Available online: https://cran.r-project.org/web/packages/R0/index.html (accessed on 10 October 2025).
  33. White, L.F.; Wallinga, J.; Finelli, L.; Reed, C.; Riley, S.; Lipsitch, M.; Pagano, M. Estimation of the reproductive number and the serial interval in early phase of the 2009 influenza A/H1N1 pandemic in the USA. Influenza Other Respir. Viruses 2009, 3, 267–276. [Google Scholar] [CrossRef] [PubMed]
Figure 1. This VAPN is used as a guide to help visualize some of the concepts described in the Next-Generation Matrix for Petri Nets formulation. The legend on the right describes the elements within the PN. The places of this VAPN can be labeled ( P 1 , P 2 , P 3 , P 4 , P 5 ) or equivalently ( N 1 , I 1 , I 2 , I 3 , N 2 ) , where the second label gives more description on the infectious state of the place and is used in the diagram. Red outline correspond to use in the corresponding F matrix and green outline correspond to use in the corresponding V matrix.
Figure 1. This VAPN is used as a guide to help visualize some of the concepts described in the Next-Generation Matrix for Petri Nets formulation. The legend on the right describes the elements within the PN. The places of this VAPN can be labeled ( P 1 , P 2 , P 3 , P 4 , P 5 ) or equivalently ( N 1 , I 1 , I 2 , I 3 , N 2 ) , where the second label gives more description on the infectious state of the place and is used in the diagram. Red outline correspond to use in the corresponding F matrix and green outline correspond to use in the corresponding V matrix.
Applsci 15 12827 g001
Figure 2. Two Petri Net implementations of the SIRS ODE model given in Equations (4)–(6). Option (a) uses a discrete-time, variable arc weight PN. Option (b) uses a continuous-time, stochastic Markov Chain PN. The arcs and arc weights used in forming matrix F i ( x ) are outlined and highlighted in red, and the arcs and arc weights used in forming matrix V i ( x ) are outlined and highlighted in green.
Figure 2. Two Petri Net implementations of the SIRS ODE model given in Equations (4)–(6). Option (a) uses a discrete-time, variable arc weight PN. Option (b) uses a continuous-time, stochastic Markov Chain PN. The arcs and arc weights used in forming matrix F i ( x ) are outlined and highlighted in red, and the arcs and arc weights used in forming matrix V i ( x ) are outlined and highlighted in green.
Applsci 15 12827 g002
Figure 3. Two Petri Net implementations of the SEIR ODE model given in Equations (7)–(10). Option (a) uses a discrete-time, variable arc weight PN. Option (b) uses a continuous-time, stochastic Markov Chain PN. The arcs and arc weights used in forming matrix F i ( x ) are outlined and highlighted in red, and the arcs and arc weights used in forming matrix V i ( x ) are outlined and highlighted in green.
Figure 3. Two Petri Net implementations of the SEIR ODE model given in Equations (7)–(10). Option (a) uses a discrete-time, variable arc weight PN. Option (b) uses a continuous-time, stochastic Markov Chain PN. The arcs and arc weights used in forming matrix F i ( x ) are outlined and highlighted in red, and the arcs and arc weights used in forming matrix V i ( x ) are outlined and highlighted in green.
Applsci 15 12827 g003
Figure 4. This SEEIR Petri Net model is mapped directly from Equations (11)–(15). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Figure 4. This SEEIR Petri Net model is mapped directly from Equations (11)–(15). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Applsci 15 12827 g004
Figure 5. A variable arc weight SVEIR Petri Net mapped from Equations (17)–(20). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Figure 5. A variable arc weight SVEIR Petri Net mapped from Equations (17)–(20). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Applsci 15 12827 g005
Figure 6. A variable arc weight COVID-19 Petri Net mapped from Equations (21)–(26). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Figure 6. A variable arc weight COVID-19 Petri Net mapped from Equations (21)–(26). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Applsci 15 12827 g006
Figure 7. A variable arc weight nonlinear SEIR PN mapped from Equations (27)–(30). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Figure 7. A variable arc weight nonlinear SEIR PN mapped from Equations (27)–(30). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Applsci 15 12827 g007
Figure 8. A variable arc weight two patch SEIR PN mapped from Equations (35)–(42). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Figure 8. A variable arc weight two patch SEIR PN mapped from Equations (35)–(42). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Applsci 15 12827 g008
Figure 9. A variable arc weight SIR Vector-borne PN mapped from Equations (43)–(47). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Figure 9. A variable arc weight SIR Vector-borne PN mapped from Equations (43)–(47). The arc weights used in forming matrix F i ( x ) are outlined in red, and the arc weights used in forming matrix V i ( x ) are outlined in green.
Applsci 15 12827 g009
Figure 10. Using the R library “R0: Estimation of R0 and Real-Time Reproduction Number from Epidemics” from Boelle and Obadia [31,32] with estimation method of R 0 of Attack rate. The error of the simulations remains below 1% RRMSE for all parameter values in the SIRS system and below 0.1% RRMSE for most parameter sets and below 1% RRMSE for all parameter sets, including all biologically plausible values.
Figure 10. Using the R library “R0: Estimation of R0 and Real-Time Reproduction Number from Epidemics” from Boelle and Obadia [31,32] with estimation method of R 0 of Attack rate. The error of the simulations remains below 1% RRMSE for all parameter values in the SIRS system and below 0.1% RRMSE for most parameter sets and below 1% RRMSE for all parameter sets, including all biologically plausible values.
Applsci 15 12827 g010
Figure 11. Using the R library R0: Estimation of R0 and Real-Time Reproduction Number from Epidemics from Boelle and Obadia [31,32] with estimation method of R 0 of ML. The error of the simulations remains below 1.2% RRMSE for all parameter values in the Nonlinear system and below 0.1% RRMSE for nearly all parameter values, including all biologically plausible values.
Figure 11. Using the R library R0: Estimation of R0 and Real-Time Reproduction Number from Epidemics from Boelle and Obadia [31,32] with estimation method of R 0 of ML. The error of the simulations remains below 1.2% RRMSE for all parameter values in the Nonlinear system and below 0.1% RRMSE for nearly all parameter values, including all biologically plausible values.
Applsci 15 12827 g011
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Reckell, T.; Sterner, B.; Jevtić, P. The Basic Reproduction Number for Petri Net Models: A Next-Generation Matrix Approach. Appl. Sci. 2025, 15, 12827. https://doi.org/10.3390/app152312827

AMA Style

Reckell T, Sterner B, Jevtić P. The Basic Reproduction Number for Petri Net Models: A Next-Generation Matrix Approach. Applied Sciences. 2025; 15(23):12827. https://doi.org/10.3390/app152312827

Chicago/Turabian Style

Reckell, Trevor, Beckett Sterner, and Petar Jevtić. 2025. "The Basic Reproduction Number for Petri Net Models: A Next-Generation Matrix Approach" Applied Sciences 15, no. 23: 12827. https://doi.org/10.3390/app152312827

APA Style

Reckell, T., Sterner, B., & Jevtić, P. (2025). The Basic Reproduction Number for Petri Net Models: A Next-Generation Matrix Approach. Applied Sciences, 15(23), 12827. https://doi.org/10.3390/app152312827

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop