Multivariable Optimisation for Waiting-Time Minimisation at Roundabout Intersections in a Cyber-Physical Framework

The evolution of communication networks offers new possibilities for development in the automotive industry. Smart vehicles will benefit from the possibility of connecting with the infrastructure and from an extensive exchange of data between them. Furthermore, new control strategies can be developed that benefit the advantages of these communication networks. In this endeavour, the main purposes considered by the automotive industry and researchers from academia are defined by: (i) ensuring people’s safety; (ii) reducing the overall costs, and (iii) improving the traffic by maximising the fluidity. In this paper, a cyber-physical framework (CPF) to control the access of vehicles in roundabout intersections composed of two levels is proposed. Both levels correspond to the cyber part of the CPF, while the physical part is composed of the vehicles crossing the roundabout. The first level, i.e., the edge-computing layer, is based on an analytical solution that uses multivariable optimisation to minimise the waiting times of the vehicles entering a roundabout intersection and to ensure a safe crossing. The second level, i.e., the cloud-computing layer, stores information about the waiting times and trajectories of all the vehicles that cross the roundabout and uses them for long-term analysis and prediction. The simulated results show the efficacy of the proposed method, which can be easily implemented on an embedded device for real-time operation.


Introduction
The main benefit of a roundabout is that it contributes to the reduction of the number of accidents, but the fluidity of the traffic can be negatively influenced, as it is an area that can cause the production of bottlenecks. Moreover, the emissions of CO 2 increase with the number of vehicles. Therefore, various studies that analyse the efficiency of the roundabouts and other cross intersections, along with solutions to optimise them were proposed. In [1][2][3][4], the authors study the influence of the geometry of roundabouts on the number of accidents and show that the form of the roundabout directly influences this number. For example, the results from [5] prove that the angle between vehicles, which depends on the view of the drivers, and the velocity of the vehicles can negatively influence the number of crashes.
In [6], the authors proposed a solution based on a support vector machine to estimate the moment at which the vehicle leaves the roundabout using information related to the steering angle, steering velocity, and steering wheel position, and the solution has an efficiency of 95%. Furthermore, in [7], a study is proposed in which the traffic in a roundabout intersection is monitored, with the information about velocities of vehicles, steering wheel angle, geometry of the roundabout being obtained from vehicle routes. Moreover, the information includes the number of dynamic objects, presence of pedestrians, cyclists, motorcyclists and the distances between vehicles. Another solution based on intelligent methods is proposed in [8], where the vehicles are trained to cross a roundabout using the Q-learning algorithm. Furthermore, a solution based on fuzzy logic is proposed in [9] to compute the velocity for vehicles in order to ensure safe travel through the intersection and to decrease the emission of CO 2 . A solution that combines techniques of image processing and artificial intelligence to command the time when the vehicles can enter the roundabout is proposed in [10]. Another study [11], which is based on image processing, has the aim to ensure a safe entering into a roundabout for all the vehicles. In [12], an intelligent manager to determine the speed of the vehicles is proposed while considering a roundabout connected with a crossroad intersection. The obtained results illustrate an increase in the number of vehicles traversing the intersections. There were also studies performed that propose solutions to model and optimise the intersections using intelligent methods, such as Q-learning algorithms, fuzzy logic, neural networks, and neuro-inspired control [13][14][15][16][17][18].
Furthermore, there are solutions to model the traffic and to predict the vehicles flow through an intersection using Petri net models and neuro-inspired approaches [19,20]. Moreover, there are various studies in the literature that analysed the quantity of the CO 2 emissions in the intersection [21][22][23][24]. These studies analyse different kinds of roundabouts (not signalised/signalised, with different forms and number of entries/exits) [25,26]. The results prove that repeated variations of velocity contribute to an increase in emissions. In [27], the performed study demonstrates that replacing the signalised intersections with roundabouts reduces the emission of CO 2 , but the NO x value is always smaller in the signalised intersection. Furthermore, the variation of the velocity can influence the number of emissions. Another solution is proposed in [28] where, at each sample time, a matrix is built with the position of vehicles in the roundabout. The solution is supposed to find the velocity of vehicles to avoid the cases in which two or more vehicles are in the same position at the same time. Furthermore, there are analytical solutions to compute the time when the vehicles should enter the roundabout. In [29], a solution for a roundabout with only two entries/exits is proposed. In this case, a merging zone is considered in front of each entry. The entry time is determined so that if there are two vehicles from different entries that want to enter the merging area, then there can be only one vehicle in this zone. Otherwise, the vehicles can be both in the merging zone but have to maintain a safe distance between them. In [30], a manager for a roundabout intersection is proposed to determine the rate of acceleration/deceleration of vehicles to avoid the collision between them.
Nowadays, the ideas of smart cities and autonomous/automated driving are strongly related to the interconnection of vehicles with the other traffic participants, smart infrastructure and cloud-computing platforms through the so-called cyber-physical frameworks (CPFs) [31]. This paper is a sequel to our previous work in [32], in which the problem of managing a roundabout with four entries/exits through minimising the waiting times of vehicles was firstly introduced. Moreover, safety constraints were also imposed and the problem was solved using the fmincon Matlab function. In the present work, the novelty is the generalisation of this problem, considering the intersection as having n entries/exits. The main contributions of the paper are the following: (i) proposing a cyber-physical framework to manage a roundabout intersection, the solution having two levels on the cyber plane, which are illustrated in Figure 1: the first level is represented by an edge server and the video cameras from the intersection, while the second level contains a cloud computing platform; (ii) the derivation of an analytical solution to minimise the waiting times of the vehicles and to ensure a safe drive through the roundabout. The first level, i.e., the edge-computing layer, interrogates the vehicles about their exits and receives information from the cameras installed on each entering lane-the data being used to compute the waiting times for vehicles. The second level, i.e., the cloud-computing layer, stores information received from the first layer about the waiting times and trajectories of all the vehicles that cross the roundabout and uses them for long-term analysis and prediction. The proposed solution is based on classical multivariable optimisation techniques, i.e., Lagrange multipliers method and Kuhn-Tucker conditions [33], to minimise the waiting times of vehicles. The same method is used in a manifold of applications to minimise a cost function with constraints, such as [34][35][36]. Among the applications that are based on this method, one can enumerate the following: trajectory planning for unmanned ground vehicles [37], optimal control of a diesel engine [38], minimisation of fuel consumption in a hybrid electric vehicle [39], control of dynamics of a robot manipulator [40] and thermal applications [41,42]. The main advantages of our proposed solution with respect to similar works are: The consideration of a general case for a roundabout with n entries/exits; compared to the solutions in [29,30], we solve a general case of a roundabout intersection, and the solution does not depend on the number of entries/exits or number of vehicles; 2.
The analytical formulation is easily implementable on an embedded device for realtime operation in a cyber-physical framework; 3.
The methodology is suitable for fully automated and semi-automated vehicles; 4.
The results show an increased number of vehicles crossing the roundabout in a certain period of time, when compared to our previous work [32]; 5.
The safety constraints are imposed for all the involved vehicles, i.e., the ones already inside the roundabout and vehicles that want to enter; 6.
The CO 2 emissions are reduced by eliminating the acceleration/deceleration of vehicles imposing a constant velocity; 7.
Being a centralised solution, the vehicles do not have to be equipped with high computational power systems, which usually increase the costs too much.

Notation and basic definitions
Let R, R * + , Z and Z + denote the set of real, non-negative real, integer and non-negative integer numbers, respectively. I n ∈ R n×n denotes the identity matrix. Card(X) denotes the cardinal of the set X and is defined as the number of the elements of X.

Theoretical Foundation
In this section, classical multivariable optimisation techniques based on the Lagrange multipliers method and Kuhn-Tucker conditions are presented, setting the base of our solution using multivariable optimisation for waiting-time minimisation at roundabout intersections. The Lagrange multipliers method is mainly used to minimise a function with inequality and equality constraints, such as: where X = [x 1 , x 2 , . . . , x n ] T represents the vector of the optimisation variables, with n being their number, q j (X) ≤ 0 represents the inequality constraints, g k (X) = 0 represents the equality constraints, f , g j , g k , are derivable functions, m q and m g represent the number of inequality and equality constraints, respectively.
The optimal solution for Problem 1 will be derived by applying the Kuhn-Tucker conditions: where λ qj and λ gk denote the Lagrange multipliers associated with the constraints q j (X) ≤ 0 and g k (X) = 0, respectively. The gradient of function f (X) is denoted as ∇ f (X). The Kuhn-Tucker conditions (2) represent the sufficient conditions of optimality, if f is a convex function and the constraints q j (X) and g k (X) are linear or convex functions [33].
At this point, the minimum solution and optimal points of specific functions will be determined, which will help to compute in Section 4 the minimum waiting times for the vehicles that want to enter the roundabout. These functions represent mathematical expressions for specific situations that can appear in a roundabout intersection, particularly: • The roundabout is empty and only a vehicle wants to cross it; • The roundabout is empty and n vehicles want to cross it; • A vehicle wants to cross the roundabout and a vehicle is inside it.
In the remaining, the optimal solution of Problem 1 will be denoted with Solution: It can be easily seen that min( f (X)) = 0 with X * = x * 1 = 0. Solution: The gradient function f (X) can be computed as ∇ f = [x 1 , ..., x n ] T , and from ∇ f = 0 yields that x * 1 = x * 2 = · · · = x * n = 0. The Hessian matrix is given by H = I n , being positive definite (H > 0), and from the fact that x * i satisfies the constraint x * i ≥ 0, i = 1, ..., n, yields that the optimal solution is obtained for where X = x 1 , x s ∈ R * + , and c ∈ R.
The variable s can be defined as: (4) Solution: The first constraint can be rewritten as: We used that |a| = sgn(a) * a, a ∈ R. The second constraint can be rewritten as −x 1 ≤ 0. Now, the constraints |c − x 1 | ≥ x s ⇔ x s + s 1 x 1 − s 1 c ≤ 0 and x 1 ≥ 0 ⇔ −x 1 ≤ 0 are rewritten according to the constraints of Problem 1. Thus, Problem 4 can be rewritten as: Knowing that f is a convex function ( f (x 1 ) = 1 > 0, ∀x 1 ∈ R) and the constraints q 1 (x 1 ) and q 2 (x 1 ) are linear functions ∀x 1 ∈ R, the solution that satisfies the Kuhn-Tucker conditions is a solution for Problem 5. To solve Problem 5, the Kuhn-Tucker conditions given in (2) are applied: where λ 1 and λ 2 represent the Lagrange multipliers.
The solution can be computed for several cases depending on λ 1 and λ 2 . The first case will be represented by λ 1 = 0, the second case by λ 2 = 0 and the third one by λ 1 = 0 and λ 2 = 0. Next, each of the three cases will be analysed in detail.
The first and second equations in (8) yield that x 1 = λ 2 = 0 and from the third one we have: (3), and x s > 0 results that the solution x 1 = c is not a solution for Problem 4 ( Considering λ 2 = 0 in (7), the second case results: The second equation in (14) yields that x 1 = c − x s /s 1 and replacing x 1 in the first and third equations from (14) we obtain that: λ 1 = −c/s 1 + x s /s 1 and the third equation is accomplished as an equality from which yields λ 2 = 0. We used s 1 s 1 = s 1 /s 1 = 1. If In conclusion, there are two main solutions for Problem 4: It can be observed that the results (16) and (17) represent all the possible solutions of Problem 4.

Problem Definition
This section presents the following interest points: • The roundabout intersection description and the rules that manage it, extending the features introduced in our previous work [32]; • The cost function and safety constraints imposed to ensure both a safe entering into the roundabout and a minimum waiting time.

Roundabout Cyber-Physical Framework-General Information
A roundabout with n entries and exits, each of them having a single lane for both directions, is illustrated in Figure 2. The direction of the vehicles that are entering and leaving the intersection is counter-clockwise. The roundabout is controlled through a cyberphysical framework composed of two levels on the cyber plane, while the vehicles that cross the roundabout form the physical plane. As previously mentioned, the first level uses an edge-computing server with the task of a centralised manager (CM) to communicate with the vehicles to obtain data from the installed cameras and send information about traffic to the cloud platform. Using this data, the CM will compute the waiting times for the vehicles that want to enter the roundabout to avoid all collisions. The second level, which is based on a cloud-computing platform, receives traffic data from the CM, stores it and performs long-term analysis and prediction regarding the management of the roundabout.
The control area (CA) is the zone represented with turquoise. In this area, the CM asks each vehicle about its requested exit and sends to it the corresponding waiting time.
If the vehicles are not yet interrogated, then they will stop and wait in the waiting-point represented by the intersection of the red circle with each entering lane until they receive the waiting time. Furthermore, after the waiting time is received, the vehicles have to stay in the waiting-point a period of time equal to their waiting time. The CM computes the waiting time for the first vehicle from each entry in the control area, then it waits until they all enter the roundabout, marked with the grey circle. After that, it computes the waiting time for the next vehicles. This rule ensures equal priority for each entry, and the cases in which some entries are disadvantaged, thus having a higher waiting time, are excluded. By defining the cost function as a sum of all waiting times for the vehicles from each entry, a minimum global waiting time is ensured.
The main reasons for using a CM are: • The vehicles do not have to be equipped with complex algorithms to ensure a safe entry in the roundabout; • A high computational power unit for the vehicles is not required, which reduces the production costs; • The CM is a system used for a whole intersection that can benefit from a high computational power unit without increasing the costs; • The CM also employs all the information in the immediate vicinity of the roundabout, thus ensuring a global optimal solution and safety for all traffic participants.
In this work, all vehicles are considered fully automated and are moving with constant velocity, imposed by the roundabout rules. This assumption ensures economic traffic, knowing that a roundabout is a place with conglomerate traffic and the acceleration/deceleration produces more pollution due to high fuel consumption [25].
The proposed solution can be extended to vehicles that are semi-automated or driverdriven. The vehicles can communicate with the CM using different devices like navigation systems or smartphones together with a dedicated application. These can be used for sending to the CM the desired exit. After that, the CM will send to the device the waiting time and the driver can see it. When the driver arrives at the waiting-point, the application from the device starts to count a time period equal to the received waiting time. The application will announce to the driver when the waiting time has finished such that they can safely enter the roundabout. Following, the driver has to enter and cross the roundabout with a velocity as close as possible to the imposed velocity. If the vehicles are equipped with cruise control (CC) or adaptive cruise control (ACC) functionalities, this last issue is solved, and these functionalities ensure that the vehicle moves with the desired imposed velocity.
Our solution relies on existing vehicle-to-infrastructure (V2I) communication architecture with the standard IEEE802.11p for Dedicated Short-Range Communication (DSRC) [43]. The information can also be sent via wireless communication using the 4G/5G cellular interface or satellite links [44].

Multivariable Optimisation Problem with Safety Constraints
Hereafter, the cost function and the safety constraints are described, followed by the definition of the problem to be solved.
The time a vehicle spends in the roundabout depends on the waiting time and the distance between the vehicle entry and exit: where τ f i represents the time when the vehicle i ∈ Veh I N leaves the intersection, τ 0 i represents the moment when the CM has the first contact with the vehicle i, τ w i is the waiting time to be computed by the CM, τ in i is the time needed by the vehicle to travel the distance between the point when it has the first contact with the CM and the point when it enters on the lane of the roundabout, and the last term, δ i /v, represents the time needed by the vehicle to travel the distance δ i , between its entry and exit at the imposed velocity v. Note that, Veh I N = {1, 2, . . . , n k } is the array of vehicles for which the CM has to compute the waiting time at step time k, n k ≤ n, where n represents the number of entries/exits in the roundabout.
However, the proposed solution can be applied for a general case of a roundabout because it is not developed for a specific number of entries/exits of the roundabout, diameter or lane width. The dimensions of the roundabout are only required when the CM has to compute the distance to be covered by a vehicle between an entry and the desired exit.
To reduce the time each vehicle spends in the roundabout, the value of the difference represented by Equation (18) has to be minimised. In this equation, the terms τ in i and δ i /v cannot be modified and are considered as known constants, resulting in that only the term τ w i has to be minimised. Based on this, the cost function to be minimised by the CM, can be formulated as: At this point, the safety constraints have to be imposed to ensure that the vehicles will enter the roundabout without collisions: • The first constraint is imposed for the vehicles that want to enter the roundabout with respect to the vehicles that have already entered: where τ zi is the time needed by the vehicle z ∈ Veh I N zi to arrive in front of E i , i.e., the entry for vehicle i ∈ Veh I N , Veh I N zi is the set of the vehicles that are already inside the roundabout and will pass in front of entry E i , and τ sa f ety represents the safety time and corresponds to the imposed safety distance between vehicles δ sa f ety , computed as τ sa f ety = δ sa f ety /v. This constraint ensures that the vehicles i ∈ Veh I N and z ∈ Veh I N zi will not be in front of E i at the same time.

•
The second constraint takes into account the vehicles j, i ∈ Veh I N with i = j: where τ ji is the time needed by vehicle j ∈ Veh I N , i = j, to arrive in front of entry E i of vehicle i ∈ Veh I N .
In this case, the constraint ensures that the vehicles i and j will not be at the same time in front of E i , if vehicle j has to pass in front of this entry.

•
The last constraint ensures that the waiting time is positive: The CM will compute the waiting time in order to minimise the cost function (19) while satisfying all the constraints (20)- (22), defined as the following problem: Problem 6. Minimise (19) subject to: (20)- (22).

Main Theoretical Contribution
This section presents the analytical solution for Problem 6. The waiting times are determined using the theoretical solutions provided in Section 2.
Case 1: The first case is the one in which there are no vehicles inside the intersection, Veh I N zi = ∅, and only n k ≤ n vehicles want to enter the roundabout. In this case, Problem 6 will be solved using the solution of Problem 3. Considering Card(Veh I N ) = n k , Card(Veh I N ji ) = 0, Card(Veh I N zi ) = 0, Problem 6 becomes: In this case, the solution is τ w * i = 0, with J * = 0, i = 1, . . . , n k . The set Veh I N ji includes the vehicles j ∈ Veh I N that will pass in front of entry E i , i = j.
Case 2: The next situation is represented by the case in which there is a vehicle that wants to enter the intersection through entry E i and in the roundabout there is only a vehicle that will pass in front of this entry. Considering Card(Veh I N ) = 1, Card(Veh I N ji ) = 0, Card(Veh I N zi ) = 1, Problem 6 becomes: Note that (24) is the same as Problem (4) in which The solution of this problem is determined according to (16) and (17), which yields τ w * In the first case, the vehicle i ∈ Veh I N , being the vehicle that wants to enter the roundabout through entry E i , will enter in front of vehicle v zi ∈ Veh I N zi . In the second case, the vehicle v zi will pass first in front of entry E i and the vehicle i will enter the roundabout behind it. In the third case, if τ sa f ety ≥ −(τ zi − τ in i ), the solution will be τ w * i = τ sa f ety + (τ zi − τ in i ). In this last case, the vehicle will wait for the vehicle that is already in the intersection to pass first; after that, it will enter the roundabout. The distance between vehicles when vehicle i enters the roundabout is δ sa f ety = v/τ sa f ety .
Case 3: Next, the case in which there are n z vehicles inside the roundabout that will pass in front of entry E i through which vehicle i wants to enter is solved. Considering Card(Veh I N ) = 1, Card(Veh I N ji ) = 0, Card(Veh I N zi ) = n z , Problem 6 becomes: In this case, it is assumed that vehicle v zži is in front of vehicle v z(ž+1)i ,ž = 1, n z − 1, and then the problem can be solved using Algorithm 1.

Algorithm 1: Case 3
for v zži ∈ Veh I N zi do Compute the waiting time τ w v zži * i using the solution of (24); if vehicle i will pass in front of vehicle v zži then algorithm STOP: Analysing the proposed solution given by Algorithm 1 it can be noticed that for vehicle i from entry E i , the CM will compute the waiting time required to ensure a safe entry, by initially considering the first vehicle already in the roundabout, which will pass in front of E i . If vehicle i can enter the intersection in front of this vehicle, the algorithm will stop. Otherwise, it will compute the waiting time considering the next vehicle and the waiting time obtained for the first vehicle and so on.
Case 4: The last case, which is the most general and realistic one, represents the situation in which n k ≤ n vehicles want to enter the intersection, each vehicle will enter through a unique entry and in front of these entries will pass n zi vehicles that are already in the roundabout, also n ji vehicles from those n k vehicles will pass if front of entry E i , i = 1, n k . Considering that Card(Veh I N ) = n k , Card(Veh I N ji ) = n ji , Card(Veh I N zi ) = n zi , Problem 6 becomes: Furthermore, in this case, it is assumed that vehicle v zži is in front of vehicle v z(ž+1)i , z = 1, . . . , n zi − 1, i ∈ {1, 2, . . . , n k }, then the problem can be solved using Algorithm 2.

Algorithm 2: Case 4
For each vehicle, i ∈ Veh I N , the CM simultaneously performs the following steps: for v zži ∈ Veh I N zi do Compute the waiting time τ w v zži * i using the solution of (24); if vehicle i will pass in front of vehicle v zži then algorithm STOP: ; end if CM has finished to compute the waiting time τ w i for vehicle i ∈ Veh I N ji then add vehicle i in Veh I N zi in a proper position, reset τ w i , τ w i = 0, and reseť z, vehicle i ∈ Veh I N , i = i ; end end When CM finishes computing the waiting time τ w i for vehicle i ∈ Veh I N ji , then vehicle i will be added in Veh I N zi in a proper position, i.e., the vehicles from array Veh I N zi are in the same order as they will pass in front entry E i . In the case in which Card(Veh I N zi ) = 0, i ∈ Veh I N , then the waiting time τ w * i = 0 because there are no vehicles inside the roundabout to pass in front of entry E i , i.e., the case illustrated by Problem 2.

Results
In this section, the results obtained with the proposed solution are presented. The simulated intersection has four entries and four exits with the parameters illustrated in Table 1. The parameters of the roundabout directly influence the performances of the solution as follows: (i) the maximum number of vehicles in the roundabout depends on its radius and the distances between the vehicles, (ii) the velocities of the vehicles determine the time in which they cross the intersection and, (iii) the safety time, which influences the safety distance, determines the minimum distance between vehicles.
The waiting times are computed using the solution presented in Section 4. To simulate the movements of vehicles through the intersection, they were modelled using a point model that describes the longitudinal and the lateral dynamics of the vehicles. The interested reader is referred to a more detailed description in [32]. Note that the CM, knowing about the velocity of the vehicles that are entering the roundabout, can always estimate their position through the roundabout.
The rates used to generate the vehicles that want to cross the roundabout during an entire day have a Gaussian distribution and are illustrated in Figure 3. For the first entry, the average rate of the vehicles that want to enter is 1 vehicle/4.25 s, for the second-1 vehicle/4.25 s, for the third-1 vehicle/5 s, and for the fourth entry-1 vehicle/3.42 s. From this analysis, it results that through entry 2, fewer vehicles want to pass when compared to entry 4 and, at the same time, more vehicles than through entry 3.  Figure 4 illustrates two consecutive steps (upper and lower sub-figures), from which one can notice that in front of entry 4 (illustrated with cyan colour), a vehicle from entry 2 (represented with red colour) passes. It can be observed that the CM succeeds to compute a waiting time for the vehicle of entry 4 to avoid the collision and to enter the roundabout at a safe distance.   To fully test the solution, a simulation of 1 h was performed. The results are illustrated in Table 2 and represent the minimum, maximum, and the average waiting times and the number of vehicles that entered the roundabout. Furthermore, for comparison, Table 3 illustrates the results obtained with the solution from our previous work [32]. In that paper, the same problem, (6), was solved but using the Matlab function fmincon. It can be noticed that the analytical solution proposed in the current work allows more vehicles to cross the intersection compared to the solution based on the fmincon function, while the average waiting time is four times smaller for the analytical solution.  In Figure 5, the waiting times of the vehicles that cross the roundabout are illustrated. Analysing these figures, it can be observed that the values of the waiting times obtained with the analytical solution are lower compared to those obtained by the fmincon solution provided by Matlab. From these figures and Tables 2 and 3, it can also be observed that the number of vehicles that cross the roundabout has increased. Moreover, in Figure 6, one can observe that a better result is obtained for the solution presented in Section 4. It can be noticed that the results obtained using the multivariable optimisation-based analytical solution proposed in this paper outperforms the results obtained in our previous work [32]. Since the average waiting times for each entry has decreased, this leads to an increased number of vehicles that crossed the roundabout. The simulation was done using Matlab R2016a, on a system equipped with a Core i7 processor and 8GB memory RAM. The computational times for both the proposed solution and the comparative fmincon solution from [32] are illustrated in Figure 7. Because the required computational average time needed by the CM, implemented based on the proposed analytical solution, to obtain the waiting time is smaller than the average time needed by the fmincon function, i.e., 0.0066 s < 0.035 s , results that the proposed analytical solution can be implemented on a real-time equipment with minimum costs. Another advantage is given by its overall implementation simplicity, when compared to the fmincon function.

Conclusions
The main contribution of this paper is represented by the proposed cyber-physical framework based on an analytical solution for a roundabout intersection with n entries and exits with the aim of minimising the waiting times of the vehicles entering the intersection and ensuring a safe crossing. The results show that the proposed methodology is robust and can be easily implemented on an embedded device for real-time operation. The robustness of the solution is given by the capability of the CM to compute the optimal waiting times, independent of: (i) the number of entries/exits of the roundabout, (ii) the imposed velocity for the vehicles or (iii) the number of vehicles that want to cross the intersection.
Future work will focus on improving the proposed solution to consider roundabouts with multiple lanes, vehicles moving with variable velocities and mixed traffic.