CN115099569A - Passenger and taxi matching method based on fuzzy logic controller - Google Patents

Passenger and taxi matching method based on fuzzy logic controller Download PDF

Info

Publication number
CN115099569A
CN115099569A CN202210559859.0A CN202210559859A CN115099569A CN 115099569 A CN115099569 A CN 115099569A CN 202210559859 A CN202210559859 A CN 202210559859A CN 115099569 A CN115099569 A CN 115099569A
Authority
CN
China
Prior art keywords
passenger
taxi
matching
fuzzy
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210559859.0A
Other languages
Chinese (zh)
Inventor
龚月姣
陈子航
刘译文
陈伟能
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202210559859.0A priority Critical patent/CN115099569A/en
Publication of CN115099569A publication Critical patent/CN115099569A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/02Computing arrangements based on specific mathematical models using fuzzy logic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0645Rental transactions; Leasing transactions

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Accounting & Taxation (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Algebra (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Mathematical Analysis (AREA)
  • Fuzzy Systems (AREA)
  • Biomedical Technology (AREA)
  • Automation & Control Theory (AREA)
  • Educational Administration (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a passenger and taxi matching method based on a fuzzy logic controller, which comprises the following steps: s1, sampling time in a discretization mode into a plurality of time slices, arranging passengers submitting orders into a passenger sequence within sampling interval time, and arranging idle taxis into a taxi sequence; s2, taking the waiting time of the passenger, the order travel distance of the passenger and the distance between the passenger and the taxi as input variables of a fuzzy logic controller at the sampling moment, and judging and calculating a priority matching degree value between the passenger and the taxi through fuzzy logic; s3, constructing a passenger sequence and a taxi sequence into a bipartite graph, wherein the weight value between graph nodes is the preferential matching degree of the passenger and the taxi, and solving the maximum weight value matching of the bipartite graph by adopting a Kuhn-Munkres algorithm to obtain the optimal matching scheme of the passenger and the taxi; and S4, dispatching the taxis to dispatch the list according to the matching scheme, keeping the passengers or taxis which are not successfully matched in the corresponding sequence, and waiting for the next sampling time to carry out matching and dispatching.

Description

Passenger and taxi matching method based on fuzzy logic controller
Technical Field
The invention belongs to the field of automatic traffic scheduling, and particularly relates to a real-time matching method for online passengers and taxis based on a fuzzy logic controller.
Background
In recent years, with the gradual popularization of mobile online taxi taking platforms such as drip taxi taking and the like in people, online taxi taking becomes an important travel mode for urban residents, and the completion of matching between a user passenger and a taxi is one of indispensable processes in online taxi taking service. In the on-line taxi taking task, the application server receives information from taxies and passengers getting off the order, matches the free taxies to each passenger according to a certain method, and issues an instruction to enable the driver to go to the passenger position to take the order. The matching method of the high-quality passenger and the taxi can solve the problem of unbalanced taxi allocation, reduce the average waiting time of the passenger, improve the order service rate and the service quality, and simultaneously, the taxi taking platform on the guide line obtains higher profit and reduces the consumption of resources.
At present, the mainstream online taxi dispatching system adopts a greedy strategy to complete the matching of passengers and taxis, wherein a passenger and taxi matching method based on a nearest neighbor principle (NN) and a maximum profit principle (MP) combined with a first-come-first-serve (FCFS) dispatching strategy is widely applied. The matching method based on the nearest-neighbor principle and the first-come first-serve strategy enables each passenger to be matched with the nearest taxi nearby as soon as possible, so that the priority of the passenger is guaranteed, the overall waiting time of the passenger can be greatly shortened, but the method only partially considers the distance between the passenger and the taxi, ignores other index factors such as platform profit and the like, can cause that part of the passengers cannot be matched for a long time, and has poor comprehensive performance. The matching method based on the maximum profit principle also has the same problem, and the method ignores the waiting time of passengers, also causes that partial passengers can not be matched for a long time, and reduces the average experience of the passengers. The FCFS strategy is abandoned by part of taxi dispatching systems, historical information of passengers and taxis is considered when the taxis are dispatched, and the problems of the demands of future passengers, whether the taxis carry passengers and the like are predicted by analyzing the success rate and the quality of the previous matched orders. The method improves the matching quality of the passenger and the taxi to a certain extent, but as the method still uses greedy strategy analysis for each input historical index, the calculation result is trapped in local optimization caused by the greedy strategy.
At present, a passenger and taxi matching method which is efficient, can consider various index factors and combines historical global information is needed in the field of automatic taxi scheduling. As the fuzzy logic control method is widely and successfully applied in various fields in the industry, a fuzzy logic controller can be introduced to process the relationship and weight of each index factor in the matching of passengers and taxis, so as to improve the performance of the method. There is still a lack of a staged, high performance passenger to taxi matching method that considers both quality of service and profits.
Disclosure of Invention
The invention aims to overcome the defects that passengers and taxis on an on-line taxi taking platform in the prior art are unbalanced in matching and poor in comprehensive performance under the indexes of service quality, profits and the like, and provides a staged and real-time passenger and taxi matching method based on a fuzzy logic controller.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a passenger and taxi matching method based on a fuzzy logic controller comprises the following steps:
s1, sampling continuous time in a discretization mode into a plurality of time slices, and discharging all passengers submitting orders to a taxi taking system into a passenger sequence and discharging idle taxis into a taxi sequence within set sampling interval time of the time slices;
s2, simulating a non-digital decision-making mode of a human brain by adopting a fuzzy logic controller at a specific sampling moment, taking the waiting time of each passenger in a passenger sequence, the order travel distance and the distance between each passenger and each taxi in a taxi sequence as input index variables, and judging and calculating a priority matching value between each pair of passengers and each taxi through fuzzy logic;
s3, constructing the passenger in the passenger sequence and the taxi in the taxi sequence into a bipartite graph, wherein the weight value between graph nodes of the bipartite graph is the preferential matching degree of the passenger and the taxi, and solving the maximum weight matching of the bipartite graph by adopting a Kuhn-Munkres algorithm to obtain the optimal matching scheme of the passenger and the taxi;
and S4, dispatching the taxis to dispatch the list according to the best matching scheme of the passengers and the taxis, keeping the passengers or the taxis which are not matched in the sequence, and waiting for the next sampling moment to carry out matching and dispatching.
Further, S2 specifically includes the following steps:
s21, determining input variables and output variables of a Fuzzy Logic Controller (FLC), taking the waiting time of each passenger, the travel distance of each passenger order and the distance between each passenger and a taxi as input variables, and taking the priority matching degree between each passenger and the taxi as output variables;
s22, designing and using a membership function to convert three input variables and one output variable from accurate quantities into fuzzy semantic quantities;
s23, formulating a fuzzy rule base, and carrying out logic operation and control on the fuzzy semantic quantity of each membership degree through a fuzzy rule to obtain the relation between an input fuzzy variable and an output fuzzy variable;
and S24, defuzzifying the output fuzzy variable, and converting the output fuzzy variable with the membership degree into an accurate numerical value to obtain an accurate priority matching degree value.
Further, in step S21, the priority matching degree is used as an output variable of the fuzzy logic controller, and three indices of the passenger waiting time WT, the order trip distance TD, and the passenger-to-taxi distance PT are selected as input variables because they are closely related to the taxi-taking service as a whole.
After an online taxi taking service order starts, the method has three steps: 1) the dispatching system matches taxis for passengers; 2) the taxi goes to the passenger position to pick up the passenger; 3) taxis deliver passengers to destinations. The passenger waiting time WT is determined by the first two steps, the passenger to taxi distance PT greatly affects the second step, and the order trip distance TD greatly affects the third step.
The waiting time of passenger i is denoted WT i The calculation formula is as follows:
WT i =t-b i
where t represents the scheduling time, b i Representing the time when passenger i places an order.
The order travel distance of passenger i is recorded as TD i And the distance between the passenger i and the taxi j is recorded as PT i ,PT i The shortest road network distance E (i, j) between i and j is calculated.
Further, in step S22, three membership functions (short, medium, and long, or low, medium, and high) are constructed for each of the three input variables and one output variable, and are used to describe fuzzy semantic features of each precise variable membership in the size concept. The output value membership of the membership function is a dimensionless number ranging from 0 to 1, representing the degree to which the precise variable belongs to the fuzzy set. The membership function can be constructed in various ways, and the trapezoidal membership function with high calculation efficiency is selected to convert an accurate variable into a fuzzy variable in consideration of real-time and rapid scheduling of an online taxi taking system.
Further, in step S23, the fuzzy rule base is composed of a plurality of rules in the form of "IF-THEN" (for example, IFTD is short, PT is short, WT is short, THEN is matching degree is low), which simulate the inference process of the human brain for the fuzzy semantic concept and determine the relationship between fuzzy variables. According to the experience of history matching of passengers and taxies, 3 is set up in the fuzzy rule base 3 The correspondence relationship between 3 types of membership degrees of 3 types of input fuzzy variables and output fuzzy variables is defined as 27 rules.
The rules in the fuzzy rule base are formulated according to the following experiences: the longer the order travel distance TD is, the shorter the passenger distance PT to the taxi is, the larger the profit of the order is, and the higher the preferential matching degree is; the longer the passenger has been waiting time WT, the longer the passenger is at a distance PT from the taxi, and the longer the passenger's total waiting time is, the higher the priority matching degree is. The rules dictate that increasing the profit of the order is a higher priority than reducing the passenger's total waiting time, so that the shorter the passenger's distance PT from the taxi as a whole, the higher the priority match.
Further, in step S24, the output fuzzy variable is defuzzified by the center of gravity method. The barycentric method firstly needs to calculate the barycentric position of each membership function, and the accurate value O of the priority matching degree obtained finally is as follows:
Figure BDA0003653841310000031
wherein o is k Degree of membership, a, representing the kth fuzzy output result k Is the abscissa position of the center of gravity of the corresponding membership function. The membership degree of the output result can be obtained by calculation by using a cross operator and a merging operator in the fuzzy logic operation, wherein the cross operator is equivalent to the minimum value in the mathematical operation, and the merging operator is equivalent to the maximum value in the mathematical operation. Specifically, for each fuzzy output result (with low, medium or high degree of priority matching), all fuzzy rules with output as the fuzzy result are found, the degree of output membership of the fuzzy result is obtained by using a merging operator operation on the degrees of output membership of the fuzzy rules, and the degree of output membership of each fuzzy rule is obtained by using a cross operator operation on the degrees of membership of all IF condition variables of the fuzzy result.
Further, S3 specifically includes the following steps:
s31, constructing a bipartite graph by using a passenger sequence and a taxi sequence, respectively using passengers and taxis as vertexes in the graph, and connecting each pair of passenger vertexes with the corresponding taxi vertexes by using edges with weights as the preferential matching degrees of the passenger vertexes and the taxi vertexes;
and S32, solving the maximum weight matching of the bipartite graph by using a Kuhn-Munkres algorithm on the bipartite graph, wherein the matching result is the matching between the optimal passenger output by the algorithm and the taxi.
Further, S32 specifically includes the following steps:
s321, initializing a top mark of the bipartite graph, firstly selecting a part with a small number of top points in the bipartite graph as an X part, and selecting another part as a Y part, wherein for any top point i of the X part, the value X [ i ] of the top mark is the weight of the maximum side associated with the top point, and the top mark Y [ j ] of any top point j of the Y part is set to be 0.
S322. for each vertex in X, an augmented path is found in a subgraph (called an equal subgraph, where w [ i, j ] is the weight of the edge connecting vertex i and vertex j) that satisfies the formula X [ i ] + Y [ j ] ═ w [ i, j ]. The augmented path is characterized by: the starting point and the end point are unmatched vertexes and belong to an X part and a Y part respectively, nodes in the path are matched vertexes which belong to the X part and the Y part alternately and are not repeated in sequence, the path only has odd edges, the odd edge does not belong to a matched subgraph, and the even edge belongs to a matched subgraph. And if the augmentation path is found, taking all odd edges in the augmentation path as matching edges to obtain a new matching subgraph.
And S323, if the augmentation path cannot be found in the equal subgraph, modifying the top marks of the vertexes of the X part and the Y part, and expanding the range of the equal subgraph. Specifically, the subscripts of all the vertices in the X part are decreased by d, and the subscripts of all the vertices in the Y part are increased by d, where d is min (X [ i ] + Y [ j ] -w [ i, j ]), where node i belongs to an equal subgraph and node j does not belong to an equal subgraph. And searching an augmented path on the expanded equal subgraphs to obtain a new matched subgraph. If no augmentation path can be found, the top mark is modified continuously according to the method.
S324, repeating the steps S322 and S323 until all the vertexes in the X part are matched, wherein the matching result is bipartite graph maximum weight matching.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention provides a passenger and taxi matching method comprehensively considering various indexes for a taxi dispatching system of an on-line taxi taking platform, three input variables, namely passenger waiting time, order travel distance and distance between a passenger and a taxi, which are closely related to the taxi taking process are introduced, a fuzzy logic controller is used for carrying out fuzzy comprehensive judgment on the three input variables, the influence of initial conditions on the matching priority between the passenger and the taxi is comprehensively and effectively considered, the method cannot be trapped in local optimization under a certain index like the conventional matching method based on the nearest neighbor principle or the maximum profit principle, the method comprehensively considers the balance of indexes such as service quality, profit and the like, and the quality of matching between the passenger and the taxi is improved.
2. The invention provides a two-stage framework for a passenger and taxi matching model, and the model can be specifically divided into a priority calculation module and a matching module. The priority calculation module calculates the priority matching degree between each pair of passengers and the taxi by using a fuzzy logic controller according to the three input variables; the matching module converts the problem into a weighted matching problem of the bipartite graph, and solves the best matching between the passenger and the taxi by using a Kuhn-Munkres algorithm. The method is the first algorithm to try to prioritize passengers and taxis before matching them, which improves the fitting complexity of the algorithm model so that it can better handle the complex situations in the actual system.
3. The invention provides a scheduling scheme for matching passengers and taxis at fixed time intervals, the system puts the information of passengers getting off orders received in the time slices into a passenger sequence, puts the idle taxi information in the time slices into the taxi sequence, matches the passengers and the taxis in the two sequences when the scheduling time arrives, and moves the successfully matched passengers and the taxis out of the sequence. Different from a conversation type dispatching system based on first-come first-serve, the method considers global passenger and taxi information within a period of time, leaves space for global comprehensive optimization, and simultaneously guarantees real-time performance and high efficiency of dispatching.
Drawings
Fig. 1 is a flow chart of a real-time passenger and taxi matching method based on a fuzzy logic controller according to the present invention.
Fig. 2 is a block diagram of a fuzzy logic controller.
FIG. 3 is a graph of membership function design for example 1.
FIG. 4 is a graph of membership function design for example 2.
FIG. 5 is a graph of membership function design for example 3.
FIG. 6 is a diagram of an example fuzzy rule base design.
Fig. 7 is a schematic diagram of a passenger and taxi matching method based on the Kuhn-Munkres algorithm.
Detailed Description
The passenger and taxi matching method based on the fuzzy logic controller according to the present invention is further described with reference to the accompanying drawings and the specific embodiments.
The invention discloses a passenger and taxi matching method based on a fuzzy logic controller, wherein the flow schematic diagram of the passenger and taxi matching method based on the fuzzy logic controller is shown in figure 1, and the method specifically comprises the following steps:
s1, sampling continuous time discretization into a plurality of time slices, and discharging all passengers submitting orders to a taxi taking system into a passenger sequence and discharging idle taxis into a taxi sequence within set sampling interval time of the time slices.
And S2, simulating a non-digital decision-making mode of a human brain by adopting a fuzzy logic controller at a specific sampling moment, taking the waiting time of each passenger in the passenger sequence, the order travel distance and the distance between each passenger in the taxi sequence and the taxi as input index variables, and calculating the priority matching value between each pair of passengers and the taxi through fuzzy logic judgment.
And S3, constructing the passenger in the passenger sequence and the taxi in the taxi sequence into a bipartite graph, wherein the weight value between graph nodes of the bipartite graph is the preferential matching degree of the passenger and the taxi, and solving the maximum weight matching of the bipartite graph by adopting a Kuhn-Munkres algorithm to obtain the optimal matching scheme of the passenger and the taxi.
And S4, dispatching the taxis to dispatch the list according to the best matching scheme of the passengers and the taxis, keeping the passengers or the taxis which are not matched in the sequence, and waiting for the next sampling moment to carry out matching and dispatching.
In order to better show the passenger and taxi matching method based on the fuzzy logic controller, the invention carries out the following model construction:
consider an undirected graph G ═ V, E, representing a network of urban paths, where the set of vertices V represents the set of street locations where a passenger may get on or off the vehicle, and the set of edges E represents the set of roads in the road network connecting these vertices. And then, in order to realize the global optimal matching between the passengers and the taxis within a period of time, the time is discretized into a plurality of time slices, the length of each time slice is the time interval between two adjacent matching tasks, and the information of all passengers getting off the order and the idle taxis within the time interval is collected by the server and respectively arranged into a sequence. Passenger sequences and taxi sequences are the basis of subsequent scheduling, so that the algorithm can perform passenger and taxi matching in a more global angle, unlike the local matching performed by a first-come-first-serve strategy adopted by most scheduling systems. The setting of the interval time of the time slices is also very important, if the interval time is shorter, the algorithm is trapped in local matching, and if the interval time is longer, the real-time performance of dispatching vehicles on the taxi taking platform is deteriorated, so that the use of passengers and drivers is influenced. According to the experience of a large-scale online taxi taking platform, in the embodiment of the invention, the sampling interval time is set to be 2 seconds in both the embodiment 1 and the embodiment 2, and the sampling interval time is set to be 4 seconds in the embodiment 3, so that the real-time performance of the system can be ensured.
To match a passenger with a taxi, each passenger i in the passenger sequence holds the following relevant information: current position v of passenger i Passenger destination position d i And time of passenger order taking b i Wherein v is i And d i And also the vertices belonging to the set of vertices V. Binding v i 、d i The adjacency matrix of the road network graph G can be used for calculating the order travel distance TD of the passenger by using Dijkstra Algorithm i . To simplify the problem, only the number of each taxi is stored in the taxi sequence, and other attributes of the taxi that are not relevant to the matching problem are ignored.
At the scheduling time of each time slice, the algorithm will give a matching result to the current passenger sequence and taxi sequence. Noting that m represents passenger sequence length, n represents taxi sequence length, the matching result given by the algorithm at the time t can be formed by an m x n matrix H t Represents:
Figure BDA0003653841310000051
H t the following conditions are satisfied at the same time:
Figure BDA0003653841310000052
that is, each passenger only takes one taxi, and each taxi only carries one passenger.
Because the number of passengers in the sequence is not necessarily equal to the number of taxis at the time t, only the less passenger can be completely matched by the algorithm, and the number Q of passengers served by the taxis at the time t t Can be represented by the following formula:
Figure BDA0003653841310000053
the priority matching degree calculated in step S2 is a numerical score that measures the degree of potential willingness of a taxi to serve a passenger, and the higher the priority matching degree between the passenger and the taxi is, the easier the passenger and the taxi can be matched together in subsequent matching. Memory M t At time t, the priority matching degree matrix (with size of M × n) between all passengers and taxis, and the matrix element M t [i,j]Indicating the degree of preferential match between passenger i and taxi j at time t.
Referring to FIG. 2, to find the preferential matching matrix M t In step S2, a fuzzy logic controller is used, and S2 specifically includes the following steps:
and S21, determining input variables and output variables of a Fuzzy Logic Controller (FLC), taking the waiting time of each passenger, the travel distance of each passenger order and the distance between each passenger and a taxi as input variables, and taking the priority matching degree between each passenger and the taxi as output variables.
S22, designing and using a membership function to convert three input variables and one output variable from an accurate quantity into a fuzzy semantic quantity.
And S23, formulating a fuzzy rule base, and carrying out logic operation and control on the fuzzy semantic quantity of each membership degree through a fuzzy rule to obtain the relation between the input fuzzy variable and the output fuzzy variable.
And S24, defuzzifying the output fuzzy variable, and converting the output fuzzy variable with the membership degree into an accurate numerical value to obtain an accurate priority matching degree value.
In order to obtain the matching result of the passenger and the taxi comprehensively considering each index, the input of the fuzzy logic controller needs to have certain representativeness and universality. The service quality and profit level of the taxi taking system are considered as optimization targets of the matching algorithm. The service quality of the taxi taking system can be specifically used by the average waiting time T of passengers before getting on the taxi wait It is composed of two parts: average time T from passenger ordering to system completion matching match And the average time T for the taxi to go to the passenger position for order taking pick The formula for calculating the three times is as follows:
T wait =T match +T pick
Figure BDA0003653841310000061
Figure BDA0003653841310000062
wherein, b i Representing the time of order of passenger i, s t Representing the time consumed by the system for calculating the matching result at the time t, E (i, j) representing the shortest road network distance between the passenger i and the taxi j, and being obtained by calculation through a Dijkstra algorithm according to the adjacent matrix of the road network graph G, v j Representing the average speed of taxi j. In the embodiment of the invention, the average running speed of the taxi is assumed to be 35 km/h.
The profit PR of a taxi-taking order may be calculated by subtracting the expenditure EX from the income IN, where the passenger i places the orderDistance between revenue and order travel TD i In direct proportion, the expenditure is proportional to the total distance covered by the taxi in the order (the longer the journey, the more fuel consumed). After the passenger is matched with the taxi at the time t, the calculation formula of the total profit PR of the taxi taking platform is as follows:
PR=IN-EX
Figure BDA0003653841310000063
Figure BDA0003653841310000064
wherein, alpha and beta are proportionality coefficients. In the present embodiment, α is 1.5 and β is 0.5.
In order to optimize both the quality of service and the profit when matching the passenger with the taxi is performed, three indices of the order trip distance TD, the passenger-to-taxi distance PT and the passenger' S waiting time WT are selected as input variables in step S21. The order travel distance of the passenger i is TD i And the distance between the passenger i and the taxi j is recorded as PT i ,PT i Calculating the shortest road network distance E (i, j) between i and j, and recording the waiting time of the passenger i as WT i The calculation formula is as follows:
WT i =t-b i
the passenger waiting time WT has a great influence on the service quality, the order trip distance TD is a main factor affecting the profit, and the passenger and taxi distance PT can affect both the service quality and the profit. By using the three indexes as input variables of the fuzzy logic controller and the priority matching degree of the passenger and the taxi as output variables, the priority matching degree of each pair of the passenger and the taxi can be given under the condition of fully considering the service quality and the profit.
In step S22, three membership functions are constructed for each of three input variables and one output variable: short, medium and long (or low, medium and high) for describing fuzzy semantic features that each precise variable is attached to a concept of size. The output value membership of the membership function is a dimensionless number ranging from 0 to 1, representing the degree to which the precise variable belongs to the fuzzy set. The membership function can be constructed in various ways, and the trapezoidal membership function with high calculation efficiency is selected to convert an accurate variable into a fuzzy variable in consideration of real-time and rapid scheduling of an online taxi taking system. The trapezoidal membership function can be designed in different manners according to experience, and three embodiments of the invention provide different trapezoidal membership function designs, wherein the membership function of embodiment 1 is shown in fig. 3, the membership function of embodiment 2 is shown in fig. 4, and the membership function of embodiment 3 is shown in fig. 5.
In step S23, the fuzzy rule base is composed of a plurality of rules in the form of IF-THEN, which simulate the inference process of the human brain on the fuzzy semantic concept and determine the relationship between fuzzy variables (example of fuzzy rule: IFTD is short, PT is short, WT is short, THEN preferential matching degree is low). According to the experience of matching the passenger with the taxi history, a fuzzy rule base is set up 3 3 The correspondence relationship between 3 types of membership degrees of 3 types of input fuzzy variables and output fuzzy variables is defined as 27 rules.
For the fuzzy rule base, the rules are formulated according to the following experiences: the longer the order travel distance TD is, the shorter the passenger distance PT to the taxi is, the larger the profit of the order is, and the higher the preferential matching degree is; the longer the passenger has been waiting time WT, the longer the passenger is at a distance PT from the taxi, and the longer the passenger's total waiting time is, the higher the priority matching degree is. The rules specify that increasing the profit of the order is a higher priority than reducing the passenger's total waiting time, so that the shorter the passenger's distance PT from the taxi as a whole, the higher the priority matching degree, but the sensitivity of the priority matching degree as PT varies is not as high as other variables. According to the above principle, the specific design of the 27 rules in the fuzzy rule base is shown in fig. 6.
In step S24, the output fuzzy variable is defuzzified by the center of gravity method. The gravity center method firstly needs to calculate the gravity center position of each membership function, and the finally obtained accurate value O of the prior matching degree is as follows:
Figure BDA0003653841310000071
wherein o is k Representing degree of membership, a, of the kth fuzzy output result k Is the abscissa position of the center of gravity of the corresponding membership function. The membership degree of the output result can be obtained by calculation by using a cross operator and a merging operator in the fuzzy logic operation, wherein the cross operator is equivalent to the minimum value in the mathematical operation, and the merging operator is equivalent to the maximum value in the mathematical operation. Specifically, for each fuzzy output result (with low, medium or high degree of priority matching), all fuzzy rules with output as the result are found, the degree of output membership of the fuzzy result can be obtained by using a merging operator operation on the degrees of output membership of the rules, and the degree of output membership of each rule is obtained by using a cross operator operation on the degrees of membership of all IF condition variables of the rule.
For example, if the membership output o of "high priority matching" is to be calculated 3 Firstly, all 4 fuzzy rules with high matching degree are found, and the output membership degree of the 4 fuzzy rules is calculated by using a cross operator. Taking the conditional rule of "TD medium, PT short, WT long" as an example, the membership degree of "order journey medium" is recorded as m 1 The membership degree of 'short distance between passenger and taxi' is m 2 The membership degree of "long waiting time of passenger" is m 3 Then the output membership under this rule is r 1 =min(m 1 ,m 2 ,m 3 ). Then, for 4 rules r satisfying the condition 1 、r 2 、r 3 And r 4 The output membership degree is calculated by using a merging operator to obtain a membership degree o with high priority matching degree 3 =max(r 1 ,r 2 ,r 3 ,r 4 ). The accurate value O of the total priority matching degree can also be output according to the membership degree O of the 3 fuzzy output results 1 、o 2 And o 3 And calculating by using a gravity center method.
In step S3, the matrix M of the degree of priority matching at time t obtained in step S2 is used t For passenger and taxi sequencesExcellent match H t [i,j]The optimal matching is aimed at the sum F of the priority matching degrees of the matched passenger and the taxi pair t Maximum, F t The calculation formula of (2) is as follows:
Figure BDA0003653841310000081
in order to achieve the optimal matching goal, a bipartite graph is constructed by using a passenger sequence and a taxi sequence, the passenger and the taxi are respectively used as vertexes in the graph, and each pair of passenger vertexes and taxi vertexes are connected by using an edge with the weight being the preferential matching degree of the passenger vertexes and the taxi vertexes. The passenger top points and the passenger top points, and the taxi top points are not connected with each other.
And solving the maximum weight matching of the bipartite graph by using a Kuhn-Munkres algorithm, wherein the result of the maximum weight matching is the optimal matching between the passenger and the taxi given by the algorithm. The method for solving the maximum weight matching of the bipartite graph by using the Kuhn-Munkres algorithm specifically comprises the following steps of:
1. initializing the top mark of the bipartite graph, firstly selecting a part with a small number of top points in the bipartite graph as an X part, and selecting another part as a Y part, wherein for any top point i of the X part, the value X [ i ] of the top mark is the weight of the maximum side associated with the top point, and the top mark Y [ j ] of any top point j of the Y part is set to be 0.
2. For each vertex in X, an augmented path is found in a subgraph (called an equal subgraph, where w [ i, j ] is a weight of an edge connecting vertex i and vertex j) that satisfies the formula X [ i ] + Y [ j ] ═ w [ i, j ]. The augmented path is characterized by: the starting point and the end point are unmatched vertexes and belong to an X part and a Y part respectively, nodes in the path are matched vertexes which belong to the X part and the Y part alternately and are not repeated in sequence, the path only has odd edges, the odd edge does not belong to a matched subgraph, and the even edge belongs to a matched subgraph. And if the augmentation path is found, taking all odd edges in the augmentation path as matching edges to obtain a new matching subgraph.
3. If the augmentation path can not be found in the equal subgraph, modifying the top marks of the vertexes of the X part and the Y part, and expanding the range of the equal subgraph. Specifically, the superscripts of all the vertices in the X part are decreased by d, the superscripts of all the vertices in the Y part are increased by d, d is min (X [ i ] + Y [ j ] -w [ i, j ]), a node i in the equation belongs to an equal subgraph, and a node j does not belong to an equal subgraph. And searching an augmentation path on the expanded equal subgraph to obtain a new matching subgraph. If no augmentation path can be found, the topmark is continuously modified according to the method.
4. And (4) repeating the step (2) and the step (3) until all the vertexes in the X part are matched, wherein the matching result is bipartite graph maximum weight matching.
An example of solving the maximum weight match of a bipartite graph using the Kuhn-Munkres algorithm is shown in fig. 7, where there are 3 taxis and 4 passengers, all of which have a preferential match with each other. And finding the maximum weight matching (the bold connecting line is the matching result) of the bipartite graph and the corresponding equal subgraph thereof by using a Kuhn-Munkres algorithm.
In conclusion, the invention has the following beneficial effects:
1. the invention provides a passenger and taxi matching method comprehensively considering various indexes for a taxi scheduling system of an on-line taxi-taking platform, three input variables, namely passenger waiting time, order travel distance and distance between a passenger and a taxi, which are closely related to the taxi-taking process are introduced into the method, a fuzzy logic controller is used for carrying out fuzzy comprehensive judgment on the three input variables, the influence of initial conditions on the matching priority between the passenger and the taxi is comprehensively and effectively considered, the method cannot be trapped into local optimum under certain indexes like the conventional matching method based on the most adjacent principle or the maximum principle, the method comprehensively considers the balance of indexes such as service quality, profit and the like, and the quality of the matching between the passenger and the taxi is improved.
2. The invention provides a two-stage framework for a passenger and taxi matching model, and the model can be specifically divided into a priority calculation module and a matching module. The priority calculation module calculates the priority matching degree between each pair of passengers and the taxi by using a fuzzy logic controller according to the three input variables; the matching module converts the problem into a weighted matching problem of the bipartite graph, and solves the best matching between the passenger and the taxi by using a Kuhn-Munkres algorithm. The method is the first algorithm to try to prioritize passengers and taxis before matching them, which increases the complexity of the fit of the algorithm model, enabling it to better handle complex situations in the actual system.
3. The invention provides a scheduling scheme for matching passengers and taxis at fixed time intervals, the system puts the information of passengers getting off orders received in the time slices into a passenger sequence, puts the idle taxi information in the time slices into the taxi sequence, matches the passengers and the taxis in the two sequences when the scheduling time arrives, and moves the successfully matched passengers and the taxis out of the sequence. Different from a conversation type dispatching system based on first-come first-serve, the method considers global passenger and taxi information within a period of time, leaves space for global comprehensive optimization, and simultaneously guarantees real-time performance and high efficiency of dispatching.
The above description is intended to describe in detail the preferred embodiments of the present invention, but the embodiments are not intended to limit the scope of the claims of the present invention, and all equivalent changes and modifications made within the technical spirit of the present invention should fall within the scope of the claims of the present invention.

Claims (10)

1. A passenger and taxi matching method based on a fuzzy logic controller is characterized by comprising the following steps:
s1, sampling continuous time in a discretization mode into a plurality of time slices, and discharging all passengers submitting orders to a taxi taking system into a passenger sequence and discharging idle taxis into a taxi sequence within set sampling interval time of the time slices;
s2, taking the waiting time of the passenger, the order travel distance of the passenger and the distance between the passenger and the taxi as input variables of a fuzzy logic controller at a specific sampling moment, and calculating a priority matching degree value between the passenger and the taxi through fuzzy logic judgment;
s3, constructing a passenger sequence and a taxi sequence into a bipartite graph, wherein the weight value between graph nodes of the bipartite graph is the priority matching degree of the passenger and the taxi, and solving the maximum weight matching of the bipartite graph by adopting a Kuhn-Munkres algorithm to obtain the optimal matching scheme of the passenger and the taxi;
and S4, scheduling the taxis to dispatch the list according to the optimal matching scheme of the passengers and the taxis, continuously keeping the passengers or the taxis which are not successfully matched in the passenger sequence or the taxi sequence, and waiting for the next sampling time to perform matching and scheduling.
2. The passenger and taxi matching method based on the fuzzy logic controller according to claim 1, wherein the step S2 comprises the steps of:
s21, taking the waiting time of each passenger, the travel distance of each passenger order and the distance between each passenger and a taxi as input variables of a fuzzy logic controller, and taking the priority matching degree between each passenger and the taxi as output variables of the fuzzy logic controller;
s22, designing and adopting a membership function to convert three input variables and one output variable from an accurate quantity into a fuzzy semantic quantity;
s23, formulating a fuzzy rule base, and carrying out logic operation and control on the fuzzy semantic quantity of each membership degree through a fuzzy rule to obtain the relation between an input fuzzy variable and an output fuzzy variable;
and S24, defuzzifying the output fuzzy variable, and converting the output fuzzy variable with the membership degree into an accurate numerical value to obtain an accurate priority matching degree value.
3. A passenger and taxi matching method based on fuzzy logic controller according to claim 2, wherein in step S21, waiting time of passenger i is marked as WT i And the order travel distance of the passenger i is recorded as TD i And the distance between the passenger i and the taxi j is recorded as PT i ,WT i The calculation formula of (a) is as follows:
WT i =t-b i
where t represents the scheduling time, b i Representative multiplierTime of ordering, PT, guest i i The shortest road network distance E (i, j) between i and j is calculated.
4. The fuzzy logic controller based passenger and taxi matching method according to claim 2, wherein in step S22, three membership functions are constructed for each of three input variables and one output variable, the membership of the output value of the membership function is a dimensionless number ranging from 0 to 1, and the membership function selects the trapezoidal membership function having high computational efficiency to perform the conversion of the precise variable to the fuzzy variable.
5. The passenger and taxi matching method based on the fuzzy logic controller as claimed in claim 2, wherein in step S23, the fuzzy rule base is composed of a plurality of rules in the form of "IF-THEN", and 3 is established in total in the fuzzy rule base 3 The correspondence relationship between each of 3 types of membership degrees of 3 types of input fuzzy variables and output fuzzy variables is defined as 27 rules.
6. The fuzzy logic controller based passenger and taxi matching method according to claim 2, wherein in step S24, the output fuzzy variable is defuzzified by using a gravity center method, and the accurate value O of the preferential matching degree calculated by the gravity center method is as follows:
Figure FDA0003653841300000011
wherein o is k Representing degree of membership, a, of the kth fuzzy output result k Is the abscissa position of the center of gravity of the corresponding membership function.
7. The passenger and taxi matching method based on the fuzzy logic controller according to claim 1, wherein the step S3 comprises the steps of:
s31, constructing a bipartite graph by using a passenger sequence and a taxi sequence, wherein the passenger sequence and the taxi sequence are respectively used as vertexes in the graph, each pair of passenger vertexes is connected with the taxi vertex by using a side, and the weight of the side is the priority matching degree between the passenger and the taxi;
and S32, solving the maximum weight matching of the bipartite graph by using a Kuhn-Munkres algorithm, wherein the maximum weight matching result is used as the output optimal passenger to be matched with the taxi.
8. The passenger and taxi matching method based on the fuzzy logic controller according to claim 7, wherein the step S32 comprises the following steps:
s321, dividing a part with a small number of vertexes in the bipartite graph into an X part, dividing another part with a large number of vertexes in the bipartite graph into a Y part, setting a superscript X [ i ] of any vertex i of the X part as a weight of a maximum side associated with the vertex, and setting superscripts Y [ j ] of any vertex j of the Y part as 0;
s322, for each vertex in the X part, finding an augmentation path in equal subgraphs satisfying the formula X [ i ] + Y [ j ] ═ w [ i, j ], and taking all odd-numbered edges in the augmentation path as matching edges to obtain a new matching subgraph, wherein w [ i, j ] is a weight of the edge connecting the vertex i with the vertex j;
s323, if the augmentation path can not be found in the equal subgraph, modifying the top marks of each vertex of the X part and the Y part, and expanding the range of the equal subgraph;
s324, repeating the steps S322 and S323 until all the vertexes in the X part are matched, and obtaining the matching result which is the bipartite graph maximum weight matching.
9. The fuzzy logic controller based passenger and taxi matching method of claim 8, wherein in step S322, the augmentation path is characterized by: the starting point and the end point are unmatched vertexes and belong to an X part and a Y part respectively, nodes in the path are matched vertexes which belong to the X part and the Y part alternately and are not repeated in sequence, the path only has odd edges, the odd edge does not belong to a matched subgraph, and the even edge belongs to a matched subgraph.
10. The fuzzy logic controller based passenger and taxi matching method of claim 8, wherein in step S323, the X and Y vertex indices are modified by: and d is decreased from the top marks of all the vertexes of the X part, d is increased from the top marks of all the vertexes of the Y part, and the calculation formula of d is that d is min (X [ i ] + Y [ j ] -w [ i, i ]), the node i in the formula belongs to an equal subgraph, and the node j does not belong to an equal subgraph.
CN202210559859.0A 2022-05-20 2022-05-20 Passenger and taxi matching method based on fuzzy logic controller Pending CN115099569A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210559859.0A CN115099569A (en) 2022-05-20 2022-05-20 Passenger and taxi matching method based on fuzzy logic controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210559859.0A CN115099569A (en) 2022-05-20 2022-05-20 Passenger and taxi matching method based on fuzzy logic controller

Publications (1)

Publication Number Publication Date
CN115099569A true CN115099569A (en) 2022-09-23

Family

ID=83289266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210559859.0A Pending CN115099569A (en) 2022-05-20 2022-05-20 Passenger and taxi matching method based on fuzzy logic controller

Country Status (1)

Country Link
CN (1) CN115099569A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116168530A (en) * 2023-04-21 2023-05-26 盐城市羽林科技有限公司 Intelligent dispatching and distributing system for taxis

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1460966A (en) * 2003-06-18 2003-12-10 清华大学 Computer performance index quantification method based on fuzzy logic
CN108846057A (en) * 2018-06-01 2018-11-20 山东师范大学 A kind of time series long-range forecast method based on band-like time-varying blurring information
CN111191899A (en) * 2019-12-23 2020-05-22 华南理工大学 Vehicle scheduling method based on region division parallel genetic algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1460966A (en) * 2003-06-18 2003-12-10 清华大学 Computer performance index quantification method based on fuzzy logic
CN108846057A (en) * 2018-06-01 2018-11-20 山东师范大学 A kind of time series long-range forecast method based on band-like time-varying blurring information
CN111191899A (en) * 2019-12-23 2020-05-22 华南理工大学 Vehicle scheduling method based on region division parallel genetic algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘译文: "基于分布式计算智能的城市出租车最优化调度算法", 中国优秀硕士学位论文全文数据库 工程科技II辑, no. 1, 15 January 2020 (2020-01-15), pages 034 - 1328 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116168530A (en) * 2023-04-21 2023-05-26 盐城市羽林科技有限公司 Intelligent dispatching and distributing system for taxis

Similar Documents

Publication Publication Date Title
CN108417031B (en) Intelligent parking berth reservation strategy optimization method based on Agent simulation
US9116007B2 (en) System and method for journey planning, finding K shortest paths through a time/space network
CN109544929A (en) A kind of control of vehicle low-carbon and abductive approach, system, equipment and storage medium based on big data
CN111879329B (en) Customized public transport passable shortest path calculation method based on A-x algorithm
CN114399095A (en) Cloud-side-cooperation-based dynamic vehicle distribution path optimization method and device
CN112418514A (en) Method for optimizing campus bus route planning by using ant colony system
CN111126799A (en) Shared network driver and crew matching method based on bipartite graph
CN116663811A (en) Scheduling matching method and device for reciprocating dynamic carpooling of inter-city passenger transport
CN115099569A (en) Passenger and taxi matching method based on fuzzy logic controller
CN111882915A (en) On-demand bus route planning method adopting composite algorithm and interactive model
CN112330001A (en) Logistics distribution vehicle route optimization method based on discrete bat algorithm
CN113379159B (en) Taxi driver passenger searching route recommendation method based on gray model and Markov decision process
CN115423168A (en) Customized public transport network optimization method and system considering service stability
CN115048576A (en) Flexible recommendation method for airport passenger group travel mode
Liu et al. Stochastic one-way carsharing systems with dynamic relocation incentives through preference learning
CN111723871B (en) Estimation method for real-time carriage full load rate of bus
CN110674990B (en) Instant distribution path selection method and system with sliding window updating mechanism
CN112529338A (en) Method for calculating degree of forward road
CN112991801A (en) Optimal safety path obtaining method based on time-varying road condition
CN112949987A (en) Taxi dispatching and matching method, system, equipment and medium based on prediction
CN115083198B (en) Multi-vehicle power resource scheduling method and device
CN113222248B (en) Automatic taxi-driving charging pile selection method
CN114692955A (en) Taxi path planning method based on Markov decision and queuing theory
CN111611332B (en) Optimization method and system for route transfer
CN114462898A (en) Road planning management method and system based on geographic information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination