Dijkstra algorithm-based vehicle route planning method and system

Through the vehicle route planning method based on the Dijkstra algorithm, the multi-objective decision-making optimization problem in bus route planning is solved, fully automated route planning is achieved, operating costs are reduced and passenger experience is improved.

CN118780452AInactive Publication Date: 2024-10-15XIAMEN KING LONG UNITED AUTOMOTIVE IND CO LTD

Patent Information

Application Number
CN202410807960.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the multi-objective decision-making optimization problem in bus route planning, resulting in high operating costs and poor passenger travel experience.

Method used

The vehicle route planning method based on Dijkstra algorithm is used to calculate the shortest path between each station by obtaining the actual traffic route map and bus dispatch model, and use the improved Dijkstra algorithm to find the lowest cost path from the origin station to the target station, delete Redundant sites enable fully automated route planning.

Benefits of technology

It reduces operating costs, improves passenger travel experience, and uses real-time data for vehicle route planning, liberating labor and improving planning accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780452A_ABST
    Figure CN118780452A_ABST
Patent Text Reader

Abstract

The invention discloses a Dijkstra algorithm-based vehicle route planning method and a Dijkstra algorithm-based vehicle route planning system. The Dijkstra algorithm-based vehicle route planning method comprises the following steps of S1, acquiring an actual traffic route map and a bus scheduling model; s2, according to the actual traffic route map and the bus scheduling model, obtaining the shortest path between the stations; and S3, according to the shortest path between the stations, obtaining a path with the lowest cost from the starting station to the target station by using an improved Dijkstra algorithm. By adopting the technical scheme of the invention, the complex problem in bus route planning is solved, the operation cost is reduced, and the travel experience of passengers is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of path planning, and in particular relates to a vehicle route planning method and system based on Dijkstra algorithm. Background Art

[0002] With the continuous improvement of automotive electronic information and intelligent technologies, achieving high reliability and high quality transportation services is of great significance to social development and people's economic livelihood. Flexible bus systems have gradually become a new type of public transportation that can better meet people's travel needs and improve the convenience and comfort of public transportation. Flexible bus is a demand-responsive bus mode. Passengers can book buses according to their personal needs and only need to meet a certain number of people to travel. Unlike traditional buses, flexible bus vehicles are not fixed, but are dispatched according to passenger needs and real-time road conditions. However, with the popularization of public transportation and the improvement of traffic convenience, road conditions have become more complex and changeable, with various restrictions and conditions, which has brought greater complexity to route arrangement and vehicle scheduling. At present, vehicle path planning and scheduling in the industry usually rely on historical experience and manual methods, and cannot solve the optimization problem of multi-objective decision-making in bus path planning. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a vehicle route planning method and system based on the Dijkstra algorithm to solve the complex problems in bus route planning, reduce operating costs, and improve passengers' travel experience.

[0004] To achieve the above object, the present invention adopts the following technical solution:

[0005] A vehicle route planning method based on Dijkstra algorithm comprises the following steps:

[0006] Step S1, obtaining an actual traffic route map and a bus dispatch model;

[0007] Step S2: Obtain the shortest path between each station according to the actual traffic route map and the bus dispatch model;

[0008] Step S3: According to the shortest path between each station, the improved Dijkstra algorithm is used to obtain the lowest cost path from the origin station to the destination station.

[0009] Preferably, step S2 comprises:

[0010] Transform the traffic route map into an adjacency matrix based on the bus dispatch model;

[0011] According to the adjacency matrix, the Flody algorithm is used to calculate the shortest path between each site.

[0012] Preferably, step S3 comprises:

[0013] According to the shortest path between each station, the improved Dijkstra algorithm is used for path planning to obtain the lowest cost path from the origin station to the destination station;

[0014] In the least-cost path from the origin to the destination, redundantly traversed stations are deleted and the untraversed stations are assigned to specific trips.

[0015] The present invention also provides a vehicle route planning system based on Dijkstra algorithm, comprising:

[0016] The first processing module is used to obtain the actual traffic route map and the bus dispatch model;

[0017] The second processing module is used to obtain the shortest path between each station according to the actual traffic route map and the bus scheduling model;

[0018] The third processing module is used to obtain the path with the lowest cost from the originating station to the destination station by using the improved Dijkstra algorithm according to the shortest path between the stations.

[0019] Preferably, the second processing module comprises:

[0020] A conversion unit, used for converting a traffic route map into an adjacency matrix based on a bus scheduling model;

[0021] The calculation unit is used to calculate the shortest path between each site using the Flody algorithm according to the adjacency matrix.

[0022] Preferably, the third processing module comprises:

[0023] A construction unit is used for obtaining a path with the lowest cost from a starting station to a target station by using a path planning method of an improved Dijkstra algorithm according to the shortest path between the stations;

[0024] The checking unit is used for deleting redundantly traversed stations in the path with the lowest cost from the origin station to the destination station and allocating the untraversed stations to a specific trip.

[0025] The present invention firstly considers the road conditions, filters out the sections that are too far, too narrow or impassable, and establishes the shortest path between bus stops; secondly, adopts the improved Dijkstra algorithm to find the lowest-cost path from the starting station to the target station; the present invention also includes adding isolated stations and deleting redundant stations in the itinerary to avoid the situation where some stations are not passed or are passed repeatedly. The technical solution of the present invention can achieve the goal of fully automated route planning, liberate labor, plan the vehicle's path according to real-time data, reduce operating costs and improve passengers' riding experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0027] Figure 1 This is a flow chart of a vehicle route planning method based on Dijkstra algorithm according to an embodiment of the present invention;

[0028] Figure 2 For the actual traffic route map;

[0029] Figure 3 Schematic diagram of the path planning process;

[0030] Figure 4 This is a schematic diagram showing the impact of the number of transfer points on costs;

[0031] Figure 5 This is a schematic diagram showing the impact of the number of transfer points on the average waiting time of passengers;

[0032] Figure 6 This is a schematic diagram showing the impact of the total number of departure stations on costs;

[0033] Figure 7 Schematic diagram of the impact of the total number of departure stations on the average waiting time of passengers. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0036] Embodiment 1:

[0037] like Figure 1 As shown, an embodiment of the present invention provides a vehicle route planning method based on Dijkstra algorithm, comprising the following steps:

[0038] Step S1, obtaining an actual traffic route map and a bus dispatch model;

[0039] Step S2: Obtain the shortest path between each station according to the actual traffic route map and the bus dispatch model;

[0040] Step S3: According to the shortest path between each station, the improved Dijkstra algorithm is used to obtain the path with the lowest cost from the originating station to the destination station.

[0041] The actual traffic route map is defined as a directed graph G(V, E), where V is the set of bus stops and transfer stations. Figure 2 As shown, V can be expressed as V = {v1, .., v n}, E is the set of edges, denoted as E = {e(u, v), where u, v∈V∧u≠v}; the bus itinerary set m is denoted as S = {s1, s2, ..., s m}. Itinerary Collections k ∈S is represented by τ(s)={v i , ..., v j}, where v i is the departure station, v j It is the terminal. Figure 2 There are 4 terminal nodes, 3 of which are starting points; 1 is the location of the subway station (terminal station); and 9 ordinary bus stops. If you start from the 3 starting points, you will find 3 parallel routes that pass through all the bus stops and finally reach the subway station. Passengers can only get on the bus at the 9 stops, namely the 3 starting stations.

[0042] The total path length τ(s) of a trip s is the sum of the distances to all adjacent sites, as shown in formula (1):

[0043]

[0044] st z i,j ∈{0,1},where i,j=1,2,..,S (2)

[0045] Where i and j are adjacent bus stops; d(i, j) is the distance between bus stops i and j; zi,j is a binary variable. If the station j of this trip is the next station of station i, then z i,j is equal to 1, otherwise z i,j is 0.

[0046] The total passenger volume P(v,u) is equal to the sum of the passenger volumes at all stations in a journey, where v represents the starting point and u represents the end point, and is expressed using formula (3):

[0047]

[0048] Among them, C(b) i,j (s) represents the number of passengers on bus b at stop i.

[0049] The passenger capacity b of the bus can be updated according to the passenger capacity of the bus station, as shown in formula (4):

[0050]

[0051] Among them, C(b) i,j (s) is the number of passengers who board bus b when it first arrives at station i, B(b) i,j (s) is the number of passengers who get on bus b at station i, A(b)i(s) is the number of passengers who get off at station i, and equation (4) is subject to the constraints of equations (5) to (7).

[0052]

[0053] In formula (5), cap(b) is the total capacity of vehicle b (i.e., the total number of passengers that can be carried). The total number of passengers on vehicle b minus the total number of passengers that have been carried between stations i and j must be greater than or equal to the total number of passengers that have boarded between stations i and j. Formula (6) indicates that the total number of passengers that have been carried between stations i and j must be less than the number of people waiting for the bus between stations i and j, where p i,j (s) is the number of passengers waiting at station i. Formula (7) indicates that the total number of passengers boarding at station j must be greater than or equal to the total number of passengers getting off at station i.

[0054] Minimizing the number of buses that need to be dispatched is conducive to reducing operating costs. In addition, the travel needs of all passengers need to be met, where numb is the number of buses and the minimum value of nb is 1, that is, at least one bus is dispatched, as shown in Equations (8) and (9).

[0055] min(numb) (8)

[0056]

[0057] From the perspective of travel, each trip has an optimization target τp(s). Each trip is determined by selecting a travel route from candidate routes based on the optimization target τp(s) and the constraints. Therefore, the bus scheduling model in the present invention is expressed as formula (10):

[0058] min(numb,τp(s)) (10)

[0059] Limited by Eq(2),(5),(6),(7)

[0060] As an implementation method of an embodiment of the present invention, in step S2, the Floyd algorithm is used to calculate the shortest distance between any two sites. The Floyd algorithm is an algorithm for calculating the shortest path based on greed and dynamic programming techniques, which can effectively process weighted directed graphs or edge length matrices in directed graphs. In this stage, unnecessary transfer points can be eliminated, including narrow roads, road maintenance, and roads that buses cannot pass. Based on the bus scheduling model, the actual traffic map is converted into an adjacency matrix. In addition to recording the information of each bus stop, the adjacency matrix MG also records the intersections of each road. The intersections of the roads are transfer points (transfer points). MG is defined as the Euclidean distance pair between any two points. The diagonal distance of the adjacency matrix MG is 0, as shown in Equations (11) and (12).

[0061] MG=MG T (11)

[0062] Diag(MG)=0 (12)

[0063] In addition, in order to record the path sequence, the path matrix Record the path sequence with the shortest distance between bus stops, and set the initial value to -1, as shown in formula (13). Represents the adjacency matrix processed by Floyd's algorithm. Record the shortest distance s between bus stops, with the initial value set to 0.

[0064]

[0065] After the adjacency matrix MG is generated, the first stage is to calculate the shortest path between bus stops. There are multiple transfer stations between any pair of bus stops, so there are multiple paths between bus stops. Suppose we want to calculate the shortest path between station f and station g, with station f as the starting point and station g as the end point. DIS f,g,h is the shortest path length from f to g, and only the nodes in (1, .., h) are set as intermediate nodes. Whether to update the path length is divided into the following two cases:

[0066] In equation (14), if the shortest path is determined to pass through node h, and it is found that the path is shorter, the path length is updated as follows:

[0067] DIS f,g,h =DIS g,h,h-1 +DIS h,g,h-1 (14)

[0068] On the other hand, if the path does not pass through station h, the path length remains unchanged, as shown in formula (15):

[0069] DIS f,g,h =DIS f,g,h-1 (15)

[0070] From this, the Freud relationship can be derived, as shown in formula (16):

[0071] DIS f,g,h = min(DIS f,g,h-1 ,DIS f,h,h-1 +DIS h,g,h-1 ) (16)

[0072] As an implementation of the embodiment of the present invention, in step S3, the route planning process is divided into path construction and site checking.

[0073] The path is constructed as follows:

[0074] According to the principle of Dijkstra algorithm, once the starting point and the end point are determined, the route from the starting point to the end point can be found. Figure 3 For example, plan a path starting from node 0 and ending at site 4.

[0075] Different from the traditional Dijkstra algorithm, the route planning of the improved Dijkstra algorithm adopted in the embodiment of the present invention not only considers the distance between nodes, but also utilizes the composite function τp(v,u), as shown in formula (17). Wherein, P(v,u) represents the total number of passengers carried. α is a threshold value set according to the operator's requirements. The larger the value of τp(v,u), the higher the cost.

[0076]

[0077] Path construction includes the following steps:

[0078] Step 1: Initialize cost[v0], record the cost from the starting node to other sites, and set the starting point v0, as shown in formula (18). Set the distance of the starting site to 0 and the distance of all other sites to infinity. In order to facilitate the construction of the path, an array named previous[] is added to record the previous site (parent site) of each node. In addition, use visited[v i ] to track site v i Is it included in the itinerary? i If the site contains i , then visited[v i ] is set to 1; otherwise, it is set to 0, as shown in formula (19).

[0079]

[0080]

[0081] Step 2: For the currently selected site v i , traverse site v i All neighboring sites k and update the minimum cost of neighboring sites. If the current site v i If the distance to the neighbor site k is less than the current minimum cost of the neighbor site, the minimum cost of the neighbor site is updated to the new cost, and previous[k] is updated to the current site v i , as shown in formula (20).

[0082]

[0083] Step 3: Return to step 2 until the target site is reached, and then end the path building subroutine.

[0084] The site inspection is as follows:

[0085] The improved Dijkstra algorithm of the embodiment of the present invention first determines the shortest path from each node to the target node. There may be a situation where a site is traversed multiple times or not traversed during the path construction. In this case, it is necessary to decide whether to delete the redundantly traversed sites and assign the untraversed sites to a specific trip s. i .

[0086] Redundant stops: If multiple trips cover a stop w, consider removing it to reduce operating costs. Select trip s from all trips with the lowest cost after adding stop w. i , and retain site w. For all except s i For the remaining trips that include station w, delete station w from the remaining trips, as shown in formula (21).

[0087]

[0088] Isolated site: When all trips i After all the destinations are reached, if there is a station u that is not included in any itinerary, consider including it in itinerary s i From all the trips, select the trip s with the lowest total cost after adding the stop u. i , as shown in formula (22).

[0089]

[0090] The embodiment of the present invention adopts an improved Dijkstra algorithm to optimize the vehicle's path planning by planning a path trajectory with the minimum cost; the cost is defined as the path length divided by the number of passengers to ensure that both the number of passengers and the path length are considered. The embodiment of the present invention takes into account the trade-off between the number of passengers and the path length, so that the optimal path planning solution can be found, unnecessary driving distance and time can be reduced, the accuracy and efficiency of planning can be improved, and vehicle planning and scheduling can be further made more efficient and economical, which helps to improve the overall operational efficiency of the public transportation system and the travel experience of passengers.

[0091] Simulation experiment

[0092] In order to verify the performance of the embodiment of the present invention (BusGuide algorithm), the performance of BusGuide was compared with that of the greedy algorithm and the RRT algorithm. The greedy algorithm is a traditional path planning method, which is closer to the manual planning method, while RRT is usually used in static traffic environments. Two experiments were designed. The first experiment verified the impact of the total number of transfer points (transfer points) on the cost and the average waiting time of passengers. The second experiment verified the impact of the number of departure stations on the cost and the average waiting time of passengers. The greedy method is a traditional manual scheduling method, and Table 1 sets the experimental parameters.

[0093] Table 1

[0094] project parameter Area size (km) 30×30 Number of starting sites 3-12 Number of endpoints 1 Number of transfer stations 20-100 Maximum passenger capacity of the vehicle 60 bits Total number of passengers per stop 2-10 The number of runs for each set of experiments, et 100 times Simulation working time of traffic environment 3 hours

[0095] The impact of the total number of transit points on algorithm performance

[0096] The experiment compares the performance of the three methods under the change of the number of transfer stations. The number of starting stations is fixed at 3, the number of transfer stations increases from 10 to 100, the total number of passengers is limited to between 10 and 55, and each group of experiments is run 100 times to get the average value. Figure 4The experimental results show that as the number of transfer points increases, the travel cost gradually increases. When the total number of transfer points exceeds 20, the gap between BusGuide and the greedy method and RRT algorithm gradually widens. BusGuide considers both the travel cost and the degree of bus congestion to ensure that the workload of each bus is more balanced. Therefore, the travel cost of BusGuide is lower than that of the greedy method and RRT algorithm. Among them, the RRT algorithm has the highest average cost, and when the number of transfer points reaches 55, the average travel cost exceeds 12.

[0097] As the number of transfer points increases, the waiting time of passengers gradually increases. Since BusGuide considers the travel cost, it distributes the workload more evenly to the buses, thus reducing the burden on congested buses. On the other hand, the greedy method only considers the shortest path, so BusGuide is better than the greedy method in terms of the average waiting time of passengers. However, the RRT algorithm, due to its random exploration of routes and lack of consideration of cost factors, leads to the longest average waiting time for passengers, especially when the number of transfer points increases, such as Figure 5 shown.

[0098] The impact of the total number of starting sites on the algorithm performance:

[0099] The experiment of the embodiment of the present invention aims to change the number of starting stations and analyze the impact of BusGuide, Greedy Method, and RRT method on cost and average passenger waiting time. The number of starting stations is fixed to 3, and only one bus is dispatched to each starting station. The number of transfer points is fixed to 50, and 1-3 passengers are randomly assigned to each station. Each experimental result is performed 100 times and the average is taken.

[0100] Figure 6 Experimental results showing the trip cost. It can be observed that as the number of starting stations increases, BusGuide gradually approaches the greedy method. However, BusGuide takes the trip cost into account, so the average passenger waiting time is shorter compared to the greedy method. On the other hand, RRT has the highest cost. When the number of transfer points is 3, the average cost per passenger is 7, and when the number of transfer points is 12, the average cost increases to 9.

[0101] Figure 7 Results showing average passenger waiting time. The experimental results show that increasing the total number of starting stations not only enhances the riding experience, but also leads to higher operating costs. Among the three methods, BusGuide has the shortest average passenger waiting time and the longest RRT; when the number of starting stations is 12, BusGuide has the shortest average passenger waiting time.

[0102] Embodiment 2:

[0103] The embodiment of the present invention further provides a vehicle route planning system based on the Dijkstra algorithm, comprising:

[0104] The first processing module is used to obtain the actual traffic route map and the bus dispatch model;

[0105] The second processing module is used to obtain the shortest path between each station according to the actual traffic route map and the bus scheduling model;

[0106] The third processing module is used to obtain the path with the lowest cost from the originating station to the destination station by using the improved Dijkstra algorithm according to the shortest path between the stations.

[0107] As an implementation of the embodiment of the present invention, the second processing module includes:

[0108] A conversion unit, used for converting a traffic route map into an adjacency matrix based on a bus scheduling model;

[0109] The calculation unit is used to calculate the shortest path between each site using the Flody algorithm according to the adjacency matrix.

[0110] As an implementation of the embodiment of the present invention, the third processing module includes:

[0111] A construction unit is used for obtaining a path with the lowest cost from a starting station to a target station by using a path planning method of an improved Dijkstra algorithm according to the shortest path between the stations;

[0112] The checking unit is used for deleting redundantly traversed stations in the path with the lowest cost from the origin station to the destination station and allocating the untraversed stations to a specific trip.

[0113] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A vehicle route planning method based on Dijkstra algorithm, characterized in that: The following steps are involved: Step S1, obtaining an actual traffic route map and a bus dispatch model; Step S2: Obtain the shortest path between each station according to the actual traffic route map and the bus dispatch model; Step S3: According to the shortest path between each station, the improved Dijkstra algorithm is used to obtain the lowest cost path from the origin station to the destination station.

2. The vehicle route planning method based on Dijkstra algorithm as claimed in claim 1, characterized in that: Step S2 includes: Transform the traffic route map into an adjacency matrix based on the bus dispatch model; According to the adjacency matrix, the Flody algorithm is used to calculate the shortest path between each site.

3. The vehicle route planning method based on Dijkstra algorithm as claimed in claim 2, characterized in that: Step S3 includes: According to the shortest path between each station, the improved Dijkstra algorithm is used for path planning to obtain the lowest cost path from the origin station to the destination station; In the least-cost path from the origin to the destination, redundantly traversed stations are deleted and the untraversed stations are assigned to specific trips.

4. A vehicle route planning system based on Dijkstra algorithm, characterized in that: include: The first processing module is used to obtain the actual traffic route map and the bus dispatch model; The second processing module is used to obtain the shortest path between each station according to the actual traffic route map and the bus scheduling model; The third processing module is used to obtain the path with the lowest cost from the originating station to the destination station by using the improved Dijkstra algorithm according to the shortest path between the stations.

5. The vehicle route planning system based on Dijkstra algorithm as claimed in claim 4, characterized in that: The second processing module includes: A conversion unit, used for converting a traffic route map into an adjacency matrix based on a bus scheduling model; The calculation unit is used to calculate the shortest path between each site using the Flody algorithm according to the adjacency matrix.

6. The vehicle route planning system based on Dijkstra algorithm as claimed in claim 5, characterized in that: The third processing module includes: A construction unit is used for obtaining a path with the lowest cost from a starting station to a target station by using a path planning method of an improved Dijkstra algorithm according to the shortest path between the stations; The checking unit is used for deleting redundantly traversed stations in the path with the lowest cost from the origin station to the destination station and allocating the untraversed stations to a specific trip.

Citation Information

Patent Citations

  • Multi-vehicle-type customized bus operation optimization method

    CN115409388A

  • Urban bus commuting path planning method based on dynamic planning algorithm

    CN117073698A

  • Multi-target path planning method for intelligent public transportation system

    CN118031995A

Cited By

  • Responsive bus route processing method, device and equipment

    CN119323296A

  • Dynamic path planning method and device based on time sequence convolutional network traffic prediction and medium

    CN120146333A