Available online at www.sciencedirect.com Available online at www.sciencedirect.com
ScienceDirect ScienceDirect
Procedia Computer Science 00 (2019) 000–000 Procedia Computer Science 00 (2019) 000–000
Available online at www.sciencedirect.com
ScienceDirect
www.elsevier.com/locate/procedia www.elsevier.com/locate/procedia
Procedia Computer Science 150 (2019) 302–308
13th International Symposium “Intelligent Systems” (INTELS’18) 13th International Symposium “Intelligent Systems” (INTELS’18)
Optimal Control for Traffic Flows in the Urban Road Networks and Optimal Control for Traffic Flows in the Urban Road Networks and Its Solution by Variational Genetic Algorithm Its Solution by Variational Genetic Algorithm a a
E.A. Sofronovaa,b, *, A.A. Belyakovbb, D.B. Khamadiyarovbb a,b, E.A. Sofronova *, A.A. Belyakov , D.B. Khamadiyarov
Federal Research Center “Computer Science and Control” of RAS, Vavilova str. 44 b. 2, Moscow 119333, Russia b RUDN University, 6, Miklukho-Maklaya str., Moscow Federal Research Center “Computer Science and Control” of RAS, Vavilova117198, str. 44 b.Russia 2, Moscow 119333, Russia b RUDN University, 6, Miklukho-Maklaya str., Moscow 117198, Russia
Abstract Abstract A study is aimed at development and research of mathematical models and algorithms for traffic flows control in urban road networks. optimal control problem formathematical traffic flows in urbanand networks is given. feature of the problem is thatroad the A study isAn aimed at development and statement research of models algorithms for A traffic flows control in urban networks. An optimal control probleminstatement for traffic flows inAurban networks is given.by A the feature of the of problem that the model of control object is presented finite-difference equations. control is constrained durations active is phases of traffic lights at intersections. The solution is a control program thatAdetermines the momentsbyfor switching. A variational model of control object is presented in finite-difference equations. control is constrained thephase durations of active phases of genetic algorithm is used to solve problem. traffic lights at intersections. The the solution is a control program that determines the moments for phase switching. A variational genetic algorithm is used to solve the problem. © 2019 The Author(s). Published by Elsevier B.V. © 2019 The Authors. Published by Elsevier B.V. This is an open access article underbythe CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) © 2019 The Author(s). Published Elsevier B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) This is an open access article under the CC BY-NC-ND license Peer-review under responsibility of the scientific committee of 13th Peer-review under responsibility of the scientific committee of the the (https://creativecommons.org/licenses/by-nc-nd/4.0/) 13th International International Symposium Symposium “Intelligent “IntelligentSystems” Systems”(INTELS’18) (INTELS’18). Peer-review under responsibility of the scientific committee of the 13th International Symposium “Intelligent Systems” (INTELS’18) Keywords: traffic flow control; controlled networks; optimal control; evolutionary algorithms. Keywords: traffic flow control; controlled networks; optimal control; evolutionary algorithms.
1. Introduction 1. Introduction A problem of traffic control has been known for a long time. The basics of estimation and analysis of traffic flows A problem traffic controlthat hasinfluence been known a long time. The basicsThe of estimation and analysis of in traffic flows parameters as of well as factors themforwere described in [1,2]. first microscopic model, which the parameters as well as factors that influence them were described in [1,2]. The first microscopic model, in which movement of a traffic flow was considered from the position of continuum mechanics, was proposed in 1955the in movement of aAtraffic flow was considered from the position of continuum was proposed in 1955 in papers [3,4]. formation of mathematical studies on traffic flows into mechanics, an independent branch of applied papers [3,4]. A formation of mathematical studies on traffic flows into an independent branch of applied mathematics began with work [5]. Currently, a large number of scientists are engaged in solving this problem, but it mathematics began with work Currently, can be said with confidence that[5]. it has not beena large solvednumber yet. of scientists are engaged in solving this problem, but it can be said with confidence that it has not been solved yet.
* Corresponding author. address:author.
[email protected] * E-mail Corresponding E-mail address:
[email protected] 1877-0509 © 2019 The Author(s). Published by Elsevier B.V. This is an open access underPublished the CC BY-NC-ND 1877-0509 © 2019 The article Author(s). by Elsevier license B.V. (https://creativecommons.org/licenses/by-nc-nd/4.0/) Peer-review under responsibility of the scientific committee of the 13th International Symposium “Intelligent Systems” (INTELS’18) This is an open access article under CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) Peer-review under responsibility of the scientific committee of the 13th International Symposium “Intelligent Systems” (INTELS’18)
1877-0509 © 2019 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/) Peer-review under responsibility of the scientific committee of the 13th International Symposium “Intelligent Systems” (INTELS’18). 10.1016/j.procs.2019.02.056
2
E.A. Sofronova et al. / Procedia Computer Science 150 (2019) 302–308 E.A. Sofronova et al. / Procedia Computer Science 00 (2019) 000–000
303
In our opinion, it has not been solved because of lack of a good mathematical model for describing traffic. A control object, traffic flow in urban road network, is very complex. If it could be described as a control object model in the form of x f ( x, u) , then for this model we could easily formulate an optimal control problem, a control synthesis problem, a problem of optimal regulation, etc. After that applying various numerical methods we could find solutions to these problems. The key point here is that we do not have a model in the form x f ( x, u) . In this study, we use a model built using theory of controlled networks [6,7]. The application of this approach does not allow us to obtain differential equations, but it gives the opportunity to obtain a system of recurrent finitedifference equations, which describes the change in the number of vehicles on each road section at each time step. This is an approximate analogue of the description of the numerical solution of differential equations. As a state vector, we use a parameter characterizing the number of vehicles on each section of the road network. The number of road sections determines the dimension of the state space of the considered control object. The model, built using the theory of controlled networks, takes into account the structure of roads accessible to traffic and the change in the network in accordance with the signals of traffic lights. The change in the state vector is due to maneuvers between road sections. The control of an object is determined by the duration of the phases of traffic lights at regulated intersections. Control provides permission or prohibition of some maneuvers between sections. To build a traffic control model we need to know the configuration of the roads, i.e. their connection to regulated intersections, as well as maneuver carrying capacity and traffic distribution at the intersection in different directions. In papers [8-10], the model under consideration was improved by extension. A method was developed to combine the subnetworks from which the complete model is assembled. The disadvantage of the model was that its accuracy strongly depends on the accuracy of network parameters determination, the throughput capabilities of intersections and the distribution of traffic flows in the directions of possible maneuvers. These parameters depend on many factors, including the day time, weather conditions, traffic accidents, road repairs, etc. Their variations lead to the fact that, calculated by the model, the duration of the active phases of traffic lights under the changed conditions become non-optimal, and the actual values of the output flows on the road sections differ from the simulated values. To eliminate this drawback, it was proposed to use artificial neural networks to refine the model parameters.
2. Mathematical model of control object A mathematical model of traffic flows based on the controlled networks [6,7] has the following form: x( k ) x(k 1) ((x(k 1)1TL ) A (u(k )) D ((x(k 1)1TL ) A (u(k )) D A (u(k )) B))1 L T
((x(k 1)1TL ) A(u(k )) D ((x(k 1)1L ) A(u(k ))
(1)
D A (u(k )) B))T 1 L δ(k ) ,
where L is a number of road sections, is an Adamard product, δ(k ) [1 (k ) L (k )]T , i (k ) is a randomly given value of the incoming flow to road section i , i 1,, L ; A [ai, j ] , ai, j {0,1} , i,j 1,, L is an adjacency matrix of the network graph; B [bi , j ] , bi , j R1 {0} is a capacity matrix, bi , j describes the flow from the road section i to the section j
at some period of time; D [d i , j ] , d i , j [0;1] is a distribution matrix, d i , j shows what part of the flow on section i makes a maneuver to section j . All sections of roads must satisfy the condition
L
d i, j 1 , i 1,, L ; j 1
304
Sofronova al. / Procedia Computer Science 150 (2019) 302–308 E.A.E.A. Sofronova et al.et/ Procedia Computer Science 00 (2019) 000–000
3
u [u1 u M ]T , ui {0, , ui } is a control vector, where ui is an index of traffic light phase at the intersection i , u i is a maximum number of active phases at the intersection i , i 1, , M , M is a number of intersections in the network; 1, if ai , j 1, u ci , j {Fi , j } ; A (u) [ai , j (u)] is a matrix of configurations, ai , j u 0, otherwise
C [ci , j ] , ci , j 1, , M is control matrix, ci , j is an index of the intersection on which the maneuver from
section i to section j is possible; F [ Fi , j ] , i, j 1,, L is a matrix of the traffic lights phases, Fi , j { f i , j ,1 , , f i , j ,k (ci , j ) } , f i , j ,r {0, u ci , j } , 1 r k (ci , j ) , u ci , j is a maximum number of active phases at the intersection ci , j , k (ci , j ) is a maximum length of
traffic light phase that allows maneuver from section i to section j at intersection ci , j , Fi, j is a set of phase indices that allow maneuver from section i to section j . All matrices are identical in structure: bi , j 0 , ci , j 0 , d i , j 0 , Fi, j , if ai , j 1 , otherwise bi , j 0 , ci , j 0 , d i , j 0 , Fi , j 0 .
To describe the parameters of the road flow, we introduce time intervals, t . We assume that the lengths of all phases are integers. All traffic lights are synchronized, so that the countdown of entire time intervals at all traffic lights of the network occurs simultaneously. To describe the quantitative characteristics of the flow for each section of roads we use the flow state vector x(t k ) [ x1 (t k ) x L (t k )]T ,
(2)
where x j (t k ) is a number of cars at section j in time t k , x j (t k ) R1 , j 1,, L , k 0,, N , N is a number of control intervals. 3. Optimal control problem statement
A mathematical model of traffic flow is given (1). An initial state of traffic flow is x(0) x 0 [ x10 , , x N0 ]T ,
(3)
where N is the number of road sections in the entire network. The duration of the control process is K f . Restrictions on the values of some components of the state vector are specified x [ x1 , , x N ]T .
(4)
J 1 xi ( K f ) min
(5)
xi ( K f ) x j ( K f ) min
(6)
One of the control quality criteria is given
iI1
J2
iI 0
jI1
4
E.A. Sofronova et al. / Procedia Computer Science 150 (2019) 302–308 E.A. Sofronova et al. / Procedia Computer Science 00 (2019) 000–000
J3
J4
305
Kf
( xi (k ) xi )( xi (k ) xi ) J1 min
(7)
k 0 iI 0 I1 Kf
( xi (k ) xi )( xi (k ) xi ) J 2 min
(8)
k 0 iI 0 I1
where I 0 is the set of numbers of the components of the state vector (3) associated with the entrance sections of roads in the network, I1 is the set of numbers of the components of the state vector (3) associated with the output sections of roads in the network, 1, if a 0 . (a ) 0 - otherwise
~ () that would provide at least one selected functional (5) - (8) It is necessary to find a control program u ~ () (u ~ (0), , u ~ ( K )) , u f
(9)
~ (k ) [u~ (k ) u~ (k )]T , u 1 m
(10)
where u~ j (k ) {0,1} , j 1,, m , m is a number of regulated intersections. Since the order of switching the phases of traffic lights does not change, the control program determines the moments of switching the phase at an adjustable intersection. In the control program, 1 indicates the switching of the current phase of the traffic light to the next phase in the specified order, and 0 keeps the phase unchanged. When the maximum phase number u i is reached, the phase switches to the initial, ~ ui ( k ) (ui ( k 1) 1) mod ui , if ui ( k ) 1 . ui (k 1) - otherwise
The number of cycles in which the phase remains unchanged is limited from above and below
u~ j a j b j u~ j , where a j , b j are the nearest numbers of cycles in which program control takes the value 1, u~ j (a j ) 1 , u~ j (b j ) 1 , u~ j , u~ j are lower and upper permissible number of cycles of one working phase of the traffic light. Between moments a , b the values of components of the program control are equal to zero, u~ (a i ) 0 , i 1, , b a . j
j
j
j
j
j
The search for the elements of the control program matrix is performed using one of the evolutionary algorithms, the variational genetic algorithm [11]. 4. Variational genetic algorithm for optimal control problem
To solve the optimal control problem, we use a modification of the genetic algorithm, a variational genetic algorithm [11]. To implement the algorithm, we assign one basic program control and a set of small variations of the basic solution [12].
306
E.A. Sofronova et al. / Procedia Computer Science 150 (2019) 302–308 E.A. Sofronova et al. / Procedia Computer Science 00 (2019) 000–000
5
Define the basic solution in the form of a control program for each simulation cycle
~ 0 () (u ~ 0 (0), , u ~ 0 ( K )) u f
(11)
According to the principle of small variations of the basis solution [12], we introduce the vector of small variations w [ w1 w2 w3 ]T ,
(12)
where w1 is an index of intersection, w1 {1, , m} , w2 is a control time index, w2 {1, , K f } , w3 is a new value of the control program element, w3 {0,1} . The action of the vector of small variations (12) on the basic solution (11) leads to a change in the control program ~ () u~ ( w ) w . w u w1 2 3
(13)
A variational genetic algorithm works with ordered sets of variation vectors. Each set of variation vectors contains a certain number of vectors of small variations. An ordered set of variation vectors acts sequentially on the basic control program and transforms the basic solution into one of the possible solutions to the problem. The main genetic operations, crossover and mutation, are performed on ordered sets of vectors of variation. The initial set of possible solutions consists of a basic solution (11) and a set of ordered sets of vectors of small variations W (W0 , , WH ) ,
(14)
Wi (w i ,1 , , w i , L ) ,
(15)
where Wi is an ordered set of variation vectors,
L w i , j [ w1i , j w2i , j w3i , j ]T , i 1, , H , j 1,, L , W0 (0 3 , ,0 3 ) , 0 [0 0]T , the zero vector of variations ~ () u ~ () . does not change the possible solution, 0 u
3
Each ordered set of vectors of small variations defines a new possible solution after affecting the basic solution ~ 0 () w i ,1 w i , 2 w i , L u ~ 0 () , W u ~ 0 () u ~ 0 () . Wi u 0
(16)
We calculate the quality criterion values for each element of the set of possible solutions ~ 0 ()), f J (W u ~ 0 ()), , f J (W u ~ 0 ())) . F ( f 0 J (u H H 1 1
Next, we find the best possible solution from the entire set of solutions
f min{ f 0 , , f H } .
(17)
6
E.A. Sofronova et al. / Procedia Computer Science 150 (2019) 302–308 E.A. Sofronova et al. / Procedia Computer Science 00 (2019) 000–000
307
3.1. Crossover To perform crossover operation, we randomly select two ordered sets of vectors of variations from the initial set W (w ,1 , , w , L ) and W (w ,1 , , w , L ) . Calculate the probability of crossover f f Pr max , . f f
We generate a random number in the range from 0 to 1, [0,1] . If Pr , then perform the crossover. Randomly select the crossing point and exchange items among the selected sets after the crossing point. As a result, we obtain two new ordered sets of variation vectors, which define two new possible solutions. Randomly select the crossover point {1, , L} and exchange items among the selected sets after the crossover point. As a result, we obtain two new ordered sets of variation vectors, which define two new possible solutions WH 1 (w ,1 , , w , 1 , w , , , w , L ) ,
(18)
WH 2 (w ,1 , , w , 1 , w , , , w , L ) .
(19)
3.2. Mutation To perform the mutation for each of the new ordered sets that define new possible solutions WH 1 and WH 2 we randomly find the point of mutation i {1, , L} , i 1,2 , and generate new vectors of small variations, w i , H i [ w1i , H i , w2 i , H i w3i , H i ]T , i 1,2 , which we place in the corresponding randomly found positions i , i 1,2 , in the ordered set of variation vectors. We recalculate the value of the functional for the first new possible solution ~ 0 ()) . f H 1 J (WH 1 u
(20)
On the set of values of the functionals we find the worst solution with the maximum value of the functional f i max{ f 0 , , f H } .
(21)
If the value of the functional of the first new solution f H 1 is less than the maximum found on the set of values of the functionals f i , then we replace the worst solution with a new possible solution, Wi WH 1 , f i f H 1 . We perform the same actions for the second new possible solution. We calculate the value of the functional for the second new possible solution ~ 0 ()) . f H 2 J (WH 2 u
(22)
On the set of values of functionals we find the worst possible solution f i max{ f 0 , , f H } .
(23)
308
E.A. Sofronova et al. / Procedia Computer Science 150 (2019) 302–308 E.A. Sofronova et al. / Procedia Computer Science 00 (2019) 000–000
7
If the value of the functional for the second new possible solution f H 2 is less than the value of the functional for the worst possible solution, then we replace the worst possible solution with the new second possible solution, Wi WH 2 , f i f H 2 . Repeat the operation of crossover and mutation a given number of times. After performing these operations, we replace the basic solution by the best solution found by this time. After that, we calculate the new values of the functional (17). Thus the basic solution is changed given number of times, and the calculations are complete. We consider the solution found to be the best possible solution found by this moment. The developed algorithm was used to solve the problem of traffic optimal control for a part of the Moscow road network. The following parameters of variational genetic algorithm were used: the power of initial set of possible solutions – 1024, the power of the set of variation vectors – 8; the probability of mutation – 0.7; the number of generations – 128, the number of crossovers in each generation – 128, the number of generations before the change of the basic solution – 17. Acknowledgements Research was supported by the Russian Foundation of Basic Researches, project № 16-08-00639-a. References Greenshields BD, Bibbins JR, Channing WS, Miller HH. A study of traffic capacity. In: Proc. Highw. Res. Bd, Wash. 14:448–477. Aangenendt JJM, Van Gils JFL, Boost AGM. Studies of traffic and of the conditions which influence it. In: Ninth Congress of the Permanent International Association of Road Congresses; 1951. Sec. 2, Qun. III, Rep. No.42. [3] Lighthill MJ, FRS, Whitham GB. On kinetic waves II. A theory of traffic flow on crowded roads. In: Proc. Of the Royal Society Ser. A. 1955;229(1178):317–345. [4] Whitham GB. Linear and nonlinear waves. John Wiley & Sons Inc. 1974. [5] Haight FA. Mathematical theories of traffic flow. Academic Press, 1963. 241 p. [6] Diveev AI. Controlled networks and their applications. Computational Mathematics and Mathematical Physics 2008;48(8):1428–42. [7] Alnovani GHA, Diveev AI, Pupkov KA, Sofronova EA. Control Synthesis for Traffic Simulation in the Urban Road Network. In: Proc. of the 18th IFAC World Congress 2011. p. 2196–2201. [8] Diveev AI, Sofronova EA. Synthesis of Intelligent Control of Traffic Flows in Urban Roads Based on the Logical Network Operator Method. In: Proc. of European Control Conference (ECC-2013) 2013. p. 3512–3517. [9] Diveev AI, Sofronova EA, Mikhalev VA. Model Predictive Control for Urban Traffic Flows In: Proc. 2016 IEEE International Conference on Systems, Man, and Cybernetics (SMC 2016) 2016. p. 3051–3056. [10] Diveev AI, Sofronova EA, Mikhalev VA, Belyakov AA. Intelligent Traffic Flows Control Software for Megapolis. Procedia Computer Science 2017;103:20–27. [11] Diveev AI. Small Variations of Basic Solution Method for Non-numerical Optimization. In: Proc. of 16th IFAC Workshop on Control Applications of Optimization (CAO’ 2015) 2015. p. 28–33. [12] Diveev AI, Sofronova EA. The Network Operator Method for Search of the Most Suitable Mathematical Equation. In: Bio-Inspired Computational Algorithms and Their Applications, edited by Shangce Gao. Intech; 2012. p. 19–42. [1] [2]