*Article* **Stochastic Modeling of Plant Virus Propagation with Biological Control**

**Benito Chen-Charpentier**

Department of Mathematics, University of Texas at Arlington, Arlington, TX 76019, USA; bmchen@uta.edu

**Abstract:** Plants are vital for man and many species. They are sources of food, medicine, fiber for clothes and materials for shelter. They are a fundamental part of a healthy environment. However, plants are subject to virus diseases. In plants most of the virus propagation is done by a vector. The traditional way of controlling the insects is to use insecticides that have a negative effect on the environment. A more environmentally friendly way to control the insects is to use predators that will prey on the vector, such as birds or bats. In this paper we modify a plant-virus propagation model with delays. The model is written using delay differential equations. However, it can also be expressed in terms of biochemical reactions, which is more realistic for small populations. Since there are always variations in the populations, errors in the measured values and uncertainties, we use two methods to introduce randomness: stochastic differential equations and the Gillespie algorithm. We present numerical simulations. The Gillespie method produces good results for plant-virus population models.

**Keywords:** virus propagation; stochastic modeling; Gillespie algorithm

### **1. Introduction**

Viruses cause a great number of diseases in plants. In [1] the authors gave a review of the top ten viruses. In plants the most common way that viruses are propagated is by means of a vector, usually insects. A carrier insect will bite an infected plant, thereby infecting it [2]. Mathematical models of virus-caused diseases in plants can be used to better understand the processes involved [3–7]. Viruses take time to propagate and replicate. These effects can be taken into account by considering latent populations [8,9]. In this paper we present three different mathematical models of virus propagation in plants with a predator used as a biological control of the insects that transmit the virus [10]. The description of the model is given in terms of differential equations and also biochemical style reactions. Models based on differential equations are built on the assumption that the number of individuals is very large, which is not always the case. The model that we use incorporating delays in the spread of the virus in both plants and vectors is based on [11]. An extension to optimal control through the use of predators and insecticide is in [12]. The authors in [13] introduced a delay to the model in [8] to account for the incubation period of the plants. In [14] there is a different model with delays. Populations have variabilities and there are errors in measuring and estimating the parameters involved. The variations and uncertainties in the populations and environmental conditions can be modeled by introducing randomness or stochasticity into the models. One common way is to use stochastic differential equations [15,16]. A second way is to consider that some of the coefficients in the model are random variables, as in the method of polynomial chaos [17,18]. Another method is to consider discrete populations and work with Markov chains [19–21], including working with the master equation [22]. Models based on continuous time Markov chains usually use the stochastic simulation algorithm of Gillespie [23,24]. Very complex models of plant viral assembly have been presented in [25,26]. Mathematical models of populations involve a series of simplifying hypotheses [27]. One of them is that

**Citation:** Chen-Charpentier, B. Stochastic Modeling of Plant Virus Propagation with Biological Control. *Mathematics* **2021**, *9*, 456. https:// doi.org/10.3390/math9050456

Academic Editor: Rafael Company

Received: 18 December 2020 Accepted: 16 February 2021 Published: 24 February 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

the individuals in each population group have the same properties. Another usual one is that the populations are homogeneously distributed. A third one is that the number of individuals is large. Based on these simplifications, the populations can be assumed to be continuous and the model can be described in terms of differential equations or maybe delay differential equations. An alternative method of developing mathematical population models is to consider the interactions between individuals to be a reaction. For example, an individual of the class susceptible *S* dying can be described by the following reaction: *S <sup>k</sup>* −→ . Here the blank space denotes an empty population. Using differential equations, it would be *dS dt* <sup>=</sup> <sup>−</sup>*kS*. Additionally, the interaction between a susceptible *<sup>S</sup>* and an infective *<sup>I</sup>* leading to a new infective is *<sup>S</sup>* + *<sup>I</sup> <sup>β</sup>*/*<sup>N</sup>* −−→ *<sup>I</sup>* + *<sup>I</sup>*, while the corresponding differential

equation is *dS dt* <sup>=</sup> <sup>−</sup>*βSI*/*N*. *<sup>k</sup>* is the death rate, *<sup>β</sup>*/*<sup>N</sup>* is the infection rate divided by the total population *N* in the differential equations and both are the reaction rates in the corresponding reactions. This is the formulation preferred by biology and chemistry researchers. By dividing the time period of interest into subintervals and considering that all the different reactions happen at the same instant in each subinterval, the reaction system can be converted into a system of discrete equations giving the change of each population in the time subinterval. By letting the length of the time subintervals go to zero, a system of differential equations is obtained. However, if the number of individuals is not very large, as is the case in our plant-virus propagation problem or in cell processes in systems biology, the limiting process introduces errors, and the assumption that all reactions occur simultaneously is not a good one. An alternative is to consider the reactions as continuous time Markov chains [28]. This assumption leads to the stochastic simulation algorithm, or Gillespie algorithm [23,24], and its variations.

We apply this method to a simple susceptibles (S), infectives (I) and recovereds (R) (SIR) epidemic model and to a predator–prey model. The objective of presenting these two simple models is to introduce the basic ideas of writing ordinary differential equations as biochemical reactions. Then we apply them to our main interest, which is a model of virus propagation consisting of six populations, susceptible plants, infective plants, recovered plants, susceptible insects, infective insects and predators. For this virus propagation model, we consider three cases: all the interactions are mass actions—some of them are saturated and some are saturated with delays. The saturated interactions are modeled using Holling type 2 functionals [29]. We also write the models as a system of reactions. Simulations were performed using the stochastic simulation algorithm. For comparison purposes, the corresponding system of differential equations is solve numerically, and finally white noise is added to the differential equation systems to obtain stochastic differential equations and simulate them numerically. The rest of the paper is organized as follows. In Section 2, the development of the models is presented, as is the addition of stochasticity to the models to take into account the variability in the populations and other uncertainties always present in the processes modeled. Next, the virus propagation models and the numerical methods are described. Section 3 shows sample numerical simulations. In Section 4, the results are discussed. Finally there is a conclusions section.

#### **2. Materials and Methods**

#### *2.1. Mathematical Modeling*

Mathematical models for populations are usually given in terms of differential equations or difference equations. The differential equations may be ordinary, delay, partial or even fractional. However, the models may also be given by describing the interactions between the different population groups and the rate at which they happen. That is, they may be described in terms of reactions with the same structure as biochemical reactions. Therefore, we can write differential equations arising from mathematical biology as reactions. For example *dS dt* <sup>=</sup> <sup>−</sup>*kS* can be written as *<sup>S</sup> kS* −→ , where the ban space means that the population disappears. As a second example, *dS dt* <sup>=</sup> <sup>−</sup>*βSI* is equivalent to *<sup>S</sup>* <sup>+</sup> *<sup>I</sup> <sup>β</sup>SI* −−→ *<sup>I</sup>* + *<sup>I</sup>*. Sometimes the quantity written on top of the arrow is the number of times the reaction

occurs in a population (propensity), and sometimes only the reaction rate constant is included. We use the propensities.

As an illustration on the basic ideas of converting differential equations into biochemical reactions, consider the well known SIR model giving the interaction of susceptibles (S), infectives (I) and recovereds (R) [27]:

$$\begin{aligned} \frac{dS}{dt} &= -\frac{\beta SI}{N} \\ \frac{dI}{dt} &= \frac{\beta SI}{N} - \gamma I \\ \frac{dR}{dt} &= \gamma I. \end{aligned} \tag{1}$$

In writing the model as a system of reactions, we obtain a reaction for each distinct term on the right hand-side of the differential equations. In this example we have two such terms, *<sup>β</sup>SI <sup>N</sup>* and *γI*. The first term has the reaction of *S* and *I*. The second gives the change of *I* to another population. If the differential equation that has the derivative of a population includes the given term on the right-hand side with a positive sign, then the product of the reaction is that population. Hence, by writing the model as reactions between the populations we have

$$\begin{aligned} I + S & \xrightarrow{SI \mid \beta/N} 2I \\ I & \xrightarrow{\gamma I} R. \end{aligned} \tag{2}$$

The first reaction is the conversion of one *S* into one *I*, and the second one is the conversion of one *I* into one *R*.

The system of reactions is not unique. This non-uniqueness has been established by [30]. In this case a more complex system is

$$\begin{aligned} I + S \xrightarrow{SI\beta/N} I\\ I + S \xrightarrow{SI\beta/N} S + 2I \\ I \xrightarrow{\gamma I} R. \end{aligned} \tag{3}$$

In this second set of reactions, *S* loses one member first and in the next reaction *I* gains one. The reaction happens in two steps. We use the simpler formulation with *S* converting directly into *I*. However, below we will show that both formulations give the same system of differential equations.

To convert the model given in terms of reactions to a differential equation model, consider a time interval [*t*, *<sup>t</sup>* + *<sup>δ</sup>t*] and assume that all the reactions occur at the same instant in this interval. For the reaction system (3) we have

$$\begin{aligned} I(t+\delta t) &= I(t) + \delta t (S(t)I(t)) \beta / N \\ S(t+\delta t) + 2I(t+\delta t) &= S(t) + 2I(t) + \delta t (S(t)I(t)) \beta / N \\ R(t+\delta t) &= R(t) + I(t) \gamma. \end{aligned}$$

Assuming that the three populations are large enough, so that all the reactions happen even for very small *δt*, we can take the limit as *t* → 0 to get

$$\frac{dI}{dt} = (IS)\beta/N$$

$$\frac{d(S+2I)}{dt} = (IS)\beta/N$$

$$\frac{dR}{dt} = \gamma I.$$

By subtracting the first equation from the second, we obtain the original system of differential Equation (1). Similarly, using the reactions in (2), we obtain (1) directly. In [31], the authors used biochemical reactions to model SIR processes. Reference [32] also included implementations of the Gillespie algorithm for the SIR model.

As a second example, consider a simple predator–prey model as given by Lotka and Volterra [27]:

$$\begin{aligned} \frac{dx}{dt} &= (b - py)x\\ \frac{dy}{dt} &= (rx - d)y \end{aligned} \tag{4}$$

where *x* is the prey and *y* is the predator. The corresponding system of reactions is

$$\begin{aligned} \text{x \xrightarrow{bx} 2x} \\ \text{x + y \xrightarrow{pxy} y} \\ \text{x + y \xrightarrow{rxy} x + 2y} \\ \text{y \xrightarrow{dy}} \end{aligned} \tag{5}$$

The first reaction is the birth of new prey, the second reaction is the elimination of prey by predators, the third one is the conversion of dead prey into new predators and the last one is the death of predators. The conversion of prey into predators needs to be in two reactions, since one killed prey does not convert into one new predator.

Even though it is straightforward to convert a population model based on differential equations to one described by reactions, there exist software packages that will automate the process. Biocham [33] http://lifeware.inria.fr/biocham4/ (accessed on 12 December 2020) will convert systems of ordinary differential equations with general interactions between populations written in xppauto format [34] to biochemical reactions. Moccasin [35] uses biocham and adds an interface for the MATLAB format of differential equations. Both programs write the equations in SBML [36], a widely used machine-readable description of biochemical reactions.

#### *2.2. Stochastic Modeling*

In order to produce more realistic results, mathematical models need to take into account the existence of errors in the observed or measured population data; variability in the populations; and uncertainties such as missing data and lack of knowledge.

These uncertainties can be modeled using random differential equations wherein it is considered that the parameters are random variables [37]. Another method is to use discrete or continuous time Markov chain models [38,39]. A different method consists of introducing the uncertainties as white noise and obtaining stochastic differential equations [16,40]. In this paper we only consider the second and third methods.

### 2.2.1. Continuous Time Markov Chain Models

As mentioned above, population models can be described in terms of biochemicaltype reactions. A Markov chain is a stochastic process in which the probability of an event happening depends on a sequence of possible events, in which the probability of each event depends only on the previous event [28,39]. In a discrete time Markov chain, the changes of state happen at fixed points in time. In a continuous time Markov chain, the changes of state can happen at any time. Each reaction is a random event that has a given probability of happening. This probability is a function of the reaction rate and of the numbers of individuals of the populations involved. Since the reactions can occur at any time, the reactions are continuous time Markov chains. The master chemical equation for a reaction is the time evolution equation for the probability distribution over the state space of a Markov process. This is derived by substituting the transitional probability of the Markov process into the Chapman–Kolmogorov equation [41,42]. For a system of reactions, the master chemical equation is a system of ordinary differential equations that is hard to solve either analytically or numerically [43,44]. An alternative is the stochastic simulation algorithm (SSA) proposed by Gillespie [23] which produces numerical realizations. The next reaction and the time until it occurs are determined by Monte Carlo simulations involving the propensities of the reactions, and the process is repeated. The processes are Poisson processes with exponentially distributed transition times. Improvements on Gillespie's direct method are given in [24,45]. The SSA works with populations which should not be very small. Numerical implementations are, for example, in [46–48]

#### 2.2.2. Stochastic Differential Equations

Randomness can be added to an ordinary differential equation *dx* <sup>=</sup> *<sup>f</sup>*(*x*, *<sup>t</sup>*)*dt*, *<sup>x</sup>*(*t*0) = *<sup>x</sup>*<sup>0</sup> by including a white noise process [16,40]. A stochastic differential equation is given by

$$dX(t,\omega) = f(X(t,\omega),t) + \mathcal{g}(X(t,\omega),t)dW(t,\omega)\_{\tau}$$

where *<sup>ω</sup>* is an element of the sample space and *<sup>X</sup>* = *<sup>X</sup>*(*t*, *<sup>ω</sup>*) is a stochastic process. The initial condition *<sup>X</sup>*(0, *<sup>ω</sup>*) = *<sup>X</sup>*<sup>0</sup> is taken to be known with probability one. A Brownian motion or Wiener process is formed by a sequence of random variables parameterized by time that are independent and identically distributed (iid). A stochastic process *<sup>W</sup>*(*t*), *<sup>t</sup>* <sup>∈</sup> [0, <sup>∞</sup>] is a Wiener process (or a standard Brownian motion) if it satisfies: (i) It is defined for *<sup>t</sup>* <sup>≥</sup> 0 with *<sup>W</sup>*<sup>0</sup> <sup>=</sup> 0; (ii) if 0 <sup>≤</sup> *<sup>s</sup>* <sup>&</sup>lt; *<sup>t</sup>* <sup>&</sup>lt; <sup>∞</sup>, then *<sup>W</sup>*(*t*) <sup>−</sup> *<sup>W</sup>*(*s*) is normally distributed with mean 0 and variance *<sup>t</sup>* <sup>−</sup> *<sup>s</sup>*, that is, *<sup>W</sup>*(*t*) <sup>−</sup> *<sup>W</sup>*(*s*) <sup>∼</sup> *<sup>N</sup>*(0, *<sup>t</sup>* <sup>−</sup> *<sup>s</sup>*); (iii) if 0 <sup>≤</sup> *<sup>r</sup>* <sup>&</sup>lt; *<sup>s</sup>* <sup>&</sup>lt; *<sup>t</sup>* <sup>&</sup>lt; <sup>∞</sup>, the increments *<sup>W</sup>*(*t*) <sup>−</sup> *<sup>W</sup>*(*s*) and *<sup>W</sup>*(*s*) <sup>−</sup> *<sup>W</sup>*(*r*) are independent.

The noise term is called additive if it is independent of the population. This noise is also called environmental noise. If the noise term is proportional to the population, it is called multiplicative. These two are the most common types of white noise used, but they can have more complicated forms [49–52]. For uniform populations the environmental noise may be dominant. However, populations usually have variations. Demographic stochasticity is usually defined as the variation in the time evolution of a small population due to the randomness of individual birth, death, infection and other rates. However, the term can also be used for populations of any size. It can be related to stochasticity with multiplicative white noise by considering that the rates have a deterministic part plus a stochastic one. Additionally, environmental fluctuations may be related to overpopulation in ways such as shortage of food, increased aggression toward each other, etc. Therefore, a reasonable way to modify the deterministic equation is to consider introducing randomness that is proportional to the size of the population. However, this is just an assumption that needs to be verified, even though it has been commonly used, for example, in [53,54]. The best choice of white noise regarding its magnitude depends on the particular problem and is still an open research question.

### *2.3. A Plant-Virus Model with Biological Control*

In this paper, we consider the application of the SSA and stochastic differential approaches to the model in [10]. We consider six different population groups: susceptible plants *<sup>S</sup>*(*t*), infected plants *<sup>I</sup>*(*t*), recovered plants *<sup>R</sup>*(*t*), susceptible vectors *<sup>X</sup>*(*t*), infected vectors *<sup>Y</sup>*(*t*) and predators *<sup>P</sup>*(*t*). Each variable represents the number of individuals in the respective population group at time *t*. Susceptible plants are healthy but could get the disease if infected with the virus. The infected plants have the virus but can only infect a susceptible plant through a vector. Additionally, the death rate of infected plants is higher than that of susceptible plants, since infected plants can also die from the viral infection. We also assume that farm workers replace any dead plant immediately with a new susceptible plant. Therefore, we can assume that the total plant population remains constant. We will denote this constant by *K*. Using this assumption, we can simplify the model in the deterministic case, since *<sup>K</sup>* = *<sup>S</sup>*(*t*) + *<sup>I</sup>*(*t*) + *<sup>R</sup>*(*t*) can be used to eliminate the recovered population from the system of equations, and thus we can work with only five populations. This cannot be done in the stochastic case. The virus is not present in susceptible insects but they can be infected with it if they bite an infected plant. By biting a susceptible plant, infected insects can transmit viruses to it. Another assumption is that there is no vertical transmission of the virus in either plants or vectors. Moreover, we assume that the the vector does not get sick from the virus and thus it does not defend against the virus and will remain infected for the rest of its life. Therefore, there are no recovered vectors. The predators feed on the vectors and use the resulting energy to increase the number of predators. We also assume predators do not get infected by the virus even if they eat an infected vector. There is also intra-species competition between predators for the insects. A consequence of the infected vectors not being sick is that the predators feed on the infected insects and susceptible insects at the same rate. The interactions between vector and plant and predator and vector are assumed to have a limitation modeled by a predator–prey Holling type 2 functional [29]. For a large number of vectors, the number of infected plants due to the infected vectors tends to saturate as the number of infected vectors increases, which is the behavior of the Holling type 2 functional. In other words, for small number of vectors, doubling the population doubles the number of plants that are infected by the vectors, but for large number of vectors, doubling this number does not double the number of infected plants since there are not enough plants to be infected. Even though there are many other functionals that can be used to model this saturation effect, the Holling type 2 is a simple one.

After an infected vector bites a susceptible plant, it takes time for the plant to be infected, since the virus has to enter the plant cells, replicate, burst the cell and spread in the plant. It also takes time for the virus to spread inside a susceptible insect after it bites an infected plant. Hence, we introduce two discrete delays: *τ*1, which is the time it takes a plant to become infected after an infected bite, and *τ*2, the time it takes a vector to become infected after biting an infected plant. *τ*<sup>1</sup> is much larger than *τ*<sup>2</sup> since the infection process is more complex for plants. The assumptions used in the model are: the number of plants is constant, so the recovered plant population can be eliminated from the system of equations; plants die and are infected by infected vectors and converted into infected plants after a delay; infected plants can recover and also die; susceptible vectors are recruited at a constant rate, can die, are infected after biting an infected plant after a delay and can be eaten by a predator; infected insects can die and be eaten by a predator; predators are recruited at a constant rate, grow due to they eating vectors and can die; the interactions between populations saturate according to a Holling type 2 functional.

The model with the two discrete delays is

$$\begin{aligned} \frac{dS}{dt} &= \mu(K - S) + dI - \frac{\beta Y(t - \tau\_1)}{1 + aY(t - \tau\_1)} S(t - \tau\_1) \\ \frac{dI}{dt} &= \frac{\beta Y(t - \tau\_1)}{1 + aY(t - \tau\_1)} S - (d + \mu + \gamma)I \\ \frac{dX}{dt} &= \Lambda - \frac{\beta\_1 I(t - \tau\_2)}{1 + a\_1 I(t - \tau\_2)} X(t - \tau\_2) - \frac{c\_1 X}{1 + a\_3 X} P - mX \\ \frac{dY}{dt} &= \frac{\beta\_1 I(t - \tau\_2)}{1 + a\_1 I(t - \tau\_2)} X(t - \tau\_2) - \frac{c\_2 Y}{1 + a\_3 Y} P - mY \\ \frac{dP}{dt} &= \Lambda\_p + \frac{a\_4 c\_1 X}{1 + a\_3 X} P + \frac{a\_4 c\_2 Y}{1 + a\_3 Y} P - \delta P \end{aligned} \tag{6}$$

The meanings of the parameters and the values used in the simulations to obtain the results presented in Section 3 are in Table 1, which is based on the data in [11]. P-unit is the number of individuals in the population group.

**Table 1.** Values for the parameters of the virus model.


The equivalent reactions-based system is

$$\begin{array}{ll} \stackrel{p\rightarrow}{\longrightarrow} S\\ S & \stackrel{p\rightarrow}{\longrightarrow} \\ Y + S & \stackrel{k\_1}{\longrightarrow} Y + I, \quad \text{where} \quad k\_1 = \frac{\beta Y S}{1 + \kappa Y} \\ I & \stackrel{pI}{\longrightarrow} \\ I & \stackrel{H\_1}{\longrightarrow} S \\ & \stackrel{H\_2}{\longrightarrow} X \\ & X + P \stackrel{k\_2}{\longrightarrow} P, \quad \text{where} \quad k\_4 = \frac{\alpha\_4 c\_1 X}{1 + \kappa\_3 X} P \\ X & \stackrel{mX}{\longrightarrow} I + Y, \quad \text{where} \quad k\_3 = \frac{\beta\_1 I X}{1 + \kappa\_1 I} \\ & I + X \stackrel{k\_3}{\longrightarrow} I + Y, \quad \text{where} \quad k\_3 = \frac{\alpha\_4 c\_2 Y}{1 + \kappa\_3 Y} P \\ Y + P \stackrel{k\_3}{\longrightarrow} P, \quad \text{where} \quad k\_3 = \frac{\alpha\_4 c\_2 Y}{1 + \kappa\_3 Y} P \\ & \stackrel{\Delta\_{\mathcal{P}}}{\longrightarrow} P \\ X + P \stackrel{k\_4}{\longrightarrow} 2P + X \\ Y + P \stackrel{k\_5}{\longrightarrow} 2P + Y \\ & P \stackrel{\delta}{\longrightarrow} \\ & I \stackrel{\gamma}{\longrightarrow} \mathcal{R} \\ & R \stackrel{pR}{\longrightarrow} \end{array} \tag{7}$$

Note that the delays do not appear explicitly in the reactions. The stochastic differential equations for the virus model are given system (8).

$$\begin{aligned} dS &= (\mu(K - S) + dI - \frac{\beta Y(t - \tau\_1)}{1 + aY(t - \tau\_1)} S(t - \tau\_1)) dt + \sigma\_1 S dW\_1 \\ dI &= (\frac{\beta Y(t - \tau\_1)}{1 + aY(t - \tau\_1)} S - (d + \mu + \gamma)I) dt + \sigma\_2 dW\_2 \\ dR &= (\gamma I - \mu R) dt + \sigma\_3 R dW\_3 \\ dX &= (\Lambda - \frac{\beta\_1 I(t - \tau\_2)}{1 + a\_1 I(t - \tau\_2)} X(t - \tau\_2) - \frac{c\_1 X}{1 + a\_3 X} P - mX) dt + \sigma\_4 X dW\_4 \\ dY &= (\frac{\beta\_1 I(t - \tau\_2)}{1 + a\_1 I(t - \tau\_2)} X(t - \tau\_2) - \frac{c\_2 Y}{1 + a\_3 Y} P - mY) dt + \sigma\_5 Y dW\_5 \\ dP &= (\Lambda\_p + \frac{a\_4 c\_1 X}{1 + a\_3 X} P + \frac{a\_4 c\_2 Y}{1 + a\_3 Y} P - \delta P) dt + \sigma\_6 P dW\_6 \end{aligned} \tag{8}$$

#### *2.4. Numerical Methods*

Numerical methods for ordinary differential equations can be modified for delay differential equations by integrating piece-wise over time intervals chosen such that they are multiples of the delays [55,56]. A very good numerical solver based on Runge–Kutta methods is given in [56]. In our numerical simulations we used the following values for our parameters: *K* = 63, *β* = 0.01, *β*<sup>1</sup> = 0.01, *α* = 0.2, *α*<sup>1</sup> = 0.1, *μ* = 0.01, *m* = 0.2974, *γ* = 0.01, Λ = 10,

*d* = 0.2, *c*<sup>1</sup> = 0.05, *c*<sup>2</sup> = 0.05, *δ* = 0.05, Λ*<sup>p</sup>* = 0.4, *α*<sup>3</sup> = 0.1 and *α*<sup>4</sup> = 0.1. Additionally, we chose the following initial conditions: *<sup>S</sup>*(0) = 59.8478, *<sup>I</sup>*(0) = 1.57612, *<sup>X</sup>*(0) = 14.6247478, *<sup>Y</sup>*(0) = 19.5 and *<sup>P</sup>*(0) = 2. We considered the values of the delays to be *<sup>τ</sup>*<sup>1</sup> <sup>=</sup> 24 and *<sup>τ</sup>*<sup>2</sup> <sup>=</sup> 1. The history for the delay equations is usually taken to be constant and equal to the initial values. However, if we consider the model in terms of reactions, the delayed reactions do not happen during the history, so we took the history to be equal to zero. The values of most the parameters were taken from [7] and those referring to the delays and the predator were from [10]. These are not implied to apply to specific plants, vectors and viruses. We were not able to find real values for many of the parameters. Even for the well studied maize streak virus, the model in [57], which uses the parameters presented in [58–60], some of the values are assumed.

For stochastic differential equations using Ito calculus, two common methods are the Euler–Murayama and Milstein methods [15]. Both can be easily modified to include delays in a similar way as for ordinary differential equations [61]. The SSA can be modified to include delays in the reactions by adding the corresponding delay to the time when the reaction happens [62,63].

For the deterministic ordinary differential equations we used an Euler method implemented in GNU octave [64]. For the stochastic differential equations the Milstein method was also implemented in octave. Both methods are first order. For the reactionbased method, we used the software stochPy [65], an open source program implemented in Python.

#### **3. Results**

The first simulation is of the SIR model given by differential Equation (1) and reactions (3). The values of the parameters were: *<sup>N</sup>* = 63, *<sup>β</sup>* = 0.2 and *<sup>γ</sup>* = 0.1. The initial values were *<sup>S</sup>*(0) = 60, *<sup>I</sup>*(0) = 2 and *<sup>R</sup>*(0) = 1. Figure <sup>1</sup> shows the deterministic simulation on the left and the SSA simulation on the right. For the SSA simulation, only the average values of the populations are plotted. For the values of the parameters used, the populations tended to the disease-free equilibrium for a large amount of time.

The next simulation was of the predator–prey model described by Equation (4) and reactions (5). The parameter values used were *<sup>p</sup>* = 1,*<sup>r</sup>* = 1, *<sup>b</sup>* = 1 and *<sup>d</sup>* = 1. The initial conditions were *<sup>X</sup>*(0) = 2 and *<sup>Y</sup>*(0) = 2. Figure <sup>2</sup> shows on the left the deterministic simulation and on the right the simulation using SSA. For the SSA simulation only the average values are plotted. Note that the deterministic solution is periodic but SSA is not quite periodic.

**Figure 1.** Simulation of susceptibles (S), infectives (I) and recovereds (R) (SIR) model. (**Left**) deterministic. (**Right**) Stochastic simulation algorithm (SSA); only the average values are shown.

**Figure 2.** Simulation of the predator–prey model. (**Left**) deterministic. (**Right**) SSA; only the average values are shown.

The next simulations were for the plant-virus model given by Equation (6) and reactions (7). The stochastic differential equations used were (8). The values of the parameters used in the simulations are in Table 1.

We did three simulations of the plant-virus model. The first one was with mass action kinetics and no delays. That is, *α*1, *α*2, *α*3, *α*4, *τ*<sup>1</sup> and *τ*<sup>2</sup> all being equal to zero. All the other parameters were as given in Table 1, with the exception of *σ*<sup>1</sup> to *σ*6. An open question is how to determine the values of the *σ*s. We did one simulation of the deterministic model, one of the reaction model using the SSA and three of the stochastic differential equation model (8) using three different values of the *σ*, 0.01. 0.025 and 0.05. Figure 3 shows the results of the deterministic simulation on the left and of the SSA simulation on the right. The stochastic simulation shows the plots for the mean and the mean +/− standard deviation for 1000 realizations. Figure 4 shows the stochastic differential equation simulations results for the mean and the mean +/− one standard deviation for 1000 simulations with all *σ*s equal to 0.01 on the left and with the *σ*s equal to 0.025 on the right. Figure 5 shows on the left the mean and the mean +/− one standard deviation plots for the *σ*s equal to 0.05. From these figures we see that the *σ*s equal to 0.025 gives a stochastic effect that is important but does not overcome the deterministic part. The plots for the mean values of the stochastic simulations were taken for 1000 realizations since the results for 500 and 1000 realizations agree to at least three significant figures.

**Figure 3.** Plots for the virus plant model with mass action interactions and no delays. (**Left**) deterministic. (**Right**) SSA with only the average values included.

**Figure 4.** Plots for the plant-virus model with mass action interactions and no delays using the stochastic differential equations model. The solid lines are the mean values, and the dashed lines are the mean value plus or minus one standard deviation. (**Left**) *σ*s equal to 0.01. (**Right**) *σ*s equal to 0.025.

The next simulation for the plant-virus model is with Holling type 2 saturation kinetics and no delays. So *α*1, ..., *α*<sup>4</sup> are nonzero with their values and the values of the other parameters given in Table <sup>1</sup> and *<sup>τ</sup>*<sup>1</sup> <sup>=</sup> *<sup>τ</sup>*<sup>2</sup> <sup>=</sup> 0. Figure <sup>6</sup> has the plots of the deterministic simulation. Figure 7 has the plots of simulations using the SSA (left) and stochastic differential equation s (right). For the SSA, the vertical lines represent the intervals [mean − 1 standard deviation, mean + 1 standard deviation]. For the stochastic differential equations plot the mean is given by the solid lines and the dashed lines give the mean +/− one standard deviation for 1000 realizations for the stochastic simulations. On the left for the SSA simulation and on the right for the stochastic differential equation run with *σ*s equal to 0.025.

**Figure 5.** Plots for the plant-virus model for mass action interactions and no delays using the stochastic differential model. The solid lines are the mean values, and the dashed lines are the mean values +/− one standard deviation. The *σ*s are equal to 0.05.

**Figure 6.** Plots for the virus plant model with saturations and no delays for the deterministic model.

The final simulation was for the plant-virus model with both saturation and delays. All the parametrer values are given in Table <sup>1</sup> and the delays were *<sup>τ</sup>*<sup>1</sup> <sup>=</sup> 24 and *<sup>τ</sup>*<sup>2</sup> <sup>=</sup> 1. Figure 8 has the plot of the deterministic simulation. Figure 9 has the plots of the mean and of the mean +/− one standard deviation for 1000 realizations for the stochastic simulations. On the left are the results for the SSA simulation, and the vertical lines represent the intervals (mean − 1 standard deviation, mean + 1 standard deviation). On the right are the plots for the stochastic differential equation run with *σ* equal to 0.025. The solid lines represent the mean values and the dashed lines the mean +/− one standard deviation.

**Figure 7.** Plots for virus plant models with saturation and no delays. (**Left**) SSA; the vertical lines denote the intervals (mean − 1 standard deviation, mean + 1 standard deviation). (**Right**) Stochastic differential equations simulation mean values (solid lines) and mean values +/− 1 standard deviation (dashed lines).

**Figure 8.** Plots for the virus plant model with saturations and delays for the deterministic model.

**Figure 9.** Plots for mean values and the mean values +/− 1 standard deviation for the virus plant model with saturation and delays. (**Left**) SSA with the vertical lines giving the intervals (mean − 1 standard deviation, mean + 1 standard deviation). (**Right**) Stochastic differential equations with the solid lines giving the mean values and the dashed lines the means +/− 1 standard deviation.

#### **4. Discussions**

The numerical simulations in all cases gave similar results for the differential equation, the stochastic differential and the reaction models. The differential equation simulations give one trajectory and do not take into account the variations in the populations and environment, or the errors in measurements of parameters. However, they are the easiest simulations to implement and the fastest. The stochastic differential equations include variations of the populations when multiplicative noise is added, as we did. By doing multiple simulations, they give the mean values and the standard deviations of the solutions, which are more realistic. However, there are other types of white noise and we need to estimate the size of the noise. The reaction model simulations using the Gillespie algorithm also give the means and standard deviations of the solutions when run for multiple simulations. It has a more solid theoretical base for small populations, and this is our case. Through both the stochastic differential equation method and the Gillespie algorithm there are some outcomes with different behavior than what comes from the

deterministic method. For some realizations the disease may not disappear for very long time periods, and in future work it may be worth estimating the probability.

#### **5. Conclusions**

Mathematical population models based on differential equations give realistic results even when the populations are not very large. However, models based on biochemical reactions are more realistic. Models given in terms of reactions are usually easier to understand for biologists, ecologists and other specialists without backgrounds in mathematics. The stochastic simulation algorithm has solid theoretical backing for its use for small populations, and there is a wide variety of existing software implementing it. As with all stochastic simulations, there is the question of how many realizations to use. In our case we did one hundred and then one thousand realizations, and the results have at least three significant digits of agreement. The results for the stochastic differential equations depend on the type and magnitude of the white noise term, and it is usually not obvious which one should be used.

Even though from the first epidemic models it has been known that the models can be written in terms of biochemical reactions [66], their use and the use of Gillespie's algorithm should be more frequent, since in epidemic models the populations are many times not very large and the continuity hypothesis is not justified. Second, this method is easy to implement and does not require one—as the stochastic differential method does—to decide on the type and magnitude of the white noise. There are many papers dealing with the use of Gillespie's algorithm for epidemic models and others on using biochemical reactions and other methods. For example, in [67] the authors used a biochemical reactions formulation and cellular automata. In [68], the authors mentioned that epidemic models can be described as chemical reactions but then used a stochastic model based on binomial drawing for certain terms. In [31] the equivalent reactions for a SIR model are given. In some other papers the Gillespie algorithm was applied to variations of the SIR method [69–71]. Reference [72] presents continuous time Markov chain and stochastic differential equation models, including an SIR model and a four-population model for malaria. For this last model, the author approximated the branching process by working with the forward and backward Kolmogorov equations. In [70] the model used was an SEIR (Susceptible, Exposed, Infectious, Recovered) with added numbers of patients hospitalized and killed regarding Ebola. To the best of my knowledge, the publications about the applications of the Gillespie algorithm to epidemic models do not include models with saturation interaction terms, particularly with Holling type 2 functionals, or epidemic models with discrete delays; they also do not involve plant diseases caused bv viruses and spread by vectors. The comparison of the results for the model using stochastic equation simulations with different sizes for the white noise is also new. Future work will include applying the application to more complex models and to models with time varying rates.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The author declares no conflict of interest.

#### **References**

