A bus route planning method, device and equipment and a storage medium

By generating shuttle bus stops using ant colony optimization and clustering algorithms, and combining this with neighborhood search to optimize route planning, the problem of existing shuttle bus planning relying on driver experience is solved. This achieves reasonable shuttle bus stop and route design, improving the efficiency and flexibility of route planning.

CN114839984BActive Publication Date: 2026-04-07GUANGDONG UNIVERSITY OF FOREIGN STUDIES
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The current shuttle bus planning relies mainly on driver experience, making it difficult to make timely and efficient route adjustments based on changes in demand, resulting in unreasonable station and route planning.

Method used

Bus stops are generated using ant colony optimization and clustering algorithms. The target route planning is optimized by combining ant colony optimization with consideration of the number of vehicles, total travel distance, and excess detour rate. The optimal route is then optimized using a neighborhood search algorithm.

Benefits of technology

It has enabled the rational design of shuttle bus stops and routes, improved the efficiency and flexibility of route planning, and met the changing needs of passengers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114839984B_ABST
    Figure CN114839984B_ABST
Patent Text Reader

Abstract

The application discloses a bus route planning method, device and equipment and a storage medium. The starting points and destinations of all passengers are acquired. Passengers with the same destination are classified into a category, and a plurality of passenger sets are obtained. For each passenger set, a plurality of boarding stations are generated based on a clustering algorithm according to the starting points. For each passenger set, a target route planning scheme is searched based on an ant colony algorithm on the basis of the boarding stations, with the minimum total consumption as an optimization target. The total consumption is in a positive correlation with the number of vehicles, the total distance of vehicle driving, and the accumulated amount of the excess of the detour rate of all vehicles. According to the application, passengers are classified according to the destinations, a plurality of boarding stations are generated according to the starting points of passengers for each category of passengers, and a target route planning scheme is acquired based on the ant colony algorithm on the basis of the boarding stations, so that the reasonable design of the stations and routes of buses is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet technology, and in particular to a shuttle bus route planning method, apparatus, device, and storage medium. Background Technology

[0002] In existing technologies, traditional shuttle bus planning is mostly based on the driver's experience, and the routes are generally not easy to change, let alone make timely and efficient changes according to changes in demand. Therefore, how to reasonably set up shuttle bus stops and routes and better plan shuttle bus routes is an urgent problem to be solved. Summary of the Invention

[0003] The purpose of this invention is to provide a shuttle bus route planning method, apparatus, device, and storage medium. By generating boarding stations for passengers with the same destination based on their origin, and using an ant colony algorithm to search for a target route planning scheme based on the boarding stations, the invention aims to achieve the goal of rationally setting shuttle bus stops and routes.

[0004] To achieve the above objectives, embodiments of the present invention provide a shuttle bus route planning method, comprising:

[0005] Obtain the origin and destination of all passengers;

[0006] Passengers with the same destination are grouped into one category, resulting in several passenger sets;

[0007] For each set of passengers, several boarding stations are generated based on the origin using a clustering algorithm.

[0008] For each set of passengers, based on the boarding stations, an ant colony algorithm is used to search for a target route planning scheme with the goal of minimizing total consumption. The total consumption is positively correlated with the number of vehicles, the total distance traveled by vehicles, and the cumulative amount of the excess detour rate of all vehicles.

[0009] As an improvement to the above solution, it also includes:

[0010] Using the target path planning scheme as the initial optimal solution, the optimal path planning scheme is calculated based on the neighborhood search algorithm.

[0011] As an improvement to the above scheme, for each set of passengers, several passenger stations are generated in the following manner:

[0012] Initialize each passenger as a passenger class;

[0013] Find the two passenger classes with the smallest nearest starting distance and designate them as the first passenger class and the second passenger class respectively. Then merge the first passenger class into the second passenger class to form a new passenger class, until at least one passenger in the first passenger class is more than a preset distance threshold from the class center of the second passenger class. The number of passengers in the first passenger class is less than or equal to the number of passengers in the second passenger class.

[0014] Target passenger classes are selected to generate boarding stations; wherein, the target passenger class is a passenger class whose number of passengers is greater than or equal to the preset minimum number of passengers required for the station.

[0015] As an improvement to the above scheme, the nearest origin distance between the two passenger classes is calculated in the following way:

[0016] distance(o r ,o k )=min ou,ov∈S,ou≠ov distance(o u ,o v );

[0017] Among them, o r Represent passenger class r, o k Let k and o represent passenger classes. u Represent passengers u and o in passenger class r. v Let v represent passenger in passenger class k, and S represent passenger set S.

[0018] As an improvement to the above scheme, the fitness function is specifically as follows:

[0019] fitness(t)=NV(t)+arctan(TD(T)) / π+ AccumulateBypassRate(t)

[0020] Where fitness(t) represents the fitness of the t-th planning scheme, NV(t) represents the number of vehicles in the t-th planning scheme, TD(t) is the total distance traveled by vehicles in the t-th planning scheme, and AccumulateBypassRate(t) is the cumulative amount of the detour rate excess of all vehicles in the t-th planning scheme.

[0021] As an improvement to the above scheme, the excess detour rate for each vehicle is calculated in the following way:

[0022] Divide the planning time of each target station by the direct time to obtain the detour coefficient of each target station;

[0023] The detour rate is obtained by summing the detour coefficients of all target stations and then dividing by the total number of target stations.

[0024] Subtracting a preset detour rate threshold from the detour rate yields the detour rate excess.

[0025] Wherein, the target station is a boarding station on the planned route of the vehicle, the target destination is the destination on the planned route of the vehicle, the planned time represents the time taken for the vehicle to travel from the target station to the target destination according to the planned route of the vehicle, and the direct time is the time taken for the vehicle to travel directly to the target destination.

[0026] As an improvement to the above scheme, the step of using the target path planning scheme as the initial optimal solution and calculating the optimal path planning scheme based on the neighborhood search algorithm specifically includes:

[0027] The optimal path planning scheme of the previous iteration is used as the initial optimal solution of the current iteration; wherein, the initial optimal solution of the first iteration is the target path planning scheme;

[0028] From the initial optimal solution of the current iteration round, one vehicle is randomly selected as the first vehicle, a boarding stop of the first vehicle is randomly selected as the first test stop, and another vehicle is randomly selected as the second vehicle; wherein, the first test stop is not the boarding stop of the destination, and the boarding stop of the second vehicle includes the first test stop.

[0029] When the number of available seats in the second vehicle is less than the number of passengers at the first test station, a station exchange operation is performed to update the optimal path planning for the current iteration.

[0030] When the number of available seats in the second vehicle is greater than or equal to the number of passengers at the first test station, a station insertion operation is performed to update the optimal path planning for the current iteration.

[0031] The neighborhood search algorithm iteration ends when the current iteration round meets the preset threshold for the number of neighborhood search attempts.

[0032] To achieve the above objectives, embodiments of the present invention also provide a shuttle bus route planning device, comprising:

[0033] The location acquisition module is used to obtain the origin and destination of all passengers;

[0034] The passenger classification module is used to group passengers with the same destination into one category, resulting in several passenger sets.

[0035] The station generation module is used to generate several boarding stations for each set of passengers based on a clustering algorithm and according to the starting point.

[0036] The scheme generation module is used to search for a target route planning scheme for each set of passengers based on the boarding stations and the ant colony algorithm, with the goal of minimizing the total consumption. The total consumption is positively correlated with the number of vehicles, the total distance traveled by vehicles, and the cumulative amount of the detour rate exceeding the limit for all vehicles.

[0037] To achieve the above objectives, embodiments of the present invention also provide a shuttle bus route planning device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the shuttle bus route planning method as described in any of the above embodiments.

[0038] To achieve the above objectives, embodiments of the present invention also provide a computer-readable storage medium, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the shuttle bus route planning method as described in any of the above embodiments.

[0039] Compared with existing technologies, the shuttle bus route planning method, apparatus, device, and computer-readable storage medium disclosed in this invention first obtain the origin and destination of all passengers; then, passengers with the same destination are grouped into one category, resulting in several passenger sets; next, for each passenger set, several boarding stops are generated based on the origin using a clustering algorithm; finally, for each passenger set, based on the boarding stops, a target route planning scheme is searched using an ant colony algorithm with the goal of minimizing total consumption, wherein the total consumption is positively correlated with the number of vehicles, the total distance traveled by vehicles, and the cumulative amount of detour rate excesses of all vehicles. This invention can achieve a reasonable design of shuttle bus stops and routes by classifying passengers according to their destinations, generating several boarding stops for each category of passengers based on their origins, and obtaining a target route planning scheme based on the ant colony algorithm. Attached Figure Description

[0040] Figure 1 This is a flowchart of a shuttle bus route planning method provided in an embodiment of the present invention. Detailed Implementation

[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0042] See Figure 1 This is a flowchart of a shuttle bus route planning method provided in an embodiment of the present invention. The shuttle bus route planning method includes steps S1 to S4:

[0043] S1. Obtain the origin and destination of all passengers;

[0044] S2. Group passengers with the same destination into one category to obtain several passenger sets;

[0045] S3. For each set of passengers, generate several boarding stations based on the starting point using a clustering algorithm.

[0046] S4. For each set of passengers, based on the boarding stations, using the ant colony algorithm, with the goal of minimizing total consumption, a target path planning scheme is searched. The total consumption is positively correlated with the number of vehicles, the total distance traveled by vehicles, and the cumulative amount of the detour rate exceeding the limit for all vehicles.

[0047] Specifically, for a defined area, shuttle bus routes are planned for passengers. The destinations of all passengers are obtained, and passengers are classified according to their destinations, resulting in several passenger sets. The number of passenger sets is determined by the number of passenger destinations. For each passenger set, the starting point of each passenger in the set is obtained, and a hierarchical clustering algorithm is called to further classify passengers according to their starting points, resulting in several passenger classes to generate boarding stations. After the boarding stations for each passenger set are determined, an ant colony algorithm is called to optimize the process by minimizing the number of vehicles, minimizing the total distance traveled by vehicles, and minimizing the vehicle detour rate, thereby searching for the target route planning scheme.

[0048] Compared with the prior art, the embodiments of the present invention can classify passengers by obtaining the destinations of all passengers; for each type of passenger, several boarding stations are generated based on the passenger's origin according to the clustering algorithm; and based on the boarding stations, the target route planning scheme is obtained based on the ant colony algorithm, thus realizing the rational design of bus stops and routes.

[0049] In one implementation, it further includes:

[0050] Using the target path planning scheme as the initial optimal solution, the optimal path planning scheme is calculated based on the neighborhood search algorithm.

[0051] Specifically, after step S4, the neighborhood search algorithm is called to optimize the planning results and obtain the optimal planning route (optimal path planning scheme).

[0052] In one implementation, for each set of passengers, several passenger stations are generated in the following manner:

[0053] Initialize each passenger as a passenger class;

[0054] Find the two passenger classes with the smallest nearest starting distance and designate them as the first passenger class and the second passenger class respectively. Then merge the first passenger class into the second passenger class to form a new passenger class, until at least one passenger in the first passenger class is more than a preset distance threshold from the class center of the second passenger class. The number of passengers in the first passenger class is less than or equal to the number of passengers in the second passenger class.

[0055] Target passenger classes are selected to generate boarding stations; wherein, the target passenger class is a passenger class whose number of passengers is greater than or equal to the preset minimum number of passengers required for the station.

[0056] Specifically, for each passenger set, the boarding station is generated in the following way:

[0057] 1. Take a well-classified set of passengers S (passenger set S), let S = {o1, o2, ..., o...} n There are n passengers in total;

[0058] 2. Initialize the passenger set, setting each passenger to o. i There is one class, resulting in n passenger classes: o1, o2, ..., o n ;

[0059] 3. Find the two passenger classes whose starting points are closest to each other. Calculate the distance between two points on a sphere using latitude and longitude coordinates, and then find the two closest passenger classes from all existing classes. r and o k ;

[0060] 4. Determine if passenger classes can be merged. If the class center distance between two passenger classes is less than or equal to a preset distance threshold r, then attempt to merge class o. r and o k Merge; otherwise, proceed to step 6 for termination judgment. Wherein, the distance threshold r represents the maximum walking distance that passengers can tolerate, and can be set according to the actual situation.

[0061] 5. Merge passenger classes, merging classes with fewer passengers into classes with more passengers. r The number of passengers (passenger count) is less than or equal to 0. k , and o r All passengers in the middle to o k If the distances to all class center points are within the preset distance threshold r, then o r All passengers merged into o k Then remove o r Otherwise, proceed to step 6 for termination judgment;

[0062] 6. Perform a termination check. If all current classes cannot be merged, write the clustering result that satisfies the minimum passenger requirement of the station (max_set_number) to the database and terminate the algorithm; otherwise, return to step 3 to find the two nearest passenger sets. Each passenger class in the clustering result corresponds to a boarding station. Considering cost issues (including time cost, vehicle-related costs, etc.), the setting of boarding stations needs to take into account the number of passengers at the station.

[0063] In one implementation, the nearest origin distance between the two passenger classes is calculated in the following manner:

[0064] distance(o r ,o k )=min ou,ov∈S,ou≠ov distance(o u ,o v );

[0065] Among them, o r Represent passenger class r, o k Let k and o represent passenger classes. u Represent passengers u and o in passenger class r. v Let v represent passenger in passenger class k, and S represent passenger set S.

[0066] Specifically, for any two passenger classes r and k in set S, find the two points with the shortest distance between the two passenger classes to calculate the nearest starting point distance between passenger classes r and k.

[0067] In one implementation, for each set of passengers, the target route planning scheme is obtained by searching in the following manner:

[0068] In the current iteration, each ant in the ant colony algorithm is randomly assigned a boarding station as its starting station. Based on the roulette wheel algorithm, the station visit order of each ant is obtained, and a feasible solution is constructed according to the hard constraints. The hard constraints are set according to the actual application.

[0069] The optimization process minimizes the number of vehicles, the total distance traveled by vehicles, and the vehicle detour rate. The fitness of each ant is calculated and the ants are sorted to select a preset number of elite ants. The number of elite ants can be set according to the actual application.

[0070] The pheromone concentration of the updated path is determined by the elite ants, and the optimal solution in the current iteration is recorded.

[0071] When the current iteration round meets the preset ant colony count threshold, the optimal solution of the current iteration round is used as the target path planning scheme, and the ant colony algorithm iteration ends.

[0072] Specifically, at the beginning of the ant colony algorithm, each ant is randomly assigned a starting station (the initial boarding station). The transition probability from that station to the remaining stations is calculated according to the following formula. The next station is selected according to the roulette wheel algorithm until the ant has visited all the stations, obtaining a complete station visit order. A feasible solution is then constructed based on the hard constraints.

[0073]

[0074] Where, τ ij α is the pheromone concentration at edge (i,j), and α is the pheromone influence factor. ij It is the edge Visibility is the reciprocal of the distance from i to j, β is the visibility impact factor; Ω is the set of cities already served, C j This represents the set of remaining sites j.

[0075] The system optimizes three objectives: minimizing the number of vehicles, minimizing the total travel distance, and ensuring that the vehicle detour rate is within the range of maxBypassRate (automatically initialized at the start of the algorithm). Then, it calculates the fitness of each ant, sorts the ants in descending order based on the calculated fitness, and selects a preset number of the top-ranked ants as elite ants.

[0076] Update the pheromone concentration along the path and record the optimal solution for this iteration; the method for updating the pheromone concentration in the elite ant system is as follows:

[0077] After the ants have visited all the sites, they update the pheromone matrix according to the following formula:

[0078] ;

[0079] Where, τ ij ρ is the pheromone concentration at edge (i,j); ρ is the pheromone volatile factor; and e is the number of elite ants. It is the pheromone concentration remaining at edge (i,j) of the elite ant ranked t in this iteration; q1 represents the pheromone concentration remaining on edge (i,j) of the top-ranked elite ant after this iteration; q2 and q1 are the enhancement weights of the two pheromones, respectively.

[0080] The pheromone concentration is calculated using the following formula:

[0081] .

[0082] In one implementation, the fitness function is specifically:

[0083] fitness(t)=NV(t)+arctan(TD(T)) / π+ AccumulateBypassRate(t)

[0084] Where fitness(t) represents the fitness of the t-th planning scheme, NV(t) represents the number of vehicles in the t-th planning scheme, TD(t) is the total distance traveled by vehicles in the t-th planning scheme, and AccumulateBypassRate(t) is the cumulative amount of the detour rate excess of all vehicles in the t-th planning scheme.

[0085] Specifically, fitness is calculated using the following formula:

[0086] fitness(t)=NV(t)+arctan(TD(T)) / π+ AccumulateBypassRate(t); where, NV ( t ) represents the number of vehicles required for the t-th ant colony algorithm; TD(t) represents the total travel distance for the t-th ant colony algorithm; AccumulateBypassRate(t) represents the cumulative amount of the detour rate excess for all vehicles in the t-th ant colony algorithm, where the detour rate excess is the portion of the detour rate exceeding maxBypassRate, and maxBypassRate is an automatically initialized parameter at the start of the algorithm.

[0087] In one implementation, the excess detour rate for each vehicle is calculated as follows:

[0088] Divide the planning time of each target station by the direct time to obtain the detour coefficient of each target station;

[0089] The detour rate is obtained by summing the detour coefficients of all target stations and then dividing by the total number of target stations.

[0090] Subtracting a preset detour rate threshold from the detour rate yields the detour rate excess.

[0091] Wherein, the target station is a boarding station on the planned route of the vehicle, the target destination is the destination on the planned route of the vehicle, the planned time represents the time taken for the vehicle to travel from the target station to the target destination according to the planned route of the vehicle, and the direct time is the time taken for the vehicle to travel directly to the target destination.

[0092] Specifically, the detour rate is calculated using vehicle route 1 (e→b→P) as an example, as shown in the following formula:

[0093] bypassRate(e,b,p)=[Time(e,b,P) / Time(e,P)+ Time(b,P) / Time(e,P)] / 2;

[0094] Wherein, Time(e,b,P) refers to the travel time from station e through station b to finally arrive at station P. Time(e,P) and Time(b,P) are similar. The average of the ratios of the time taken by each station to reach the destination according to the planned route to the time taken to travel directly from that station to the destination is the detour rate of the planned route.

[0095] Optionally, when the vehicle's travel time is only related to the length of the traveled path, the excess detour rate for each vehicle can be calculated as follows:

[0096] Divide the planned route for each target station by the direct route to obtain the detour coefficient for each target station.

[0097] The detour rate is obtained by summing the detour coefficients of all target stations and then dividing by the total number of target stations.

[0098] Subtracting a preset detour rate threshold from the detour rate yields the detour rate excess.

[0099] Wherein, the target station is a passenger station on the planned route of the vehicle, the target destination is the destination of the planned route of the vehicle, the planned route represents the length of the path the vehicle travels from the target station to the target destination along the planned route of the vehicle, and the direct path is the length of the path the vehicle takes directly to the target destination along the shortest path of the road network.

[0100] In one implementation, the step of calculating the optimal path planning scheme based on a neighborhood search algorithm, using the target path planning scheme as the initial optimal solution, specifically includes:

[0101] The optimal path planning scheme of the previous iteration is used as the initial optimal solution of the current iteration; wherein, the initial optimal solution of the first iteration is the target path planning scheme;

[0102] From the initial optimal solution of the current iteration round, one vehicle is randomly selected as the first vehicle, a boarding stop of the first vehicle is randomly selected as the first test stop, and another vehicle is randomly selected as the second vehicle; wherein, the first test stop is not the boarding stop of the destination, and the boarding stop of the second vehicle includes the first test stop.

[0103] When the number of available seats in the second vehicle is less than the number of passengers at the first test station, a station exchange operation is performed to update the optimal path planning for the current iteration.

[0104] When the number of available seats in the second vehicle is greater than or equal to the number of passengers at the first test station, a station insertion operation is performed to update the optimal path planning for the current iteration.

[0105] The neighborhood search algorithm iteration ends when the current iteration round meets the preset threshold for the number of neighborhood search attempts.

[0106] Specifically, the neighborhood search algorithm is used to optimize the solution:

[0107] 1. Initialization: Input the initial optimal solution into this algorithm using the planning scheme (target path planning scheme) generated by the Elite Ant System Algorithm (ant colony algorithm);

[0108] 2. Select vehicle1, and randomly select a station i (excluding company stations) that vehicle1 passes through from the current optimal solution. Obtain the number of people p at this station. i And the number of empty seats in the vehicle, emptySeatNum1; In this embodiment, the route planning is for shuttle bus route planning for enterprises, so this "company station" refers to the location of the enterprise, that is, the station where the route planning destination is located.

[0109] 3. Select vehicle2, randomly select another vehicle2 from the planning scheme, and obtain the number of empty seats of the vehicle, emptySeatNum2, where emptySeatNum2 is the number of empty seats of vehicle2 when passing station i.

[0110] 4. Perform optimization operation judgment; if emptySeatNum2 < p i If the site is successfully swapped, proceed to step 5 to perform the site swapping operation; otherwise, proceed to step 6 to perform the site insertion operation.

[0111] 5. Site exchange operation: Iterate through the sites of vehicle2. If a site j (excluding company sites) is encountered, and p is satisfied... j +emptySeatNum2≥p i And p j ≤p i If +emptySeatNum1, then swap the two stations. If a better solution is found, stop traversing and replace the current best solution; jump to step 7; where p j This represents the number of people at station j;

[0112] 6. Insertion operation: Insert station i one by one between the stations that vehicle2 passes through. If a better solution is found, stop traversing and replace the current best solution; jump to step 7.

[0113] 7. Perform a termination check. If the number of iterations reaches the preset threshold for the number of neighborhood searches, terminate the algorithm and return the current optimal solution; otherwise, return to step 2.

[0114] This invention employs hierarchical clustering to generate stations and intervenes in the clustering process by adding other constraints to classify passengers. Stations are generated for similar passenger data with the same destination based on parameters. The elite ant system algorithm is used for path planning, and a pheromone reset mechanism is added to the algorithm for improvement. The solution constructed by the elite ant system algorithm is used as the initial solution for neighborhood search and input into the algorithm for further optimization to obtain the optimal planning result and return it. This invention is suitable for handling large-scale multi-route path planning systems.

[0115] This invention also provides a shuttle bus route planning device, comprising:

[0116] The location acquisition module is used to obtain the origin and destination of all passengers;

[0117] The passenger classification module is used to group passengers with the same destination into one category, resulting in several passenger sets.

[0118] The station generation module is used to generate several boarding stations for each set of passengers based on a clustering algorithm and according to the starting point.

[0119] The scheme generation module is used to search for a target route planning scheme for each set of passengers based on the boarding stations and the ant colony algorithm, with the goal of minimizing the total consumption. The total consumption is positively correlated with the number of vehicles, the total distance traveled by vehicles, and the cumulative amount of the detour rate exceeding the limit for all vehicles.

[0120] It is worth noting that the specific working process of the shuttle bus route planning device can be referred to the working process of the shuttle bus route planning method described in the above embodiments, and will not be repeated here.

[0121] The device provided in this embodiment of the invention can classify passengers by obtaining the destinations of all passengers; for each type of passenger, several boarding stations are generated based on the passenger's origin using a clustering algorithm; and based on the boarding stations, a target route planning scheme is obtained using an ant colony algorithm, thus realizing the rational design of bus stops and routes.

[0122] This invention also provides a shuttle bus route planning device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps described in the above-described shuttle bus route planning method embodiments, for example... Figure 1 The steps S1 to S4 described above; or, when the processor executes the computer program, it implements the functions of each module in the above-described device embodiments, such as the location acquisition module.

[0123] For example, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the shuttle bus route planning device. For example, the computer program can be divided into multiple modules, each with the following specific functions:

[0124] The location acquisition module is used to obtain the origin and destination of all passengers;

[0125] The passenger classification module is used to group passengers with the same destination into one category, resulting in several passenger sets.

[0126] The station generation module is used to generate several boarding stations for each set of passengers based on a clustering algorithm and according to the starting point.

[0127] The scheme generation module is used to search for a target route planning scheme for each set of passengers based on the boarding stations and the ant colony algorithm, with the goal of minimizing the total consumption. The total consumption is positively correlated with the number of vehicles, the total distance traveled by vehicles, and the cumulative amount of the detour rate exceeding the limit for all vehicles.

[0128] The specific working process of each module can be referred to the working process of the shuttle bus route planning device described in the above embodiments, and will not be repeated here.

[0129] The shuttle bus route planning device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The shuttle bus route planning device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the schematic diagram is merely an example of a shuttle bus route planning device and does not constitute a limitation on the device. It may include more or fewer components than shown in the diagram, or combine certain components, or use different components. For example, the shuttle bus route planning device may also include input / output devices, network access devices, buses, etc.

[0130] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the shuttle bus route planning equipment, connecting all parts of the equipment via various interfaces and lines.

[0131] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the shuttle bus route planning device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0132] If the module integrated into the shuttle bus route planning equipment is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0133] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A shuttle bus route planning method, characterized in that, include: Obtain the origin and destination of all passengers; Passengers with the same destination are grouped into one category, resulting in several passenger sets; For each set of passengers, several boarding stations are generated based on the origin using a clustering algorithm. For each set of passengers, based on the boarding stations, an ant colony algorithm is used to search for a target route planning scheme with the goal of minimizing total consumption. The total consumption is positively correlated with the number of vehicles, the total distance traveled by vehicles, and the cumulative amount of the excess detour rate of all vehicles. Using the target path planning scheme as the initial optimal solution, the optimal path planning scheme is calculated based on the neighborhood search algorithm; The step of using the target path planning scheme as the initial optimal solution and calculating the optimal path planning scheme based on the neighborhood search algorithm specifically includes: The optimal path planning scheme of the previous iteration is used as the initial optimal solution of the current iteration; wherein, the initial optimal solution of the first iteration is the target path planning scheme; From the initial optimal solution of the current iteration round, one vehicle is randomly selected as the first vehicle, a boarding stop of the first vehicle is randomly selected as the first test stop, and another vehicle is randomly selected as the second vehicle; wherein, the first test stop is not the boarding stop of the destination, and the boarding stop of the second vehicle includes the first test stop; the destinations of the first vehicle and the second vehicle are the same. When the number of available seats in the second vehicle is less than the number of passengers at the first test station, the stations of the second vehicle are iterated through. If a station j is reached and p satisfies... j +emptySeatNum2≥p i And p j ≤p i If the path planning scheme after swapping the first test station and station j is better than the initial optimal solution of the current iteration, then swap the first test station and station j to obtain the optimal path planning scheme of the current iteration; wherein, station j is not the boarding station where the destination is located, p j p is the number of people at station j, emptySeatNum2 is the number of empty seats when the second vehicle passes the first station to be tested, and p is the number of people at station j. i is the number of passengers at the first test station, and emptySeatNum1 is the number of empty seats when the first vehicle passes the first test station; When the second vehicle passes through the first test station, if the number of available seats is greater than or equal to the number of passengers at the first test station, the first test station is inserted one by one between the stations passed by the second vehicle. If the path planning scheme corresponding to the inserted station is better than the initial optimal solution of the current iteration, then the path planning scheme corresponding to the inserted station is taken as the optimal path planning scheme of the current iteration. When the current iteration round meets the preset threshold for the number of neighborhood search iterations, the neighborhood search algorithm iteration ends. For each vehicle, the excess detour rate is calculated as follows: Divide the planning time of each target station by the direct time to obtain the detour coefficient of each target station; The detour rate is obtained by summing the detour coefficients of all target stations and then dividing by the total number of target stations. Subtracting a preset detour rate threshold from the detour rate yields the detour rate excess. Wherein, the target station is a boarding station on the planned route of the vehicle, the target destination is the destination on the planned route of the vehicle, the planned time represents the time taken for the vehicle to travel from the target station to the target destination according to the planned route of the vehicle, and the direct time is the time taken for the vehicle to travel directly to the target destination.

2. The shuttle bus route planning method as described in claim 1, characterized in that, For each set of passengers, several passenger stations are generated in the following manner: Initialize each passenger as a passenger class; Find the two passenger classes with the smallest starting distance and designate them as the first passenger class and the second passenger class respectively. Then merge the first passenger class into the second passenger class to form a new passenger class, until at least one passenger in the first passenger class is more than a preset distance threshold from the class center of the second passenger class. The number of passengers in the first passenger class is less than or equal to the number of passengers in the second passenger class. Target passenger classes are selected to generate boarding stations; wherein, the target passenger class is a passenger class whose number of passengers is greater than or equal to the preset minimum number of passengers required for the station.

3. The shuttle bus route planning method as described in claim 2, characterized in that, The nearest origin distance between the two passenger classes is calculated in the following way: Among them, o r Represent passenger class r, o k Let k and o represent passenger classes. u Represent passengers u and o in passenger class r. v Let v represent passenger in passenger class k, and S represent passenger set S.

4. The shuttle bus route planning method as described in claim 1, characterized in that, The fitness function of the ant colony algorithm is: fitness(t)=NV(t)+arctan(TD(T)) / π+AccumulateBypassRate(t) Where fitness(t) represents the fitness of the t-th planning scheme, NV(t) represents the number of vehicles in the t-th planning scheme, TD(t) is the total distance traveled by vehicles in the t-th planning scheme, and AccumulateBypassRate(t) is the cumulative amount of the detour rate excess of all vehicles in the t-th planning scheme.

5. A shuttle bus route planning device, characterized in that, include: The location acquisition module is used to obtain the origin and destination of all passengers; The passenger classification module is used to group passengers with the same destination into one category, resulting in several passenger sets. The station generation module is used to generate several boarding stations for each set of passengers based on a clustering algorithm and according to the starting point. The scheme generation module is used to search for a target route planning scheme for each set of passengers based on the boarding stations and the ant colony algorithm, with the goal of minimizing the total consumption. The total consumption is positively correlated with the number of vehicles, the total distance traveled by vehicles, and the cumulative amount of the detour rate exceeding the limit for all vehicles. The scheme generation module is specifically used for: The optimal path planning scheme of the previous iteration is used as the initial optimal solution of the current iteration; wherein, the initial optimal solution of the first iteration is the target path planning scheme; From the initial optimal solution of the current iteration round, one vehicle is randomly selected as the first vehicle, a boarding stop of the first vehicle is randomly selected as the first test stop, and another vehicle is randomly selected as the second vehicle; wherein, the first test stop is not the boarding stop of the destination, and the boarding stop of the second vehicle includes the first test stop; the destinations of the first vehicle and the second vehicle are the same. When the number of available seats in the second vehicle is less than the number of passengers at the first test station, the stations of the second vehicle are iterated through. If a station j is reached and p satisfies... j +emptySeatNum2≥p i And p j ≤p i If the path planning scheme after swapping the first test station and station j is better than the initial optimal solution of the current iteration, then swap the first test station and station j to obtain the optimal path planning scheme of the current iteration; wherein, station j is not the boarding station where the destination is located, p j p is the number of people at station j, emptySeatNum2 is the number of empty seats when the second vehicle passes the first station to be tested, and p is the number of people at station j. i is the number of passengers at the first test station, and emptySeatNum1 is the number of empty seats when the first vehicle passes the first test station; When the second vehicle passes through the first test station, if the number of available seats is greater than or equal to the number of passengers at the first test station, the first test station is inserted one by one between the stations passed by the second vehicle. If the path planning scheme corresponding to the inserted station is better than the initial optimal solution of the current iteration, then the path planning scheme corresponding to the inserted station is taken as the optimal path planning scheme of the current iteration. When the current iteration round meets the preset threshold for the number of neighborhood search iterations, the neighborhood search algorithm iteration ends. For each vehicle, the excess detour rate is calculated as follows: Divide the planning time of each target station by the direct time to obtain the detour coefficient of each target station; The detour rate is obtained by summing the detour coefficients of all target stations and then dividing by the total number of target stations. Subtracting a preset detour rate threshold from the detour rate yields the detour rate excess. Wherein, the target station is a boarding station on the planned route of the vehicle, the target destination is the destination on the planned route of the vehicle, the planned time represents the time taken for the vehicle to travel from the target station to the target destination according to the planned route of the vehicle, and the direct time is the time taken for the vehicle to travel directly to the target destination.

6. A shuttle bus route planning device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the shuttle bus route planning method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the shuttle bus route planning method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Intelligent logistics distribution and delivery based on discrete particle swarm optimization algorithm

    CN102117441A

  • Urban commuting regular bus planning method based on buses

    CN114092176A