Using “GUI” programming environments to calculate the level of service at intersections

Inside busy cities, road congestion is common due to the large number of vehicles. Modifying existing infrastructure only for certain periods of peak time or for specific events involves high costs, so it is desirable to use its full capacity. At the same time those in charge of traffic optimization level infrastructure and coordination are municipalities. Based on the above premises it can be seen that for a better optimization of traffic in a critical situation and require the use of unique software for calculating traffic light times, service level, etc. The paper aims at using software platforms in “GUI” applications to be used in the context of dynamic changes in road traffic.


Introduction
The level of service indicates the degree of use (load intersection, through the transit of vehicles and a degree of creating congestion) at an intersection, translated in time constant [1] [2].
These criteria of analysis are necessary for rapid examinations imposed a junction and offers some quick values that can identify in real time where the intersection and the problems studied.
The maximum service flow rate is defined as the maximum number of vehicles that can cross a uniform road section over a given time period (preferably 15 minutes) under certain road, traffic and control conditions to maintain a certain level of service projected [8].
They are highlighted as follows: • Level A: characterizes free flow, with individual users, virtually unaffected by the presence of other traffic vehicles. • Level B: characterizes stable flows with a high degree of freedom in choosing speed and operating conditions that have little influence on other road users. • Level C: characterizes restricted flows that remain stable but interact with other participants in traffic flow. The overall comfort and safety level drops considerably. • Level D: characterizes the high-density flow in which speed and maneuverability are severely restricted, and comfort and safety are low even if the flow remains stable. • Level E: characterizes unstable flow at or near the capacity limitation, with the lowest level of comfort and safety. • Level F: corresponds to conditional traffic in which the number of vehicles arriving at a point exceeds the service possibilities and therefore creates the conditions of tail formation (traffic jams), low comfort and increased accident risk.

Designing the graphical user interface (GUI)
Designing the graphical user interface was done using the MATLAB platform, GUI mode. Figure 2 shows how the buttons, windows, etc. were arranged in the design interface of the user interface, and also figure 2 represents the graphical interface in the running mode, i.e. as seen by the user [3] [4].

Figure 2. Working window for the GUI
The main window ( Figure 2) is divided into four distinct zones [5] in order to enter the input data for the level of service calculation:  Area 1 is the area where inputs will be entered for vehicle volumes for each lane of bands existing on that arm.  Zone 2 represents the area where the saturation flow for each group of bands will be entered.  Zone 3 is the area where all the values associated with the types of traffic lights are to be entered, depending on the signal plan configuration.  Zone 4 is the group area of the control delay calculation buttons for the band groups, arms and intersection studied. In order for the software not to be stuck in an infinite loop or loop due to errors that may occur when data is entered, codes are provided on all critical areas to provide error windows. For example, one of these errors is found at the introduction of traffic phases, so this window appears if less than two phases are entered [6].

Conceiving the software instruction code
This subchapter presents the main sequence of instructions, sequences that calculate, check, and display the service level values at the intersection studied. Figure 5 shows the code for initializing the graphical interface, entering the text boxes with the default value of 0, and resetting the constants and the database to calculate the service level.  The next step is to retrieves user input into the text boxes and converts them into input variables to be entered into the service level code. After the values are transformed from string to integer variables the code for calculating the traffic capacity that takes into account the intersection geometry and all the traffic volumes stored in the database when the software is opened, is called, as can be seen in the figure 7.
After the traffic capacity is calculated the code for the flow-capacity calculation is called. All variables used in the program code are retrieved from the database, created temporarily by the software. The next code called is for the calculation of the uniform delays and incremental delays at the intersection studied, and uses "for" and "if" instructions to be able to calculate the delays values as accurately as possible depending on the intersection geometry. The next step is the call of the code for the calculation of control delays for every group of movement, the aggregation of the control delay for

Case study for a junction in Craiova city
Verification of the LOS and at the same time the functionality of the computing application made in the MatLab platform will be accomplished with data taken from an intersection in Craiova. The intersection chosen is a transfer area between two neighborhoods and the city center, as well as a critical point thanks to the municipal hospital in Craiova, as can be seen from Figure 8.  In order to be able to check the service level of the intersection studied, it is necessary to provide the software with the data on the intersection traffic lights. Thus, the greening times at the intersection reported for each phase (the northern phase has 32 seconds, the south phase has 29 seconds, the phase is 16 seconds, and the west phase has 15 seconds), were measured also. It can also be seen that the duration of the traffic light cycle is 112 seconds, and the intersection protection and release times at the end of each phase are 3 seconds of yellow and 2 seconds of red. After running the input data through the LOS calculation software, we obtained the specific intersection results studied divided into delays related to movement groups, arm and intersection.

Conclusions
The utility behind the LOS MATLAB application is being designed to help in the following aspects:  A rapid verification tool for intersection delays;  Graphical user interface as simple and intuitive as possible;  Creating the programming procedures so as to use as few resources as possible;  It is an application designed for rapid calculation so that it can be easily used by personnel without special training in the field;  Can be used on the field or in the office by changing input data very quickly to see the differences in delay time between different traffic flows;  The application can rapidly evaluate different types of signal plans based on the LOS results.