# A Utility Method for the Matching Optimization of Ride-Sharing Based on the E-CARGO Model in Internet of Vehicles

Authors: Xiaohui Li; Hongbin Dong; Shuang Han; Xiaowei Wang; Xiaodong Yu
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

The Internet of Vehicles (IoV) is the extension of the Internet of Things (IoT) technology in the field of transportation systems. Ride-sharing is one of intelligent travel applications in IoV. Ride-sharing is aimed at taking passengers with similar itineraries and time arrangements to travel in the same car according to a certain matching rule. To effectively integrate transport capacity resources and reduce the number of cars on the road, ride-sharing has become a popular and economical way of travel. The matching and optimizing of drivers and passengers are the core contents of a ride-sharing application system. This paper mainly studies the dynamic real-time matching of passengers and drivers in IoV, considering the main factors such as travel cost, car capacity, and utility. The matching problem is formulated in a ride-sharing system as a Role-Based Collaboration (RBC). A new utility method for the matching optimization of ride-sharing is present. In this paper, we establish a model for simulating the assignment of ride-sharing with the help of the Environments-Classes, Agents, Roles, Groups, and Objects (E-CARGO) model. The objective function and formal definitions are proposed. The utility and time of optimal matching are obtained by using the Kuhn-Munkres algorithm on the revenue matrix. The experimental results show that the proposed formal method based on the E-CARGO model and utility theory can be applied in the ride-sharing problem. Numerical experiments show that the matching time cost increases with the increase of the number of drivers and passengers participating in the ride-sharing system. When the number of drivers and passengers is different, one-to-many matching takes the least time, and one-to-one matching takes more time. When the number of drivers and passengers is the same, the time cost of one-to-one matching increases sharply with a certain value (bigger than 800). Compared with other matching methods, the time spent by the one-to-many method is reduced by 30%. The results show that the proposed solution can be applied to the matching and pricing in a ride-sharing system.


---

## Body

## 1. Introduction

The Internet of Vehicles (IoV) is a huge and interactive network composed of vehicle locations, speed, routes, and other information. Through the Internet technology, all vehicles can transmit all kinds of information to the central processing unit. This vast vehicle information can be analysed and processed in the computer technology, so as to calculate the best route of different vehicles, timely report the road conditions, and arrange the signal lamp cycle. Ride-sharing is one of the representatives of intelligent travel applications in IoV.With the development of economy, the number of private cars is increasing in cities. Although it is convenient for travel with the increase of urban car, it also brings a series of problems, such as traffic congestion, excessive consumption of oil resources, and environmental pollution. Traffic congestion in cities is a universal phenomenon. In order to solve traffic congestion and environmental pollution problems, the matching and optimizing problems have been researched extensively in a ride-sharing system. Technologies such as IoV and GPS real-time positioning provide support and guarantee for ride-sharing application systems. Data sharing is privacy-preserved towards passengers and drivers in IoT [1, 2]. The economic aspects of shared mobility systems have attracted more and more applications and attention [3]. Ride-sharing travel services have been proved to be an effective way, which could make full use of traffic resources, alleviate the shortage of parking spaces, reduce environmental pollution, and optimize social benefits [4]. In addition, ride-sharing travel services allow passengers and drivers to share the travel cost, which is also considerable. With the continuous progress of mobile Internet technologies and the popularity of Internet mobile devices, ride-sharing travel, which is simple, safe, flexible, efficient, and economical, will be more popular in the future.Ride-sharing travel refers to a travel mode. The passengers with the same or similar travel paths are assigned to travel together in the same vehicle according to a matching mode. The passengers share the travel cost together in a certain driving interval. A ride-sharing application system mainly considers to complete the optimal pricing strategy and vehicle scheduling strategy in combination with geographical locations and time information [5]. In a ride-sharing application system, it matches the passenger sending the ride request with the nearby driver whose car has vacant seats. The passenger sends the ride request including the departure place, time, and destination for traveling. Then, the ride-sharing application system returns the approximate fee to the passenger according to a certain pricing rule. After accepting and confirming the fee, the passenger can be match to a nearby driver. In case of one driver and many passengers, when the driver’s car still has vacant seats, some passengers with similar paths will be assigned to travel together according to a certain matching strategy. After the completion of the ride-sharing travel, passengers will pay a certain fee. If it is a single passenger mode, only a single passenger can be match to a single driver at the ride-sharing time. As the driver can only match one passenger’s request each time, the next matching will be carried out only after the passenger is delivered to the destination.A driver may only pick up one passenger or may be willing to pick up two or more passengers when there are vacant seats. Similarly, each passenger may choose to take a driver’s car alone or share it with other passengers. An effective incentive mechanism [6] can attract more and more passengers and drivers to participate in a ride-sharing system. A cost-sharing mechanism [7, 8] for ride-sharing can solve the problem of vehicles with no passengers in a ride-sharing system. Furthermore, effective and incentive mechanisms can improve the service level of sharing systems [9]. The existing riding-share relationships between the drivers and passengers are shown in Table 1. No matter which travel mode was selected, the matching method of passengers and drivers is the core of a riding-sharing system.Table 1
The ride-sharing relationships between drivers and passengers.
One passengerMany passengersOne driverOne-to-one matching between drivers and passengersOne-to-many matching between drivers and passengers according to passengers’ routes and timeMany driversOne passenger transferring to different drivers’ car according to his travel routesOne-to-one or one-to-many matching for many times, respectively, according to the routes and time of passengers and driversFrom the perspective of leaders, utility theory is a theory used by leaders in decision-making. From the perspective of consumers, utility theory refers to the satisfaction of consumers from consuming certain goods, which is the core of consumer behavior theory.In riding-share travel, the passengers’ satisfaction can be expressed by their utility. The utility function is used to quantify the satisfaction [10]. The actual utility function describes the quantitative relationship between the utility obtained by passengers and their travel choices in ride-sharing. In addition, the utility function can measure the satisfaction of passengers in different travel choices.Many problems have been formalized and solved in collaboration [11–13]. Role-Based Collaboration (RBC) was initially proposed to support natural collaboration through computer-based systems. The E-CARGO model is proposed by Canadian scholar Professor Zhu, which denotes Environments—Classes, Agents, Roles, Groups, and Objects. We concentrate on the online dynamic matching problem between passengers and drivers. A utility method for the matching problem of ride-sharing was proposed. In this paper, the method combines RBC and the E-CARGO model [14–17] to model the matching of the ride-sharing problem. Agents, roles, groups, and the relationship between them are defined. The ride-sharing optimization problem is formalized as a group role assignment (GRA) problem. The formal definitions and objective function are present. Under the constraints of vacant seats and acceptable flexible time, the optimization matching scheme is obtained by maximizing the revenue of a ride-sharing system. On the distance profit matrix, Kuhn-Munkres algorithm [18–20] is used to obtain the optimal matching matrix and time based on GRA.GRA constructs a group by assigning roles to its members or agents to achieve its highest performance. In the proposed model, a driver is regarded as a role, and a passenger is regarded as an agent. In the system, current agents and roles are our focus. The problem is to find a role assignment matrix that makes the group workable, where each agent is assigned at most one role. In this situation, GRA seeks to find a matching matrix with the maximum revenue of the revenue matrix for a ride-sharing system.According to the matching strategies and core factors affecting passengers’ choice of travel in a ride-sharing application system, the specific contributions of this paper are shown as follows.(1)
We propose a new utility method for the ride-sharing matching based on the E-CARGO model with utility and seat number constraints. We formulate the matching problem in ride-sharing application system as a RBC problem. To better understand the GRA process, we develop a matching model, in which drivers can be match to more than one passenger in a flexible time(2)
This is the first paper that considers the utility between passengers and drivers in terms of matching and pricing based on the E-CARGO model. This paper contributes a novel way to study the matching problem in ride-sharing from the perspective of utility. When the number of drivers and passengers is the same, the utility of one-to-one matching between drivers and passengers is approximately equal to one-to-many matching. When the number of drivers and passengers is different, the utility of one-to-one matching is the least(3)
The experiments present that the utility has an impact on the revenue in a ride-sharing system. The advantages of the proposed method in terms of economic efficiency, matching incentives are demonstrated in the numerical experiments. The results show that our solutions are practical in terms of matching optimization and predicting behaviorsThe rest of the paper is organized as follows. The related works are introduced in Section2. The E-CARGO model, travel utility, model formulation, and algorithm analysis are introduced in Section 3. It formally specifies the ride-sharing problem with the E-CARGO model and utility theory. Experiments and analyses are illustrated in Section 4. This paper concludes and points our further research in Section 5.


## 2. Related Works

Travel cost can be reduced through cost-sharing in a ride-sharing system. Travelers who do not own private cars make travel more convenient by ride-sharing. Ride-sharing services may be provided by private car owners or public service providers. Gong et al. [21] propose the technique which has been introduced to realize the privacy-preserving distributed service recommendation. If the ride-sharing application system is private, the provider can get commission or advertising revenue. If it is a public system, there may be a social goal, such as reducing pollution and traffic congestion. However, no matter what the nature of the ride-sharing system is, it is necessary to complete the matching of drivers and passengers. Generally speaking, there are some specific objectives to be considered in the matching, such as minimizing the vehicle mileage or the travel time or maximizing the number of participants or revenue in a ride-sharing system. High success matching rate will stimulate more participants to participate in ride-sharing. In this paper, the modeling and matching methods in ride-sharing are proposed.The application system of ride-sharing travel generally requires passengers to provide departure time. In the area of obtaining participants’ time preference, Long et al. [22] present a ride-sharing problem with travel time uncertainty and propose a matching model considering travel time uncertainty. Due to various uncertain factors, the passengers’ time preference cannot always be satisfied. Lopez et al. [23] propose a new formal attack model. Their research shows that people are more concerned about the guarantee of travel time. In addition to the time factor, other factors will also affect the success of matching between passengers and drivers. The data uploading in ride-sharing systems suffers novel challenges on privacy preservation [24]. For example, people may prefer to share a car with familiar people. Women feel more secure when taking a female driver’s car. In short, the more restrictions on potential passengers when choosing coriding partners, the more difficult it will be to find a successful match for a passenger [25]. Unlike the aforementioned preference, this paper proposed a utility method to measure participants’ preference, which is more universal.If a driver has enough flexible time, he may be willing to provide services for multiple passengers. The driver can pick up passengers one by one or take more than one passenger at the same time. With assigning many passengers to a driver, the ride-sharing application system will provide a feasible optimal route to minimize the travel cost. Javier et al. [26] propose and construct a mathematical model for real-time high-capacity ride-sharing. The model can be extended to a large number of passengers and trips and dynamically generate optimal routes according to online demand and vehicle locations. Calvo and Fabio [27] propose an integrated system for the organization of a ride-sharing service, in which there is an optimization module solving heuristically the specific routing problem. This paper combines the E-CARGO model with utility theory to establish travel matching model, improve the utilization of available seat capacity, maximize platform revenue, and rationalize resource matching.When people choose to travel together, they consider not only the time factor but also hope to share the travel cost and reduce the cost through ride-sharing. Therefore, many scholars have studied the cost sharing methods in ride-sharing. Wang et al. [28] have studied various cost sharing strategies. They provided the necessary conditions for cost sharing strategies to maintain participation or reduce cars. In literature [29], considering the difference of travel distance, a cost sharing method in proportion to distance is proposed. The cost is apportioned in proportion to the distance. Kleiner et al. [30] proposed a method to determine the driver’s compensation based on the auction mechanism. In this method of determining remuneration, it is necessary to take into account the evaluation of drivers. For drivers, the cost they are willing to pay is between the cost of driving a private car alone and the cost of taking a taxi. The higher the compensation and commission for the driver is, the longer the acceptable length of the detour in the driver’s mind.There are also studies focusing on pricing policy in ride-sharing systems. Sun et al. [31] point out that there are fewer restrictions on the access to the ride-sharing market and less strict supervision on pricing. They present the impact of labor supply elasticity on market labor supply from the perspective of supply and demand in economics. Cachon et al. [32] study the surge pricing strategy. The provider is paid a fixed commission at a dynamic price. It is concluded that all stakeholders can benefit from the platform with self-scheduling ability under the surge pricing strategy. These papers focus on pricing policy but ignore the utility of passengers in a ride-sharing system. When the more utility of passengers is obtained, they will be willing to pay more for a certain route of their travel.In terms of matching for dynamic ride-sharing systems, Wang et al. [33] introduce some mathematical methods to establish stable matches. They consider the stability of ride-sharing matches and propose optimization approaches. Peng et al. [34] propose a stable matching model for the ride-sharing. The objective function of the model is minimizing travel cost of the passengers. They also illustrate the main factors affecting the successful matching rate. Zkan [35] researches the interplay between pricing and matching decisions of a ride-sharing firm. He proves that the optimization matching strategies effect on the performance of a ride-sharing application system. A utility method for the matching optimization of ride-sharing based on the E-CARGO model is proposed, which describes a real scenario in a ride-sharing problem and considers the overall system’s utility.


## 3. Methodology

### 3.1. E-CARGO Model

The E-CARGO model is proposed by Canadian scholar Professor Zhu based on the research and discussion of role collaboration theory [36–38]. The E-CARGO model has been applied in assignment problems and recommendation systems. It is the research and extension of the basic theory of role distribution. The experiment shows that this method is efficient and reliable. The E-CARGO model is suitable for modeling social systems and economic systems with the formal analysis. In this paper, the engineering theory method based on role collaboration and the E-CARGO model is abstracted, and the ride-sharing application is modeled.In the E-CARGO model, a system∑can be described as a nine-tuple ∑:≔C,O,A,M,R,E,G,S0,H, where C is a set of classes, O is a set of objects, A is a set of agents, M is a set of messages, R is a set of roles, E is a set of environments, G is a set of groups, S0 is the initial state of the system, and H is a set of users. In such a system, A and H and E and G are tightly coupled sets. A user and his agent can play a role together. Each group works in the same environment, and the environment has a normative effect on the groups. In the E-CARGO model, each agent plays only one role at a time.Many problems in reality can be formalized and specified with the E-CARGO model [39–41]. Firstly, the problem is decomposed into subproblems, and the roles and agents are determined. Secondly, the relationships and constraints between roles and agents are described by constraints. Thirdly, agents are assigned to roles and groups. The assignment results are evaluated through the evaluation criteria. Then evaluation and assignments are performed circularly to meet evaluation criteria indicators. Finally, the final assignment scheme is determined. In the following ride-sharing model, we focus on agents (A) and roles (R). The following formal definitions can be taken as a part of the E-CARGO model.


### 3.2. Travel Utility

In the utility theory, utility refers to the satisfaction that customers get in the process of exchanging goods. Utility function is often used to model different consumption behaviors and measure social welfare or satisfaction of a consumer [42]. The utility function is used to identify different customers’ behavior [43]. Passengers usually consider travel experience and actual conditions to select travel modes. In the utility theory, passengers always choose the trip modes that can maximize their personal utility.The drivers and passengers in a ride-sharing system can be regarded as participating agents. When the utility obtained by each participating agent is strictly greater than that obtained without participating, and no other protocol provides greater utility for all agents, it can be regarded as that all agents spontaneously participate in the system game.Passengers prefer to travel with acquaintances or similar age people. Due to objective factors affecting travel mode such as travel cost, convenience, and time, there is great randomness to a certain extent. In the utility function, we mainly consider the following core factors:(i)
Expenses incurred in a driver to passenger matching with a profit matrix(ii)
Time cost(iii)
Cost of privacy protection(iv)
Cost due to lack of reputationWe assume that the relationship between utility and core factors and attributes is linear. The utility function can be established with RBC as follows:(1)U=αQi,j×Ti,j+βCt−γCp−δCr,where α,β,γ, and δ are the weight coefficients of the core factors. When the drivers’ revenue increases, the drivers’ utility also increases. When passengers’ payment increases, the passengers’ utility decreases. There is a negative correlation between the passengers’ travel utility and the travel cost. The weight coefficient value α in the driver utility function is bigger than that in the passenger utility function. There is a positive correlation between the drivers’ travel utility and revenue.We assume that all pick-up arrangements are completed within an acceptable time range. Therefore, there is little difference in the utility weight coefficient valueβ of time cost in the driver and passenger utility functions. Passengers pay more attention to privacy and reputation. Therefore, the weight coefficients γ and δ of privacy cost and reputation cost are bigger than those of drivers under the same cost.


### 3.3. Model Formulation

In a ride-sharing system, it is necessary to consider the acceptable time range, profit income, and vacant seats for vehicle scheduling matching and transfer modes. In order to save travel cost and time, passengers may transfer.Definition 1.
RoleR. In a ride-sharing system, a driver role is defined as R:≔<n,I,Ac,Ap,No,Q1>, where n is the identification of the driver role; I:≔<Min,Mout> denotes the message set processed by the driver roles of the ride-sharing system, where Min expresses the incoming messages and Mout expresses the outgoing messages; Ac expresses a set of agents who are currently playing this role, that is, a set of passengers who are matched to the drivers; Ap expresses a set of agents who are potential to play this role, that is, a set of passengers that may be matched; No expresses a set of objects that can be obtained by the agent playing this role, mainly including traveling passengers on the way together; and Q1 expresses the minimum evaluation value required for the agent to play this role, i.e., travel revenue. In the ride-sharing system, role R represents a car driver who will be matched to passengers.Definition 2.
AgentA. In a ride-sharing system, a passenger agent is defined as A:≔<n,Rc,Rp,Ng,Qr>, where n is the identification of the passenger agent; Rc expresses a role that the agent is playing, that is, the driver of a car in which the passenger agent is riding; Rp expresses a set of roles that this agent may play in the future, i.e., the driver who will be matched due to transfers in the travel; Ng indicates the group number that this agent belongs to; and Qr expresses the evaluation value of this agent for each role in the set of roles. In the ride-sharing system, agent A expresses a passenger who sends out the message about the departure time, place, and destination.Definition 3.
Lrepresents the passenger vector matched to the drivers, i.e., the number of passengers that each driver can be matched to within a certain time range.Definition 4.
The profit matrixQ of driver picking up passengers is a mxn matrix, where Qi,j represents the revenue of the driver role j0≤j<n picking up the passenger agent i0≤i<m.Definition 5.
The matching matrixT is an mxn matrix, where Ti,j represents whether the agent i is matched to the role j. Ti,j=1 indicates that the agent i is matched to the role j. Ti,j=0 indicates not. T2,2=1 represents the third passenger agent is matched to the third driver role.Definition 6.
When the number of passengers carried by the driver roleR in the same time is less than or equal to the maximum passenger capacity of the car, the driver role R is operable, i.e., ∑i=0mTi,j≤Lj.Definition 7.
Passengers may transfer many times from the departure to the destination.Lai0≤i<m indicates the maximum transfer times of passenger agent i. Lai=0 indicates that the passenger agent is not matched to a driver, and the sharing request fails.Definition 8.
Lj∈Ν(0≤j<n) is a driver role range vector, where N is a natural number. In a ride-sharing travel system, it represents the maximum number of passengers carried by a car. For example, the maximum number of passengers carried by a 5-seat car at the same time is 4, i.e., Lj=4.Definition 9.
After determining the matching matrixT, the total revenue r is the sum of all drivers’ revenue, i.e., r=∑j=0n−1∑i=0m−1Qi,j×Ti,j. The solution process of total income is to multiply the revenue matrix Q by the matching matrix T.In the many drivers to many passenger mode, one driver can pick up more than one passenger. It is assumed that there is an intersection between ride time and distance. It is in a flexible and acceptable time range. Letm represent the number of passenger agents and n represent the number of driver roles. There are N seats in cars. Each passenger can transfer many times. The main objective is to maximize the total revenue r of all drivers picking up and transporting passengers. Let Ud represent drivers’ utility and Up represent passengers’ utility. To encourage more drivers and passengers to participate in the ride-sharing system, the gap between driver utility and passenger utility should be within a reasonable range. A utility constraint is added to the following model.
(2)maxr=∑j=0n−1∑i=0m−1Qi,j×Ti,j,(3)s.t.Ti,j∈0,10≤i<m,0≤j<n,(4)∑i=0m−1Ti,j=Lj≤N‐10≤j<n,(5)∑j=0n−1Ti,j≤Lai0≤i<m,(6)Ud−UpUd≤ε,where expression (3) is a 0-1 constraint, and it represents whether the passenger i is matched to the driver role j; (4) guarantees passengers are allocated according to the number of vacant seats; (5) indicates the maximum transfer times of the passenger i; and (6) indicates the utility constraint between drivers and passengers.


#### 3.3.1. Case Analysis

It is assumed that 10 passengers send ride requests at the same time within a certain acceptable distance. There are 4 drivers available for dispatching. The cars all have 5 seats. Passengers do not transfer. According to the distance between drivers and each passenger, the revenue matrixR is as follows:
(7)1136431521105136582171021594617110284131839.The matching matrixT may be as follows: (a)
(8)0010010000100010100010001000001010000100,(b)(9)0001000100100010100010001000001010000001.According to the matching matrix (a), the total revenue is 75, andLa=4,2,4,0. With the matching matrix (b), the total revenue is 81, and Lb=4,0,3,3. In the matching scheme (a), the 4th driver is not matched to a passenger, and the 2nd driver is not matched to a passenger in the matching scheme (b).


### 3.4. Algorithm Analysis

The time complexity of K-M algorithm [18, 19] is O (m3), which is better than the exhaustive search method. The above problem can be transformed into integer programming to solve the maximum matching matrix T. The algorithm is described as follows:Algorithm 1: Kuhn_Munkres solves the optimal matching problem of ride-sharing (OMPR).
Algorithm1: Solve OMPR.Inputs:the number of driver rolesnthe number of passenger agentsmthe number of passengers carried by then-dimensional role range vector Lthe passenger transfer vectorLaAnm x n revenue matrix Q for the drivers to pick up and drop off passengersOutputs: optimal matching matrix T and time tbegin(1) While (time < passenger acceptance time && vacant seats < loading)(2) {(3)   Call the Kuhn_Munkres algorithm to get the matching matrix(4) }(4) If (transfer times <La) {(5)   Return optimal matching matrixT, time t}(6) End ifend


## 3.1. E-CARGO Model

The E-CARGO model is proposed by Canadian scholar Professor Zhu based on the research and discussion of role collaboration theory [36–38]. The E-CARGO model has been applied in assignment problems and recommendation systems. It is the research and extension of the basic theory of role distribution. The experiment shows that this method is efficient and reliable. The E-CARGO model is suitable for modeling social systems and economic systems with the formal analysis. In this paper, the engineering theory method based on role collaboration and the E-CARGO model is abstracted, and the ride-sharing application is modeled.In the E-CARGO model, a system∑can be described as a nine-tuple ∑:≔C,O,A,M,R,E,G,S0,H, where C is a set of classes, O is a set of objects, A is a set of agents, M is a set of messages, R is a set of roles, E is a set of environments, G is a set of groups, S0 is the initial state of the system, and H is a set of users. In such a system, A and H and E and G are tightly coupled sets. A user and his agent can play a role together. Each group works in the same environment, and the environment has a normative effect on the groups. In the E-CARGO model, each agent plays only one role at a time.Many problems in reality can be formalized and specified with the E-CARGO model [39–41]. Firstly, the problem is decomposed into subproblems, and the roles and agents are determined. Secondly, the relationships and constraints between roles and agents are described by constraints. Thirdly, agents are assigned to roles and groups. The assignment results are evaluated through the evaluation criteria. Then evaluation and assignments are performed circularly to meet evaluation criteria indicators. Finally, the final assignment scheme is determined. In the following ride-sharing model, we focus on agents (A) and roles (R). The following formal definitions can be taken as a part of the E-CARGO model.


## 3.2. Travel Utility

In the utility theory, utility refers to the satisfaction that customers get in the process of exchanging goods. Utility function is often used to model different consumption behaviors and measure social welfare or satisfaction of a consumer [42]. The utility function is used to identify different customers’ behavior [43]. Passengers usually consider travel experience and actual conditions to select travel modes. In the utility theory, passengers always choose the trip modes that can maximize their personal utility.The drivers and passengers in a ride-sharing system can be regarded as participating agents. When the utility obtained by each participating agent is strictly greater than that obtained without participating, and no other protocol provides greater utility for all agents, it can be regarded as that all agents spontaneously participate in the system game.Passengers prefer to travel with acquaintances or similar age people. Due to objective factors affecting travel mode such as travel cost, convenience, and time, there is great randomness to a certain extent. In the utility function, we mainly consider the following core factors:(i)
Expenses incurred in a driver to passenger matching with a profit matrix(ii)
Time cost(iii)
Cost of privacy protection(iv)
Cost due to lack of reputationWe assume that the relationship between utility and core factors and attributes is linear. The utility function can be established with RBC as follows:(1)U=αQi,j×Ti,j+βCt−γCp−δCr,where α,β,γ, and δ are the weight coefficients of the core factors. When the drivers’ revenue increases, the drivers’ utility also increases. When passengers’ payment increases, the passengers’ utility decreases. There is a negative correlation between the passengers’ travel utility and the travel cost. The weight coefficient value α in the driver utility function is bigger than that in the passenger utility function. There is a positive correlation between the drivers’ travel utility and revenue.We assume that all pick-up arrangements are completed within an acceptable time range. Therefore, there is little difference in the utility weight coefficient valueβ of time cost in the driver and passenger utility functions. Passengers pay more attention to privacy and reputation. Therefore, the weight coefficients γ and δ of privacy cost and reputation cost are bigger than those of drivers under the same cost.


## 3.3. Model Formulation

In a ride-sharing system, it is necessary to consider the acceptable time range, profit income, and vacant seats for vehicle scheduling matching and transfer modes. In order to save travel cost and time, passengers may transfer.Definition 1.
RoleR. In a ride-sharing system, a driver role is defined as R:≔<n,I,Ac,Ap,No,Q1>, where n is the identification of the driver role; I:≔<Min,Mout> denotes the message set processed by the driver roles of the ride-sharing system, where Min expresses the incoming messages and Mout expresses the outgoing messages; Ac expresses a set of agents who are currently playing this role, that is, a set of passengers who are matched to the drivers; Ap expresses a set of agents who are potential to play this role, that is, a set of passengers that may be matched; No expresses a set of objects that can be obtained by the agent playing this role, mainly including traveling passengers on the way together; and Q1 expresses the minimum evaluation value required for the agent to play this role, i.e., travel revenue. In the ride-sharing system, role R represents a car driver who will be matched to passengers.Definition 2.
AgentA. In a ride-sharing system, a passenger agent is defined as A:≔<n,Rc,Rp,Ng,Qr>, where n is the identification of the passenger agent; Rc expresses a role that the agent is playing, that is, the driver of a car in which the passenger agent is riding; Rp expresses a set of roles that this agent may play in the future, i.e., the driver who will be matched due to transfers in the travel; Ng indicates the group number that this agent belongs to; and Qr expresses the evaluation value of this agent for each role in the set of roles. In the ride-sharing system, agent A expresses a passenger who sends out the message about the departure time, place, and destination.Definition 3.
Lrepresents the passenger vector matched to the drivers, i.e., the number of passengers that each driver can be matched to within a certain time range.Definition 4.
The profit matrixQ of driver picking up passengers is a mxn matrix, where Qi,j represents the revenue of the driver role j0≤j<n picking up the passenger agent i0≤i<m.Definition 5.
The matching matrixT is an mxn matrix, where Ti,j represents whether the agent i is matched to the role j. Ti,j=1 indicates that the agent i is matched to the role j. Ti,j=0 indicates not. T2,2=1 represents the third passenger agent is matched to the third driver role.Definition 6.
When the number of passengers carried by the driver roleR in the same time is less than or equal to the maximum passenger capacity of the car, the driver role R is operable, i.e., ∑i=0mTi,j≤Lj.Definition 7.
Passengers may transfer many times from the departure to the destination.Lai0≤i<m indicates the maximum transfer times of passenger agent i. Lai=0 indicates that the passenger agent is not matched to a driver, and the sharing request fails.Definition 8.
Lj∈Ν(0≤j<n) is a driver role range vector, where N is a natural number. In a ride-sharing travel system, it represents the maximum number of passengers carried by a car. For example, the maximum number of passengers carried by a 5-seat car at the same time is 4, i.e., Lj=4.Definition 9.
After determining the matching matrixT, the total revenue r is the sum of all drivers’ revenue, i.e., r=∑j=0n−1∑i=0m−1Qi,j×Ti,j. The solution process of total income is to multiply the revenue matrix Q by the matching matrix T.In the many drivers to many passenger mode, one driver can pick up more than one passenger. It is assumed that there is an intersection between ride time and distance. It is in a flexible and acceptable time range. Letm represent the number of passenger agents and n represent the number of driver roles. There are N seats in cars. Each passenger can transfer many times. The main objective is to maximize the total revenue r of all drivers picking up and transporting passengers. Let Ud represent drivers’ utility and Up represent passengers’ utility. To encourage more drivers and passengers to participate in the ride-sharing system, the gap between driver utility and passenger utility should be within a reasonable range. A utility constraint is added to the following model.
(2)maxr=∑j=0n−1∑i=0m−1Qi,j×Ti,j,(3)s.t.Ti,j∈0,10≤i<m,0≤j<n,(4)∑i=0m−1Ti,j=Lj≤N‐10≤j<n,(5)∑j=0n−1Ti,j≤Lai0≤i<m,(6)Ud−UpUd≤ε,where expression (3) is a 0-1 constraint, and it represents whether the passenger i is matched to the driver role j; (4) guarantees passengers are allocated according to the number of vacant seats; (5) indicates the maximum transfer times of the passenger i; and (6) indicates the utility constraint between drivers and passengers.


### 3.3.1. Case Analysis

It is assumed that 10 passengers send ride requests at the same time within a certain acceptable distance. There are 4 drivers available for dispatching. The cars all have 5 seats. Passengers do not transfer. According to the distance between drivers and each passenger, the revenue matrixR is as follows:
(7)1136431521105136582171021594617110284131839.The matching matrixT may be as follows: (a)
(8)0010010000100010100010001000001010000100,(b)(9)0001000100100010100010001000001010000001.According to the matching matrix (a), the total revenue is 75, andLa=4,2,4,0. With the matching matrix (b), the total revenue is 81, and Lb=4,0,3,3. In the matching scheme (a), the 4th driver is not matched to a passenger, and the 2nd driver is not matched to a passenger in the matching scheme (b).


## 3.3.1. Case Analysis

It is assumed that 10 passengers send ride requests at the same time within a certain acceptable distance. There are 4 drivers available for dispatching. The cars all have 5 seats. Passengers do not transfer. According to the distance between drivers and each passenger, the revenue matrixR is as follows:
(7)1136431521105136582171021594617110284131839.The matching matrixT may be as follows: (a)
(8)0010010000100010100010001000001010000100,(b)(9)0001000100100010100010001000001010000001.According to the matching matrix (a), the total revenue is 75, andLa=4,2,4,0. With the matching matrix (b), the total revenue is 81, and Lb=4,0,3,3. In the matching scheme (a), the 4th driver is not matched to a passenger, and the 2nd driver is not matched to a passenger in the matching scheme (b).


## 3.4. Algorithm Analysis

The time complexity of K-M algorithm [18, 19] is O (m3), which is better than the exhaustive search method. The above problem can be transformed into integer programming to solve the maximum matching matrix T. The algorithm is described as follows:Algorithm 1: Kuhn_Munkres solves the optimal matching problem of ride-sharing (OMPR).
Algorithm1: Solve OMPR.Inputs:the number of driver rolesnthe number of passenger agentsmthe number of passengers carried by then-dimensional role range vector Lthe passenger transfer vectorLaAnm x n revenue matrix Q for the drivers to pick up and drop off passengersOutputs: optimal matching matrix T and time tbegin(1) While (time < passenger acceptance time && vacant seats < loading)(2) {(3)   Call the Kuhn_Munkres algorithm to get the matching matrix(4) }(4) If (transfer times <La) {(5)   Return optimal matching matrixT, time t}(6) End ifend


## 4. Simulation Experiments and Result Analysis

The experimental platform is shown in Table2. To check the applicability and performance of the proposed model, the experiments are conducted. The values of the revenue matrix Q are produced randomly between 0 and 10. We let m=100,200,⋯,900,100, n=m, m=2n, Lj∈0,1,2, ε=0.2.Table 2
Experimental platform configuration.
Configuration nameConfiguration descriptionCPUAMD Ryzen 5 PRO 3500 U w/Radeon Vega Mobile Gfx 2.10 GHzMM8 GBOSMicrosoft Windows 10 HomeEclipseVersion: Eclipse Java Oxygen (4.7.3)JDK1.8.0_181According to the revenue matrix, simulate the scenarios with the same and different number of drivers and passengers as follows.


### 4.1. Nonutility Scenario

The utility of drivers and passengers is not considered. For each scale, the matching times in Kuhn-Munkres algorithm are collected. The total revenuer is shown with m=n and m=2n in Figure 1. Tables 3 and 4 show the matching times with m=n and m=2n.Figure 1
The total revenue withm=n and m=2n.Table 3
The times (ms) for the assignment algorithm withm=n.
mnLargestSmallestAverage10010058.840234.700642.33467200200211.0163135.737163.0133300300595.0694470.5191518.67174004001694.8381189.3671451.65005005313.6232639.783282.6176006008314.0755864.8756565.41370070012101.596828.4889727.42280080018487.9512509.0813758.4390090025012.8921341.0523315.231000100041122.1134377.1837197.4Table 4
The times (ms) for the assignment algorithm withm=2n.
mnLargestSmallestAverage1005035.734524.793128.50592200100146.3957102.3475119.7406300150473.8116389.648435.91434002001375.6721157.3291262.2295002502927.4592546.1682786.1296003006049.8355204.0615663.72170035011628.829658.46810809.1480040021250.1917858.7519202.9290045032658.3628327.5430718.17100050049614.1442969.3747163.84


### 4.2. Utility Scenario

The utility of drivers and passengers is considered. In utility scenario, we letε=0.2. The utility of one-to-one and one-to-many matching when m=n and m=2n is shown in Figure 2. The time of one-to-one and one-to-many matching when m=n and m=2n is shown in Figure 3.Figure 2
The utility of one-to-one and one-to-many matching withm=n and m=2n.Figure 3
The utility of one-to-one and one-to-many matching withm=n and m=2n.The experiments indicate that the greater the gap between the number of passengers and drivers, the less the total revenue and utility. When the number of drivers and passengers is the same, the utility of one-to-one matching between drivers and passengers is approximately equal to one-to-many matching. When the number of drivers and passengers is different, the utility of one-to-one matching is the least.In terms of the time spent on matching, Figure3 shows that the time cost increases with the increase of the number of drivers and passengers participating in the ride-sharing system. When m is bigger than a certain value (m>600), time cost increases sharply in both matching methods. When the number of drivers and passengers is different, one-to-many matching takes the least time, and one-to-one matching takes more time. When the number of drivers and passengers is the same, the time cost of one-to-one matching increases sharply with m>800. The results show that our solutions are practical.


## 4.1. Nonutility Scenario

The utility of drivers and passengers is not considered. For each scale, the matching times in Kuhn-Munkres algorithm are collected. The total revenuer is shown with m=n and m=2n in Figure 1. Tables 3 and 4 show the matching times with m=n and m=2n.Figure 1
The total revenue withm=n and m=2n.Table 3
The times (ms) for the assignment algorithm withm=n.
mnLargestSmallestAverage10010058.840234.700642.33467200200211.0163135.737163.0133300300595.0694470.5191518.67174004001694.8381189.3671451.65005005313.6232639.783282.6176006008314.0755864.8756565.41370070012101.596828.4889727.42280080018487.9512509.0813758.4390090025012.8921341.0523315.231000100041122.1134377.1837197.4Table 4
The times (ms) for the assignment algorithm withm=2n.
mnLargestSmallestAverage1005035.734524.793128.50592200100146.3957102.3475119.7406300150473.8116389.648435.91434002001375.6721157.3291262.2295002502927.4592546.1682786.1296003006049.8355204.0615663.72170035011628.829658.46810809.1480040021250.1917858.7519202.9290045032658.3628327.5430718.17100050049614.1442969.3747163.84


## 4.2. Utility Scenario

The utility of drivers and passengers is considered. In utility scenario, we letε=0.2. The utility of one-to-one and one-to-many matching when m=n and m=2n is shown in Figure 2. The time of one-to-one and one-to-many matching when m=n and m=2n is shown in Figure 3.Figure 2
The utility of one-to-one and one-to-many matching withm=n and m=2n.Figure 3
The utility of one-to-one and one-to-many matching withm=n and m=2n.The experiments indicate that the greater the gap between the number of passengers and drivers, the less the total revenue and utility. When the number of drivers and passengers is the same, the utility of one-to-one matching between drivers and passengers is approximately equal to one-to-many matching. When the number of drivers and passengers is different, the utility of one-to-one matching is the least.In terms of the time spent on matching, Figure3 shows that the time cost increases with the increase of the number of drivers and passengers participating in the ride-sharing system. When m is bigger than a certain value (m>600), time cost increases sharply in both matching methods. When the number of drivers and passengers is different, one-to-many matching takes the least time, and one-to-one matching takes more time. When the number of drivers and passengers is the same, the time cost of one-to-one matching increases sharply with m>800. The results show that our solutions are practical.


## 5. Conclusions

The matching optimization is a general problem in a ride-sharing system. In this paper, under the constraints of vacant seats and passenger transferring, the matching problem in the ride-sharing system is formally modelled based on the E-CARGO model. First, the E-CARGO model and travel utility are introduced. Next, the proposed method is formalized. Then, algorithm analysis is provided. Finally, the Kuhn-Munkres algorithm is used to solve the optimal matching matrix. The analysis of time performance shows that the proposed method is practical.In the future work, we will further study methods to solve matching optimization problems. To improve the matching rate and time performance, we will improve the algorithm to meet the real-time requirements of dynamic ride sharing matching. We plan to study the relationship between pricing and matching based on the E-CARGO model and utility theory. Besides, to attract more and more passengers and drivers to participate in the ride-sharing system, utility incentive mechanism is also the direction and content of our research in the future.



---

*Source: 2438972-2021-11-12.xml*