Development of a System for Assessing Passenger Traffic Based on Fuzzy Logic

A methodology has been developed for assessing public transport passenger traffic in the city. A mathematical model based on fuzzy logic is presented. The main criteria for assessing the attractiveness of passenger traffic are: the interval between vehicles, technical condition of the vehicle, route length, time of day. In the mathematical model, all input linguistic variables and output variable, their terms and membership functions are described. A fragment of a fuzzy knowledge base presented in the form of production rules is presented. At the exit, the dispatcher receives an output variable – the degree of confidence in the attractiveness of the route. Based on this assessment, the dispatcher can make a number of necessary changes to improve the functioning of the route. The software is implemented as a web service. This software will be convenient for dispatchers to use for planning public transport routes. Fifteen selected routes were taken for research, which are the most popular in the city. These routes were proposed for evaluation by three controllers. The results obtained from dispatchers were compared with the results of the fuzzy inference implemented in the software. The main advantage of using this software product is the ability to build a dynamic schedule based on the analysis of the dispatcher. This, in turn, will allow passengers to receive a better transportation service within the city.


Introduction
Passenger traffic affects the functioning of human life in the modern world. Economic indicators, production and simply the standard of living of the population depend on the speed and quality of transportation. The main task of passenger transport is the timely movement of users from one point to another. It is important for passengers that during the hours when they need to go to work or from it, transport runs more often. The choice of the route number also depends on how much faster one or the other will cover the distance from the initial to the final station [1].
As for such a parameter as technical condition, it becomes less significant during rush hours. The main problem of people at such a time is to get to the last point of travel, even sacrificing comfort. Since there is an incorrect distribution of transport or its lack. All this happens because the passenger traffic data is not updated, the routes change dynamically and they are not adjusted to the modern needs of people. Passenger traffic estimation data can help the dispatcher in scheduling, improve transportation and passenger satisfaction during the trip. This would have a positive effect on the city's transport infrastructure. Trip schedules could be adjusted and drawn up so that drivers, on the one hand, do not stand idle, and on the other, do not drive empty. The purpose of this work is to investigate the operation of urban route transport, analyze the criteria affecting the assessment of passenger traffic and build a fuzzy model for assessing passenger traffic. It is necessary to implement the developed mathematical model in the form of a software product for conducting experiments.
Today there are many works devoted to the assessment of passenger traffic. So in the work [2], a three-phase fuzzy inference system (FIS) was proposed, where it was proposed to compare social and demographic variables to the total number of trips.
These works shows that the key condition for successfully predicting the future is the correct analysis of what already exists. The main task was to describe as accurately as possible human choice, which is more consistent with fuzzy logic compared to clear mathematics [3,4]. Fuzzy logic can be a logical way to reflect such areas.
The work [4] did not take into account the influence of weather, seasons and urban culture during the assessment studies. At the same time, due to different weather and seasons, the condition of people is very different [5], which can also affect the pleasure of riding. Also, the problem is not taken into account how many buses passengers can choose to the same place. Riding pleasure influences passengers' decision to choose a line. This is also a direction for future research.
In [6], a model for predicting traffic volume based on fuzzy logic was presented, where the input variables were weeks and time of day, and the output was the predicted traffic volume. Regarding the criteria for the attractiveness of the route, in the work [7], the significance of factors influencing the choice of passengers was investigated. Their comparison was carried out by the field method using questionnaires, after which a rating was made of such factors as travel time, fare, waiting time, number of transfers, etc.
The paper [8] also uses a nonlinear regression equation to obtain an indicator of the quality of passenger transportation.
Analysis of decision-making problems for assessing passenger traffic showed that to solve problems, it is necessary to use processing approaches in conditions of fuzzy information.

Methods
Estimation of passenger traffic consists of many factors intertwined with each other. After analyzing various methods for solving this problem and revising similar problems, it was decided to take fuzzy logic as a basis. To estimate passenger traffic using fuzzy logic, it is necessary to select the parameters, indicate the range of values that the parameters can take, and select the membership functions. There are many membership functions. But for this problem, a sigmoid and generalized bell was singled out [9,10]. They are non-linear and do not have sharp peaks.
According to the subject area, the main criteria were selected that affect the passenger traffic. A fuzzy model for calculating the degree of confidence in the attractiveness of passenger traffic is presented in the following form: where {V} is a set of input linguistic variables; {R} is a set of production rules; {W} is a set of output linguistic variables.  A fragment of a fuzzy knowledge base presented in the form of production rules is presented. At the exit, the dispatcher receives an output variable -the degree of confidence in the attractiveness of the route. Based on this assessment, the dispatcher can make a number of necessary changes to improve the functioning of the route. The software is implemented as a web service. This software will be convenient for dispatchers to use for planning public transport routes. Fifteen selected routes were taken for research, which are the most popular in the city. These routes were proposed for evaluation by three controllers. The results obtained from dispatchers were compared with the results of the fuzzy inference implemented in the software. The main advantage of using this software product is the ability to build a dynamic schedule based on the analysis of the dispatcher. This, in turn, will allow passengers to receive a better transportation service within the city. Keywords: passenger traffic, decision support, fuzzy mathematical model, degree of confidence in the attractiveness of passenger traffic, software.

DEVELOPMENT OF A SYSTEM FOR ASSESS-ING PASSENGER TRAFFIC BASED ON FUZZY LOGIC
The parameter will be measured as a percentage, and its range will reach from 0 to 100 %. Where values closer to 0 will indicate a worse condition than those closer to 100. Such a term as «very bad» was not introduced, since with such an unsatisfactory condition of the vehicle, it should not be released on the route at all. Name of terms CB is a bad, CM is a middle, CG is a good, CE is an excellent. Membership functions for terms CB, CE are the sigmoid membership function, CM, CG are the generalized bell. The length of the route will be measured in the number of stops along the route. Its range is from 0 to 50. The shorter the distance for the passenger from the initial stop, where it got into the vehicle, to the final one, the less time it will spend on the road and the more attractive the route will be for it. Name of terms MS is a short, MM is a middle, ML is a long. Membership functions for terms MS, ML are the sigmoid membership function, MM is a generalized bell. R R R each rule is represented in the form of fuzzy products [9]. The knowledge of experts is incorporated into the software product. In total, 180 rules were created that describe all possible combinations of terms of linguistic variables.
The rules are set by experts on the basis of subjective preferences and are not random.
The attractiveness of the route is influenced by all input parameters: the interval between vehicles, technical condition of the vehicle, route length, time of day. Depending on them, the output variable will be formed, with the help of which it is possible to estimate the passenger traffic. The closer the value is to one, the more confidence the passenger will choose this route as it is the most attractive.
The linguistic variable ω 1 is defined by a tuple<ω 1 , T(ω 1 ), X>, where ω 1 =«the degree of confidence in the attractiveness of the route» T(ω 1 )={PS, PM, PL}, X=[0; 1]. Name of terms PS is a little, PM is a middle, PL is a large. Membership functions for terms PS, PL are the sigmoid membership function, PM is a generalized bell.

Results
To conduct an experiment to determine the attractiveness of the route, 15 routes were selected. Among the routes tested were all possible combinations of the interval between vehicles, technical condition of the vehicle, route length and time of day.
All data was taken from the system with real routes of the city of Mariupol, Ukraine.
Let's conduct an experiment to check the effectiveness of the implementation of the proposed decision support method for assessing passenger traffic for an ordinary user (dispatcher). The system contains the knowledge of an expert, if the system is used by an ordinary user, its opinion is subjective. If a decision is made by an ordinary person, mistakes may be made. When modeling the experiment, various route options were chosen in order to explore the subject area as a whole and operate with more reliable data. To check the reliability of the results obtained, 3 dispatchers were involved. The dispatchers had to evaluate the routes according to the provided terms. Fig. 1 shows the results of decision-making on the assessment of passenger traffic by ordinary users. Solution dispatchers are shown as circles. The results of the system are presented as crosses.
The system makes a decision based on the knowledge of experts.
Each dispatcher appreciated the attractiveness of the route for its own thoughts and calculations. And each of the users' ratings slightly scattered both among themselves and between the system. From Fig. 1 it is possible to see that the results of decisions of dispatchers and the system coincide by only 25 %. Consequently, the system makes a decision more efficiently in comparison with an ordinary user.
The time spent by the dispatchers on the analysis was also noted, the speed of each dispatcher is individual. Each person has a different pace of work, and there are many factors that can affect the overall performance. The software realizes the analysis almost instantly, while the speed is almost unchanged. Naturall, the speed of the software is much faster than the speed of the dispatcher. The proposed mathematical model formed the basis of the software. The experimental prototype was implemented as a web interface for user convenience. Any route can be evaluated in the software and multiple routes can be compared. Fig. 2 shows the result of the system based on the developed fuzzy model for assessing passenger traffic. The last column shows the degree of confidence in the attractiveness of the route. Fig. 3 shows a data visualization for route comparison. On the x-axis are the route numbers, on the y-axis is the gradation of the values of the input variables. The data is additionally converted into a 100-point system for greater clarity This visualization helps the user to compare similar routes.
The total value of the column shows the most attractive route. In addition, the influence of each parameter on the final assessment of passenger traffic is clearly seen in the form of a share ratio.   The given route attractiveness diagram shows the ratio of the input parameters to the original. This diagram can be saved to a computer for further work or analysis.

Discussion
The developed experimental model of the passenger traffic assessment system allows the dispatcher to determine the attractiveness of routes. The system is designed to facilitate the dispatcher's work to assess passenger traffic by determining the attractiveness of routes, which can be used to reassign transport during rush hours and congestion of routes.
The study confirms that the use of this method reduces the time for analyzing passenger traffic and allows for a more accurate assessment of the congestion of public transport. To date, in the city where the study was conducted, the schedule is not dynamically adjusted, the exception is critical situations. The use of the obtained results will allow the dispatcher to build a dynamic schedule at different times of the day using the system to assess the attractiveness of routes. This technique can be used to support decision-making for a dispatcher when adding new routes or changing existing ones in any city of Ukraine.

Сonclusions
As part of this work, the main criteria were identified that affect the assessment of passenger traffic, namely: the interval between vehicles; technical condition of the vehicle; route length; Times of Day. A mathematical model for assessing passenger traffic was built. The mathematical model is presented in the form of a fuzzy model with four input linguistic variables of one output variable; the system contains one hundred and eighty production rules. The rules were built on the knowledge of subject matter experts. The developed mathematical model formed the basis for a test prototype of software for evaluating passenger traffic, presented in the  The results obtained indicate that the system, based on the knowledge of experts, estimates the attractiveness of passenger traffic more accurately than an ordinary user (dispatcher). All this together will help improve passenger traffic in public transport, reduce negative impressions from its use and improve the city's infrastructure.