Variability of Passenger Satisfaction Depended on Choosing a Type of Transport on the Constant Transport Infrastructure

As a basic approach, a system with shared interests is used. The situation is considered when a passenger chooses between two types of transport: personal and public. Quality parameters of the route network and road infrastructure are fixed. A simulation model based on reinforcement learning. For the first time, a mechanism for finding the best option in the unchanged conditions of the route network, taking into account information about neighbors, was demonstrated. Our goal is to clarify the mechanism of choice based on satisfaction, which depends on comparing the quality of services in the past with that of the neighbors.


I. INTRODUCTION
This work is devoted to the study of satisfaction in relationships, transport companies and passengers in a system with shared interests. In order to formulate the concept of a system with shared interests [1], we need to introduce some notation.
We will denote the set of regulators A (authorities), the set of executors -E (executers), the set of consumers -(customer).
is the set of all subsets of an arbitrary set (Boolean of ). The set of real numbers is traditionally denoted by .
A system with shared interests is a collection th h h h h , where t , , t are the functions of interaction. A natural example of systems with shared interests is the system of public transport services. In this paper we investigate the interaction function [2]. Specifically, we are interested in how the quality of transportation servicesinteraction function -affects our satisfaction. Our goal is to build an imitation model of satisfaction. On the same route network on different days, a lot of passengers may unexpectedly gather, crash or congestion. All this changes the satisfaction of passengers, affects their choice of transport for the next trip. It is important that this model demonstrates and covers such features of the real transport system.
We emphasize that it is important to build not a forecasting model based on the apparatus of mathematical statistics. We build a model that simulates the decision making of an individual passenger or a group of those based on a change in Manuscript  their satisfaction as a result of each particular choice. The study of the factors determining passenger satisfaction is quite active (see for example [3]- [7]). Many works identify quality with satisfaction. Our goal is to clarify the mechanism of choice based on satisfaction, which depends on comparing the quality of services in the past with that of the neighbors.

II. QUALITY INITIATIONS
Let's try to display this approach on our system, that is, we will compile the following mathematical model and fix the main aspects of the real problem: We divide the entire set of passengers (transport service consumers, designated C) into subsets [ 1 h…, ] such that each subset is a group of people who live in some definite proximity to one another and somehow can communicate with each other.
Next, for simplicity's sake, suppose that a lot of choice consists of two actions to choose a trip to the car or by public transport. In general, a selection society may contain a greater number of elements, corresponding, for example, to the selection of various types of public transport, pedestrian and bicycle routes. Randomly we will divide passengers from set C into these two classes. We denote by k the estimate of the quality of the services of the transport system for each consumer. For those who originally boarded a bus, we will define this coefficient k as follows. We will consider a number of all flights, and we will break it into 3 classes, depending on the quality level (see Fig.  1): qualitative, normal, bad (quality parameters include such parameters as bus uptime, waiting time at a stop and others). Then we will also randomly arrange passengers for these flights, thereby obtaining for each passenger an assessment of the quality of the services rendered. For all car owners at the time of initialization, we set the coefficient k equal to a certain constant. The mechanism of the carrier's work with the quality of its own services is proposed in [8]. Let's compare the results of one queueing system (QS) with failures and a discrete series for a specified period of time.
Consider a model of the work of public transport using single QS with failures, but with a variable input flow of passengers depending on the time. We will consider that we have one hour of peak in the middle of an 8-hour work day. The intensity of the input stream as a function of time is given by the function sin t th . The intensity of maintenance set equal to 2, i.е. ½ application per minute. The number of channels of service is 6. The queue size is 5. The cut-off line of the first level is taken to be equal to 3, the second -to the 4. We get the following performance indicators of the system.
 70 percent of passengers got on low-quality channels.  52 percent of the passengers refused the transport service, i.e. Switched to another mode of transport.  The average length of the queue is 0.586 passenger.  49 passengers did not get into the system due to full employment of the queue and all service channels. The number of service channels and the queue size will be the same as in the case of one QS. We get the following performance indicators of the system.
 73 percent of passengers were on low-quality channels.  58 percent of the passengers refused the transport service, i.e. switched to another mode of transport.  The average length of the queue is 0.627 passengers.  68 passengers did not get into the system due to full employment of the queue and all service channels.  The average service time per passenger was 0.48 minutes.  The average waiting time for the passenger was 0.04 minutes.
Here are the results of the work of both systems on the graphs. On a discrete set, we see more precisely what exactly has worsened the result in quality service. The main overflow of passengers occurred at rush hour. On the model with one QS, we do not have a sharp rise in the number of passengers, the increase of intensity is more flattened.
International Journal of Machine Learning and Computing, Vol. 10, No. 1, January 2020 The average service time of one passenger decreased due to the fact that now only at one hour the intensity of service sharply increases. On the others, the intensity of service became less.
We have received that the traditional approach does not allow to simulate rather accurately the passengers' satisfaction with the quality of the services provided. This can be seen in Fig. 3. A traditional solution in the form of a single queuing system shows that 50 percent of the passengers will refuse the transport service. The use of a discrete series with peak-to-peak division gives a more accurate result. It shows that 80 percent of the passengers will refuse from the service at the rush hour. In this case, the result in normal hours is similar to a single QS. We get that the traditional model smooth the peak too much and gives a false result switched passengers count.
With the help of a discrete series, we can understand at what time it is necessary to enter additional channels. They, for example, may be missed only during peak hours, the rest of the time the system will work with acceptable quality.
Let us introduce one more indicator -the level of satisfaction, when the passenger realizes that the comfort level of the mode of transport used by him is below a certain limit, he is transplanted to another mode of transport (for simplicity, everyone in our system is able to buy car and start driving at any moment) [9], [10].
Thus, in the initialization phase, there is a subset of 1 , where each person either drives a car or a bus, and can evaluate the quality of the transport service. In addition, people communicate with each other, and since they are in about the same conditions, each person can determine their level of comfort relative to other people, which means that he can decide whether to change tomorrow to another type of transport.
Let us consider in more detail a graph consisting of 9 districts (Fig. 4). For the study we will consider only two areas A and B, between which there is a route. All further research will be built at work with this route. It should be noted that the point on the square can be not only areas, but also stops, cities, countries.

A. The Neighborhood Determining Algorithm
For each passenger, we obtain a list of his nearest neighbors and add them to the neighborhood. Until the number of neighbors is equal to the required number, we choose a random passenger who is not yet a neighbor of the current passenger and whose neighbors are smaller than the given one. When such a passenger is found, set them a mutual neighborhood. After each passenger is processed, all passengers will need a number of neighbors. Let us note 1. Passengers do not mix up with each other, at first only passengers go by buses, then only by cars, however, both of them have neighbors from different layers, but due to the geometric definition of neighbors, some motorists have more familiar motorists, and those who ride buses, more friends on the buses. Visually, passengers on buses differ in that they have a greenish tint and a picture of the bus on top of the current indicators, motorists have a red tint and a picture of the car. It should be noted that at the next iterations of the system the picture will change. 2. At initialization, the satisfaction of all passengers is equal to 0.5, this parameter does not have such a strong influence on further satisfaction, therefore it can be taken as a constant.

B. Algorithm for the Choice of Transport for the Next Trip
As an algorithm for the choice of transport, we proposed an algorithm based on reinforcement learning. The system is trained using the Q-learning algorithm (see for example [11]), the purpose of which is to build a matrix for estimating the benefits obtained when choosing an action from a particular state. The algorithm itself is reduced to the choice of such an action from this matrix, which will bring the benefit, in this case, satisfaction with the transport system.
The passenger chooses transport based on their own experience. Accounting experience can be implemented in 2 possible options. Option 1. It is assumed that there is already a trained model (black box), which always answers the right choice of transport (ie, knows what is best to move in the current situation tomorrow, in a year, in a week) in order to get the maximum benefit.
Option 2. It is assumed that there is still an untrained model, it makes at least some choice, not always optimal, in the algorithm it is assumed that with a probability of 0.15 the passenger will make a non-optimal choice, in the hope that this choice will be promising in the future. So over time, the agent through trial and error understands how to act properly. Problems of this approach -noise is possible at the initial iterations. There must be a lot of iterations before the model is trained.
In the current implementation, Option 2 is considered. The model is simultaneously trained and makes a choice at each iteration.
Let us consider in more detail the Q-learning algorithm. We introduce additional parameters: -the set of all states in which the agent may be, -an action that an agent can take, tt -a set of actions that can be performed from the state t, th is the function of the agent's subjective assessment of the quality of action , which he can choose from the state t.
Consider the algorithm for constructing th . Denote LF is a learning factor. The higher it is, the stronger the agent trusts the new information. DF is a discounting factor. The less it is, the less the agent thinks about the benefits of their future actions.

C. Algorithm for Determining Satisfaction
Each passenger keeps a history of all received quality ratings. And also the current quality assessment obtained after selecting the mode of transport. The satisfaction of each passenger is calculated according to the following formula: currentQualityCoefficient − averageQuality 1 currentQualityCoefficient currentQualityCoefficient -the current coefficient of transport quality, averageQuality -the average quality of the last 5 trips. The overall satisfaction of the transport system is considered as the average satisfaction of all passengers.

IV. EVALUATION CASES AND INTERPRETATIONS
As noted earlier, only passengers traveling on buses first go, then only passengers choosing cars. Such an arrangement affects the neighborhood and communication environment, which is logical in principle (see Fig. 5A). After several iterations, agents try different modes of transport, and this will continue (see Fig. 5B). Even after 100 iterations, the system did not come into balance. Agents are transplanted for random transport each time (see Fig. 5C).
The results of calculations of the variation satisfaction in 100 iterations shown at Fig. 4. As you can see average satisfaction changed at each iteration. Nevertheless, it fluctuates around a certain constant average value of about 0.8 for that example. This is due to the fact that during the experiment the transport infrastructure and available routes remained unchanged. Nevertheless, passengers have tried various ways to improve their experience in using transport services. value of satisfaction -satisfaction declined. This can be explained as follows. Passengers neighbors in the graph of information connectivity tried to rotate the most successful experience among all their neighbors. As a result, at the next iteration, many people choose the same type of transport. This led to traffic jams or overcrowded buses and reduced satisfaction. Iteration can correspond to a pre-selected arbitrary period of time, for which it makes sense to talk about the choice of transport. It could be a day, a week, or, for example, a year, if we consider the choice between a ship, a train, and a plane for a vacation trip.   Consider the above simulation in more detail. Namely, we are interested in what experience preceded this or that choice. We conducted a survey of passenger traffic in several regions of Russia. In practice, we are faced with the apparent heterogeneity of passenger traffic. For example, on two different Tuesdays, which occurred during normal working weeks, under similar weather conditions, passenger traffic could differ by 20%. Of course, not all passengers from the bus used another mode of transport, but some switched to another.
There are cases (see for ex. [12]) of significant passenger switching from one type of transport to another.
In the simulation, for simplicity, we consider the number of passengers (groups of passengers) unchanged (see Fig. 8). That is, each of them chooses a car or a bus at each iteration.
It is of interest how satisfaction with one or another type of transport influenced the subsequent choice of a passenger and his neighbors in the broad sense. For this simulation, we fixed exactly 7 "neighbors" for each passenger, with whom he exchanges (met in the yard, at work or on Facebook) information about his experience of using transport. At iterations 39-41, the use of the number of machines increased. Traffic jams started to occur. Fig. 6 shows the average satisfaction separately for those who used the bus and car.
As can be seen, the satisfaction of using the machine due to the traffic jams that occurred at iterations 39-41 decreased, but this happened gradually. At each iteration, one passenger can exchange experience only with some people (in this simulation 7) "neighbors". Accordingly, the information that now by car began to get less comfortable than the bus is distributed with a delay. As a result, by 42 iterations, a substantial part of the passengers switched to the bus. Just as slowly as three iterations before this information began to spread that there were fewer traffic jams and you could go by car.

V. CONCLUSION
Thus, in the course of the research work, 2 models were combined, while in the trivial case. At this stage, the movement of passengers from only one area to another is being investigated. However, the basis for the choice of movement in the locality has been laid; a similar choice can be made for railway transport or air transport.
For the first time, a mechanism for finding the best option in the unchanged conditions of the route network, taking into account information about neighbours, was demonstrated.
The immediate task of further research is to verify the proposed model on the data of real passenger flows. It is necessary to build detailed models for determining the quality of the journey by car. It is planned to expand the choice between the modes of transport from two variants to some random set. The choice between pedestrian, scooter, bicycle, subway, tram, trolley, etc. can be considered.
A separate area of research is the application of the approach to composite routes, which includes both individual trips and different modes of transport.