Next Article in Journal
Neuron-by-Neuron Quantization for Efficient Low-Bit QNN Training
Next Article in Special Issue
Methodology to Obtain Universal Solutions for Systems of Coupled Ordinary Differential Equations: Examples of a Continuous Flow Chemical Reactor and a Coupled Oscillator
Previous Article in Journal
Conditioning Theory for Generalized Inverse CA and Their Estimations
Previous Article in Special Issue
Experimental Design for Progressive Type I Interval Censoring on the Lifetime Performance Index of Chen Lifetime Distribution
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Neural Networks Simulation of Distributed SEIR System †

1
Department of Informatics, J. Selye University, Bratislavská Cesta 3322, 945 01 Komárno, Slovakia
2
Department of Mathematics, Faculty of Natural Sciences and Informatics, Constantine the Philosopher University, Tr. A. Hlinku 1, 949 74 Nitra, Slovakia
*
Author to whom correspondence should be addressed.
This paper is an extension of our conference paper at the AlCoB 2016 Algorithms for Computational Biology conference held on 21–22 June 2016 in Trujillo, Spain.
Mathematics 2023, 11(9), 2113; https://doi.org/10.3390/math11092113
Submission received: 2 March 2023 / Revised: 26 April 2023 / Accepted: 27 April 2023 / Published: 29 April 2023

Abstract

:
In this paper, a neural network-based optimal control synthesis is presented for distributed optimal control problems. We deal with solutions of systems controlled by parabolic differential equations with control and state constraints and discrete time delays. The given optimal control problem is transformed into a discrete nonlinear problem and then implemented into a feed-forward adaptive critic neural network. We propose a new algorithm to reach optimal control and an optimal trajectory using a feed-forward neural network. We present a concrete application of this simulation method on the SEIR (Susceptible—Exposed—Infectious—Recovered) optimal control problem of a distributed system for disease control. The results show that the adaptive-critic-based neural network approach is suitable for the solution of optimal distributed control problems with delay in state and control variables subject to control-state constraints and simulates the spread of disease in the SEIR system.

1. Introduction

In recent decades, the application of nonlinear dynamic systems has proven to be useful in many fields, for example, computer networks, robotics, transportation systems, epidemiology, and biology. These nonlinear dynamic systems were extended with control variables to control the dynamic of the systems. The design of controllers for nonlinear dynamic systems has also drawn intensive attention [1]. Many results have been obtained for the control of dynamic systems using adaptive control and neural networks (see, e.g., [2,3,4]).
According to Marino [5] (p. 55), “Adaptive controls for nonlinear systems are defined as nonlinear dynamic (state or output feedback) compensators capable of guaranteeing asymptotic tracking of an output reference signal for any unknown parameter vector and any initial condition for the closed loop system when time varying disturbances are not present.” Dynamic programming has been a useful technique to control nonlinear dynamic systems [6], where we want to attain the minimum or maximum of a given objective function, optimization criterion, or performance index representing the mathematical expression of a phenomenon.
The aim of our article, which is related to works [7,8,9,10], is to apply neural network methods in the study and simulation of nonlinear complex adaptive epidemiological systems, specifically a SEIR system. We consider an optimal distributed control problem for systems governed by parabolic differential equations with control and state constraints and a discrete time delay for the SEIR model, which contains the intensity of vaccination. There are some numerical methods based on necessary conditions of optimality [11,12], where the state and co-state equations are solved forward and backward in time. In the last decade, efficient techniques have been developed [13,14,15] to construct learning systems for the approximate solution of optimal control problems. Characterized by self-learning and adaptability, artificial neural networks are also a serviceable tool to implement controlled learning [16,17,18]. “Multilayer feedforward networks with as few as one hidden layer are indeed capable of universal approximation in a very precise and satisfactory sense” [19] (p. 260). Therefore, feedforward networks are used in adaptive dynamic programming (ADP) algorithms or adaptive critic design (ACD), which was proposed by Werbos [17,18] to deal with optimal control problems forward in time.
The finite element approximation approach has been thoroughly studied in [20,21,22] and [12] for parabolic and elliptic optimal control problems. This approach plays an important role in the numerical treatment of optimal control problems. The characteristic of this solution is that the optimal control problem is translated into a finite-dimensional nonlinear programming problem (NLP-problem) by discretization. These methods, basically, apply nonlinear programming techniques to the resulting finite-dimensional optimization problem, as one can see in [23,24] and [12]. Thereafter, neural networks are used as a universal approximation to solve finite-dimensional optimization problems forward in time with ACD [18,25,26,27].
In this paper, we use an adaptive critic neural network architecture based on [7] for two optimal distributed control problems. In Section 2, we introduce an optimal control problem for a parabolic differential equation where state and control variables are delayed in time and also a control problem with control and state constraints. In Section 3, we transform the initial continuous problem into a nonlinear programming problem using discretization. Section 4 presents a new algorithm using adaptive critic neural network design, where the adaptive neural network approximates optimal control and critic network co-state variables. Section 5 presents a short description of the SEIR model and investigates the optimal vaccine coverage threshold needed for disease control and eradication as the optimal control problem subject to control and state constraints. For the numerical experiments described in Section 5, Matlab 2021b software was used.

2. The Optimal Control Problem

We consider the nonlinear control problem governed by parabolic equations with delays in state and control variables for mixed control-state constraints. We denote x ( p , t ) R n and u ( p , t ) R m the state and control variable, respectively, in a given space-time domain Q = a , b × t 0 , t f , where the final time t f is fixed. The optimal control problem is to minimize
J ( u ) = a b g ( x ( p , t f ) ) d p + a b t 0 t f f 0 ( x ( p , t ) , x ( p , t τ x ) , u ( p , t ) , u ( p , t τ u ) ) d t d p ,
subject to
x ( p , t ) t = D 2 x ( p , t ) p 2 + f ( x ( p , t ) , x ( p , t τ x ) , u ( p , t ) , u ( p , t τ u ) ) ,
x ( a , t ) p = x ( b , t ) p = 0 , t [ t 0 , t f ] ,
x ( p , t ) = ϕ s ( p , t ) , u ( p , t ) = ϕ c ( p , t ) , p [ a , b ] , t [ t 0 τ u , t 0 ] ,
ψ ( x ( p , t f ) ) = 0 , c ( x ( p , t ) , u ( p , t ) ) 0 , p [ a , b ] , t [ t 0 , t f ] .
where c ( x , u ) formulates a mixed state-control constraint, τ x 0 and τ u 0 are discrete time delays in the state and control variable, respectively, and ψ is a given terminal condition for state variable x .   D is a diffusion matrix. The functions g : R n R , f 0 : R 2 ( n + m ) R , f : R 2 ( n + m ) R n , c : R n + m R q and ψ : R n R r ,   0 r n are assumed to be sufficiently smooth on appropriate open sets, and the initial conditions ϕ s ( p , t ) , ϕ c ( p , t ) are continuous functions. Dynamic optimization objective functional J ( u ) has Bolza form with scalar terminal cost and Equation (2) describes a dynamic of state variables. The theory of necessary conditions for the optimal control problem of form (1) is well developed, see, e.g., [24,28]. To simplify the notation, we introduce an additional state variable x 0 ( p , t ) = 0 t f 0 ( x ( p , s ) , x ( p , s τ x ) , u ( p , s ) ,   u ( p , s τ u ) d s . Then the augmented Hamiltonian function for problem (1) is
H ( x , x τ x , u , u τ u , λ , μ ) = j = 0 n λ j f j ( x , x τ x , u , u τ u ) + j = 0 q μ j c j ( x , u ) ,
where λ R n + 1 is the adjoint variable and μ R q is a multiplier associated to the inequality constraints. Assume that τ x , τ u ( 0 , τ x , τ u ) ( 0 , 0 ) and τ x τ u Q for τ u > 0 or τ u τ x Q for τ x > 0 . Let ( x ^ , u ^ ) be an optimal solution for (1). Then the necessary optimality condition for (1) implies [24,28] that there exist a piecewise continuous and piecewise continuously differentiable adjoint function λ : Q R n + 1 , a piecewise continuous multiplier function μ : Q R q ,   μ ^ ( p , t ) 0 and a multiplier σ R r satisfying
λ t = D 2 λ p 2 H x x ^ , x ^ τ x , u ^ , u ^ τ u , λ , μ χ [ t 0 , t f τ x ] H x τ x ( x ^ + τ x , x ^ , u ^ + τ x , u ^ τ u + τ x , λ + τ x , μ + τ x ) ,
λ ( p , t f ) = g x ( x ^ ( p , t f ) ) + σ ψ x ( x ^ ( p , t f ) ) , λ ( a , t ) p = λ ( b , t ) p = 0 ,
0 = H u x ^ , x ^ τ x , u ^ , u ^ τ u , λ , μ χ [ t 0 , t f τ u ] H u τ u ( x ^ + τ u , x ^ τ x + τ u , u ^ + τ u , u ^ , λ + τ u , μ + τ u ) .
In addition, the complementary conditions hold, i.e., in p [ a , b ] , t [ t 0 , t f ] ,   μ ( p , t ) 0 ,   c ( x ( p , t ) , u ( p , t ) ) 0 , and μ ( p , t ) c ( x ( p , t ) , u ( p , t ) ) = 0 . The subscript x , x τ x , u and u τ u denote the partial derivative with respect to x , x τ x , u and u τ u , respectively and x + τ x = x ( p , t + τ x ) ,   x τ x + τ u = x ( p , t τ x + τ u ) . Numerical methods that solve the challenges of obtaining an optimal control u ^ and optimal trajectory x ^ are described in [29,30]. The first is based on solving the optimal system (2, 3) which consists of 2 n partial differential equations and boundary conditions in time also. The second method starts with initial guess for the adjoint state given by Equation (3). We solve Equation (6) and then state Equation (2). Then, those control values u and state values x are used to solve the adjoint state λ by backward method in time. We proposed a new method to solve the distributed optimal control problem (1) using adaptive critic neural networks, where state variable x and adjoint variable λ are solved forward in time.

3. Discretization of the Distributed Optimal Control Problem

In this section, we develop discretization techniques to transform the distributed control problem (1) into a nonlinear programming problem (see also in [11,12,20]). We suppose that τ u = l τ x k with l , k N . Defining h m a x = τ x k gives the maximum interval length for an elementary transformation interval that satisfies τ x h m a x = k N and τ u h m a x = l N . The minimum number of grid points for an equidistant discretization mesh is N m i n = t f t 0 h m a x . Let K N , and set N = K N m i n . Let t j t 0 , t f ,   j = 0 , , M , be an equidistant grid point with t j = t 0 + j h t ,   j = 0 , , M , where h t = b a M is a time step and t f = N h + t 0 . Let us suppose that the rectangle R = { ( p , t ) : a p b , t 0 t t f } is subdivided into N by M rectangles, each with sides h t and h s = b a M . For the bottom row, we have t = t 0 , and the solution is x ( p i , t 0 ) = ϕ s ( p i , t 0 ) . For the grid points in successive rows, we have { x ( p i , t j ) : i = 0 , 1 , , N ,   j = 0 , 1 , , M } for the approximations to x ( p , t ) . The difference formulae for x t ( p , t ) ,   x p ( p , t ) and x p p ( p , t ) are
x t ( p , t ) x ( p , t + h t ) x ( p , t ) h t ,
x p ( p , t ) x ( p + h s , t ) x ( p , t ) h s
And
x p p ( p , t ) x ( p h s , t ) 2 x ( p , t ) + x ( p + h s , t ) h s 2 .
Using the approximation x i , j in Equations (6) and (7), which are substituted into Equation (2), we obtain that
x i , j + 1 x i , j h t = D x i 1 , j 2 x i , j + x i + 1 , j h s 2 + f i , j .
Equation (8) is applied to create the ( j + 1 ) th row across the grid, assuming that approximations in the j th row are known. Let the vectors x i j R n ,   u i j R m ,   i = 0 , , N , j = 0 , , M , be an approximation of the state variable and control variable x ( p i , t j ) ,   u ( p i , t j ) , respectively at the mesh point ( p i , t j ) .   z : = ( ( x i j ) , ( u i j ) , i = 0 , , N , j = 0 , , M ) R N s ,   N s = ( n + m ) N M . Instead of the optimal control problem, here we use the following discretised control problem in the form of nonlinear programming problem with inequality constraints: Minimise
J ( z ) = h s h t ( i , j ) f 0 ( x i j , x τ x i j , u i j , u τ u i j ) + h s ( i ) g ( x i M )
subject to
x i , j + 1 = x i j + h t D x i 1 , j 2 x i j + x i + 1 , j h s 2 + h t f i j ,
x 0 j = x 1 j , x N j = x N 1 j ,   i = 0 , , N ,   j = 0 , , M 1 ,
x i , j = ϕ x ( p i , t 0 j h ) , j = k , , 0 , u i , j = ϕ u ( p i , t 0 j h ) , j = l , , 0 ,
ψ ( x i , N ) = 0 , c ( x i j , u i j ) 0 ,   i = 0 , , N ,   j = 0 , , M 1 ,
Our goal is to find an admissible control in a discrete-time formulation which minimises objective function (9). The Lagrangian function for the nonlinear optimisation problem (9) is given by Equation (12).
L ( z , λ , σ , μ ) = h s h t ( i , j ) f 0 ( x i j , x τ x i j , u i j , u τ u i j ) +
( i , j ) λ i , j + 1 ( x i , j + 1 + x i j + D x i 1 , j 2 x i j + x i + 1 , j h s 2 + h t f i j ) + ( i , j ) μ i j c ( x i j , u i j ) + ( i ) σ i ψ ( x i N ) + h s ( i ) g ( x i M ) + ( j ) λ 0 , j x 0 , j x 1 , j h s + ( j ) λ N , j x N , j x N 1 , j h s ,
The first order optimality Karush–Kuhn–Tucker conditions [31] (p. 199) for problem (9) are given by Equations (12)–(14).
0 = L x i j ( z , λ , σ , μ ) = λ i , j + 1 λ i j + h t D λ i 1 , j 2 λ i j + λ i + 1 , j h s 2 + h t λ i , j + 1 f x i j ( x i j , x i , j k , u i j , u i , j l ) + h t λ i , j + k + 1 f x i j τ x ( x i , j + k , x i j , u i , j + k , u i , j l + k ) + μ i j c x i j ( x i j , u i j ) ,   j = 0 , , M k 1 ,
0 = L x i j ( z , λ , σ , μ ) = λ i , j + 1 λ i j + h t D λ i 1 , j 2 λ i j + λ i + 1 , j h s 2 + h t λ i , j + 1 f x i j ( x i j , x i , j k , u i j , u i , j l ) ,   j = M k , , M 1 ,
0 = L x i M ( z , λ , σ , μ ) = g x i M ( x i m ) + σ i ψ x i M ( x i M ) λ i M , λ 0 j = λ 1 j , λ N j = λ N 1 , j ,
0 = L u i j ( z , λ , σ , μ ) = h t λ i , j + 1 f u i j ( x i j , x i , j k , u i j , u i , j l ) + h t λ i , j + l + 1 f u i j τ u ( x i , j + l , x i , j k + l , u i , j + l , u i , j ) + μ i j c u i j ( x i j , u i j ) ,   j = 0 , , M l 1 ,
0 = L u i j ( z , λ , σ , μ ) = h t λ i , j + 1 f u i j ( x i j , x i , j k , u i j , u i , j l ) + μ i j c u i j ( x i j , u i j ) ,     j = M l , , M 1 .
These equations represent the discrete version of the necessary conditions (3)–(6) for the optimal control problem (1).

4. Adaptive Critic Neural Network for a Distributed Optimal Control Problem with Control and State Constraints

Neural networks are useful for approximation of the smooth time-invariant functions. According to [32] (p. 2), “experience has shown that optimisation of functionals over admissible sets of functions made up of linear combinations of relatively few basis functions with a simple structure and depending nonlinearly on a set of “inner” parameters e.g., feedforward neural networks with one hidden layer and linear output activation units often provides surprisingly good suboptimal solutions”. In 1977, Werbos [18,33] introduced an approach to “approximate dynamic programming”, which later became known under the name adaptive critic design (ACD). “A typical design of ACD consists of three modules: action, model (plant), and critic” [8] (p. 587), also in [14,17,18].
In the following part describing Algorithm 1, we resolve how to adjust the critic network, the model network, and the action network. ACD is able to optimize over time under conditions of noise and uncertainty. For control actions to be performed sequentially for a given series, while the effect of the actions is not known up to the end of the sequence, one cannot design an optimal controller with the well-known supervised learning artificial neural network. Progressively adapting two artificial neural networks, we have an adaptive critic method in which the first neural network dispenses the control signals (this is the action network) and the second one (the critic network) learns the requested performance index for some action associated with the index. These two then approximate the optimal control and co-state equation. The adaptation process starts with an arbitrary selection, controlled by the action network. “The critic network then guides the action network towards the optimal solution at each successive adaptation. This method determines optimal control policy for the entire range of initial conditions and needs no external training, unlike other neurocontrollers” [34] (p. 293).
Algorithm 1: Algorithm for Solving the Optimal Control Problem
 Input: Select t 0 , t f , a , b , N , M - number of steps, time and space steps h t , h s ,
       ε a , ε c - stopping tolerance for action and critic neural networks, respectively, x i , j = ϕ s ( p i , t 0 j h t ) , j = k , , 0 ,
       u i , j = ϕ c ( i , t 0 j h t ) , j = l , ,0 - initial values.
 Output: Set of final approximate optimal control u ^ ( p i , t 0 + j h t ) = u ^ i j and optimal trajectory x ^ ( p i , t 0 + ( j + 1 ) h t ) = x ^ i , j + 1 , j = 0 , , M 1 ,
1Set the initial weight W a = ( V a , W a ) , W c = ( V c , W c )
for j 0 to M 1 do
2 for i 1 to N 1 do
3 while e r r a ε a and e r r c ε c do
4 for s 0 to m a x ( k , l ) do
5 Compute u i , s + j a , μ i , s + j a and λ i , s + j + 1 c using action ( W a ) and critic ( W c ) networks, and x i , s + j + 1 by (10)
6 Compute λ i j t , u i j t , a n d   μ i j t using (12) and (14) F ( u i j , μ i j ) = ( L u i j ( z , λ , σ , μ ) , c ( x i j , u i j ) ) = 0
7 if j = M 1 then
8 F ( u i , M 1 , μ i , M 1 , σ i ) = ( L u i , M 1 ( z , λ , σ , μ ) , c ( x i , M 1 , u i , M 1 ) , ψ ( x i , M ) ) with λ i M = G x i M ( x i M ) + σ i ψ x i M ( x i M )
9 e r r c = λ i j t λ i j c
10 e r r a = ( u , μ ) i j t ( u , μ ) i j a
11 With data set x i j , λ i j t update weight parameters W c
12 With data set x i j , ( u , μ ) i j t update weight parameters W a
13 Set λ i j c = λ i , j t ,   ( u , μ ) i , j a = ( u , μ ) i , j t
14 Set λ ^ i , j = λ i , j t , ( u ^ i , j , μ ^ i , j ) = ( u , μ ) i , j t
15 Compute x ^ i , j + 1 using (10) and u ^ i , j
16 λ 0 j = λ 1 j , λ N j = λ N 1 , j
17 return λ ^ i , j , u ^ i , j , μ ^ i , j , x ^ i , j + 1
Let x = [ x 1 , , x n ] and y = [ y 1 , , y m ] be the input and output vectors for this network. The matrix of synaptic weights between the input nodes and the hidden units is V = [ v 1 , , v r ] , where v k = [ v k 0 , v k 1 , v k n ] ;   v k 0 is the bias of the k th hidden unit and v k i is the weight for i th input node connecting to the k th hidden unit. Similarly, W = [ w 1 , , w m ] , (where w j = [ w j 0 , w j 1 , w j r ] ; w j 0 is the bias of j th output unit, and w j k is the weight that connects the k th hidden unit to j th output unit) is the matrix of synaptic weights between the hidden and output units. The response of the k th hidden unit is given by z k = t a n h i = 0 n v k i x i , k = 1 , , r , where tanh ( . ) is the activation function for the hidden units (hyperbolic tangent), and of the j th output unit is given by y j = k = 0 r w j k z k ,   j = 1 , , m .
The number of input variables specifies the number of neurons in the input layer. Multiple layers of neurons with nonlinear transition functions provide the opportunity to learn nonlinear and linear relationships between input and output vectors. The number of output vectors is determined by the number of output variables. The multi-layered network is trained by back-propagation algorithm, where the steepest descent error is propagated backward from the output to the input layer. With the help of the adaptive critic and recurrent neural network we can specify the algorithm for solving the optimal control problem (Algorithm 1). In the maximum principle of Pontryagin for optimal control, the mutual dependence of the state, co-state and control dynamics becomes clear. Naturally, the optimal control u ^ and multiplier μ ^ are given by Equation (14), while co-state Equations (12) and (13) progress backward in time and depend on the state and control. Adaptive critic neural networks based on this relationship are shown in [26,27]. There are two networks at each node. The first one is an action network, where the inputs are the current states and their outputs are the corresponding control u ^ and multiplier μ ^ , and the second one is a critic network, where the current states for the critic network are inputs and current co-states are outputs for normalising the inputs and targets. For a detailed explanation see [35].
The output of the critic network is given by λ i j , c = W c f ( V c x i j ) . The target function λ i j , t is expressed by Equation (12). Then, we define the error function of the critic network as e r r c = λ i j , t λ i j , c . The objective function to be minimised in the critic network is E c = 1 / 2 e r r c 2 . The weights are updated by
W c ( s + 1 ) = W c ( s ) ρ E c W c ,
V c ( s + 1 ) = V c ( s ) ρ E c V c ,
where ρ > 0 is the learning rate of the critic network; j is the inner-loop iteration step for updating the weight matrix W c and V c . This is a gradient-based adaptation for training the critic network.
To get the approximate optimal control as an output, the state x i was used as an input in the action network ( u i j , a , μ i j , a ) = W a f ( V a x i j ) . The target function ( u i j , t , μ i j , t ) can be written as a solution of Equation (14). The error function of the action network is e r r a = ( u i u , t , μ i j , t ) ( u i j , a , μ i j , a ) . The objective function to be minimised in the action network is E a = 1 / 2 e r r a 2 . The weights are updated by
W a ( s + 1 ) = W a ( s ) ρ E a W a ,
V a ( s + 1 ) = V a ( s ) ρ E a V a ,
where the meaning of ρ > 0 and j are the same as in (15) for the weight matrices of action network W a and V a .
The whole procedure of the distributed optimal control problem is summarised in Algorithm 1. Now, we describe the condition for terminating the training of action and critic networks within each cycle j = 0 , , M 1 and i = 1 , , N 1 . We use stopping tolerance ε a for action network to approximate optimal control u and multipliers μ . Convergence condition is given as e r r a = ( u , μ ) i j t ( u , μ ) i j a , where ( u , μ ) i j t and ( u , μ ) i j a are solutions of optimality condition (14), inequality multipliers and an action network output, respectively. Similarly, we use stopping tolerance ε c for critic network to approximate co-state variable λ . Convergence condition is given as e r r c = λ i j t λ i j c , where λ i j t and λ i j c are a solutions of co-state Equation (12) and the critic network output, respectively. The proof of convergence of adaptive critic design for a class of parabolic partial differential equations is given in [25]. For nonlinear distributed systems with time delay we can examine only the numerical convergence of ACD.
The learning procedure for the action and critic network is shown in [27,35]. The action and critical networks in adaptive critic synthesis were chosen to consist of n + m subnetworks, each constructed with n 3 n 1 structure such that there are n , 3 n and 1 neurons in the input, the hidden and the output layer, respectively.

5. SEIR Model with Spatial Diffusions

The classical SEIR (Susceptible—Exposed—Infectious–Recovered) model is one of the most used models in the simulation of infectious diseases [36]. In the SEIR model, the entire population is divided into four distinct groups of individuals. The first group is created by susceptible individuals (marked by S , x 1 ) who are able to catch the disease, the second group contains exposed persons (marked by E , x 2 ), who are infected but not yet infectious, infective people are in the third group ( I , x 3 ), they are able to transmit the disease, and the last group contains recovered individuals (marked by R , x 4 ), who are permanently immune. The whole population size is N , while the letters S, E, I, R sign the number of individuals in each group at a particular time, so S + E + I + R = N . We suppose that the population size N is constant and that the populations are well mixed (the spatial mobility of individuals has been ignored in the model) [37]. The evolution of the groups of the population over time in the SEIR model is described by the following four non-linear partial differential equations:
x i ( p , t ) t = D i 2 x i ( p , t ) p 2 + F i x ( p , t ) , x ( p , t τ ) , u ( p , t ) , t ,
where F i , i = 1 , ,4 are given by Equation (20) with Neumann boundary condition
x i p ( 0 , t ) = x i p ( 1 , t ) = 0
and initial conditions
x i p ,0 = ϕ i p 0 ,     0 p 1 ,   i = 1 , ,4
and
F 1 x ( p , t ) , u ( p , t ) , , t = μ N ( t ) x 1 ( p , t ) β x 3 ( p , t τ ) N ( t ) x 1 ( p , t ) u ( p , t ) x 1 ( p , t )
F 2 x ( p , t ) , u ( p , t ) , , t = β x 3 ( p , t τ ) N ( t ) x 1 ( p , t ) ( μ + γ ) x 2 ( p , t )
F 3 x ( p , t ) , u ( p , t ) , , t = γ x 2 ( p , t ) ( μ + δ ) x 3 ( p , t )
F 4 x ( p , t ) , u ( p , t ) , , t = δ x 3 ( p , t ) μ x 4 ( p , t ) + u ( p , t ) x 1 ( p , t )
Here, t denotes the time, p represents the spatial location, D i are the diffusion coefficients, μ is both birth and death rate, β is the contact rate that indicates the probability of catching the disease between susceptible and infectious individuals with time delay τ , 1 / δ is the mean latent period of the disease, 1 / γ is the mean infectious period and u ( p , t ) is the vaccination coverage of susceptible individuals. We set N ( t ) = 0 1 i = 1 4 x i ( p , t ) d p for all t 0 , where x ( ϕ , t , p ) = x 1 ( ϕ , t , p ) , , x 4 ( ϕ , t , p ) is the solution of Equation (17).
It follows from the model that
d N ( t ) d t = d d t 0 1 i = 1 4 x i ( p , t ) d p = 0 1 d d t i = 1 4 x i ( p , t ) d p = 0 1 i = 1 4 d d t x i ( p , t ) d p = i = 1 4 0 1 D i 2 x i ( p , t ) p 2 d p = i = 1 4 D i x i p ( 1 , t ) x i p ( 0 , t ) = 0 .
It follows easily that
N ( t ) = 0 1 i = 1 4 x i ( p , t ) d p = c
and c = 0 1 i = 1 4 x i ( p , 0 ) d p , i.e., that the population size N ( t ) is constant for all t .

Distributed Optimal Control Problem of Spread of Diseases

To control the spread of diseases, we introduce an optimal control in the SEIR model. The SEIR models with optimal control are currently being intensively studied, see [38,39,40]. Our objective is to find the optimal vaccine coverage threshold u ( p , t ) for disease control and liquidation [41].
Our optimal control problem is to find a distributed control u ( p , t ) to minimise the following objective function:
J ( u ) = a b t 0 t f a 1 x 1 ( p , t ) + a 2 x 2 ( p , t ) + a 3 x 3 ( p , t ) + 1 2 u ( p , t ) 2 d t d p ,
subject to the state system (17)–(18), under constraints
c 1 ( x , u ) = u m i n u 0
c 2 ( x , u ) = u u m a x 0 ,
where a 1 , a 2 , a 3 are positive constants to keep a balance in the size of S, E and I.
The augmented Hamiltonian function for problem (22) is given by
H ( x , x τ , u , λ ) = a 1 x 1 ( p , t ) + a 2 x 2 ( p , t ) + a 3 x 3 ( p , t ) +
1 2 u ( p , t ) 2 + j = 1 4 λ j F j ( x , x τ , u ) = 1 2 u ( p , t ) 2 u ( p , t ) x 1 ( p , t ) ( λ 1 ( p , t ) λ 4 ( p , t ) ) + G ( p , t ) ,
where λ R 4 is the adjoint variable. Let ( x ^ , u ^ ) be an optimal solution for (22). Then the necessary optimality condition for (22) implies [24] that there exists a piecewise continuous and piecewise continuously differentiable adjoint function λ : Q R 4 , satisfying
λ t = D 2 λ p 2 H x x , x τ , u , λ χ [ t 0 , t f τ ] H x τ ( x + τ , x , u , λ + τ ) ,
λ ( p , t f ) = 0 , λ ( a , t ) p = λ ( b , t ) p = 0 ,
0 = H u x , x τ u , λ .
By the optimality condition (26), we have
H u ( x , x τ , u , λ ) = u ( p , t ) x 1 ( p , t ) ( λ 1 ( p , t ) λ 4 ( p , t ) ) = 0 .
Now, using the property of the control space u u m i n , u m a x , we get
u ^ ( p , t ) = u m i n , ( λ 1 ( p , t ) λ 4 ( p , t ) ) u m i n ,
u ^ ( p , t ) = x ^ 1 ( p , t ) ( λ 1 ( p , t ) λ 4 ( p , t ) ) ,
u m i n < x 1 ( p , t ) ( λ 1 ( p , t ) λ 4 ( p , t ) ) < u m a x ,
u ^ ( p , t ) = u m a x , ( λ 1 ( p , t ) λ 4 ( p , t ) ) u m a x .
Discretisation of Equations (17) and (22) using Equations (12)–(14) and (9) leads to minimize
J ( u ) = h s h t ( i , j ) a 1 x 1 ( p i , t j ) + a 2 x 2 ( p i , t j ) + a 3 x 3 ( p i , t j ) + 1 2 u ( p i , t j ) 2
subject to
x i , j + 1 = x i j + h t D x i 1 , j 2 x i j + x i + 1 , j h s 2 + h t F i j ,
x 0 j = x 1 j , x N j = x N 1 j ,
x i ,0 = ϕ x ( p i , t 0 ) , i = 0 , , N ,
u i j m m a x 0 , m m i n u i j 0 ,
i = 0 , , N , j = 0 , , M 1
and Equations (12)–(14). The vector function F ( x , u ) = ( a 1 x 1 ( p , t ) + a 2 x 2 ( p , t ) + a 3 x 3 ( p , t ) + 1 2 u ( p , t ) 2 , F 1 ( x , u ) , , F 4 ( x , u ) ) is given by right-hand side of Equation (17). Discrete form of optimality condition (14) is
u ^ ( p i , t j ) = u m i n , ( λ 1 ( p i , t j ) λ 4 ( p i , t j ) ) u m i n ,
u ^ ( p i , t j ) = x ^ 1 ( p i , t j ) ( λ 1 ( p i , t j ) λ 4 ( p i , t j ) ) ,
u m i n < x 1 ( p i , t j ) ( λ 1 ( p i , t j ) λ 4 ( p i , t j ) ) < u m a x ,
u ^ ( p i , t j ) = u m a x , ( λ 1 ( p i , t j ) λ 4 ( p i , t j ) ) u m a x .
The solution of distributed optimal control problem (22) using the algorithm for solving the optimal control problem are displayed in Figure 1, Figure 2, Figure 3 and Figure 4.
In this simulation, we have chosen a critic network consisting of 4 subnetworks and an action network consisting of one subnetwork. Each subnetwork has 4–12–1 structure, where the triple of numbers indicates the number of neurons in the input layer, hidden layer, and output layer, respectively. During the adaptive critic synthesis, the proposed neural network fulfils the chosen convergence tolerance values, which leads to satisfactory simulation results.
We have plotted immune, susceptible individuals with and without control by considering values of parameters as a 2 = 0.3 , a 3 = 0.2 , τ = 0.5 . We can see that the population of immune individuals with control and without control increasing and decreasing to its stable state, respectively, see Figure 2. In the case of susceptible individuals, we get the opposite trend; see Figure 3.

6. Conclusions

In this paper, we have presented a new algorithm of adaptive critic method for parabolic distributed optimal control problem. The method is based on feed-forward neural network approximation of co-state variables, where state variable x and co-state variable λ are solved forward in time and are able to simulate optimal feedback law. The new algorithm was applied to the SEIR model to minimize the infected and susceptible populations and to maximise recovered populations. The results of numerical simulation (using Matlab) have shown that our algorithm for solving a distributed optimal control problem is able to solve this practical problem successfully. We presented a comparison between optimal control and no control of the SEIR model (see Figure 2, Figure 3 and Figure 4). It is easily seen that the optimal control of the SEIR model is able to find the effective vaccination rate of the population to influence the population infection by decreasing the number of susceptible individuals.

Author Contributions

Conceptualization, T.K., M.K. and L.V.; methodology, T.K.; software, T.K.; validation, T.K., M.K. and L.V.; formal analysis, T.K., M.K. and L.V; investigation, T.K.; resources T.K., M.K. and L.V.; data curation, T.K.; writing—original draft preparation, T.K., M.K. and L.V.; writing—review and editing, T.K., M.K. and L.V.; visualization, T.K., M.K. and L.V.; supervision, T.K. All authors have read and agreed to the published version of the manuscript.

Funding

The paper was supported by the Pallas Athéné Domus Meriti Foundation (PADME-2023) and project KEGA 015UKF-4/2021 Collaboration as a means of professional growth of mathematics teachers.

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Yang, X.; He, H. Adaptive critic designs for optimal control of uncertain nonlinear systems with unmatched interconnections. Neural Netw. 2018, 105, 42–153. [Google Scholar] [CrossRef] [PubMed]
  2. He, W.; Chen, Y.; Yin, Z. Adaptive neural network control of an uncertain robot with full-state constraints. IEEE Trans. Syst. Man Cybern. Syst. 2016, 46, 620–629. [Google Scholar] [CrossRef]
  3. He, W.; Dong, Y.; Sun, C. Adaptive neural impedance control of a robotic manipulator with input saturation. IEEE Trans. Syst. Man Cybern. Syst. 2016, 46, 334–344. [Google Scholar] [CrossRef]
  4. He, W.; Ge, S.S. Cooperative control of a nonuniform gantry crane with constrained tension. Automatica 2016, 66, 146–154. [Google Scholar] [CrossRef]
  5. Marino, R. Adaptive control of nonlinear systems: Basic results and applications. Annu. Rev. Control 1997, 21, 55–66. [Google Scholar] [CrossRef]
  6. Wang, D.; Liu, D.; Wei, Q.; Zhao, D.; Jin, N. Optimal control of unknown nonaffine nonlinear discrete-time systems based on adaptive dynamic programming. Automatica 2012, 48, 1825–1832. [Google Scholar] [CrossRef]
  7. Kmet, T.; Kmetova, M. Neural network solution of distributed control problems with control and state constraints. In LNCS 9886 Artificial Neural Networks and Machine Learning—ICANN2016; Villa, A., Masulli, P., Rivero, A., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; pp. 468–477. [Google Scholar]
  8. Kmet, T.; Kmetova, M. Adaptive critic design and Hopfield neural network based simulation of time delayed photosynthetic production and prey-predator model. Inf. Sci. 2015, 294, 586–599. [Google Scholar] [CrossRef]
  9. Kmet, T.; Kmetova, M. Neural networks simulation of feeding adaptations of daphnia. In LNCS 9702 Algorithms for Computational Biology AlCoB 2016; Springer: Berlin/Heidelberg, Germany, 2016; pp. 26–37. [Google Scholar]
  10. Kmet, T.; Kmetova, M. Echo State Networks Simulation of SIR Distributed Control. In LNAI 10245 Artificial Intelligence and Soft Computing ICAISC 2017; Springer: Berlin/Heidelberg, Germany, 2017; pp. 86–96. [Google Scholar]
  11. Borzi, A. Multigrid methods for parabolic distributed optimal control problems. J. Comput. Appl. Math. 2003, 157, 365–382. [Google Scholar] [CrossRef]
  12. Mittelmann, H.D. Solving elliptic control problems with interior point and SQP methods: Control and state constraints. J. Comput. Appl. Math. 2000, 120, 175–195. [Google Scholar] [CrossRef]
  13. Liu, D.; Wang, D.; Yang, X. An iterative adaptive dynamic programming algorithm for optimal control of unknown discrete-time nonlinear systems with constrained inputs. Inf. Sci. 2013, 220, 331–342. [Google Scholar] [CrossRef]
  14. Prokhorov, D.V.; Wunsch, D.C. Adaptive critic designs. IEEE Trans. Neural Netw. 1997, 8, 997–1007. [Google Scholar] [CrossRef]
  15. Vamvoudakis, K.G.; Lewis, F.L. Online actor–critic algorithm to solve the continuous-time infinite horizon optimal control problem. Automatica 2010, 46, 878–888. [Google Scholar] [CrossRef]
  16. Levin, A.U.; Narendra, K.S. Control of nonlinear dynamic systems using neural networks: Controllability and stabilization adaptive critic designs. IEEE Trans. Neural Netw. 1993, 4, 192–206. [Google Scholar] [CrossRef] [PubMed]
  17. Werbos, P.J. A menu of designs for reinforcement learning over time. In Neural Networks for Control; The MIT Press: Cambridge, MA, USA, 1990; pp. 333–366. [Google Scholar]
  18. Werbos, P.J. Approximate dynamic programming for real-time control and neural modelling. In Handbook of Intelligent Control: Neural Fuzzy, and Adaptive Approaches; White, D.A., Sofge, D.A., Eds.; Van Nostrand: New York, NY, USA, 1992; Chapter 13. [Google Scholar]
  19. Hornik, M.; Stichcombe, M.; White, H. Multilayer feed forward networks are universal approximators. Neural Netw. 1989, 2, 259–366. [Google Scholar] [CrossRef]
  20. Chryssoverghi, I. Discretization methods for semilinear parabolic optimal control problems. Int. J. Numer. Anal. Model. 2006, 3, 437–458. [Google Scholar]
  21. Clever, D.; Lang, J.; Ulbrich, S.; Ziems, J.C. Combination of an Adaptive Multilevel SQP Method and a Space-Time Adaptive PDAE Solver for Optimal Control Problems. Procedia Comput. Sci. 2012, 1, 1435–1443. [Google Scholar] [CrossRef]
  22. Knowles, G. Finite element approximation of parabolic time optimal control problems. SIAM J. Control Optim. 1982, 20, 414–427. [Google Scholar] [CrossRef]
  23. Buskens, C.; Maurer, H. SQP-methods for solving optimal control problems with control and state constraints: Adjoint variable, sensitivity analysis and real-time control. J. Comput. Appl. Math. 2000, 120, 85–108. [Google Scholar] [CrossRef]
  24. Gollman, L.; Kern, D.; Mauer, H. Optimal control problem with delays in state and control variables subject to mixed control-state constraints. Optim. Control Appl. Meth. 2009, 30, 341–365. [Google Scholar] [CrossRef]
  25. Luo, Y.; Sun, Q.; Zhang, H.; Cui, L. Adaptive critic design-based robust neural network control for nonlinear distributed parameter systems with unknown dynamics. Neurocomputing 2015, 148, 200–208. [Google Scholar] [CrossRef]
  26. Padhi, R.; Balakrishnan, S.; Randoltph, T. A single network adaptive critic (SNAC) architecture for optimal control synthesis for a class of nonlinear systems. Neural Netw. 2006, 19, 1648–1660. [Google Scholar] [CrossRef] [PubMed]
  27. Padhi, R.; Unnikrishnan, N.; Wang, X.; Balakrishnan, S.N. Adaptive-critic based optimal control synthesis for distributed parameter systems. Automatica 2001, 37, 1223–1234. [Google Scholar] [CrossRef]
  28. Caas, E. Pontryagin’s principle for state-constrained boundary control problems of semilinear parabolic equations. SIAM J. Control Optim. 1997, 35, 1297–1327. [Google Scholar] [CrossRef]
  29. Kirk, D.E. Optimal Control Theory: An Introduction; Dover Publications Inc.: Mineola, NY, USA, 1989. [Google Scholar]
  30. Potryagin, D.E. The Mathematical Theory of Optimal Process; Nauka: Moscow, Russia, 1983. [Google Scholar]
  31. Polak, E. Optimization Algorithms and Consistent Approximation; Springer: Berlin/Heidelberg, Germany, 1997. [Google Scholar]
  32. Gnecco, G. A Comparison between Fixed-Basis and Variable-Basis Schemes for Function Approximation and Functional Optimization. J. Appl. Math. 2012, 2012, 806945. [Google Scholar] [CrossRef]
  33. Werbos, P. Advanced Forecasting Methods for Global Crisis Warning and Models of Intelligence; General Systems Yearbook; 1977. Available online: https://www.researchgate.net/publication/243634290_Advanced_Forecasting_Methods_for_Global_Crisis_Warning_and_Models_of_Intelligence#fullTextFileContent (accessed on 1 March 2023).
  34. Venayagamoorthy, G.K.; Wunsch, D.C.; Harley, R.G. Adaptive critic based neurocontroller for turbogenerators with global dual heuristic programming. In Proceedings of the 2000 IEEE Power Engineering Society Winter Meeting. Conference Proceedings (Cat. No.00CH37077), Singapore, 23–27 January 2000; pp. 291–294. [Google Scholar]
  35. Rumelhart, D.F.; Hinton, G.E.; Wiliams, R.J. Learning internal representation by error propagation. In Parallel Distributed Processing: Foundation; Rumelhart, D.E., McClelland, D.E., Group, P.R., Eds.; The MIT Press: Cambridge, MA, USA, 1987; Volume 1, pp. 318–362. [Google Scholar]
  36. Aron, J.L.; Schwartz, I.B. Seasonality and period-doubling bifurcations in an epidemic model. J. Theor. Biol. 1984, 110, 665–679. [Google Scholar] [CrossRef]
  37. Holko, A.; Medrek, M.; Pastuszak, Z.; Phusavat, K. Epidemiological modeling with a population density map-based cellular automata simulation system. Expert Syst. Appl. 2016, 48, 1–8. [Google Scholar] [CrossRef]
  38. Zhou, J.; Zhao, Y.; Ye, Y. Complex dynamics and control strategies of SEIR heterogeneous network model with saturated treatment. Phys. A 2022, 608, 128287. [Google Scholar] [CrossRef]
  39. Meng, L.; Zhu, W. Analysis of SEIR epidemic patch model with nonlinear incidence rate, vaccination and quarantine strategies. Math. Comput. Simul. 2022, 200, 489–503. [Google Scholar] [CrossRef]
  40. Wang, Z.; Zhang, Q. Near-optimal control of a stochastic partial differential equation SEIR epidemic model under economic constraints. Eur. J. Control 2023, 69, 100757. [Google Scholar] [CrossRef]
  41. Kar, T.K.; Batabyal, A. Stability analysis and optimal control of an SIR epidemic model with vaccination. BioSystems 2011, 104, 127–135. [Google Scholar] [CrossRef]
Figure 1. Adaptive critic neural network simulation of optimal control u ^ ( t ) with the initial condition ψ s ( t ) = ( 8 , 3 , 2 , 1 ) ( 2 + c o s ( 2 π p ) ) and adaptive critic neural networks simulation of optimal feedback law for 18,000 x k state input signal (optimal control u ^ ( t ) depending on the input xk).
Figure 1. Adaptive critic neural network simulation of optimal control u ^ ( t ) with the initial condition ψ s ( t ) = ( 8 , 3 , 2 , 1 ) ( 2 + c o s ( 2 π p ) ) and adaptive critic neural networks simulation of optimal feedback law for 18,000 x k state input signal (optimal control u ^ ( t ) depending on the input xk).
Mathematics 11 02113 g001
Figure 2. The immune population both with control and without control with the initial condition ψ s ( 0 ) = ( 8 , 3 , 2 , 1 ) ( 2 + c o s ( 2 π p ) ) .
Figure 2. The immune population both with control and without control with the initial condition ψ s ( 0 ) = ( 8 , 3 , 2 , 1 ) ( 2 + c o s ( 2 π p ) ) .
Mathematics 11 02113 g002
Figure 3. The susceptible population both with control and without control with the initial condition ψ s ( 0 ) = ( 8 , 3 , 2 , 1 ) ( 2 + c o s ( 2 π p ) ) .
Figure 3. The susceptible population both with control and without control with the initial condition ψ s ( 0 ) = ( 8 , 3 , 2 , 1 ) ( 2 + c o s ( 2 π p ) ) .
Mathematics 11 02113 g003
Figure 4. The total population size both with control and without control with the initial condition ψ s ( 0 ) = ( 8 , 3 , 2 , 1 ) ( 2 + c o s ( 2 π p ) ) .
Figure 4. The total population size both with control and without control with the initial condition ψ s ( 0 ) = ( 8 , 3 , 2 , 1 ) ( 2 + c o s ( 2 π p ) ) .
Mathematics 11 02113 g004
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

Kmet, T.; Kmetova, M.; Végh, L. Neural Networks Simulation of Distributed SEIR System. Mathematics 2023, 11, 2113. https://doi.org/10.3390/math11092113

AMA Style

Kmet T, Kmetova M, Végh L. Neural Networks Simulation of Distributed SEIR System. Mathematics. 2023; 11(9):2113. https://doi.org/10.3390/math11092113

Chicago/Turabian Style

Kmet, Tibor, Maria Kmetova, and Ladislav Végh. 2023. "Neural Networks Simulation of Distributed SEIR System" Mathematics 11, no. 9: 2113. https://doi.org/10.3390/math11092113

APA Style

Kmet, T., Kmetova, M., & Végh, L. (2023). Neural Networks Simulation of Distributed SEIR System. Mathematics, 11(9), 2113. https://doi.org/10.3390/math11092113

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

Article Metrics

Back to TopTop