A route planning method, device and storage medium for cargo transportation
By constructing and optimizing the route model, the problem of mismatch between cage cars and vehicles was solved, achieving efficient matching of goods and vehicles, reducing logistics costs and improving resource utilization.
Patent Information
- Application Number
- CN202510208642.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2026-08-25
AI Technical Summary
In logistics transportation, the number of cage trucks and vehicle capacity are difficult to match, resulting in waste of vehicle resources or stockpiling of goods at transit points and outlets. Under the existing operating model, the mismatch between vehicles and cage trucks leads to resource waste and low transportation efficiency.
By constructing a route model, an initial solution is built based on transportation data and preset model parameters and then optimized. Heuristic algorithms and tabu search strategies are used to optimize a single loading and unloading route, and the optimized route is matched with the original transportation route of the vehicle to improve resource utilization.
The optimization of the matching quantity of goods and vehicle routes has reduced logistics costs, improved resource utilization and transportation efficiency, and reduced the operating costs of transshipment hubs.
Smart Images

Figure CN122636071A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of route planning technology, specifically to a route planning method, equipment, and storage medium for cargo transportation. Background Technology
[0002] In logistics transportation, goods are mainly transported in cage trucks. Transit points or distribution centers load goods into cages for shipment. After sorting, goods are placed into cages, and once a cage is full, the construction is complete. The goods are then loaded onto trucks and dispatched according to planned routes. This operational model easily leads to mismatches between cages and vehicles. For example, the total number of cages in a shift may not match the total vehicle capacity, or the number of cages and vehicle capacity may not match within a certain period of a shift. Excessive mismatches between cages and vehicles will result in wasted vehicle resources or cause goods to accumulate at transit points or distribution centers. Summary of the Invention
[0003] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method, apparatus, and storage medium for freight transportation route planning, which can increase the matching quantity of freight and vehicle operating routes and improve resource utilization.
[0004] According to a first aspect of this application, a method for planning freight transportation routes is provided, comprising: constructing input data and an initial solution for a route model based on transportation data and preset model parameters; wherein the initial solution includes at least one single-trip loading and unloading route for goods between a transshipment center and a distribution point; optimizing the initial solution through the route model based on a first preset constraint and an optimization objective to obtain an optimization result; outputting the optimized single-trip loading and unloading route based on the optimization result and preset dispatch conditions; and matching the optimized single-trip loading and unloading route with the original vehicle transportation route based on a task matching model to obtain a vehicle freight transportation route.
[0005] As one possible implementation, based on transportation data and preset model parameters, the input data and initial solution for constructing the route model include: initializing a detailed list of loading and unloading goods at each stop along the loading and unloading route; splitting the loading and unloading route into a flow direction dimension according to the principle of loading before unloading, and saving it according to the flow direction dimension; wherein, the flow direction includes the originating network point shifts and destination network points; classifying goods according to flow direction, and setting a backup cargo for each flow direction; wherein, the latest departure time of each flow direction is counted as the backup cargo completion time; sorting the route flow directions according to a first preset rule to obtain a first sorted route flow direction; based on the aforementioned... The process involves: 1) Sort the flow directions and sequentially assigning the bottom-line goods to each flow direction, verifying whether the time window and loading conditions meet the constraints, to complete the flow direction assignment of the bottom-line goods; 2) Sort the flow directions according to a second preset rule to obtain a second sorted flow direction; 3) Based on the second sorted flow direction, sequentially assign all goods except the bottom-line goods to each flow direction, verifying whether the time window and loading conditions meet the constraints, to complete the flow direction assignment of all goods; 4) Based on the flow direction assignment of all goods, allocate the loading and unloading operations of the remaining goods according to a greedy rule to construct an initial solution; wherein, the initial solution represents that the loading and unloading operations of all goods have been assigned.
[0006] As one possible implementation, based on the first preset constraints and optimization objective, the initial solution is optimized through the route model to obtain the optimization result. This includes: based on the first preset constraints and optimization objective, defining a neighborhood search operator that satisfies the constraint satisfaction engine in the route model, adding a tabu search strategy, and recording the movement operators called within a preset range, the number of each movement operator called, the moved pickup tasks, and the moved delivery tasks to optimize the initial solution and obtain the optimization result.
[0007] As one possible implementation, the custom neighborhood search operator includes: a first operator for randomly moving loading and unloading operations of the same goods to the loading and unloading routes of the same vehicle or other vehicles; a second operator for exchanging loading and unloading operations of two goods; a third operator for modifying loading and unloading operations of loading and unloading routes in terms of flow direction; a fourth operator for exchanging loading and unloading operations of loading and unloading routes in terms of flow direction; a fifth operator for splitting flow directions; a sixth operator for merging flow directions; a seventh operator for modifying flow directions in terms of route dimension; and an eighth operator for exchanging flow directions in terms of route dimension.
[0008] As one possible implementation, the optimization objectives include: a first optimization objective, for optimizing the number of newly added loading and unloading routes; wherein, fewer newly added loading and unloading routes are better than more newly added loading and unloading routes; a second optimization objective, for optimizing the total number of loading and unloading routes; wherein, fewer total loading and unloading routes are better than more total loading and unloading routes; a third optimization objective, for optimizing the number of loading and unloading route changes in the initial solution; wherein, fewer loading and unloading route changes in the initial solution are better than more loading and unloading route changes; a fourth optimization objective, for optimizing the mileage of loading and unloading routes; wherein, smaller loading and unloading route mileage is better than larger loading and unloading route mileage; a fifth optimization objective, for optimizing the number of cargo splits with the same flow direction; wherein, fewer cargo splits with the same flow direction are better than more cargo splits with the same flow direction; wherein, the priority decreases sequentially from the first optimization objective to the fifth optimization objective.
[0009] As one possible implementation, the first preset constraints include: constraining the departure address of the loading / unloading route to be the same as the pickup point address of the first cargo; constraining the loading / unloading route to either start loading / unloading cargo from the current location or remain stationary; constraining that any loading / unloading operation can only be executed once by a loading / unloading route, and that the loading / unloading route does not include duplicate outlets or duplicate flow directions; constraining that for the same loading / unloading point in the loading / unloading route, there must be both inflow and outflow; and constraining that in any segment of the loading / unloading route, the sum of the departure time of the preceding loading / unloading point and the vehicle travel time on the path is less than or equal to the arrival time of the subsequent loading / unloading point. The constraints include: ensuring that the start time of loading / unloading at the loading / unloading point falls within a preset time window; ensuring that the maximum loading capacity is not exceeded after each loading / unloading operation on the loading / unloading route; ensuring that unloading operations for the same goods are assigned to the same vehicle; ensuring that goods follow the principle of loading before unloading; ensuring that preset, unmodifiable loading / unloading operations cannot be adjusted; constraining the number of connecting points and the number of connecting points at the main network point; constraining the carding distance when loading goods at the transfer station; constraining the vehicle type at the network point; constraining the loading at the transfer station and unloading at the network point, or loading at the network point and unloading at the transfer station; constraining the order of the main network point and other network points; and constraining the distance between network points or the detour ratio threshold of the loading / unloading route.
[0010] As one possible implementation, the task matching model includes a preset objective function and a second preset constraint. The preset objective function is used to maximize the number of matches and minimize the matching cost. The second preset constraint includes: constraining single-trip loading / unloading routes with different departure points and shifts from being matched with the vehicle's original transport route; constraining new routes and deleted routes with departure times differing by a preset time from being matched; constraining single-trip loading / unloading routes with different vehicle models from being matched with the vehicle's original transport route; constraining the stop points and mileage of new routes to meet the contract requirements of deleted routes; and constraining the time range of new routes not to conflict with other tasks of the vehicle.
[0011] As one possible implementation, the transportation data includes: network point data, time distance data, site layout data, shift data, predicted or extrapolated cargo data, route data, and maximum vehicle loading data. The preset model parameters include the current model call time, route modification mode, same-direction cargo splitting strategy, default vehicle maximum loading capacity, route empty space threshold, overflow cargo number threshold, overflow cargo number packing threshold, departure time interval, maximum stop network point, maximum stop main network point, network point order, existing route dispatch standards, and new route dispatch standards.
[0012] According to a second aspect of this application, a computer device is provided, the computer device comprising: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the method as described in the first aspect or any implementation thereof.
[0013] According to a third aspect of this application, a computer-readable storage medium is provided, the storage medium storing a computer program for performing the method as described in the first aspect or any implementation thereof.
[0014] The freight transportation route planning method, equipment, and storage medium provided in this application abstract the actual business scenario into a single-trip loading and unloading problem. It optimizes the number of loading and unloading routes formed by a single trip, reduces logistics costs, reduces the operating costs of transit hubs, optimizes driving distances, optimizes transportation modes, rationally arranges freight distribution, improves logistics efficiency, and finally re-matches the optimized single-trip loading and unloading routes to the original vehicle transportation routes, making full use of the sorting capacity of logistics centers and the transportation capacity of vehicles to improve resource utilization. Attached Figure Description
[0015] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0016] Figure 1 This is a flowchart illustrating a route planning method for cargo transportation provided in an exemplary embodiment of this application.
[0017] Figure 2 This is a schematic diagram of the structure of the line transport flow provided in an exemplary embodiment of this application.
[0018] Figure 3This is a schematic diagram of a loading and unloading task provided in an exemplary embodiment of this application.
[0019] Figure 4 This is a flowchart illustrating a special loading and unloading task provided in an exemplary embodiment of this application.
[0020] Figure 5 This is a schematic diagram illustrating the concept of linked list parsing provided in an exemplary embodiment of this application.
[0021] Figure 6 This is a schematic diagram illustrating the principle of a time range conflict provided in an exemplary embodiment of this application.
[0022] Figure 7 This is a schematic diagram of the structure of a cargo transportation route planning device provided in an exemplary embodiment of this application.
[0023] Figure 8 This is a structural diagram of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation
[0024] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0025] Application Overview
[0026] Logistics transportation involves logistics network points, which are nodes in the logistics network, mainly referring to storage and transportation warehouses, distribution warehouses, and transit hubs (stations). The basic function of a transit hub is to collect, distribute, and transfer logistics goods. Transit points are crucial nodes for sorting and distributing express parcels. Their main characteristic is that they are not organizations engaged in the production of specific goods; their primary function is to centralize, exchange, and transfer express parcels collected from other network points, realizing the flow of express parcels from dispersed to centralized and then back to dispersed throughout the network. In actual operation, express parcels from other network points connected to the transit point are uniformly collected at the transit point at a certain time and then exchanged. In some embodiments, the logistics transportation process can be from the transit hub to the network point. For example, in a bulk cargo scenario, vehicles are loaded at the transit hub and depart, arriving at the corresponding network point for unloading; in a consolidated cargo scenario, vehicles are loaded at the network point and depart, arriving at the transit hub for unloading. Goods can primarily be transported in cage trucks (logistics trolleys, or cargo trolleys). Cage trucks are unit mobile container devices equipped with four casters for transporting and storing materials, commonly used in logistics distribution. In the current operational model, the number of cage trucks and vehicle capacity are often not perfectly matched. This is because the flow of cage trucks and the transportation routes of vehicles need to be considered. The original transportation routes of vehicles may have multiple outlets, and there are also loading and unloading issues at each outlet. Therefore, there are often gaps in vehicle capacity, which leads to wasted capacity during transportation. If cage trucks cannot be matched with suitable vehicles, it will increase costs to allocate vehicles for transportation. On the other hand, not allocating vehicles for transportation will lead to the accumulation of goods at the transit points or outlets, occupying space resources, and causing difficulties in timely transportation of goods and loading and unloading of other goods.
[0027] Therefore, this application proposes a route planning method, equipment, and storage medium for cargo transportation. It models and solves the route transportation scenario between transit hubs and network points as a pickup and delivery problem. The solution process utilizes a heuristic algorithm from the open-source solver OptaPlanner. Input data includes predicted and extrapolated data (estimated arrival volume at the current location based on upstream location volume, converted to cage count), planned vehicle routes, and transit hub layout. Based on the newly generated routes, a Gurobi design model is used to allocate new tasks. This application comprehensively considers site layout, cargo completion time, and vehicle resources, optimizes the number of route tasks, and reduces transit hub operating costs. The algorithm is designed based on actual business scenarios, improving computational efficiency and reducing computation time.
[0028] Exemplary methods
[0029] To address the problem of mismatching the number of cage cars and vehicle carrying capacity, a route planning method for freight transportation is proposed below. Figure 1This is a flowchart illustrating a route planning method for cargo transportation provided in an exemplary embodiment of this application. Figure 1 For example, firstly, based on transportation data and preset model parameters, the input data and initial solution of the route model are constructed (S100). The initial solution includes at least one single loading and unloading route for goods between the transfer station and the network point. This is the preprocessing of the route model, including input data parsing and initial solution construction, providing a data foundation for subsequent model optimization. Then, based on the first preset constraints and optimization objectives, the initial solution is optimized through the route model to obtain the optimization result (S200). This is the heuristic algorithm solution of the route model. The model is solved according to the constraints and optimization objectives, and the route task is planned. For example, goods include loading and unloading locations. There may be multiple loading and unloading of goods in a single loading and unloading route. The optimization result is to optimize the loading and unloading sequence of multiple goods in a single loading and unloading route, minimizing the number of newly added single loading and unloading routes, minimizing the total number of single loading and unloading routes, minimizing changes to old routes, minimizing mileage, and minimizing the splitting of cages with the same flow direction, thereby improving resource utilization. Next, based on the optimization results and preset shipping conditions, the optimized single-trip loading and unloading route is output (S300), which is the post-processing of the route model. This can include adjusting departure times, determining whether a task should be published, and outputting the route planning task. Specifically, the preset shipping conditions are used to determine whether the optimization results can be published as a task. If so, the optimized single-trip loading and unloading route is output; otherwise, it is not. Finally, based on the task matching model, the optimized single-trip loading and unloading route is matched with the original vehicle transportation route to obtain the vehicle cargo transportation route (S400). After obtaining the results of adding or deleting single-trip loading and unloading routes, in order to make full use of vehicle resources, adjustments are made to the original vehicle transportation route based on the added or deleted single-trip loading and unloading routes. For example, if conditions permit, the added single-trip loading and unloading route replaces the deleted single-trip loading and unloading route to ensure that there is no waste of air transport resources during vehicle transportation.
[0030] The following text combines Figure 1 This application provides a more detailed description of the route planning method for cargo transportation provided in its embodiments.
[0031] In S100, based on transportation data and preset model parameters, the input data and initial solution of the route model are constructed; wherein, the initial solution includes at least one single loading and unloading route for goods between the transshipment yard and the network point.
[0032] First, preprocessing of the circuit model is performed, including input data parsing and initial solution construction.
[0033] In some embodiments, the input data includes model parameters, network data, time distance data, site layout data, shift data, predicted or extrapolated cargo (cage truck) data, route data, and maximum vehicle loading data.
[0034] As an example, model parameters can include:
[0035] ① Current model call time: Used to concatenate specific shift times, which can include hours and minutes.
[0036] ② Route modification mode: 0 means that if a stop on a route has an unmodifiable marker, the entire route cannot be modified; 1 means that a route is modified based on the stop location. For example, the default value can be set to 1.
[0037] ③ Segmentation strategy for goods (cage cars) with the same flow direction: 0 indicates that a single cage is calculated as one object; 1 indicates that cages with the same flow direction are grouped together as one object for calculation; 2 indicates that cages are grouped for calculation based on the rarity of the flow direction. For example, a default value of 0 can be set to reduce the number of planning objects and improve calculation efficiency.
[0038] ④ The default maximum load capacity for vehicle models can be set to a default value of 8 for adding new routes.
[0039] ⑤ Line vacancy threshold: This is used for calculations based on the number of lines with vacancy values greater than or equal to the line vacancy threshold. Lines with higher loading rates are not included in the calculation.
[0040] ⑥ Overflow cage number threshold: After allocating cages to the input lines, the remaining number of cages is the overflow cage number. The overflow cage number is included in the model calculation when it is greater than or equal to the overflow cage number threshold.
[0041] ⑦ Overflow cage number packaging threshold: When the number of overflow cages in the same flow direction is greater than or equal to the overflow cage number packaging threshold, they are grouped together as one object for calculation.
[0042] ⑧ Departure time interval, used for post-processing to adjust departure times, for example, the default value can be set to 10 minutes.
[0043] ⑨ Maximum number of stops. For example, you can set the default value to 3, which means that the maximum number of stops is 3.
[0044] ⑩ Maximum stopover points: Main points are larger network points. For example, a default value of 2 can be set, which means that the maximum number of stopover points is 2.
[0045] Network point order: 0 indicates that the network point order is not considered, 1 indicates that the main network point is selected before the touch point, and 2 indicates that network points with hierarchical relationships are selected before the main network point. For example, the default value of 2 can be set to improve optimization efficiency.
[0046] Existing route shipping standards. For example, a default value of 2 can be set for post-processing parameters.
[0047] Establish new route shipping standards. For example, a default value of 4 can be set. Post-processing parameters.
[0048] As an example, the network data may include: network code, the area to which the network belongs, the main network code to which it belongs, the maximum vehicle length that can be parked, the whitelist of vehicle lengths that can be parked, whether it is a transit point, whether it is a main network, and loading and unloading time.
[0049] As an example, time-distance data may include: origin point code, destination point code, distance, and travel time.
[0050] As an example, the site layout data can include the distance between the storage locations, the shipping direction of each storage location, and the warehouse area to which it belongs. A transit hub includes multiple warehouse areas, and each warehouse area contains multiple storage locations. The shipping direction of storage locations may fall into three scenarios: one storage location in a transit hub shipping to one destination; one storage location in a transit hub shipping to multiple destinations; and multiple storage locations in a transit hub shipping to one destination. Goods (cage carts) from storage locations that are far apart cannot be mixed for shipping. Storage locations that are close enough can be used for cross-department shipping. Goods (cage carts) from storage locations in different warehouse areas cannot be mixed.
[0051] As an example, shift data can include time window parameters for loading and unloading goods (cage cars). A shift refers to a period of working time at a network point or transfer station. Important time nodes include shift start time, shift end time, latest arrival time, wave start time, wave end time, clearing start time, and clearing end time. The starting shift and the destination shift constitute a flow. Goods (cage cars) must be loaded between the start and end times of the starting shift to ensure that all goods (cage cars) at the starting point are transported within the clearing time and delivered for unloading before the latest arrival time of the destination shift. The wave start and end times are a time period at the end of the shift, used to limit the departure time of newly added routes in the model. When the starting shift is a transfer station shift and the destination shift is a network point shift, it is a loose cargo scenario; when the starting shift is a network point shift and the destination shift is a transfer station shift, it is a consolidated cargo scenario.
[0052] As an example, the predicted cargo (cage truck) data is based on historical data to predict the number of cages involved in this calculation, while the extrapolated cargo (cage truck) data is based on the quantity of items in the yard to estimate the number of cages in this shift. The earliest departure time, latest departure time, earliest arrival time, and latest arrival time of the cages are set using shift data, ensuring that at least one cage in each flow direction has its earliest departure time at the end of the initial shift, serving as a backup cage.
[0053] As an example, route details can include route code, date, vehicle type, license plate, stop sequence, departure / arrival time, loading / unloading operations, planned cargo volume, and deletion priority. The deletion priority uses a number to describe the completion status of the route task; the higher the number, the lower the likelihood of route modification.
[0054] As an example, the maximum load data for vehicle models is set because the maximum load of vehicle models varies in different locations. Therefore, when building the model, it is necessary to input the maximum load data for vehicle models to ensure the safety of cargo transportation.
[0055] An initial solution refers to a possible, but not necessarily optimal, solution initially given when solving the model. During the solution process, this initial solution may undergo multiple iterations and optimizations until a final solution satisfying the problem requirements is found. The selection of the initial solution has a significant impact on the efficiency and accuracy of the solution. Therefore, in some embodiments, S100 may include: initializing a detailed list of loading and unloading goods at each stop along the loading and unloading route; splitting the loading and unloading route into a flow direction dimension according to the principle of loading before unloading, and saving it according to the flow direction dimension; wherein, the flow direction includes the originating network point shift / batch and the destination network point; classifying the goods according to the flow direction, and setting a catch-up cargo (catch-up cage) for each flow direction; wherein, the latest departure time for each flow direction is counted as the catch-up cargo completion time; sorting the route flow directions according to a first preset rule to obtain a first sorted route flow. Based on the first sorted route flow direction, the bottom-line goods are sequentially allocated to each flow direction, and the time window and loading are checked to ensure they meet the constraints, thus completing the flow direction allocation of the bottom-line goods. The route flows are then sorted according to the second preset rule to obtain the second sorted route flow direction. Based on the second sorted route flow direction, all goods except the bottom-line goods are sequentially allocated to each flow direction, and the time window and loading are checked to ensure they meet the constraints, thus completing the flow direction allocation of all goods. Based on the flow direction allocation of all goods, the loading and unloading operations of the remaining goods are allocated according to a greedy rule to construct an initial solution. The initial solution represents that the loading and unloading operations of all goods have been allocated. The remaining goods represent the goods that have not yet been allocated after sorting according to the first and second preset rules.
[0056] An initial solution provides a clear starting point for the solution process, enabling it to proceed in an orderly manner. A reasonable initial solution can accelerate the solution process, reduce the number of iterations, and improve efficiency. The choice of initial solution can directly affect the accuracy and reliability of the final result, and a good initial value can improve the model's convergence speed and accuracy. Therefore, constructing an initial solution may include the following steps:
[0057] 1. Route Pre-processing. Initialize the loading and unloading details list for each stop on the route, used for the allocation of cage object loading and unloading during cage overflow calculation. Based on the principle of loading before unloading, the route is split into a flow direction dimension. The flow direction is saved according to the flow direction dimension, consisting of the originating network point, shift, and destination network point. The latest departure time for each flow direction is calculated as the completion time of the last-line cage. The number of routes under each flow direction is calculated as one of the sorting rules. The flow direction includes several important attributes: originating point, originating shift, destination, and departure time. The flow direction dimension refers to the dimension of splitting and classifying transportation routes according to the direction of cargo transportation. Through the flow direction dimension, the flow of goods on different transportation routes can be more clearly understood, including key information such as the origin, destination, and direction of transportation. Based on the flow direction dimension, transportation resources and modes can be rationally allocated, transportation routes and plans can be optimized, and transportation efficiency can be improved. For example, for upstream transportation routes with high freight volume, priority can be given to using transportation vehicles with higher capacity and efficiency; for downstream transportation routes with lower freight volume, more flexible transportation methods or combined transportation plans can be considered; for routes with long transportation distances or complex transportation conditions, more economical transportation methods or optimized transportation routes can be adopted to reduce transportation costs. Figure 2 As shown, Figure 2 This is a schematic diagram of the structure of the transportation flow direction provided by an exemplary embodiment of this application. A pure bulk cargo line can form three flow directions: WA, WB, and WC. More complex ones include W1-A2-B3-C1-W2, where 1 is loading, 2 is unloading, and 3 is loading and unloading. The flow directions that can be formed are WA, WB, WW, BW, and CW.
[0058] 2. Cage Car Pre-processing. Set the completion time for each cage car. Each cage car is categorized by flow direction. The completion time of the cage car flowing into a specific direction is set to the latest departure time for that direction and marked as the "backup cage." The completion timestamps of other cage cars are set to 0. If the latest departure time for the "backup cage car" cannot be found, its completion time is set to the end time of the shift. The cage car completion time is one of the important time constraints of the model; loading or unloading can only proceed after the cage car is created.
[0059] 3. Safety Cage Allocation. Sort the route flows according to the following rules: later departure time, higher deletion priority, non-modifiable origin / destination points, and lower planned demand codes (an example of the first preset rule). Allocate the safety cage to each flow direction sequentially, verifying whether the time window and loading meet the constraints, until all iterations are complete. The departure time of a flow direction must be greater than or equal to the cage's construction time, and the line's loading capacity cannot exceed the planned loading capacity.
[0060] 4. Other Cage Allocation. Sort the route flows according to the following rules: priority given to routes with unmodifiable origin and destination points, routes with more connection points, routes with later departure times, routes with fewer lines, and routes with fewer cages (an example of the second preset rule). Allocate cages to each route sequentially, verifying whether the time window and loading constraints are met, until all routes have been traversed. The departure time of a route must be greater than or equal to the cage's construction time, and the line's loading capacity cannot exceed the result provided by the cage allocation model. Figure 3 This is a schematic diagram of a loading and unloading task provided in an exemplary embodiment of this application. After the allocation is completed, the following can be obtained: Figure 3 The loading and unloading tasks shown are as follows: p represents loading, d represents unloading. Point W loads 1, 2, and 3 cages, point A unloads 1 cage, point B unloads 2 cages, and point C unloads 3 cages.
[0061] 5. Adding Direct Routes for Overflow Cages. Based on the default maximum load capacity of the vehicle type (set to 8), if the number of overflow cages exceeds 8, a direct route will be constructed using vehicles with a default capacity of 8 cages. The 8 cages will be bundled together and bound to the newly created route. The departure time of the new route is the start time of the wave. The remaining cages (less than 8 cages) will be bundled and allocated to the newly created route if their number is greater than or equal to the overflow cage packing threshold, but will not be bound to that new route.
[0062] 6. Input route construction initial solution. When the model parameter route modification mode is 0, if there are unmodifiable stops in the route, the parameter model calculation will not be performed. When the model parameter route modification mode is 1, if the number of empty stops is less than the line empty stop threshold, it will not participate in the model calculation. In addition, if the stops in the route are not in the network table, or are non-standard vehicle types, or have duplicate network stops, they will not participate in the model calculation, such as cross-regional routes, off-network address routes, and unmanned vehicle routes, which may require manual maintenance as the scenarios increase. When constructing the initial solution for an existing route, the initial departure point and loading / unloading operations of the route stops in the route model are initialized according to the cage allocation results provided in sections 3 and 4. Cages with unmodifiable stops are strictly bound to the route.
[0063] In some embodiments, Figure 4 This is a flowchart illustrating a special loading and unloading task provided by an exemplary embodiment of this application. A special scenario exists where the stop point cannot be modified and the unloading volume is 0. The initial loading and unloading operation is an unmodifiable operation with 0 loading and unloading volumes, and is strictly bound to the route. For example... Figure 4 As shown, p represents loading and d represents unloading. Since point B cannot be modified and has not been assigned a cage, a virtual cage with a loading capacity of 0 is created, which is considered as p0. The actual meaning is that it must stop at point B. Then, point A unloads 1 cage, stops at point B, and point C unloads 3 cages.
[0064] 7. Initialize other lines and cages. Initialize the remaining cages, add guaranteed direct delivery lines for each flow direction, and determine whether to initialize cages for a flow direction based on the overflow cage number threshold. Determine whether to split cages in the same flow direction based on the cage splitting strategy. If there are unassigned backup cages, modify the departure time to the completion time of the backup cage to ensure that the backup cage can be dispatched.
[0065] 8. Linked list initialization. Greedy rules are used to allocate cage loading and unloading operations, constructing an initial solution that ensures all cage loading and unloading operations have been allocated, and in the worst case, a direct transmission line can be guaranteed.
[0066] In some embodiments, the linked list generated based on loading and unloading operations can be parsed into concepts such as flow direction, network point, main network point, and area. Figure 5 This is a schematic diagram illustrating the concept of linked list parsing provided in an exemplary embodiment of this application, to... Figure 5 For example, p represents loading and d represents unloading. The first column represents the data structure at the lowest level, where vehicle v1 starts from time t0, sequentially picking up cages 1, 2, and 3, and then unloading cages 1, 2, and 3. This data is updated sequentially based on time t0 to record subsequent cage picking and unloading times. The second column represents the data structure at the same time, where vehicle v1 starts from time t0, sequentially picking up cages 1 and 2 at position a, picking up cage 3 at position b, unloading cages 1 and 2 at point A, and unloading cage 3 at point B. The third column represents the data structure at the same time, where vehicle v1 starts from time t0, sequentially picking up cages 1, 2, and 3 at transfer station W, unloading cages 1 and 2 at point A, and unloading cage 3 at point B. The fourth column represents the data structure at the same time, where vehicle v1 starts from time t0, sequentially picking up cages 1, 2, and 3 at transfer station W, and then unloading cages 1, 2, and 3 at main point x. The fifth column shows that vehicle v1 starts from time t0, and sequentially picks up cages 1, 2 and 3 in transfer yard W, and then unloads cages 1, 2 and 3 in area Y.
[0067] In S200, based on the first preset constraints and optimization objectives, the initial solution is optimized through the line model to obtain the optimization result.
[0068] Optaplanner's built-in neighborhood move operators for solving vehicle routing problems include: ChangeMove, SwapMove, TailChainSwapMove, SubChainChangeMove, and SubChainSwapMove, representing node modification, node swapping, tail chain swapping, subchain movement, and subchain swapping, respectively. However, for pickup-delivery (PDP) problems, these neighborhood move operators are inefficient. Therefore, a custom neighborhood search operator is defined based on the Optaplanner framework. If the scores of the routes before and after the move are essentially the same, it can lead to local optima, repeatedly jumping between these two solutions (routes), wasting computational resources. By adding a tabu search strategy, the most recently invoked move operators, the number of each move operator invoked, and the moved pickup and delivery tasks can be recorded. Based on this recorded information, if similar moves have been performed recently, subsequent searches will not be repeated. Therefore, in some embodiments, S200 may include: based on the first preset constraints and optimization objectives, defining a neighborhood search operator for the constraint satisfaction engine in the route model, adding a tabu search strategy, and recording the movement operators called within a preset range, the number of each movement operator called, the moved pickup tasks, and the moved delivery tasks, in order to optimize the initial solution and obtain the optimization result.
[0069] The circuit model can be optimized using the open-source solver Optaplanner, an AI constraint solver specifically designed for optimizing planning and scheduling problems. Optaplanner finds near-optimal solutions by applying sophisticated AI optimization algorithms, such as tabu search and simulated annealing, combined with efficient score computation and other constraint-solving techniques. In Optaplanner, operators can be understood as functions or methods that perform certain optimization operations or transformations. These operators are typically closely related to Optaplanner's optimization algorithms, used to explore different solutions in the search space and attempt to find the optimal solution. Optaplanner uses algorithms like tabu search to find near-optimal solutions among a large number of possible solutions. It limits the search range of the solution space by defining hard and soft constraints and uses efficient score computation to evaluate the quality of each solution. The application of the tabu search algorithm in Optaplanner enables the solver to find near-optimal solutions in a reasonable amount of time. The tabu search algorithm generates new candidate solutions by applying these custom neighborhood search operators and selects the next current solution based on tabu and defiance criteria. During the iteration process, the algorithm continuously updates the tabu list to avoid repeatedly visiting locally optimal solutions that have already been searched, thereby gradually approaching the global optimum. The principle of tabu search is as follows: a) Store the current optimal solution and decide whether to accept the worst solution according to a certain probability. As the number of iterations increases, the probability of accepting the worst solution decreases, eventually converging to a better solution; b) Maintain a tabu list of a certain length. Each time a new solution is obtained, it is compared with the solutions in the tabu list. Solutions in the tabu list are not accepted. After moving, the tabu list is updated, the latest solution is pushed in, and the solution from N steps ago is popped out. The tabu list can be tailored to different dimensions (neighborhood movement / solution).
[0070] As an example, optimization goals include:
[0071] The first optimization objective is to optimize the number of new loading and unloading routes; where fewer new loading and unloading routes are better than more. In other words, the first objective is to minimize the number of new routes, and its expression can be:
[0072] min Z1=v new Formula 1;
[0073] In Formula 1, min Z1 represents the first optimization objective, v new This indicates the number of newly added loading and unloading routes.
[0074] The second optimization objective is to optimize the total number of loading and unloading routes; where a smaller total number of loading and unloading routes is better than a larger total number of routes. In other words, the total number of routes should be minimized. The expression for the second optimization objective can be:
[0075] minZ2=v all Formula 2;
[0076] In Formula 2, v all Let Z represent the total number of loading and unloading routes, and minZ2 represent the second optimization objective.
[0077] The third optimization objective is to optimize the number of changes to the loading and unloading routes in the initial solution. Fewer changes to the loading and unloading routes in the initial solution are preferable to more changes. In other words, minimize changes to the old routes. This can be achieved by introducing a penalty term. The smaller the penalty term, the larger its coefficient will be when loading / unloading operation i is assigned to a route v that is not part of the initial solution. The expression for the third optimization objective can be:
[0078]
[0079] In Formula 3, PD = P∪D, P = {1,2,3,...,n}, D = {n+1,n+2,n+3,...,2n}, where PD represents the set of cage loading and unloading operation codes, and V = {1,2,3,...,m}, where V represents the set of line codes. This indicates that the loading operation belongs to line v, minZ3 represents the third optimization objective, and v represents the loading / unloading line.
[0080] The fourth optimization objective is to optimize the mileage of loading and unloading routes; where a smaller loading and unloading route mileage is preferred over a larger one. In other words, the total route mileage should be minimized. The expression for the fourth optimization objective can be:
[0081]
[0082] In Formula 4, PD = P∪D, P = {1,2,3,...,n}, D = {n+1,n+2,n+3,...,2n}, PD represents the set of cage loading and unloading operation codes, B = {1,2,3,...,m}, V represents the set of line codes, and d ij Parameters relating to distance and time, such as the distance between loading and unloading. This indicates that line v executes ij sequentially, minZ4 represents the fourth optimization objective, and v represents the loading / unloading line.
[0083] The fifth optimization objective is to optimize the number of cargo splits along the same flow direction; where fewer splits are preferable to more splits. In other words, minimize the number of splits along the same flow direction and allocate cages along the same flow direction to the same route as much as possible. The expression for the fifth optimization objective can be:
[0084]
[0085] In Formula 5, minZ5 represents the fifth optimization objective, f represents the number of flow directions, F = {1, 2, 3, ..., f} represents the flow direction code set, V = {1, 2, 3, ..., m} represents the line code set, and v represents the loading / unloading line. This indicates that the flow direction belongs to line v.
[0086] Among them, the priority decreases sequentially from the first optimization objective to the fifth optimization objective.
[0087] As an example, the first preset constraints include: the departure address of the loading / unloading route is the same as the pickup point address of the first cargo; the loading / unloading route must start loading / unloading from the current location or remain stationary; any loading / unloading operation can only be executed once by a loading / unloading route, the loading / unloading route does not include duplicate outlets, and the route does not include duplicate flow directions; for the same loading / unloading point in the loading / unloading route, there must be both inflow and outflow; in any segment of the loading / unloading route, the sum of the departure time of the preceding loading / unloading point and the vehicle travel time on the path is less than or equal to the arrival time of the subsequent loading / unloading point; the start time of loading / unloading at the loading / unloading point in the loading / unloading route falls within a preset time window; and the maximum load cannot be exceeded after each loading / unloading operation in the loading / unloading route. Quantity; Constraints on assigning unloading operations for the same goods to the same vehicle; Constraints on goods following the principle of loading before unloading; Constraints on the requirement that the first loading / unloading location on a loading / unloading route must be consistent with the starting position of the loading / unloading route if subsequent loading / unloading operations occur; Constraints on the inability to adjust preset, unmodifiable loading / unloading operations; Constraints on the inability for discontinuous, repeated loading / unloading operations at the same network point; Constraints on the number of connecting points and the number of connecting points at the main network point; Constraints on the carding distance when loading goods at the transfer station; Constraints on the vehicle type at the network point; Constraints on loading goods at the transfer station and unloading goods at the network point, or loading goods at the network point and unloading goods at the transfer station; Constraints on the order of the main network point and other network points; Constraints on the distance between network points or the detour ratio threshold of the loading / unloading route.
[0088] One way to express constraints in words is as follows:
[0089] 1.1 The departure address and the first pickup point address of the route are the same.
[0090] 1.2 Cages with strictly bound lines cannot have their lines and relative order modified. For example, if the relative order is assigned as 1, 2, 3, 4 during initialization, and v1 is bound, fixing the relative order of p1, p2, d1, d2, then it cannot be adjusted.
[0091] 1.3 The loading and unloading operations of cages should be assigned to the same vehicle, and loading should be done before unloading.
[0092] 1.4 The maximum load capacity shall not be exceeded after each loading and unloading.
[0093] 1.5 Single trip, loading cages at the transfer station and unloading cages at the distribution point, or loading cages at the distribution point and unloading cages at the transfer station.
[0094] 1.6 Loading and unloading operations at discontinuous locations are not allowed on the same route. For example, loading and unloading operations at location A-location B-location A...
[0095] Outlets.
[0096] 1.7 Discontinuous loading and unloading operations in the same direction are not allowed on the same route. For example, loading A-loading B-loading A at a transfer station.
[0097] 1.8 The loading time of the cages must not be earlier than the cage creation time to ensure that the last cage is dispatched.
[0098] 1.9 The number of branch and main branch stops can be violated if it is consistent with the original route's stop points.
[0099] 1.10 The order of the main network point and other network points varies depending on the configuration rules. It can be violated if it is consistent with the original route stop points.
[0100] 1.11 The vehicle type restriction at the network point can be violated if the route stops at the same points as the original route.
[0101] 1.12 When loading cages at the transfer station, the distance between the cages should not be too far. This rule can be violated if the cages are the same as the original route's stopping points.
[0102] 1.13 Route Mode 1, Network Distance Constraint: Either one of the two conditions must be met. It can be violated if the route stops at the same points as the original route.
[0103] 1.14 Route Mode 2: Detour ratio less than 1.8. Either of these conditions must be met. It is permissible to violate the rule if the route stops at the same points as the original route.
[0104] 1.15 It is permissible to violate the rule that the unloading time of cages is earlier than the latest delivery time of cages and coincides with the original route stop.
[0105] One way to express constraints is as follows:
[0106] Each line must either begin loading / unloading cages from its current position or remain stationary:
[0107]
[0108] Each loading / unloading cage operation can only be performed once on a single line; there cannot be duplicate network points or duplicate flow directions on a single line.
[0109]
[0110] For any line v and operation j, if line v reaches the location where operation j is executed, then line v leaves after completing operation j. That is, for the same task node, if there is an inflow, there is also an outflow.
[0111]
[0112] In a given path, the sum of the departure time of the preceding task and the travel time of vehicles along the path is less than or equal to the arrival time of the subsequent point.
[0113]
[0114] The start time of loading and unloading at the loading / unloading point falls within the time window:
[0115]
[0116] Load during the route:
[0117]
[0118] Cage loading and unloading operations are assigned to the same vehicle:
[0119]
[0120] The cage needs to be installed before it is unloaded:
[0121]
[0122]
[0123] Unmodifiable loading and unloading cage operation:
[0124]
[0125] Number of serial nodes and number of serial nodes in the main network:
[0126]
[0127] Positioning distance constraints:
[0128]
[0129] Vehicle restrictions at service outlets:
[0130]
[0131] Loading at transit hubs and unloading at distribution points, or loading at distribution points and unloading at transit hubs:
[0132]
[0133] Main branch first:
[0134]
[0135] The distance constraint within the segment or the total detour ratio is less than 1.8:
[0136]
[0137] In formulas six through twenty-three, v represents the loading / unloading route, V = {1, 2, 3, ..., m}, V represents the route code set, PD = P∪D, P = {1, 2, 3, ..., n}, D = {n+1, n+2, n+3, ..., 2n}, and PD represents the cage loading / unloading operation code set. This indicates that the code for the specified route is 0, and the route starts from the starting point. This indicates that the code for the specified line is 0, and the line returns from the starting point. This indicates that the code for the specified line is 0, meaning the line is not in use. This indicates that route v sequentially executes ij, stops at gh, and executes the flow direction rs. m represents the number of routes, n represents the number of cages (cargo quantity), l represents the number of network points, f represents the number of flow directions, L = {1, 2, 3, ..., l}, where L represents the set of network point codes, and F = {1, 2, 3, ..., f}, where F represents the set of flow direction codes. When equal to 1, This indicates that the loading operation belongs to line v. This indicates that the service point belongs to line v. This indicates that the flow direction belongs to line v, d ij Parameters relating to distance and time include the distance between loading and unloading, t. ij Indicates travel time. Indicates departure time. Indicates the arrival time of the vehicle. Indicates the start time of loading and unloading. Indicates the time required for loading and unloading. Indicates the earliest loading / unloading time, [a i ,b i ] indicates a time window. Q v q represents the maximum load capacity of line v. iv Let S represent the load after line v completes loading and unloading i, and let S represent the set of operations and line bindings. new Indicates the number of newly added lines, v all α represents the total number of lines. v β represents the detour ratio. v Indicates distance verification for non-transfer point locations, loc v Indicates the initial position of the line, loc i Indicates the loading / unloading operation position, u v Indicates the length of the vehicle. Indicates the maximum vehicle length that can stop at the service point, w g Indicates whether it is a transit point, c iv p represents the penalty coefficient assigned to line v for loading / unloading operation i, k represents the maximum number of serial points, and p represents the maximum number of serial points.ij Indicates a penalty for blocking, e g Indicates whether it is a primary service point.
[0138] As an example, custom neighborhood search operators include:
[0139] The first operator is used to randomly move loading and unloading operations for the same goods to the loading / unloading routes of the same car or other cars. The first operator can be represented as TwinChangeMove. TwinChangeMove randomly moves loading and unloading operations for the same cage car to the route of the same car or other cars. For example, if the original route is p1→p2→p3→d1→d2→d3 and the original route is p4→p5→p6→d4→d5→d6, after modification by the first operator, the route becomes: first route: p1→p3→p2→d1→d3→d2, second route: p4→p5→p6→d4→d5→d6. The loading / unloading operation of cage car number 2 is adjusted to follow the loading / unloading operation of cage car number 3.
[0140] The second operator is used to swap the loading and unloading operations of two cargoes. The second operator can represent TwinSwapMove, which swaps the loading and unloading operations of two cage cars. For example, if the original first route is p1→p2→p3→d1→d2→d3 and the original second route is p4→p5→p6→d4→d5→d6, after modification by the second operator, the first route becomes p1→p5→p3→d1→d5→d3 and the second route becomes p4→p2→p6→d4→d2→d6, swapping the loading and unloading operations of cage cars 2 and 5. The two cage car tasks can be performed on the same car or on different cars.
[0141] The third operator is used to modify the loading and unloading operations of the loading and unloading route according to the flow direction dimension. The third operator can be represented as FlowChangeMove. FlowChangeMove modifies the loading and unloading operations of the route according to the flow direction dimension. For example, the first original route is p1→p2→p3→d1→d2→d3, and the second original route is p4→p5→p6→d4→d5→d6. After being modified by the third operator, the first route is: p1→d1, and the second route is: p4→p2→p3→p5→p6→d4→d5→d6→d3→d2. Cages 2 and 3 of the first route have the same flow direction (the loading location and the unloading location are the same). At the same time, cages 2 and 3 are moved to the second route.
[0142] The fourth operator is used to exchange loading and unloading operations along loading and unloading routes in terms of flow direction. The fourth operator can be represented as FlowSwapMove. FlowSwapMove exchanges loading and unloading operations along routes in terms of flow direction. For example, if the first original route is p1→p2→p3→d1→d2→d3 and the second original route is p4→p5→p6→d4→d5→d6, the fourth operator modifies it to: the first route is p1→p4→d1→d4 and the second route is p3→p2→p5→p6→d5→d6→d3→d2, thus exchanging the operations of cage 4 with those of cages 2 and 3.
[0143] The fifth operator is used to split the flow direction. The fifth operator can be represented as FlowSplitMove. FlowSplitMove splits the flow direction. For example, the first original route is p1→p2→d1→d2, and the second original route is empty. After the fifth operator, it is modified to the first route: p1→d1 and the second route: p2→d2. The randomly moved position after splitting is not necessarily an empty vehicle.
[0144] The sixth operator is used to merge flow directions. The sixth operator can be represented as FlowMergeMove. FlowMergeMove merges flow directions. For example, if the first original route is p1→d1 and the second original route is p2→d2, the sixth operator merges them into the first route: p1→p2→d1→d2. The second original route is empty. The loading and unloading operations of cage 2 (p2, d2) of the second route are merged with the loading and unloading operations of cage 1 (p1, p2) of the first route.
[0145] The seventh operator is used to modify the route dimension. The seventh operator can be represented as RouteChangeMove. RouteChangeMove modifies the route dimension. For example, it changes the original route p1→p2→p3→d1→d2→d3 of the first route to the route p1→p3→p2→d1→d3→d2 of the second route.
[0146] The eighth operator is used for swapping along the route dimension. The eighth operator can be represented as RouteSwapMove. For example, if the first original route is p1→p2→p3→d1→d2→d3 and the second original route is p4→p5→p6→d4→d5→d6, after modification by the eighth operator, the first route becomes: p4→p5→p6→d4→d5→d6 and the second route becomes: p1→p3→p2→d1→d3→d2.
[0147] As an example, the calculation principle of S200 can be summarized as follows: orders are abstracted into individual pickup and delivery tasks, where p represents loading operations and d represents unloading operations, such as p1, d1, p2, d2, etc. For goods already loaded onto the vehicle, only delivery tasks exist. Assuming order number 1 has been loaded, only d1 needs to be completed. The ultimate goal is to plan a task execution sequence that meets the constraints and has a good objective score, without modifying tasks already loaded. For example, given p1, p2, p3, p4, p5, p6, d1, d2, d3, d4, d5, and d6, one possible loading / unloading route is: vehicle v executes p1→p2→p3→p4→d1→d3→d2→d4→p6→p5→d5→d6. A single loading / unloading route is defined as follows: taking a segment with a load of 0 as a node, the route task is divided into multiple trips. Due to real-time planning, the initial load of the vehicle may not be 0. In this case, a trip is considered from the start of the first task until the load drops to 0. After defining the trips, the calculation of some constraints and objectives becomes much clearer, and it is also convenient to design efficient neighborhood movement operators for the problem. In the embodiments above and below, modeling and solving usually consider a single task, i.e., a single loading / unloading route.
[0148] The optimization results may not necessarily be output to the vehicle as the final task. It is necessary to further determine whether the optimization results have the conditions for actual execution. Therefore, in S300, based on the optimization results and preset shipping conditions, the optimized single-trip loading and unloading route is output. This means that the route model is post-processed, including adjusting the departure time, determining whether the task has been issued, and outputting the optimization results.
[0149] In some embodiments, for routes entirely added to the model, the departure time is adjusted to be delayed as much as possible, while still satisfying the loading and unloading time windows of the cage cars. The departure time range is generated according to the following rules: from the start to the end of the wave, a value is taken at every departure time interval.
[0150] In some embodiments, the optimization result is a route detail table, and it is determined whether the output can follow the following preset shipping conditions:
[0151] For existing routes involved in the calculation, determine if they meet the shipping criteria. If there are 0 cages, a bottom cage, an unmodifiable cage, or no other flow direction, the shipping criteria are assumed to be met. If the shipping criteria are met, check if the stop point is consistent with the original route. If consistent, the original route is marked as unchanged, inherits the cage car loading / unloading volume from the model, and the modified original route is output. If inconsistent, the original route's loading / unloading volume is modified to 0, the model route is adjusted to a newly added route, and both the original and newly added routes are output. If the shipping criteria are not met, the original route's loading / unloading volume is modified to 0, and the original route is output.
[0152] For newly added routes participating in the calculation, remove cages that are shipped individually from the new routes, and then determine whether they meet the shipping criteria. If they meet the shipping criteria, the new route is output. If they do not meet the shipping criteria, they are not output. This step means that when processing the shipping plans for new routes, it is first necessary to identify and remove those shipping plans that only contain a single cage (or a small number of cages, if the criterion is individual shipment). Because individual shipments are costly, or for logistics optimization considerations, the shipping plans remaining after the previous step (i.e., those cages that are not shipped individually) need to undergo a series of evaluations to determine whether they meet the established shipping criteria. These criteria may involve multiple aspects such as cargo quantity, weight, volume, destination, and transportation costs. If a shipping plan for a new route meets all the shipping criteria after evaluation, then the route will be considered valid and will be output or recorded as an executable shipping plan. Conversely, if a shipping plan for a new route does not meet any one or more shipping criteria, then the route will not be considered valid and will not be output or recorded as an executable shipping plan. This process or rule aims to optimize logistics shipping plans by removing uneconomical individual shipping plans and only outputting valid new routes that meet all shipping criteria, thereby reducing transportation costs and improving logistics efficiency.
[0153] For lines that are not involved in the calculation, the original input data is output directly and marked as unchanged.
[0154] S300 outputs unchanged, deleted, and newly added routes. To fully utilize vehicle resources, deletions and additions are matched to form modifications. Therefore, in S400, based on the task matching model, the optimized single-trip loading and unloading route is matched with the original vehicle transportation route to obtain the vehicle's cargo transportation route.
[0155] In some embodiments, the task matching model may include a preset objective function and a second preset constraint. The preset objective function is used to maximize the number of matches and minimize the matching cost. The second preset constraint may include: constraining single-trip loading / unloading routes with different departure points and shifts from being matched with the vehicle's original transportation route; constraining new routes and deleted routes with departure times differing by a preset time from being matched; constraining single-trip loading / unloading routes with different vehicle models from being matched with the vehicle's original transportation route; constraining the stop points and mileage of new routes to meet the contract requirements of deleted routes; and constraining the time range of new routes not to conflict with other tasks of the vehicle. The processing logic of the task matching model is as follows: after modeling, it is solved using the commercial solver gurobi. If a match is successful, the deleted route is removed from the route results, the new route is modified into a modified route, and the basic information of the deleted route is matched to the modified route.
[0156] As an example, the objective function considers the destination distance, mileage difference, and deletion priority before and after the modification in order to maximize the number of matches and minimize the matching cost, that is, to minimize the cost while adding or deleting the most line matches.
[0157] One way to represent the objective function is as follows:
[0158]
[0159] In formulas 24 and 25, max Z1 represents maximizing the number of matches, min Z2 represents minimizing the matching cost, i represents the number of newly added tasks, j represents the number of deleted tasks, A represents the set of newly added tasks, D represents the set of deleted tasks, and x... ij A value of 1 indicates that the newly added route i can be executed by vehicles deleting route j. ij This indicates the cost of recovery; the greater the route change, the higher the recovery cost.
[0160] As an example, one way to express the second preset constraint is: different departure points and bus schedules cannot be matched; departure times of newly added or deleted routes differ by more than 1 hour (which can be freely configured to other times) cannot be matched; newly added large bus tasks cannot be matched with deleted small bus tasks; the stops and mileage of newly added routes must meet the contract requirements of deleted routes; and the time range of newly added routes cannot conflict with other tasks of the vehicles. Figure 6 This is a schematic diagram illustrating the principle of a time range conflict provided in an exemplary embodiment of this application. Figure 6 For example, the middle strip represents multiple tasks performed by the same vehicle, the strip above the middle strip represents newly added tasks that cannot be matched due to time conflicts, and the strip below the middle strip represents newly added tasks that can be matched because there are no time conflicts.
[0161] As another example, the second preset constraint can be expressed by the formula:
[0162] Delete a line that matches 0 or 1 newly added lines:
[0163]
[0164] Add a line that matches 0 or 1 deleted lines:
[0165]
[0166] A single insertion and deletion combination conflict; two insertions and deletions combination conflicts:
[0167]
[0168]
[0169] In formulas 26 to 29, i represents the newly added task number, j represents the deleted task number, A represents the set of newly added tasks, D represents the set of deleted tasks, and x... ij A value of 1 indicates that the newly added route i can be executed by vehicles deleting route j. ij The cost of recovery is represented by T = {(i,j),...} and S = {(i,j,m,n),...}. T represents the first combination conflict and S represents the second combination conflict.
[0170] Exemplary device
[0171] Figure 7 This is a schematic diagram of the structure of a cargo transportation route planning device provided in an exemplary embodiment of this application, as shown below. Figure 7 As shown, the freight transportation route planning device 7 includes: a construction module 71, which constructs the input data and initial solution of the route model based on transportation data and preset model parameters; wherein, the initial solution includes at least one single-trip loading and unloading route for goods between the transshipment yard and the network point; an optimization module 72, which optimizes the initial solution through the route model based on the first preset constraint conditions and optimization objectives to obtain the optimization result; a screening module 73, which outputs the optimized single-trip loading and unloading route based on the optimization result and preset dispatch conditions; and a matching module 74, which matches the optimized single-trip loading and unloading route with the original vehicle transportation route based on the task matching model to obtain the vehicle freight transportation route.
[0172] The cargo transportation route planning device provided in this application abstracts the actual business scenario into a single-trip loading and unloading problem, optimizes the number of loading and unloading routes formed by a single trip, reduces logistics costs, reduces the operating costs of transit centers, optimizes driving distances, optimizes transportation modes, rationally arranges cargo distribution, improves logistics efficiency, and finally re-matches the optimized single-trip loading and unloading routes to the original vehicle transportation routes, making full use of the sorting capacity of logistics centers and the transportation capacity of vehicles to improve resource utilization.
[0173] As one possible implementation, the construction module 71 can be configured to: initialize a detailed list of loading and unloading goods at each stop along the loading and unloading route; split the loading and unloading route into a flow direction dimension according to the principle of loading before unloading, and save it according to the flow direction dimension; wherein, the flow direction includes the originating network point shift batch and the destination network point; classify the goods according to the flow direction, and set a backup goods for each flow direction; wherein, the latest departure time of each flow direction is counted as the backup goods establishment time; sort the route flow directions according to a first preset rule to obtain a first sorted route flow direction; based on the first sorted route flow direction... The process involves: sequentially allocating the bottom-line cargo to each flow direction and verifying whether the time window and loading meet the constraints to complete the flow direction allocation of the bottom-line cargo; sorting the flow directions according to the second preset rule to obtain the second sorted flow directions; based on the second sorted flow directions, sequentially allocating all other cargo except the bottom-line cargo to each flow direction and verifying whether the time window and loading meet the constraints to complete the flow direction allocation of all cargo; and based on the flow direction allocation of all cargo, allocating the loading and unloading operations of cargo according to the greedy rule to construct the initial solution; where the initial solution represents that the loading and unloading operations of all cargo have been allocated.
[0174] As one possible implementation, the optimization module 72 can be configured to: based on the first preset constraints and optimization objectives, define a neighborhood search operator in the line model that satisfies the constraints of the engine, and add a tabu search strategy, and record the movement operators called within the preset range, the number of each movement operator called, the moved pickup tasks, and the moved delivery tasks, so as to optimize the initial solution and obtain the optimization results.
[0175] As one possible implementation, the custom neighborhood search operator may include: a first operator for randomly moving loading and unloading operations of the same goods to the loading and unloading routes of the same vehicle or other vehicles; a second operator for swapping loading and unloading operations of two goods; a third operator for modifying loading and unloading operations of loading and unloading routes in terms of flow direction; a fourth operator for swapping loading and unloading operations of loading and unloading routes in terms of flow direction; a fifth operator for splitting flow directions; a sixth operator for merging flow directions; a seventh operator for modifying flow directions in terms of route dimension; and an eighth operator for swapping flow directions in terms of route dimension.
[0176] As one possible implementation, the optimization objectives may include: a first optimization objective, which optimizes the number of newly added loading and unloading routes; wherein, fewer newly added loading and unloading routes are better than more newly added loading and unloading routes; a second optimization objective, which optimizes the total number of loading and unloading routes; wherein, fewer total loading and unloading routes are better than more total loading and unloading routes; a third optimization objective, which optimizes the number of changes to loading and unloading routes in the initial solution; wherein, fewer changes to loading and unloading routes in the initial solution are better than more changes to loading and unloading routes; a fourth optimization objective, which optimizes the mileage of loading and unloading routes; wherein, smaller loading and unloading route mileage is better than larger loading and unloading route mileage; and a fifth optimization objective, which optimizes the number of splits of goods with the same flow direction; wherein, fewer splits of goods with the same flow direction are better than more splits of goods with the same flow direction; wherein, the priority decreases sequentially from the first optimization objective to the fifth optimization objective.
[0177] As one possible implementation, the first preset constraints may include: the departure address of the loading / unloading route and the pickup point address of the first cargo must be the same; the loading / unloading route must either start loading / unloading from the current location or remain stationary; any loading / unloading operation can only be performed once by a single loading / unloading route, and the loading / unloading route does not include duplicate stops or duplicate flow directions; for the same loading / unloading location on the loading / unloading route, there must be both inflow and outflow; in any segment of the loading / unloading route, the sum of the departure time of the preceding loading / unloading location and the vehicle travel time on the path must be less than or equal to the arrival time of the subsequent loading / unloading location; the start time of loading / unloading at the loading / unloading location on the loading / unloading route must fall within a preset time window; and each loading / unloading operation on the loading / unloading route must not exceed [a certain time limit]. Exceeding maximum loading capacity; constraining the allocation of unloading operations for the same goods to the same vehicle; constraining goods to follow the principle of loading before unloading; constraining that if there are subsequent loading and unloading operations on the loading and unloading route, the first loading and unloading location must be consistent with the starting position of the loading and unloading route; constraining that preset, unmodifiable loading and unloading operations cannot be adjusted; constraining that there cannot be discontinuous repeated loading and unloading operations at the same network point on the same route; constraining that there cannot be discontinuous repeated loading and unloading operations in the same direction on the same route; constraining the number of connecting points and the number of connecting points at the main network point; constraining the parking distance when loading goods at the transfer station; constraining the vehicle type at the network point; constraining that goods are loaded at the transfer station and unloaded at the network point, or goods are loaded at the network point and unloaded at the transfer station; constraining the order of the main network point and other network points; constraining the distance between network points or the detour ratio threshold of the loading and unloading route.
[0178] As one possible implementation, the task matching model may include a preset objective function and a second preset constraint. The preset objective function is used to maximize the number of matches and minimize the matching cost. The second preset constraint includes: constraining that single-trip loading and unloading routes with different departure points and shifts cannot be matched with the vehicle's original transportation route; constraining that newly added routes and deleted routes with departure times differing by more than a preset time cannot be matched; constraining that single-trip loading and unloading routes with different vehicle models cannot be matched with the vehicle's original transportation route; constraining that the stop points and mileage of newly added routes meet the contract requirements of deleted routes; and constraining that the time range of newly added routes cannot conflict with other tasks of the vehicle.
[0179] As one possible implementation, transportation data may include: network point data, time distance data, site layout data, shift data, predicted or extrapolated cargo data, route data, and maximum vehicle loading data. Preset model parameters include current model call time, route modification mode, same-direction cargo splitting strategy, default vehicle maximum loading capacity, route empty space threshold, overflow cargo number threshold, overflow cargo number packing threshold, departure time interval, maximum stop network point, maximum stop main network point, network point order, existing route departure standards, and new route departure standards.
[0180] Exemplary electronic devices
[0181] An electronic device includes: a processor; a memory for storing processor-executable instructions; and a processor for executing the cargo transportation route planning method described in the embodiments provided in this application.
[0182] Below, for reference Figure 8 This application describes an electronic device according to embodiments thereof. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them, which may communicate with the first device and the second device to receive acquired input signals from them.
[0183] Figure 8 A block diagram of an electronic device according to an embodiment of this application is illustrated.
[0184] like Figure 8 As shown, the electronic device 10 includes one or more processors 11 and memory 12.
[0185] The processor 11 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
[0186] The memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may execute the program instructions to implement the cargo transportation route planning method and / or other desired functions of the various embodiments of this application described above. Various contents such as input signals, signal components, and noise components may also be stored in the computer-readable storage medium.
[0187] In one example, the electronic device 10 may also include an input device 13 and an output device 14, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0188] When the electronic device is a standalone device, the input device 13 can be a communication network connector for receiving the collected input signals from the first device and the second device.
[0189] In addition, the input device 13 may also include, for example, a keyboard, a mouse, etc.
[0190] The output device 14 can output various information to the outside, including determined distance information, direction information, etc. The output device 14 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0191] Of course, for the sake of simplicity, Figure 8 Only some of the components of the electronic device 10 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 10 may include any other suitable components depending on the specific application.
[0192] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0193] A computer-readable storage medium stores a computer program for executing the cargo transportation route planning method described in the embodiments provided in this application.
[0194] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0195] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for planning freight transportation routes, characterized in that, include: Based on transportation data and preset model parameters, input data and initial solutions for the route model are constructed; wherein, the initial solution includes at least one single loading and unloading route for goods between the transit hub and the network point; Based on the first preset constraints and optimization objective, the initial solution is optimized using the line model to obtain the optimization result; Based on the optimization results and preset shipping conditions, the optimized single-trip loading and unloading route is output. Based on the task matching model, the optimized single-trip loading and unloading route is matched with the original vehicle transportation route to obtain the vehicle cargo transportation route.
2. The route planning method for cargo transportation according to claim 1, characterized in that, Based on transportation data and preset model parameters, the input data and initial solution for constructing the route model include: Initialize the detailed list of loading and unloading goods at each stop along the loading and unloading route; Following the principle of loading before unloading, the loading and unloading routes are broken down into flow direction dimensions and stored accordingly; the flow direction includes the originating network point, shift, and destination network point. Goods are categorized according to their flow direction, and a backup cargo is assigned to each flow direction; the latest departure time for each flow direction is recorded as the completion time of the backup cargo. The flow directions of the lines are sorted according to the first preset rule to obtain the first sorted flow directions of the lines. Based on the first sorted route flow direction, the backup cargo is sequentially allocated to each flow direction, and the time window and loading are checked to ensure that the constraints are met, so as to complete the flow direction allocation of the backup cargo. The flow directions of the lines are sorted according to the second preset rule to obtain the second sorted flow directions of the lines. Based on the second sorting route direction, other goods except the bottom-line goods are sequentially allocated to each direction, and the time window and loading are checked to ensure that the constraints are met, so as to complete the direction allocation of all goods. Based on the flow allocation of all goods, the loading and unloading operations of the remaining goods are allocated according to the greedy rule to construct an initial solution; wherein the initial solution represents that the loading and unloading operations of all goods have been allocated.
3. The method for planning freight transportation routes according to claim 1, characterized in that, Based on the first preset constraints and optimization objective, the initial solution is optimized using the line model to obtain the optimization result, including: Based on the first preset constraints and optimization objectives, a neighborhood search operator that satisfies the constraints of the engine is defined in the route model, and a tabu search strategy is added. The movement operators called within the preset range, the number of each movement operator called, the moved pickup tasks, and the moved delivery tasks are recorded to optimize the initial solution and obtain the optimization results.
4. The freight transportation route planning method according to claim 3, characterized in that, The custom neighborhood search operator includes: The first operator is used to randomly move the loading and unloading operations of the same goods to the loading and unloading lines of the same vehicle or other vehicles; The second operator is used to exchange loading and unloading operations for two goods; The third operator is used to modify the loading and unloading operations of the loading and unloading route in terms of flow direction. The fourth operator is used to exchange loading and unloading operations along the loading and unloading route in terms of flow direction. The fifth operator is used to split the flow direction; The sixth operator is used to merge flow directions; The seventh operator is used for modification at the line dimension; The eighth operator is used for switching along the line dimension.
5. The method for planning freight transportation routes according to claim 1, characterized in that, The optimization objectives include: The primary optimization objective is to optimize the number of new loading and unloading routes; among which, a smaller number of new loading and unloading routes is better than a larger number of new loading and unloading routes. The second optimization objective is to optimize the total number of loading and unloading routes; among them, a smaller total number of loading and unloading routes is better than a larger total number of loading and unloading routes. The third optimization objective is to optimize the number of changes to the loading and unloading routes in the initial solution; among which, fewer changes to the loading and unloading routes in the initial solution are better than more changes to the loading and unloading routes in the initial solution. The fourth optimization objective is to optimize the mileage of loading and unloading routes; among which, a smaller loading and unloading route mileage is better than a larger loading and unloading route mileage. The fifth optimization objective is to optimize the number of splits for goods with the same flow direction; among them, fewer splits for goods with the same flow direction are better than more splits for goods with the same flow direction. The priorities decrease sequentially from the first optimization objective to the fifth optimization objective.
6. The method for planning freight transportation routes according to claim 1, characterized in that, The first preset constraint conditions include: The departure address of the loading and unloading route must be the same as the pick-up point address of the first shipment; The loading and unloading route must either begin loading and unloading goods from the current location or remain stationary. The constraint is that any loading or unloading operation can only be performed once by a loading or unloading route, and the loading or unloading route does not include duplicate outlets or duplicate flow directions. If there is an inflow to the same loading / unloading point in a constrained loading / unloading route, there will also be an outflow. The constraint is that, in any segment of the loading and unloading route, the sum of the departure time of the preceding loading and unloading point and the vehicle travel time on the route is less than or equal to the arrival time of the subsequent loading and unloading point. The loading and unloading start time of the loading and unloading point in the constraint loading and unloading route falls within the preset time window; The maximum load capacity must not be exceeded after each loading and unloading operation along the restricted loading and unloading route. The unloading operation of the same cargo is assigned to the same vehicle; Goods must be loaded before being unloaded. Constraints cannot be adjusted based on preset, unmodifiable loading and unloading operations; Constrain the number of serial points and the number of serial points in the main network; Constrain the spacing between loading points when loading goods at transit yards; Vehicle types at designated service outlets are restricted; Restricting the loading of goods at transit hubs and the unloading of goods at transit points, or the loading of goods at transit hubs and the unloading of goods at transit points; Constrain the order of the main branch and other branches; Constrain the distance between network points or the detour ratio threshold of loading and unloading routes.
7. The method for planning freight transportation routes according to claim 1, characterized in that, The task matching model includes a preset objective function and a second preset constraint condition; The preset objective function is used to maximize the number of matches and minimize the matching cost; The second preset constraint conditions include: The constraints stipulate that single-trip loading and unloading routes with different departure points and shifts cannot be matched with the original transportation routes of the vehicles. Unmatchable routes are restricted if the departure time difference between newly added and deleted routes exceeds a preset time. The single-trip loading and unloading routes for different vehicle models cannot be matched with the original transportation routes of the vehicles. The stops and mileage of newly added routes must comply with the contractual requirements for deleted routes; The time frame for adding new routes must not conflict with other tasks of the vehicles.
8. The method for planning freight transportation routes according to claim 1, characterized in that, The transportation data includes: network point data, time distance data, site layout data, shift data, predicted or extrapolated cargo data, route data, and maximum vehicle loading data. The preset model parameters include the current model call time, route modification mode, same-direction cargo splitting strategy, default vehicle maximum loading capacity, route empty space threshold, overflow cargo number threshold, overflow cargo number packing threshold, departure time interval, maximum stop network point, maximum stop main network point, network point order, existing route dispatch standards, and new route dispatch standards.
9. A computer device, characterized in that, The computer device includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the route planning method for cargo transportation as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the route planning method for cargo transportation as described in any one of claims 1 to 8.