Multi-objective optimization method for customized bus routes based on improved trajectory clustering algorithm

By improving the trajectory clustering algorithm to optimize customized bus routes, the problems of insufficient route flexibility and low service rate in existing technologies have been solved, and a higher service rate for intended passengers and commuting efficiency have been achieved. This approach is suitable for planning customized bus routes in cities with large scale and high road network density.

CN116882609BActive Publication Date: 2026-11-20DALIAN UNIV OF TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310990209.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2026-11-20
Estimated Expiration
2043-08-08

AI Technical Summary

Technical Problem

Existing methods for optimizing customized bus routes have shortcomings in considering road network constraints, dynamic passenger demand, and trajectory similarity, resulting in insufficient route flexibility, low service rates, and low occupancy rates.

Method used

An improved trajectory clustering algorithm is adopted, which combines the A* algorithm to find the shortest path, uses the LCSS algorithm to calculate trajectory similarity, and performs trajectory clustering through the QuickBundles algorithm to optimize customized bus routes. A multi-objective optimization model is established, taking into account the road network topology and passenger demand.

Benefits of technology

It improved the service rate of potential passengers, optimized route selection, enhanced commuting efficiency and occupancy rates, met dynamic passenger needs, and achieved a higher level of service and a green travel mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116882609B_ABST
    Figure CN116882609B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on the multi-objective optimization method of custom bus route of improved trajectory clustering algorithm, through the preselection of low-similarity path, trajectory clustering is used to optimize line, the demand of adjacent road intention user can be included and served, to improve the intention passenger service rate.The optimization method proposed by the application carries out large-scale efficient k shortest path using heuristic algorithm;The adjacency topological structure of road network is fully considered, the trajectories of low similarity in k shortest path are extracted, the demand of parallel road space intention passenger is guaranteed;Trajectory clustering is used for the line optimization design of custom bus, by merging the travelers of parallel road, the overlap of trajectory is increased, the seating rate of custom bus is improved, the performance is improved, the application can realize a new type of green travel traffic mode, from the user angle, the demand of user can be better realized, the service rate of custom bus to intention user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a multi-objective optimization method for customized bus routes based on an improved trajectory clustering algorithm, which belongs to the interdisciplinary application field of geographic big data information mining and public transportation system design. Background Technology

[0002] As cities continue to expand, the separation of work and residence is becoming increasingly common, and people's demands for convenience, comfort, and speed in commuting are constantly rising. As a demand-responsive public transport system, customized buses can provide passengers with a differentiated, efficient, and high-quality urban public transport service model that allows them to book routes and bus schedules. As a new internet-based public transport model, customized buses fall between regular buses and taxis, and their implementation is one of the main strategies for attracting more passengers, reducing private car use, and reducing greenhouse gas emissions from road traffic.

[0003] The route optimization design of customized buses is crucial. Currently, many scholars at home and abroad have conducted in-depth research on this topic from the perspective of spatiotemporal characteristics. It can be roughly divided into the following aspects: (1) Path optimization problem based on the spatial characteristics of travel demand. Chen Xi et al. constructed a multi-regional commuter customized bus route optimization model and designed a two-stage heuristic algorithm for solving it. (2) Path optimization problem based on passenger time characteristics. Yang Ming et al. considered soft time windows, constructed a customized bus network optimization model that takes into account the interests of operating companies and passengers, satisfies multiple boarding and alighting stations and multiple vehicle types, and used a genetic algorithm for solving it. (3) Path optimization problem based on spatiotemporal characteristics. Cheng Renhui et al. considered spatiotemporal factors, established a two-layer planning model for commuter customized bus routes, and designed an improved genetic algorithm.

[0004] Selecting the optimal routes to serve and accommodate more travelers and their travel needs is a crucial factor in the efficient operation of a customized bus system. Reasonable route selection can attract more potential customers to choose customized buses as their mode of transportation, thereby improving service rates and occupancy rates, and ultimately enhancing the service level and profitability of the customized bus system. Therefore, exploring a scientific method for designing customized bus stops that considers passenger service rates on parallel roads has significant practical implications.

[0005] In existing technologies, Guo Naikun et al. proposed a ship trajectory density clustering method based on spatiotemporal features (CN111582380 A). This method calculates the spatiotemporal distance between any two sub-trajectory segments and then clusters each sub-trajectory segment using the DBSCAN algorithm. The calculation of time distance takes into account ship speed information, which can more realistically reflect the time distance information of different sub-trajectory segments, thereby improving clustering accuracy. However, it has the following drawback: it does not consider road network constraints during cluster analysis.

[0006] Ma Dongfang et al. proposed a customized bus route generation method based on trajectory clustering technology (CN114722312A). This method acquires taxi GPS trajectory data, calculates trajectory similarity, uses the DBSCAN model to cluster the trajectory set, and optimizes the Eps and MinPts parameters in DBSCAN based on the multi-objective optimization method VIKOR, ultimately extracting the routes to be opened. However, it has the following drawbacks: the DBSCAN algorithm struggles with high-dimensional data processing and suffers from poor quality processing for samples with uneven density.

[0007] Zou Zhiyun et al. proposed a method for determining stops and optimizing routes for nighttime customized buses (CN115587657A), which considers the service level of customized buses and balances the time value cost of passenger travel with the operating cost of public transport. First, the location and number of passengers for each destination are obtained; then, the DBSCAN algorithm is used to perform cluster analysis on the scattered points of the destinations, resulting in several discrete points and clusters; the discrete points are set as separate stops, and the improved K-means algorithm is used to find the cluster centers of other clusters; the stops are adjusted and determined, a multi-route dynamic programming model is constructed, and the route is finally determined. The method has the following drawbacks: it performs cluster analysis on points but lacks consideration of topological structure; the K-means algorithm is sensitive to the K value and noisy points.

[0008] Deficiencies of existing methods or inventions:

[0009] 1) Most current studies analyze routes by grouping similar origins and destinations into one category through clustering. This may result in a lack of flexibility in the optimal routes, which may reduce the attractiveness of customized bus services to some extent.

[0010] 2) Current research often selects the shortest path as the customized bus route, which to some extent ignores the existing space of adjacent roads and does not adequately consider the potential passengers in this area.

[0011] 3) Current research on customized bus route optimization mainly focuses on static travel demand scenarios and deals with static ride requests, while there is little research on real-time dynamic ride requests. Summary of the Invention

[0012] Customized bus services are suitable for cities with incomplete coverage by traditional bus routes, large urban radii, high urban road network density, numerous dedicated bus lanes or expressways, and high population density with significant commuting demand. Addressing the issue that existing customized bus route planning has considerable room for improvement in serving intended passengers, this invention proposes a multi-objective optimization method for customized bus routes based on an improved trajectory clustering algorithm. This method combines trajectory similarity analysis with trajectory clustering for selecting the shortest path for customized buses, optimizing existing customized bus routes to address issues such as long detours, extended travel times, and low occupancy rates, resulting in shared routes that better meet user needs. This helps attract more passengers, improve public transportation system satisfaction, shorten commuting times, enhance travel well-being, reduce the demand for private cars, and achieve a new green transportation mode.

[0013] To achieve the above effects, the present invention adopts the following technical solution:

[0014] A multi-objective optimization method for customized bus routes based on an improved trajectory clustering algorithm is proposed, with the following steps:

[0015] Step 1: Data Collection and Processing: Collect existing passenger travel data, extract or transform the required travel information from it, including the coordinates and numbers of the origin and destination, travel distance, departure time, required arrival time, etc.; collect city vector maps and road network data as map datasets, and store the road network map structure and create network diagrams.

[0016] Step 2: Selection of k Shortest Paths: Based on the travel information data extracted in Step 1, the A* algorithm is used to find the k shortest paths between each origin-destination (OD) pair. The detour distance must not exceed the percentage of the shortest path length that passengers are willing to accept as a detour. Combining the shortest path length, the bus's free-flow speed, and the passenger's waiting time tolerance threshold, the percentage of the shortest path length that passengers are willing to accept as a detour is determined. k is the number of routes between specified OD pairs whose length does not exceed the percentage of the shortest path's detour distance.

[0017] The value of k is selected using the following formula:

[0018]

[0019] Wherein, path length is the route length between OD pairs, percentage is the percentage of the detour distance accepted by passengers relative to the shortest route length, and shortestpath length is the shortest route length.

[0020] Step 3: Extraction of k / 2 shortest paths: Using the k shortest paths generated in Step 2, the similarity between trajectories is calculated based on the Longest Common Subsequence (LCSS) algorithm, and the k / 2 shortest paths with the lowest similarity between OD pairs are selected. The specific steps are as follows:

[0021] S3.1: Similarity Comparison: Extract the shortest path from the k shortest paths and define it as the trajectory A = [a1, a2, ..., a...]. m The remaining k-1 paths are defined as B. i =[b i1 ,b i2 ,...,b in The integer i ranges from [1, k-1]. Using A as the baseline, similarity analysis is performed using the LCSS method, as follows:

[0022]

[0023] Where m and n represent the number of trajectory points of trajectory A and B, δ is the integer threshold, ε is the distance threshold, Head(A) is the first trajectory point of trajectory A, and Rest(A) is all the remaining trajectory points of trajectory A.

[0024] S3.2: Low similarity path selection: Normalize the similarity obtained in step S3.1 to obtain the percentage of similarity. Select the shortest path 1 and the least similar trajectory k / 2-1, totaling k / 2, as candidate spatiotemporal paths.

[0025] The fourth step is trajectory clustering: using all the shortest paths selected in the third step, trajectory clustering is performed based on the QuickBundles (QB) algorithm. The minimum number of passengers is selected so that each cluster contains at least the number of paths equal to the minimum number of passengers, thus obtaining the ride-sharing routes. The specific implementation steps are as follows.

[0026] S4.1: Obtain the spatiotemporal path attributes of the alternatives: Read the latitude and longitude based on the trajectory point code, calculate the time for each segment of the road according to the specified speed, accumulate the time and convert it into a standard timestamp, thereby obtaining the alternative spatiotemporal path for each trajectory, that is, the longitude, latitude and longitude and timestamp of the points passed by each passenger.

[0027] S4.2: Regional Division: Pre-divide ride-sharing areas based on OD points: Obtain the latitude and longitude information of the origin and destination points of the trajectory. Using this as an axis, select complete trajectories whose sub-trajectories are contained within a range of ver_dis in the vertical direction along the axis as cluster sub-regions. Based on the statistical rule that "more than 95% of passengers can tolerate a waiting time of more than 5 minutes," and combined with the local bus free-flow operating speed (km / h), the value of ver_dis is defined as follows:

[0028] ver_dis = speed * 5 / 60

[0029] Simultaneously, the trajectory similarity matrix based on the LCSS algorithm is calculated among all complete trajectories in the combinable region, and the average value of the trajectory similarity matrix is ​​taken as the trajectory similarity of the clustered sub-regions.

[0030] S4.3: Using a trajectory distance metric based on the minimum average direct flip distance (MDF): Define the trajectory S = [s1, s2, ..., s...]. P ]、T=[t1,t2,...,t P ] and flipped version S F =[s P s P-1 , ..., s1]、T F =[t P , t P-1 ..., t], at this time, the direct distance d direct (S, T), flip distance d flipped The distance between MDF(S,T) and MDF(S,T) is calculated as follows:

[0031]

[0032] d flipped (S,T)=d(S,T) F )=d(S F T)

[0033] MDF(S,T)=min(d direct (S,T),d flipped (S, T))

[0034] Among them, |s x -t x | represents two points of latitude and longitude s x and t x The distance between them, the direct distance d direct (S, T) refers to the average distance between corresponding points on two trajectories S and T. MDF distance can only be used for calculation when two trajectories have the same number of trajectory points. Therefore, the number of trajectory points on the shortest path is selected as the total number of trajectory points. If the number of trajectory points is less than that on the shortest path, the MD distance is used to calculate the distance between the two trajectories. That is, a simple linear interpolation algorithm is used to ensure that any two trajectories have the same number of trajectory points before the MDF distance is calculated.

[0035] S4.4: Algorithm Implementation:

[0036] When optimizing routes for customized bus services, occupancy rate is often chosen as one of the optimization objectives. The minimum number of passengers within a cluster, num_min, is calculated using the following formula:

[0037] num_min = num_pass * att_rate

[0038] Defined as follows: num_pass represents the maximum passenger capacity of the bus company's vehicle type, and att_rate represents the occupancy rate threshold. If the number of trajectories within a cluster reaches the minimum number within the cluster, it can be designated as a customized bus planning route.

[0039] Formula determined based on spatial threshold:

[0040]

[0041]

[0042] Where THRESHOLD_dis is the spatial threshold, and N is the number of all trajectories. For trajectory p i The MDF distance between it and its Mth nearest trajectory, a M For all The average value of M. The M value can be determined based on the bus company's vehicle type's passenger capacity (num_pass) and occupancy rate threshold.

[0043] The formula is determined based on the time threshold:

[0044] THRESHOLD_time=θ*THRESHOLD_dis / speed

[0045] Among them, THRESHOLD_time is the time threshold, speed is the average vehicle speed, and θ is the time adjustment parameter, which can be selected according to the actual situation.

[0046] Define `nb_points` as the number of points on the shortest path trajectory, and use it as the number of points to select for trajectory clustering. Sort the trajectories by length, and prioritize selecting the longer trajectories as one of the commutative trajectories in `cluster[i]`. Calculate the spatiotemporal distance between trajectories within the commutable region. If the calculated spatiotemporal distance between two trajectories is less than the spatial and temporal thresholds, add this trajectory to the cluster `cluster[i]`; otherwise, create a new `cluster[i+1]`. Repeat this process until all trajectories have been traversed, while simultaneously counting the number of clusters and the number of trajectories within each cluster.

[0047] The beneficial effects of this invention are:

[0048] Compared with existing technologies, the multi-objective optimization method for customized bus routes based on an improved trajectory clustering algorithm disclosed in this invention has the following advantages:

[0049] (1) In view of the problem that there is a large room for improvement in the service rate of potential passengers, the trajectory clustering adopted in this invention fully considers the actual topological adjacency structure of the road network. In terms of the optimization of actual customized bus routes, the trajectory clustering of parallel routes with high similarity is based on the number of passengers absorbed, which can include potential passengers of adjacent roads into the service, thereby improving the service rate.

[0050] (2) In view of the game between the real-time convenience of travelers' travel needs and the operating cost of customized buses, this invention establishes a multi-objective optimization model that considers the length of the operating route, the service rate of intended passengers, and the service range, which helps to achieve the overall optimization of commuting efficiency and spatial commuting cost.

[0051] (3) In response to the ever-increasing dynamic travel demands of passengers, the A* algorithm used in this invention reduces time complexity and is also applicable to large road networks, which helps to solve the temporary travel needs of passengers and expand the service scope.

[0052] (4) In view of the differences between different calculation methods for trajectory similarity between the same OD pairs, the LCSS algorithm adopted in this invention can handle the similarity of two sequences that only have certain differences in parallel road segments, and solves the problem of sensitivity to noise points very well. It is more robust and can make the customized bus route more fixed when the order demand does not change much, so that it can provide stable services and attract potential users in the surrounding area.

[0053] (5) To address the issue that passengers’ temporary travel needs may not be responded to in a timely manner, the QB algorithm used in this invention is faster and more efficient than other clustering algorithms, so as to meet the real-time response of customized bus route planning. Attached Figure Description

[0054] Figure 1 The flowchart illustrates the implementation of the multi-objective optimization method for customized bus routes based on an improved trajectory clustering algorithm provided by this invention.

[0055] Figure 2 In this embodiment of the invention, existing sites (letter labels) and unmet demand points (number labels) are represented.

[0056] Figure 3 This is a diagram showing the calculation results of the k / 2 shortest path positions provided in this embodiment of the invention;

[0057] Figure 4 This is a schematic diagram of a carpooling area in an embodiment of the present invention (the area width is 5km, and trajectories with letter labels can be included in the carpooling area, but those with number labels cannot be included).

[0058] Figure 5 This is a diagram showing multiple spatiotemporal alternative paths between two pairs of ODs provided in this embodiment of the invention (the solid and dashed lines represent different OD pairs);

[0059] Figure 6 The shortest path clustering result selected in this embodiment of the invention is used as the optimized route for customized bus trajectory clustering. Detailed Implementation

[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.

[0061] See Figure 1 This invention discloses a multi-objective optimization method for customized bus routes based on an improved trajectory clustering algorithm, specifically including the following steps:

[0062] The first step is data collection and processing: This embodiment uses customized bus passenger travel data as the demand data sample set; city vector maps and road network data are collected as map datasets. Travel demand information is extracted or calculated, including origin and destination coordinates, departure time, and required arrival time, and the road network map structure is stored and a network graph is created.

[0063] The second step is to extract the k shortest paths:

[0064] Under the premise that the detour distance does not exceed 10% of the shortest path (according to statistics, the percentage of the detour distance that passengers accept to be the shortest path length is generally taken as 10%), the number of k shortest paths calculated between each OD pair is shown in Table 1. Some passenger travel demand data for the k shortest paths are extracted.

[0065] OD can be used for the start and end points of ids 2-8. Figure 2 The existing stations (letter labels) and origin / destination pairs with id 1 can be used as... Figure 2 Unresponsive demand points (numbered).

[0066] Table 1 shows the data extracted from the k shortest paths for some passenger travel demands.

[0067]

[0068] The third step is to pre-select the shortest path with low similarity:

[0069] By calculating similarity using the LCSS algorithm and normalizing the similarity, the percentage of similarity can be obtained. The shortest path and its least similar trajectory (k / 2 in total) are selected as candidate spatiotemporal paths. Table 2 shows examples of some trajectory similarity calculation data, where route 1 is the shortest path between the start and end points (10564194286, 668475129), and the other routes are the similarity between the shortest path and other routes calculated using the LCSS algorithm. Table 3 shows the candidate spatiotemporal path numbers after extracting low-similarity trajectories, where k / 2 is rounded down.

[0070] The alternative spatiotemporal path between the start and end points (10564194286, 668475129) can be represented as Figure 3 There are k / 2 shortest paths between the starting and ending points A and B.

[0071] Table 2 shows some trajectory similarity calculation data.

[0072]

[0073] Table 3. Trajectory IDs after low-similarity trajectory extraction

[0074]

[0075] Step 4: Trajectory clustering based on the QuickBundles algorithm:

[0076] By extracting low-similarity path attributes, dividing the region, and calculating MDF distance, ver_dis = 2.5km was determined, THRESHOLD dis =1.65km, THRESHOLD_time=500s, num_min=32*80%=26.

[0077] The area where ride-sharing is possible can be determined by... Figure 4 This indicates that the starting and ending points AB, being the longer trajectories, are preferentially selected as one of the combinable trajectories in cluster[i]. With ver_dis = 2.5km, OD pairs PQ, MN, and 12 have sub-trajectories within the combinable region of AB, while OD pairs 3 and 4 are not. The spatiotemporal distance between trajectories within the combinable region is calculated.

[0078] The spacetime alternative path diagram can be derived from Figure 5 The solid lines indicate that the spatiotemporal alternative paths between OD and AB are shown, and the dashed lines indicate that the spatiotemporal alternative paths between OD and 12 are shown.

[0079] According to THRESHOLD dis =1.65km, THRESHOLD_time=500s, num_min=26, Figure 6This can be interpreted as an OD pair 12 trajectory satisfying the above requirements, which can be included in the OD pair AB cluster after trajectory clustering. Thus, the illustrated path can be selected as the customized bus trajectory clustering optimization route.

[0080] Table 4 shows the clustering results of some passenger travel demand trajectories, which can display the optimized service results for passengers not included in the service. Taking (8581973713, 377951112), (4609591245, 377951112), and (1873269659, 4897757764) as examples, the trajectory clustering results are analyzed. When using the traditional point clustering approach to optimize customized bus routes, (8581973713, 377951112) is not included in the service. When using the trajectory clustering method for route optimization, since the alternative spatiotemporal paths between this OD pair and (4609591245, 377951112) and (1873269659, 4897757764) meet the corresponding spatiotemporal thresholds during trajectory clustering, they can be included in the same route, achieving the optimization goal of maximizing service efficiency.

[0081] Table 4 shows the clustering results of some passenger travel demand trajectories.

[0082]

Claims

1. A multi-objective optimization method for customized bus routes based on an improved trajectory clustering algorithm, characterized in that, The steps are as follows: Step 1: Data Collection and Processing: Collect existing passenger travel data, extract or transform the required travel information from it, including the coordinates and numbers of the origin and destination, travel distance, departure time, and required arrival time; collect city vector maps and road network data as map datasets, and store the road network map structure and create network diagrams; Step 2: Selection of k shortest paths: Based on the travel information data extracted in Step 1, the A* algorithm is used to find the k shortest paths between each origin-destination (OD) pair, requiring that the detour distance does not exceed the percentage of the shortest path length that passengers are willing to accept as a detour distance. Combining the shortest path length, the bus's operating speed in free-flow mode, and the passenger's waiting time tolerance threshold, the percentage of the shortest path length that passengers are willing to accept as a detour distance is obtained. k is the number of routes between specified OD pairs whose length does not exceed the percentage of the shortest path detour distance. The value of k is selected using the following formula: Wherein, path length is the length of the route between OD pairs, percentage is the percentage of the shortest path length that passengers are willing to take, and shortest path length is the shortest path length. Step 3: Extraction of k / 2 shortest paths: Using the k shortest paths generated in Step 2, the similarity between trajectories is calculated based on the LCSS longest common subsequence algorithm, and the k / 2 shortest paths with the lowest similarity between OD pairs are selected; the specific steps are as follows: S3.1: Similarity Comparison: Extract the shortest path from the k shortest paths and define it as the trajectory A = [a1, a2, ..., a...]. m The remaining k-1 paths are defined as B. i =[b i1 ,b i2 ,...,b in The integer i ranges from [1, k-1]. Using A as the baseline, similarity analysis is performed using the LCSS method, as follows: Where m and n represent the number of trajectory points of trajectory A and B, δ is the integer threshold, ε is the distance threshold, Head(A) is the first trajectory point of trajectory A, and Rest(A) is all the remaining trajectory points of trajectory A. S3.2: Low similarity path selection: Normalize the similarity obtained in step S3.1 to obtain the percentage of similarity. Select the shortest path 1 and the least similar trajectory k / 2-1, totaling k / 2, as candidate spatiotemporal paths. The fourth step is trajectory clustering: using all the shortest paths selected in the third step, trajectory clustering is performed based on the QB fast bundling algorithm. The minimum number of passengers is selected so that the clustered groups contain at least the number of paths equal to the minimum number of passengers, thus obtaining the ride-sharing routes; the specific implementation steps are as follows; S4.1: Obtain the spatiotemporal path attributes of the alternatives: Read the latitude and longitude based on the trajectory point code, calculate the time for each segment of the road according to the specified speed, accumulate the time and convert it into a standard timestamp, thereby obtaining the alternative spatiotemporal path for each trajectory, that is, the latitude, longitude and latitude and timestamp of the points passed by each passenger; S4.2: Region Division: Pre-divide ride-sharing areas based on OD points: Obtain the latitude and longitude information of the origin and destination of the trajectory, and use this as the axis. Select complete trajectories whose sub-trajectories are contained within a distance of ver_dis in the vertical direction along the axis as cluster sub-regions; Based on the statistical law that "more than 95% of passengers can tolerate a waiting time of more than 5 minutes", combined with the local bus free-flow operating speed speed, the ver_dis value is defined as follows: ver_dis = speed * 5 / 60 Simultaneously, the trajectory similarity matrix based on the LCSS algorithm is calculated among all complete trajectories in the multiplicable region, and the average value of the trajectory similarity matrix is ​​taken as the trajectory similarity of the clustered sub-regions; S4.3: Use a trajectory distance metric based on the minimum average direct flip distance (MDF): Define the trajectory S = [s1, s2, ..., s...]. P ]、T=[t1,t2,...,t P ] and flipped version S F =[s P s P-1 , ..., s1]、T F =[t P , t P-1 ..., t], at this time, the direct distance d direct (S, T), flip distance d flipped The distance between MDF(S,T) and MDF(S,T) is calculated as follows: d flipped (S,T)=d(S,T F )=d(S F ,T) MDF(S,T)=min(d direct (S,T),d flipped (S,T)) Among them, |s x -t x | represents two points of latitude and longitude s x and t x The distance between them, the direct distance d direct (S, T) refers to the average distance between corresponding points on two trajectories S and T. MDF distance is used only when two trajectories have the same number of trajectory points. Based on this, the number of trajectory points of the shortest path is selected as the number of trajectory points. If the number of trajectory points is less than the number of trajectory points of the shortest path, the MD distance is used to calculate the distance between the two trajectories. That is, by using a linear interpolation algorithm, any two trajectories have the same number of trajectory points, and then the MDF distance is used for calculation. S4.4: Algorithm Implementation: Customized bus routes typically select occupancy rate as one of the optimization objectives; the minimum number of passengers within a cluster, num_min, is calculated using the following formula: num_min = num_pass * att_rate Defined as follows: num_pass is the maximum number of passengers allowed on each bus model of the bus company, and att_rate is the occupancy rate threshold; if the number of trajectories within a cluster reaches the minimum number within the cluster, it is defined as a customized bus planning route. Formula determined based on spatial threshold: Where THRESHOLD_dis is the spatial threshold, and N is the number of all trajectories. For trajectory p i The MDF distance between it and its Mth nearest trajectory, a M For all The average value of M; the value of M can be determined based on the bus company's vehicle type's passenger capacity num_pass and the occupancy rate threshold. The formula is determined based on the time threshold: THRESHOLD_time=θ*THRESHOLD_dis / speed Among them, THRESHOLD_time is the time threshold, speed is the average vehicle speed, and θ is the time adjustment parameter, which can be selected according to the actual situation. Define nb_points as the number of shortest path trajectory points, and use it as the number of points to select for trajectory clustering; sort the trajectories by length, and prioritize the longer trajectories as one of the trajectories to be combined in cluster[i]; calculate the spatiotemporal distance between trajectories within the trajectories that can be combined; if the calculated spatiotemporal distance between two trajectories is less than the spatial threshold and the temporal threshold, add this trajectory to the cluster cluster[i], otherwise create a new cluster[i+1], and so on, until all trajectories are traversed, while simultaneously counting the number of clusters and the number of trajectories within each cluster.

Citation Information

Patent Citations

  • Ship trajectory density clustering method and device based on spatial and temporal features

    CN111582380A

  • Station determination and route optimization method for customized bus at night

    CN115587657A

  • Large-scale public transit network hierarchical optimization method based on multi-scale clustering

    CN114037175A

  • Customized bus route generation method based on trajectory clustering technology

    CN114722312A