Dijkstra algorithm-based model vehicle path optimization method
By improving the Dijkstra algorithm to the Dijkstra-TJBank algorithm, combining the bank's business needs and traffic forecasts, optimizing path planning, solving the multi-constraint problem in bank vehicle distribution, and achieving efficient and reliable route planning.
Patent Information
- Application Number
- CN202510748622.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-16
AI Technical Summary
The Dijkstra algorithm has difficulty coping with the multiple constraints in bank vehicle delivery, including time window constraints, vehicle capacity limitations, and complex traffic conditions, resulting in suboptimal route planning.
The Dijkstra algorithm is improved to the Dijkstra-TJBank algorithm. It combines banking business requirements and constraints, assigns multi-dimensional weights to each edge, introduces heuristic search strategies and traffic prediction models, and optimizes path planning.
It has achieved the goal of reducing the number of vehicles and total travel time while meeting multiple constraints, improving the efficiency and reliability of vehicle distribution, and reducing operating costs.
Smart Images

Figure CN120654908A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle route planning, and in particular to a vehicle route optimization method based on the Dijkstra algorithm. Background Art
[0002] Against the backdrop of accelerating digitalization, the banking industry is at a critical juncture in its transition from a traditional manual operation model to a digital one. However, as a crucial component of banking operations, the route planning methods for bank loan escort vehicles remain relatively outdated, often relying on fixed routines developed by escort companies based on long-term experience. However, with the increasing demand for digital transformation, the comprehensive optimization of bank loan escort routes has become a top priority.
[0003] Dijkstra's algorithm, a classic method for finding the shortest paths from a single starting point to all other nodes, works by progressively expanding the known range of shortest paths until the shortest paths to all nodes are successfully determined. Specifically, the algorithm selects a node closest to the starting point that has not yet been processed, and then updates the shortest paths to its adjacent nodes.
[0004] The current Dijkstra algorithm struggles to cope with complex and ever-changing scenarios involving multiple constraints. In bank cash delivery scenarios, numerous constraints are often present, including time windows, where each bank branch requires a cash delivery vehicle to arrive at a cash box within a specific timeframe; vehicle capacity limits, which impose an upper limit on the number of cash boxes each vehicle can carry; maximum service point restrictions, which prevent a single vehicle from serving too many locations, impacting efficiency and safety; and total mileage limits. The Dijkstra algorithm itself is not equipped to directly handle these complex constraints. Summary of the Invention
[0005] In view of the above problems, the present invention is proposed to provide a vehicle routing optimization method based on Dijkstra algorithm to overcome the above problems or at least partially solve the above problems.
[0006] According to one aspect of the present invention, a method for optimizing vehicle routing based on the Dijkstra algorithm is provided, the method comprising:
[0007] Define requirements and constraints that affect path optimization;
[0008] Determine the optimal path algorithm based on the shortest path calculation, ensuring that all constraints are met and minimizing the number of vehicles used or the total travel time.
[0009] Optionally, the requirements and constraints affecting route optimization may include: starting point and end point, time window and service duration, vehicle capacity and departure interval, and road and traffic conditions.
[0010] Optionally, the starting point and the end point specifically include:
[0011] Starting point: The starting point of the cash truck, usually the bank's cash transport center or a specific bank branch. This is the starting point of the cash truck delivery mission. All cash boxes are loaded onto the truck here, and the delivery process begins.
[0012] Distribution points: These are scattered throughout the customer bank branches, all of which are the destinations where cash trucks need to be delivered to cash boxes or to carry out related business. They are widely and diversely distributed, and each has different business needs and geographical characteristics;
[0013] Destination: The location where the vehicle returns after completing all delivery tasks, marking the end of a single delivery task.
[0014] Optionally, the time window and service duration specifically include:
[0015] Each delivery destination, whether a large or relatively small branch, has a fixed service time window. Payment vehicles must arrive precisely within the specified start and end time intervals, and the cash and box handover services must be completed promptly and orderly. Any delay beyond this time window could lead to the risk of interrupting banking operations, affecting customer service experience, and even hindering financial transactions.
[0016] When planning a route, the algorithm needs to accurately consider the cumulative time from the starting point to each destination through each section of the road, ensuring that the entire time schedule closely matches the time window requirements of each destination and fully reserving time to respond to possible situations.
[0017] Optionally, the vehicle capacity and departure interval specifically include:
[0018] The vehicle's own transport carrying capacity is a key consideration in route planning;
[0019] Different delivery destinations have different demands for the number and frequency of cash boxes due to differences in business scale and transaction activity. Some busy outlets may require high-frequency, large-capacity cash box deliveries.
[0020] When vehicles depart from the cash transport center, it is impossible to dispatch a large number of vehicles at the same time due to vehicle scheduling, loading and unloading efficiency, and security procedures. The departure interval after the vehicles are loaded must be reasonably planned to ensure that each vehicle departs in an orderly manner, and the departure interval between the front and rear vehicles can ensure smooth loading and unloading operations without causing excessive delays that affect the overall delivery timeliness.
[0021] Optionally, the road and traffic conditions specifically include:
[0022] By combining historical traffic big data and real-time traffic information in real time, we can accurately predict the traffic conditions in different sections and at different times, cleverly avoid congested sections during the route planning stage, flexibly respond to various traffic anomalies, and ensure the timeliness and stability of vehicle delivery.
[0023] Optionally, the shortest path calculation ensures that all constraints are satisfied and reduces the number of vehicles used or the total travel time. The constraints of the path optimization algorithm are specifically determined to include:
[0024] Calculate the basic path;
[0025] Matching banking constraints;
[0026] After calculating the preliminary path, the path is further optimized.
[0027] Optionally, the calculation basic path specifically includes:
[0028] The shortest path calculation from the starting point to each destination is carried out based on the improved Dijkstra-TJBank algorithm;
[0029] During the route calculation process, to accurately reflect the comprehensive characteristics of different road sections, each edge is assigned a multi-dimensional weight. The weights include, but are not limited to, actual geographical distance to measure journey length; travel time, which takes into account the speed limit and road conditions; and transportation cost, which is the unit route delivery cost quantified by combining fuel consumption, vehicle wear and tear, and labor cost allocation. The weight coefficients are dynamically adjusted to adapt to the needs of different business priorities.
[0030] A heuristic search strategy is introduced. In addition to the conventional heuristic based on distance, it also combines information such as traffic flow trends and historical congestion hotspots to predict and optimize the search direction.
[0031] Optionally, the constraints for matching banking services specifically include:
[0032] Time window constraint: A bank branch explicitly stipulates that cash drawer services must be received within a time window. The Dijkstra-TJBank algorithm deeply embeds time window constraint logic.
[0033] During each step of route search and calculation, the estimated arrival time of the vehicle under the currently planned route over the past week and the time windows of each node are analyzed and predicted. If a time window limit is exceeded, the route selection is immediately adjusted retroactively, prioritizing the exploration of alternative routes that meet the time window requirements to ensure the vehicle arrives on time.
[0034] Capacity Constraints: Given that each vehicle has a capacity limit that cannot be exceeded, the algorithm introduces a vehicle remaining capacity monitoring mechanism during the node decision-making stage of path planning.
[0035] Maximum service point constraints: Taking into full consideration the balance between labor cost control and operational efficiency, a maximum service point threshold is pre-set for each vehicle.
[0036] Optionally, after calculating the preliminary path, further optimizing the path specifically includes:
[0037] Minimize the number of vehicles: Based on a global perspective of all delivery tasks, the algorithm intelligently merges multiple potential routes;
[0038] Shortest Journey: Among the many feasible paths that meet the constraints, the algorithm introduces a path length evaluation metric that comprehensively considers factors such as distance, time, and cost to quantify the path length;
[0039] Traffic congestion data: Deeply integrate historical traffic conditions information into the dynamic evolution of path calculation.
[0040] This invention provides a method for optimizing payment and vehicle routing based on the Dijkstra algorithm. This method includes defining requirements and constraints that influence routing optimization; determining the optimal routing algorithm based on the shortest path calculation, ensuring that all constraints are satisfied while minimizing the number of vehicles used or the total travel time. By innovating methods such as building a congestion prediction model, the algorithm's ability to cope with real-world business uncertainties is further enhanced, safeguarding bank payment and vehicle delivery services.
[0041] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A flowchart of a method for optimizing vehicle routing based on the Dijkstra algorithm is provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0045] The terms "comprises" and "comprising" and any variations thereof in the description, embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.
[0046] The technical solution of the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0047] like Figure 1 As shown in FIG, a method for optimizing vehicle routing based on the Dijkstra algorithm includes:
[0048] A vehicle routing optimization method based on the Dijkstra algorithm includes: defining requirements and constraints that affect routing optimization; and determining a routing optimization algorithm based on a shortest path calculation to ensure that all constraints are satisfied and to reduce the number of vehicles used or the total travel time.
[0049] The Dijkstra-TJBank algorithm fully integrates the business requirements and constraints of Tianjin Bank's loan vehicle delivery based on the Dijkstra algorithm. In this algorithm, in addition to basic shortest path calculation, special constraints of bank loan vehicle delivery also need to be considered, such as time windows, vehicle capacity, traffic regulations, security requirements, and special locations (such as schools and hospitals).
[0050] 1. Define the requirements and constraints that affect path optimization:
[0051] 1) Starting point and end point
[0052] Starting point: The place where the cash truck sets off, usually the bank's head office's cash transport center or a specific bank branch. It serves as the starting point for the cash truck's delivery mission. All cash boxes are loaded onto the truck here, and the delivery process begins.
[0053] Distribution points: These are customer bank branches scattered throughout the country. These are the destinations where money trucks need to be delivered to cash boxes or to perform related business. Their distribution is extensive and diverse, and their business needs and geographical location characteristics are different.
[0054] Destination: The place where the cash transport vehicle returns after completing all delivery tasks. It is usually a stop point or starting cash transport center designated by the escort company, marking the end of a single delivery task.
[0055] 2) Time window and service duration
[0056] Each delivery destination, whether a large or relatively small branch, has a fixed service window. This requires that the delivery vehicle arrive precisely within the specified start and end time interval and complete the cash and box handover service promptly and orderly. Any delay outside this time window could lead to the risk of interrupting banking operations, affecting the customer service experience, and even hindering financial transactions.
[0057] When planning a route, the algorithm needs to accurately consider the cumulative time from the starting point to each destination through each section of the road, ensure that the entire time schedule closely matches the time window requirements of each destination, and fully reserve time to respond to possible situations.
[0058] 3) Vehicle capacity and departure interval
[0059] A vehicle's carrying capacity is a key consideration in route planning. For example, each vehicle has a clear upper limit on the total amount of cash and valuables it can safely and legally transport, based on its vehicle model, security features, and other factors. Furthermore, the number and frequency of cash boxes required vary depending on the business scale and transaction activity of different delivery destinations. Some busy outlets may require frequent, high-capacity cash box deliveries.
[0060] When vehicles depart from the cash transport center, it is impossible to dispatch a large number of vehicles at the same time due to vehicle scheduling, loading and unloading efficiency, and security procedures. The departure interval after the vehicles are loaded must be reasonably planned to ensure that each vehicle departs in an orderly manner, and the departure interval between the front and rear vehicles can ensure smooth loading and unloading operations without causing excessive delays that affect the overall delivery timeliness.
[0061] 4) Road and traffic conditions
[0062] The real-world traffic environment is complex and ever-changing. Factors such as increased traffic during peak hours leading to congestion, restricted access due to road construction, and temporary road closures caused by unexpected traffic accidents can directly impact a vehicle's actual driving speed. The algorithm must integrate historical traffic data with real-time traffic information to accurately predict traffic conditions at different locations and times. This allows the algorithm to cleverly avoid congested sections during route planning and flexibly respond to various traffic anomalies to ensure timely and stable vehicle delivery.
[0063] The main goal of the algorithm is to ensure that all constraints are satisfied based on the shortest path calculation and to minimize the number of vehicles used or the total travel time.
[0064] 1) Basic path calculation
[0065] The improved Dijkstra-TJBank algorithm is used to calculate the shortest path from the starting point to each destination. This algorithm inherits the core advantages of the Dijkstra algorithm as a classic single-source shortest path algorithm. It can quickly and accurately traverse the weight information of the edges associated with each node for a given starting point, and efficiently calculate the shortest path to other nodes.
[0066] During the path calculation process, in order to accurately reflect the comprehensive characteristics of different road sections, each edge (section) is assigned a multi-dimensional weight. The weight covers but is not limited to the actual geographical distance to measure the length of the journey; the time required for driving is the time taken to pass after comprehensively considering the speed limit and road conditions of the section; the transportation cost is the unit section delivery cost quantified by combining factors such as fuel consumption, vehicle wear and tear, and labor cost sharing. By dynamically adjusting the weight coefficient, it adapts to the needs of different business focuses.
[0067] A heuristic search strategy, in addition to conventional distance-based heuristics, also incorporates information such as traffic flow trends and historically congested periods to predict and optimize search directions. For example, during the morning rush hour, branches with relatively low traffic volume and historically smooth traffic flow are prioritized, accelerating the convergence of the initial path and improving computational efficiency.
[0068] 2) Constraint Integration
[0069] To meet the actual needs of the vehicle, it is necessary to match the Tianjin Bank business constraints when calculating the path:
[0070] Time Window Constraints: For example, if a bank branch explicitly requires cash drawer service to be accepted within a specific time window of 7:30 AM to 8:30 AM, the Dijkstra-TJBank algorithm deeply embeds time window constraint logic. During each step of the route search and calculation, the vehicle's estimated arrival time for the current planned route over the past week and the time windows of each branch are analyzed and predicted. If a potential time window violation is detected, the algorithm immediately backtracks and adjusts the route selection, prioritizing alternative routes that meet the time window requirements to ensure on-time arrival.
[0071] Capacity Constraints: Given the insurmountable capacity limits for each vehicle, the algorithm incorporates a vehicle remaining capacity monitoring mechanism during the node selection phase of route planning. Each time a new delivery point is considered for routing, the algorithm immediately compares the vehicle's remaining capacity with the site's requirements. Only when the vehicle's remaining capacity is sufficient to meet the site's requirements is the route branch considered feasible. Otherwise, the route branch is decisively excluded, avoiding the risk of overloading and ensuring safe and compliant delivery.
[0072] Maximum service point constraints: Taking into full consideration the balance between labor cost control and operational efficiency, a maximum service point threshold is pre-set for each vehicle.
[0073] 3) Path adjustment and optimization
[0074] After calculating the preliminary path, further path optimization is performed:
[0075] Minimizing the number of vehicles: Taking a global perspective on all delivery tasks, the algorithm intelligently merges multiple potential routes, breaking the traditional limitation of a single vehicle per route. For example, when multiple vehicles are delivering to a nearby area, the algorithm analyzes factors such as vehicle load and time window compatibility, allowing some vehicles to share some of the delivery points of others along the way. This reduces the number of vehicles required for the overall task, lowering vehicle operating costs and manpower allocation costs.
[0076] Shortest Journey: The algorithm incorporates a path length evaluation metric among multiple feasible paths that meet the constraints, comprehensively considering factors such as distance, time, and cost to quantify the path length. It prioritizes the path combination with the shortest total journey, optimizing the fleet's overall mileage, reducing unnecessary fuel consumption and vehicle wear and tear, and further reducing transportation costs.
[0077] Traffic congestion data: Deeply integrate historical traffic conditions information to reduce the impact of traffic congestion or accidents during the dynamic evolution of path calculation.
[0078] Beneficial effects:
[0079] 1. Multi-Constraint Optimization: This approach transcends the traditional path planning paradigm of focusing solely on the shortest path. It comprehensively considers road connectivity and complex traffic regulations, closely integrating multiple constraints such as bank branch payment windows, vehicle capacity limits, the maximum service point threshold for vehicles, and historical traffic congestion data to create a realistic, accurate, and efficient vehicle escort route planning solution. Furthermore, it innovatively incorporates multiple algorithms and logic to adapt to different constraints, such as heuristic search to optimize time window exploration, load balancing to improve capacity utilization, and refined service point thresholds based on business complexity, making multi-constraint processing more intelligent and flexible.
[0080] 2. Optimization of minimum number of vehicles and minimum mileage: Leveraging innovative vehicle scheduling optimization strategies, we can deeply tap into the potential of collaborative vehicle delivery, minimize the number of vehicles deployed, and simultaneously reduce the overall mileage of the fleet, thereby cutting transportation costs and improving the bank's operational efficiency.
[0081] 3. Comprehensive Business Rules Modeling: This algorithm deeply aligns with the unique processes and rules of Tianjin Bank's cash-car delivery business, translating various detailed requirements and risk management key points from practical business practices into the algorithm's core logic. This ensures that each generated cash-car delivery route plan accurately aligns with the bank's actual operational scenarios, safeguarding the stability and reliability of financial services. Through innovative approaches such as building a congestion prediction model, the algorithm's ability to cope with real-world business uncertainties is further enhanced, safeguarding the bank's cash-car delivery business.
[0082] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A vehicle routing optimization method based on Dijkstra algorithm, characterized in that: The path optimization method includes: Define requirements and constraints that affect path optimization; Determine the optimal path algorithm based on the shortest path calculation, ensuring that all constraints are met and minimizing the number of vehicles used or the total travel time.
2. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 1, characterized in that: The requirements and constraints that affect route optimization are defined as follows: starting point and end point, time window and service duration, vehicle capacity and departure interval, and road and traffic conditions.
3. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 2, characterized in that: The starting point and the end point specifically include: Starting point: The starting point of the cash truck, usually the bank's cash transport center or a specific bank branch. This is the starting point of the cash truck delivery mission. All cash boxes are loaded onto the truck here, and the delivery process begins. Distribution points: These are scattered throughout the customer bank branches, all of which are the destinations where cash trucks need to be delivered to cash boxes or to carry out related business. They are widely and diversely distributed, and each has different business needs and geographical characteristics; Destination: The location where the vehicle returns after completing all delivery tasks, marking the end of a single delivery task.
4. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 2, characterized in that: The time window and service duration specifically include: Each delivery destination, whether a large or relatively small branch, has a fixed service time window. Payment vehicles must arrive precisely within the specified start and end time intervals, and the cash and box handover services must be completed promptly and orderly. Any delay beyond this time window could lead to the risk of interrupting banking operations, affecting customer service experience, and even hindering financial transactions. When planning a route, the algorithm needs to accurately consider the cumulative time from the starting point to each destination through each section of the road, ensuring that the entire time schedule closely matches the time window requirements of each destination and fully reserving time to respond to possible situations.
5. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 2, characterized in that: The capacity and departure interval of the vehicles mentioned above specifically include: The vehicle's own transport carrying capacity is a key consideration in route planning; Different delivery destinations have different demands for the number and frequency of cash boxes due to differences in business scale and transaction activity. Some busy outlets may require high-frequency, large-capacity cash box deliveries. When vehicles depart from the cash transport center, it is impossible to dispatch a large number of vehicles at the same time due to vehicle scheduling, loading and unloading efficiency, and security procedures. The departure interval after the vehicles are loaded must be reasonably planned to ensure that each vehicle departs in an orderly manner, and the departure interval between the front and rear vehicles can ensure smooth loading and unloading operations without causing excessive delays that affect the overall delivery timeliness.
6. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 2, characterized in that: The road and traffic conditions specifically include: By combining historical traffic big data and real-time traffic information in real time, we can accurately predict the traffic conditions in different sections and at different times, cleverly avoid congested sections during the route planning stage, flexibly respond to various traffic anomalies, and ensure the timeliness and stability of vehicle delivery.
7. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 1, characterized in that: The constraints of the path optimization algorithm are determined based on the shortest path calculation to ensure that all constraints are met and to reduce the number of vehicles used or the total travel time. Specifically, the constraints include: Calculate the basic path; Matching banking constraints; After calculating the preliminary path, the path is further optimized.
8. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 7, characterized in that: The basic calculation path specifically includes: The shortest path calculation from the starting point to each destination is carried out based on the improved Dijkstra-TJBank algorithm; During the route calculation process, to accurately reflect the comprehensive characteristics of different road sections, each edge is assigned a multi-dimensional weight. The weights include, but are not limited to, actual geographical distance to measure journey length; travel time, which takes into account the speed limit and road conditions; and transportation cost, which is the unit route delivery cost quantified by combining fuel consumption, vehicle wear and tear, and labor cost allocation. The weight coefficients are dynamically adjusted to adapt to the needs of different business priorities. A heuristic search strategy is introduced. In addition to the conventional heuristic based on distance, it also combines information such as traffic flow trends and historical congestion hotspots to predict and optimize the search direction.
9. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 7, characterized in that: The constraints for matching banking services specifically include: Time window constraint: A bank branch explicitly stipulates that cash drawer services must be received within a time window. The Dijkstra-TJBank algorithm deeply embeds time window constraint logic. During each step of route search and calculation, the estimated arrival time of the vehicle under the currently planned route over the past week and the time windows of each node are analyzed and predicted. If a time window limit is exceeded, the route selection is immediately adjusted retroactively, prioritizing the exploration of alternative routes that meet the time window requirements to ensure the vehicle arrives on time. Capacity Constraints: Given that each vehicle has a capacity limit that cannot be exceeded, the algorithm introduces a vehicle remaining capacity monitoring mechanism during the node decision-making stage of path planning. Maximum service point constraints: Taking into full consideration the balance between labor cost control and operational efficiency, a maximum service point threshold is pre-set for each vehicle.
10. The method for optimizing vehicle routing based on Dijkstra algorithm according to claim 7, characterized in that: After calculating the preliminary path, further optimizing the path specifically includes: Minimize the number of vehicles: Based on a global perspective of all delivery tasks, the algorithm intelligently merges multiple potential routes; Shortest Journey: Among the many feasible paths that meet the constraints, the algorithm introduces a path length evaluation metric that comprehensively considers factors such as distance, time, and cost to quantify the path length; Traffic congestion data: Deeply integrate historical traffic conditions information into the dynamic evolution of path calculation.