1 Introduction

A computer virus is a malicious code which executes harmful and unauthorized activities like erasing necessary files, accessing confidential data and personal information like passwords, account numbers, contact lists etc. Depending on the way of propagation, functioning and damaging the systems/users, malwares are classified into various categories. These include computational viruses, computer worms, Trojans, Rootkits, spyware, logic bombs and so on [1, 2]. Dissemination of computer viruses to other connected systems bears a high resemblance to the behavior of biological viruses [35]; therefore, various models of computer virus propagation have been proposed by using an epidemiological analog [69].

Transformation of the dynamics of computer virus propagation into mathematical language is an effective methodology to understand and analyze the spreading behavior of viruses. The mathematical prototypes related to the characteristics of variables, parameters and the functional relations governing the dynamics of the virus propagation classify the model as deterministic, stochastic, continuous, discrete, global or individual [2]. Over the years several compartmental models have been evolved. These involve susceptible-infected-susceptible (SIS) models [10, 11], susceptible-infected-recovered (SIR) [1214], susceptible-infected-recovered-susceptible (SIRS) [15, 16], susceptible-exposed-infected-recovered (SEIR) [17, 18], SEIQS (quarantined class included) [19], SEIRS [20, 21], SEIQRS [22], SEIRS-V (including vaccinated subpopulation) [23] models and so on.

Mathematical tool-based numerical analysis of these epidemiological models is an essential part of investigations for acquiring better knowledge of their evolution, impact and the deriving mechanisms, especially when the analytical solution is not available. A profound understanding of the model helps in imposing precautionary measures and evaluating their effectiveness in preventing the networks from infections.

The studies conducted by Rafiq et al. [24] on a nonlinear model of virus propagation in a computer network proposed by Mei Peng [25] have exposed the divergence behaviors of RK-4 and Euler methods for certain step lengths. The similar behaviors of RK-4 and Euler schemes have also been highlighted in [26] and [27]. In these studies a globally convergent non-standard finite difference (NSFD) scheme proposed by Mickens [28] has successfully been applied to the said model. To the best of the author’s knowledge, till date, the nonlinear model of virus propagation in a computer network has no analytical solution. The important factors which require further research are: (i) finding an analytical solution or constructing alternative efficient convergent numerical schemes, (ii) analysis of the convergence speeds, and (iii) the error analyses of numerical schemes, at least in the common cases when they all converge.

Over the recent years, many modern metaheuristics have been proposed to cope with the most sophisticated problems by transforming them to optimization problems. Metaheuristic algorithms are inspired by natural phenomena like evolution [29, 30], swarm behaviors [31, 32], food foraging behavior [33, 34], sport strategies [35], water dynamics [36, 37] etc. For more detailed studies one may consult the survey articles [35, 38]. Metaheuristics-based approaches of solving differential equations belong to the class of non-standard mesh free methods. The applications of these heuristics to differential equations can be found in [3943], but their applications to epidemic models are very rare.

The present work presents an innovative numerical scheme by integrating evolutionary computing and Padé rational functions [4446] for numerical treatment of the model. The proposed computational framework involves following novel aspects:

  1. (i)

    Construction of an equivalent optimization problem by exploiting interpolation and extrapolation strengths of Padé approximation.

  2. (ii)

    Preservation of positivity, boundedness and initial conditions agreement by defining problem constraints.

  3. (iii)

    Construction of fitness/objective function, an essential requirement for evolutionary computing, by use of penalty function approach.

  4. (iv)

    Implementation of differential evolution (DE) to optimize the constructed fitness function.

  5. (v)

    Evolvement of unconditionally convergent closed form numerical solution of nonlinear model of virus propagation in computer networks.

The developed method is named the evolutionary Padé approximation (EPA) scheme.

The rest of the paper is organized as follows. In Sect. 2, relative basic concepts are revisited. Section 2 elaborates the proposed framework of EPA scheme for numerical treatment of nonlinear dynamical continuous model of virus propagation in computer networks. In Sect. 5, analyses of the results are presented. In the end, conclusion and some future directions are given.

2 Related concepts

2.1 Padé approximation

The idea of a Padé approximation was formulated at the end of the 19th century within the classical theory of continued fractions [44]. The Padé approximation of order (N, M) is a rational function of the form [45]

$$P_{N,M} ( t ) = \frac{\sum_{i=0}^{N} a_{i} t^{i}}{ \sum_{j=0}^{M} b_{j} t^{j}}. $$

The polynomials \(\sum_{i=0}^{N} a_{i} t^{i}\) and \(\sum_{j=0}^{M} b_{j} t^{j}\) are called Padé approximants. Normalizing it by \(b_{0}\) (≠0) the following form is obtained:

$$P_{N,M} (t)= \frac{\sum_{i=0}^{N} a_{i} t^{i}}{1+ \sum_{j=1}^{M} b_{j} t^{j}}. $$

It involves (\(N+M+1\)) unknown coefficients which are to be determined in such a way that the Maclaurin series expansions of \(P_{N,M} (t)\) coincides with some target function as far as possible [46].

2.2 Differential evolution: the evolutionary algorithm

In evolutionary computing, differential evolution (DE) [30] is a competent population-based stochastic global search method. Initialization, mutation, recombination and selection are the main operations of a DE algorithm. In mutation, a trial solution v for improving x is generated with the help of the other two mutually different solutions y and z:

$$v_{m} = x_{m} +F\times( y_{m} - z_{m} ),\quad \mbox{for each } m=1, 2, 3, \ldots, \mbox{Dimension}. $$

Here F is a positive real number acting as an algorithmic constant.

In recombination, the coordinates of v are combined with those of x probabilistically. A predefined positive real number CR is used as recombination probability and a random number \(\mathit{rand}\in(0,1)\) is generated randomly for each coordinate m. Recombination takes place according to

$$u_{m} = \textstyle\begin{cases} v_{m} &\mbox{if }\mathit{rand}< \mathit{CR}, \\ x_{m} &\mbox{otherwise}. \end{cases} $$

In the selection step the solution u is assigned to x if it appears to be better than x. The iterative process of a DE algorithm carries on trying to improve until some termination criteria are met. Upon termination, DE returns the best member of the population as an optimal solution.

2.3 Penalty function

Evolutionary algorithms like DE are generally designed for unconstrained optimization problems and there is very rare existence of unconstrained real world problems. Therefore, transforming the constrained optimization problem to an unconstrained through suitable approach is inevitable. Penalty functions belong to the most effective methods to handle constraints [47, 48]. A penalty function allows for accepting the feasible solution and penalizes an infeasible solution by adding a sufficiently large positive number to the objective function depending on degree of violation of constraints. For an objective function \(\psi ( \boldsymbol{x} )\) and a solution x, the penalty function \(\mathcal{H} ( \boldsymbol{x} )\) defines an unconstrained penalized function \(\varphi ( \boldsymbol{x} )\) by the following relation:

$$\varphi ( \boldsymbol{x} ) = \textstyle\begin{cases} \psi ( \boldsymbol{x} ) + \mathcal{H} ( \boldsymbol{x} ) &\mbox{if } \boldsymbol{x} \mbox{ is infeasible}, \\ \psi ( \boldsymbol{x} ) &\mbox{if } \boldsymbol{x} \mbox{ is feasible}. \end{cases} $$

For a minimization problem, \(\mathcal{H} ( \boldsymbol{x} ) \geq0\) whereas for a maximization problem \(\mathcal{H} ( \boldsymbol{x} ) \leq0\).

3 Mathematical model of virus propagation in computer networks

The considered SEIR model of virus transmission in a computer network that was proposed by Mei Peng in [25] and referred to in [26] is described by Fig. 1.

Figure 1
figure 1

SEIR model for virus propagation in a computer network

At any time ‘t’ the state variables of the model are defined by:

\(S ( t )\): susceptible computers; \(E ( t )\): exposed computers; \(I ( t )\): infected computers; \(R ( t )\): recovered computers.

The model parameters are:

  • N: The total population of computers in the network.

  • p: Rate at which antivirus recovers susceptible computers.

  • k: Rate at which antivirus recovers exposed computers.

  • a: Rate at which antivirus cannot cure exposed computers.

  • \(\beta_{1}\): Contact rate of susceptible with infected computers.

  • \(\beta_{2}\): Contact rate of susceptible with exposed computers.

  • μ: Removal rate of a computer from the network.

  • r: Recovery rate of infected computers that are cured.

The system of governing equations for the model is given as under:

$$ \left . \textstyle\begin{array}{l} S ' ( t ) = ( 1-p ) N- \beta_{1} S ( t ) I ( t ) - \beta_{2} S ( t ) E ( t ) -pS ( t ) -\mu S ( t ), \\ E ' ( t ) = \beta_{1} S ( t ) I ( t ) + \beta_{2} S ( t ) E ( t ) -kE ( t ) -\alpha E ( t ) -\mu E ( t ), \\ I ' ( t ) =\alpha E ( t ) -rI ( t ) -\mu I ( t ), \\ R ' ( t ) =pS ( t ) +kE ( t ) +rI ( t ). \end{array}\displaystyle \right \} $$
(1)

Here

$$ S ( t ) +E ( t ) +I ( t ) +R ( t ) = N ( t ). $$
(2)

Suppose that

$$\begin{aligned}& X_{1} (t)=A- \beta_{1} S ( t ) I ( t ) - \beta _{2} S ( t ) E ( t ) -aS ( t ), \\& X_{2} (t)= \beta_{1} S ( t ) I ( t ) + \beta_{2} S ( t ) E ( t ) -bE ( t ), \\& X_{3} (t)=\alpha E ( t ) +cI ( t ),\quad A= ( 1-p ) N, a=p+ \mu, b= k+\alpha+\mu, c= r+\mu. \end{aligned}$$

Then, by (2) and the above suppositions, model (1) can be reduced to the following form:

$$ \left . \textstyle\begin{array}{l} S ' ( t ) = X_{1} (t), \\ E ' ( t ) = X_{2} (t), \\ I ' ( t ) = X_{3} (t). \end{array}\displaystyle \right \} $$
(3)

The initial conditions are

$$S_{0} =S ( 0 ) =50;\qquad E_{0} =E ( 0 ) = 40; \qquad I_{0} =I ( 0 ) =20. $$

The basic reproductive number defined as the average number of secondary infections produced by a primary infection can be identified:

$$R_{o} = \frac{A(\alpha\beta_{1} +c \beta_{2} )}{abc}. $$

For \(R_{o} >1\) the virus equilibrium (VE) point is found:

$$\bigl( S^{0}, E^{0}, I^{0} \bigr) = \biggl( \frac{A}{a R_{o}}, \frac{A( R_{o} -1)}{b R_{o}}, \frac{A\alpha( R_{o} -1)}{bc R_{o}} \biggr). $$

For \(R_{o} <1\) the following virus free equilibrium (VFE) point is identified:

$$\bigl( S^{*}, E^{*}, I^{*} \bigr) = \biggl( \frac{A}{a}, 0, 0 \biggr). $$

The model related parameters used in [24, 25] are exhibited in Table 1.

Table 1 Values of the model parameters for two points of equilibriums

4 Evolutionary Padé approximation numerical (EPA) scheme

The architecture of the proposed evolutionary computing-based Padé approximation scheme involves the four main steps which are presented in the following.

4.1 Construct residual functional based on Padé approximation

Suppose that \(S ( t ), E ( t ) \) and \(I(t)\) are approximated by Padé rational functions according to

$$S ( t ) \approx\frac{\sum_{i=0}^{N} a_{i} t^{i}}{1+ \sum_{j=1}^{M} b_{j} t^{j}};\qquad E ( t ) \approx \frac{\sum_{i=0}^{N} c_{i} t^{i}}{1+ \sum_{j=1}^{M} d_{j} t^{j}}; \qquad I ( t ) \approx\frac{\sum_{i=0}^{N} e_{i} t^{i}}{1+ \sum_{j=1}^{M} f_{j} t^{j}}. $$

Imposing initial conditions \(S ( t_{0} ) = S_{0}\), \(E ( t_{0} ) = E_{0}\), \(I ( t_{0} ) = I_{0}\), we obtain

$$ a_{0} = S_{0}, \qquad c_{0} = E_{0}, \qquad e_{0} = I_{0}. $$
(4)

For each of the discrete time steps \(t_{q} = t_{0} +qh\); \(q=0, 1, 2, 3,\ldots, q_{\mathrm{max}}\), the above system (3) reduces to the following form:

$$ \left . \textstyle\begin{array}{l} \varepsilon_{1} ( t_{q} )=0, \\ \varepsilon_{2} ( t_{q} ) =0, \\ \varepsilon_{3} ( t_{q} ) = 0. \end{array}\displaystyle \right \} $$
(5)

Here \(\varepsilon_{1}\), \(\varepsilon_{2} \) and \(\varepsilon_{3} \) are the residuals defined by

$$\begin{aligned}& \begin{aligned}[b] \varepsilon_{1} ( t_{q} ) &= \Biggl( 1+ \sum_{j=1}^{M} b_{j} t_{q}^{j} \Biggr) \Biggl( \sum_{i=0}^{N} i a_{i} t_{q}^{i-1} \Biggr) - \Biggl( \sum _{i=0}^{N} a_{i} t_{q}^{i} \Biggr) \Biggl( \sum_{j=1}^{M} j b_{j} t_{q}^{j-1} \Biggr) \\ &\quad {}- X_{1} ( t_{q} ) \Biggl( 1+ \sum _{j=1}^{M} b_{j} t_{q}^{j} \Biggr)^{2}, \end{aligned} \end{aligned}$$
(6)
$$\begin{aligned}& \begin{aligned}[b] \varepsilon_{2} ( t_{q} ) &= \Biggl( 1+ \sum_{j=1}^{M} d_{j} t_{q}^{j} \Biggr) \Biggl( \sum_{i=0}^{N} i c_{i} t_{q}^{i-1} \Biggr) - \Biggl( \sum _{i=0}^{N} c_{i} t_{q}^{i} \Biggr) \Biggl( \sum_{j=1}^{M} j d_{j} t_{q}^{j-1} \Biggr) \\ &\quad {}- X_{2} ( t_{q} ) \Biggl( 1+ \sum _{j=1}^{M} d_{j} t_{q}^{j} \Biggr)^{2}, \end{aligned} \end{aligned}$$
(7)
$$\begin{aligned}& \begin{aligned}[b] \varepsilon_{3} ( t_{q} ) &= \Biggl( 1+ \sum_{j=1}^{M} f_{j} t_{q}^{j} \Biggr) \Biggl( \sum_{i=0}^{N} i e_{i} t_{q}^{i-1} \Biggr) - \Biggl( \sum _{i=0}^{N} e_{i} t_{q}^{i} \Biggr) \Biggl( \sum_{j=1}^{M} j f_{j} t_{q}^{j-1} \Biggr) \\ &\quad {}- X_{3} ( t_{q} ) \Biggl( 1+ \sum _{j=1}^{M} f_{j} t_{q}^{j} \Biggr)^{2}. \end{aligned} \end{aligned}$$
(8)

The problem reduces to the problem of finding \(3(M+N)\) coefficients of Padé approximants by solving system (5) having \(3 q_{\mathrm{max}}\) nonlinear simultaneous equations. System (5) is highly nonlinear and may possess many solutions in general. By assuming \(\boldsymbol{x}= ( a_{1}, a_{2}, \ldots, a_{M}, b_{1}, b_{2}, \ldots, b_{N}, c_{1}, c_{2}, \ldots, c_{M}, d_{1}, d_{2}, \ldots, d_{N}, e_{1}, e_{2}, \ldots, e_{M}, f_{1}, f_{2}, \ldots, f_{N} )^{T} \in \mathbb{R}^{3(M+N)}\), the system (5) is further converted to a minimization problem of the form:

$$ \mbox{Minimize }\psi ( \boldsymbol{x} ) = \frac{1}{3} \sum _{v=1}^{3} \sum_{q=0}^{q_{\mathrm{max}}} \bigl[ \varepsilon_{v} ( t_{q} ) \bigr]^{2}. $$
(9)

4.2 Formation of problem constraints

The initial conditions (4) of the model are considered as equality constraints:

$$\begin{aligned}& h_{1} ( t ) =S ( t ) - S_{0} =0, \end{aligned}$$
(10)
$$\begin{aligned}& h_{2} ( t ) =E ( t ) - E_{0} =0, \end{aligned}$$
(11)
$$\begin{aligned}& h_{3} ( t ) =I ( t ) - I_{0} =0. \end{aligned}$$
(12)

The inequality constraints (13) to (15) are related to positivity whereas (16) incorporates the boundedness of the numerical solution.

$$\begin{aligned}& g_{1q} = \frac{\sum_{i=0}^{N} a_{i} t_{q}^{i}}{1+ \sum_{j=1}^{M} b_{j} t_{q}^{j}} \geq0, \end{aligned}$$
(13)
$$\begin{aligned}& g_{2q} = \frac{\sum_{i=0}^{N} c_{i} t_{q}^{i}}{1+ \sum_{j=1}^{M} d_{j} t_{q}^{j}} \geq0, \end{aligned}$$
(14)
$$\begin{aligned}& g_{3q} = \frac{\sum_{i=0}^{N} e_{i} t_{q}^{i}}{1+ \sum_{j=1}^{M} f_{j} t_{q}^{j}} \geq0, \end{aligned}$$
(15)
$$\begin{aligned}& g_{1q} + g_{2q} + g_{3q} \leq\frac{A}{a}. \end{aligned}$$
(16)

4.3 Employing penalty function approach

An equivalent unconstrained minimization model is obtained by using the following penalty function approach:

$$\mathcal{H} ( \boldsymbol{x} ) = \sum_{q=1}^{q_{\mathrm{max}}} L_{q} \times \max \Biggl\{ 0, ( h_{1} )^{2}, ( h_{2} )^{2}, ( h_{3} )^{2},- g_{1q},- g_{2q},- g_{3q}, \sum _{s=1}^{3} g_{sq} - \frac{A}{a} \Biggr\} . $$

The scalar \(L_{q} \)is a large positive real number acting as a penalty factor at qth discrete time step. The unconstrained objective function is

$$ \mbox{Minimize } \varphi ( \boldsymbol{x} ) = \psi ( \boldsymbol{x} )+ \mathcal{H} ( \boldsymbol{x} ). $$
(17)

4.4 Use of differential evolution for optimization process

To optimize objective function (17) the iterative steps of DE are executed as follows:

  1. 1.

    Generate a population of K solutions (\(\boldsymbol{x}_{j} \in \mathbb{R}^{3 ( M+N )}\); \(1\leq j\leq K \)) randomly.

  2. 2.

    Evaluate the fitness \(\varphi_{j} =\varphi ( \boldsymbol{x}_{j} )\) of each solution. Preserve the best solution with the smallest objective function value. Set\(T=0\).

  3. 3.

    Set \(T=T+1\).

  4. 4.

    For each of \(j=1, 2, 3, \ldots,K\), choose three distinct solutions \(\boldsymbol{x}_{A}\), \(\boldsymbol{x}_{B}\) and \(\boldsymbol {x}_{C}\) from the population excluding \(\boldsymbol{x}_{j}\). Set \(\boldsymbol{y}= \boldsymbol{x}_{j}\).

  5. 5.

    For each of the dimensions \(i=1,2,3,\ldots,3(M+N)\), alter the ith coordinate according to

    $$y_{i} = \textstyle\begin{cases} x_{Ai} +F\times ( x_{Bi} - x_{Ci} )& \mbox{if }\mathit{rand}< \mathit {CR}, \\ x_{ji} &\mbox{otherwise}. \end{cases} $$
  6. 6.

    If \(\varphi ( \boldsymbol{y} ) < \varphi_{j}\) then \(\boldsymbol{x}_{j} \leftarrow\boldsymbol{y}\), otherwise discard y.

  7. 7.

    Update the best solution.

  8. 8.

    If \(T>\mbox{Number of Allowed Iterations}\), then terminate by preserving the best solution, otherwise start next iteration from step 3.

In step 5 the symbol rand denotes a random number in the interval \((0, 1)\), F is a differential constant and CR is crossover fraction.

5 Numerical results

Four parameters of DE algorithm have been set: population \(\mbox{size}=50\); \(\mathit{CR}=0.9\); \(F=0.5\) and the \(\mbox{maximum number of iterations}=2000\). The order of the Padé approximation is set as \(( N,M ) =(2, 2)\). The parameter \(q_{\mathrm{max}}\) is set to be 2000. The value of each penalty factor is set to be \(L_{q} = 10^{10}\) for all q.

The optimized coefficients of Padé approximants returned by DE optimizer are given in Table 2.

Table 2 Optimized coefficients of Padé approximate solutions

5.1 Convergence analysis

This section presents the unconditional convergence of numerical solution found by the proposed method. Let the optimized coefficients of Padé approximation be denoted by \(a_{i}^{0}\), \(b_{i}^{0}\), \(c_{i}^{0}\), \(d_{i}^{0}\), \(e_{i}^{0}\), \(f_{i}^{0}\) for VE equilibrium point and \(a_{i}^{*}\), \(b_{i}^{*}\), \(c_{i}^{*}\), \(d_{i}^{*}\), \(e_{i}^{*}\), \(f_{i}^{*}\) for VFE steady state point. Then for the VE point

$$ \lim_{t\rightarrow\infty} S ( t ) \approx \lim_{n\rightarrow\infty} S_{N, M} ( t ) = \textstyle\begin{cases} \frac{a_{N}^{0}}{b_{M}^{0}} &\mbox{if }N=M, \\ 0 &\mbox{if }N< M, \\ \infty &\mbox{if }N>M. \end{cases} $$

Setting \(N=M=2\) and applying the reverse operation on optimized coefficients, we get

$$\lim_{t\rightarrow\infty} S ( t ) \approx\frac{a_{N}^{0}}{ b_{M}^{0}} = \frac{-4\text{,}731\text{,}817\text{,}317\text{,}514\text{,}237}{-3\text{,}763\text{,}605\text{,}488\text{,}155\text{,}694} \approx1.2573= S^{0}. $$

Similarly,

$$\begin{aligned}& \lim_{t\rightarrow\infty} E ( t ) \approx\frac{c_{N}^{0}}{ d_{M}^{0}} = \frac{-5\text{,}018\text{,}532\text{,}630\text{,}836\text{,}860}{-10\text{,}373\text{,}441\text{,}962\text{,}128.1} \approx48.378653568783371\approx E^{0}, \\& \lim_{t\rightarrow\infty} I ( t ) \approx\frac{e_{N}^{0}}{ f_{M}^{0}} = \frac{-2\text{,}180\text{,}339\text{,}159\text{,}320\text{,}262}{-2\text{,}794\text{,}228\text{,}815\text{,}931\text{,}405} \approx0.780300864012630\approx I^{0}. \end{aligned}$$

For the VFE point

$$\lim_{t\rightarrow\infty} S ( t ) \approx\frac{a_{N}^{*}}{ b_{M}^{*}} = \frac{-3.457895266178034 \mathrm{E}16}{-359\text{,}621\text{,}107\text{,}682\text{,}515.6} \approx96.153846153846132\approx S^{*}. $$

Similarly,

$$\begin{aligned}& \lim_{t\rightarrow\infty} E ( t ) \approx\frac{c_{N}^{*}}{ d_{M}^{*}} \approx2.2653 \mbox{E}{-}17\approx E^{*}, \\& \lim_{t\rightarrow\infty} I ( t ) \approx\frac{e_{N}^{*}}{ f_{M}^{*}} \approx1.01293 \mathrm{E}{-}17\approx I^{*}. \end{aligned}$$

This proves that the closed form numerical solution found by the proposed EPA approach unconditionally converges to the steady state points.

From Figs. 2 and 3 the divergence behaviors of EULER and RK-4 methods can be observed for \(h=0.08\) and \(h=3.5\).

Figure 2
figure 2

Divergence behaviors of (a) Euler method, (b) Rk-4 method for VE and \(h=0.08\)

Figure 3
figure 3

Divergence behaviors of (a) Euler method, (b) RK-4 method for VFE with \(h=3.5\)

On the other hand, from Figs. 410, it can observed that EPA is quickly convergent and is in good agreement with NSFD for both of the equilibrium points and the considered values of step length h.

Figure 4
figure 4

Convergence curves of EPA and NSFDE to VE point for \(h= 0.08\)

Figure 5
figure 5

Convergence curves of EPA and NSFDE to VE point for \(h= 5\)

Figure 6
figure 6

Convergence curves of EPA and NSFD to VE point for \(h= 10\)

Figure 7
figure 7

Convergence curves of EPA and NSFD to VFE with \(h= 0.08\)

Figure 8
figure 8

Convergence curves of EPA and NSFD to VFE point at \(h= 5\)

Figure 9
figure 9

Convergence curves of EPA and NSFD to VFE point at \(h = 10\)

Figure 10
figure 10

Absolute residuals of EPA and NSFD solutions for VE at \(h = 3.5\)

Figure 11
figure 11

Absolute residuals of EPA and NSFD solutions at VE for \(h = 5\)

Figure 12
figure 12

Absolute residuals of EPA and NSFD solutions at VFE for \(h = 10\)

5.2 Error analysis

To describe the dynamics of system (1) accurately, a necessary condition for a numerical solution is to satisfy the system (1) for all of the time steps. This section presents the error analysis by evaluating absolute residuals ((6) to (8)) of the numerical solutions found by EPA, RK-4, Euler and NSFD. The derivatives of the EPA solution are calculated analytically whereas a forward difference scheme is used to approximate the derivatives of numerical solutions of EU, RK-4 and NSFD.

Table 3 and Table 4 present the absolute residuals of numerical solutions at 200 time steps for the \(h=0.01\) and \(h=0.1\), respectively.

Table 3 Absolute residuals of numerical solutions for \(h=0.01\)
Table 4 Absolute residuals for \(h=0.1\)

It can be observed from Tables 3 and 4 that the numerical solutions found by EPA scheme for both steady state points satisfy the governing equations with high accuracies as compared to RK-4, Euler and NSFD schemes. The convergence of RK-4, Euler and NSFD schemes occurs at least after 200 time steps.

Since for higher values of step lengths (\(h=3.5, 5, 10, 36\)) RK-4 and Euler methods diverge so the comparisons of absolute residuals for EPA and NSFD are demonstrated graphically in Figs. 1013.

Figure 13
figure 13

Absolute residuals of EPA and NSFD solutions at VFE for \(h = 36\)

The proposed EPA scheme is also compared with an optimized version of Matlab ODE45 algorithm. Figures 14 and 15 present the convergence curves of ODE45 for \(E(t)\) and \(I(t)\) at VE and VFE points, respectively. Positivity of a numerical solution is an essential property of epidemiological dynamical models as negative values of state variables do not have any physical interpretation. It can be observed from these figures that ODE45 converges to the steady states but does not possess positivity of the numerical solutions.

Figure 14
figure 14

Convergence curves of ODE45 to VE point at \(h=3.5\)

Figure 15
figure 15

Convergence curves of ODE45 to VFE point at \(h=0.08\)

Figure 16 presents the comparisons of absolute residuals of solutions of ODE45 and EPA method for \(h=0.008\) at VE. It demonstrates that the residuals of solutions found by EPA are very small as compared to those of ODE45 up to more than 3700 time steps.

Figure 16
figure 16

Absolute residuals of EPA and ODE45 solutions at VE for \(h = 0.008\)

Figure 17 exhibits the convergence curves of state variables for VE and VFE steady states. One can observe from Fig. 17 that the numerical solutions determined by ODE45 at VE steady state also converge wrongly to VFE equilibrium point.

Figure 17
figure 17

Convergence curves of ODE45 for VE (\(h = 2\)) and VFE (\(h=5\))

6 Conclusion

This work proposed an evolutionary computing-based framework of Padé approximation of numerical solution of a nonlinear dynamical continuous model of virus propagation in computer networks. A new consolidation of two distinguished techniques, Padé approximation and differential evolution, was evolved for numerical treatment of the computer virus propagation model. From the analyses of the related facts and figures it is concluded that:

  • The evolutionary Padé approximation technique is successfully developed and implemented to the model of virus propagation in computer network.

  • EPA yielded good approximations of state variables which satisfy the governing equations with high accuracy.

  • The initial conditions and preservation of positivity and bonded-ness of the solution were efficiently handled through constraints and the penalty function approach.

  • The EPA produced a closed form numerical solution of the model having no analytical solution.

  • The obtained solution possesses very fast convergence, surpassing NSFD.

  • An advantageous aspect of the proposed framework is that the solution found by EPA is valid for several values of step lengths and needs no re-simulation for changed step length. It is analogous to consumption of less computational efforts.

  • The comparison of the tables and figures demonstrates that the solutions obtained from EPA are found to be in good agreement with NSFD particular.

  • The error analysis shows that residual errors of EPA solution remain very low at each time step as compared to RK-4, Euler and NSFD schemes.

  • It is also observed that the Euler, RK4 and ODE45 type finite difference schemes are not equipped with specific tools to preserve essential properties like positivity, boundedness and dynamical consistency of real world physical models. On the other hand EPA preserves all of these vital properties of the underlying model.

The efficiency of EPA is independent of choice of step length and unconditionally converges to steady state equilibriums more consistently. The proposed framework is suitable for many other nonlinear models that can be formulated as optimization problems. It is worth mentioning that the Padé approximation of order \((2, 2)\) was used in the present work. The accuracy of the numerical solution can be enhanced by using its higher order and more robust optimization approach. As a future work, we intend to apply the proposed framework to stiff nonlinear ODEs and more complicated dynamical models with integer and/or fractional orders.