Delivery scheduling method and device, electronic equipment and storage medium
By determining the optimal path and regret value for food delivery orders, the problem of the greedy algorithm's inability to achieve global optimization in food delivery scheduling is solved, thereby improving delivery efficiency and user experience.
Patent Information
- Application Number
- CN202010821429.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-14
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2040-08-14
AI Technical Summary
Existing greedy algorithms cannot effectively consider the global optimality of orders and delivery capacity in food delivery scheduling, resulting in poor delivery efficiency and user experience.
By acquiring the orders to be assigned and the candidate delivery capacity, the optimal path and evaluation index value of each order are determined, the regret value is calculated, and the order with the largest regret value is assigned to the capacity corresponding to the optimal evaluation index value. The impact of future scheduling is considered to prevent the algorithm from getting trapped in local minima.
It improved the quality of order dispatch, enhanced delivery efficiency and user experience, prevented the algorithm from getting stuck in local minima, and optimized delivery routes.
Smart Images

Figure CN114077947B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of Internet, in particular to a delivery scheduling method and device, electronic equipment and storage medium. BACKGROUND
[0002] Food delivery is an O2O (Online To Offline) business model that has developed rapidly in recent years. In this business model, the reasonable assignment relationship between delivery capacity and orders determines the user experience and the delivery efficiency of the delivery capacity. However, with the rapid development of the food delivery industry, the challenge of the scheduling algorithm is to provide a reasonable matching relationship between orders and delivery capacity in a scenario with a huge matching scale.
[0003] Currently, the assignment of orders is to obtain the path of the delivery capacity to deliver the orders by the path optimization algorithm, and then to determine the matching relationship between the delivery capacity and the orders according to the path, and finally to form a dispatching scheme to assign the orders to the appropriate delivery capacity. Therefore, the order delivery scheduling problem can be divided into two sub-problems to be solved independently, that is, the path planning algorithm for reasonably planning the path of the delivery capacity to deliver the orders and the dispatching algorithm for determining the assignment scheme according to the path planning result. The current assignment algorithm rule is to assign the order with the optimal scheduling index to the corresponding delivery capacity for delivery each time until all the orders are assigned, that is, the greedy algorithm is used. Although the greedy algorithm can find a relatively optimal solution to a certain extent, the solution quality of the greedy algorithm will decrease and the gap from the optimal solution will become larger as the solution scale increases. Moreover, since the greedy assignment algorithm only considers the optimal matching combination of the delivery capacity and the order in the current scheduling in the dynamic decision-making process, the influence on other orders and delivery capacities is not considered, which leads to a relatively unreasonable allocation scheme in the subsequent assignment process, poor global optimality, and affects the delivery efficiency of the delivery capacity. SUMMARY
[0004] Embodiments of the present application provide a delivery scheduling method, device, electronic equipment and storage medium, which helps to improve the delivery efficiency of the delivery capacity.
[0005] To solve the above problems, in a first aspect, embodiments of the present application provide a delivery scheduling method, comprising:
[0006] obtaining a plurality of to-be-assigned orders and a plurality of candidate delivery capacities corresponding thereto;
[0007] determining the optimal path of each candidate delivery capacity when each to-be-assigned order is assigned to each candidate delivery capacity, respectively;
[0008] determining the evaluation index value of assigning each to-be-assigned order to each candidate delivery capacity according to the optimal path of the candidate delivery capacity when each to-be-assigned order is assigned to each candidate delivery capacity.
[0009] According to the evaluation index value of assigning each to-be-assigned order to each candidate delivery capacity, a corresponding regret value of each to-be-assigned order when the to-be-assigned order is not assigned to the candidate delivery capacity corresponding to the optimal evaluation index value is determined;
[0010] The to-be-assigned order with the maximum regret value is assigned to the candidate delivery capacity corresponding to the optimal evaluation index value.
[0011] In a second aspect, an embodiment of the present application provides a delivery scheduling device, comprising:
[0012] A scheduling object acquisition module configured to acquire a plurality of to-be-assigned orders and a plurality of corresponding candidate delivery capacities;
[0013] An optimal path determination module configured to respectively determine an optimal path of each candidate delivery capacity when each to-be-assigned order is assigned to each candidate delivery capacity;
[0014] An evaluation index determination module configured to determine an evaluation index value of assigning each to-be-assigned order to each candidate delivery capacity according to the optimal path of the candidate delivery capacity when each to-be-assigned order is assigned to each candidate delivery capacity;
[0015] A regret value determination module configured to determine a corresponding regret value of each to-be-assigned order when the to-be-assigned order is not assigned to the candidate delivery capacity corresponding to the optimal evaluation index value according to the evaluation index value of assigning each to-be-assigned order to each candidate delivery capacity;
[0016] An order assignment module configured to assign the to-be-assigned order with the maximum regret value to the candidate delivery capacity corresponding to the optimal evaluation index value.
[0017] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the delivery scheduling method provided by the embodiment of the present application when executing the computer program.
[0018] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executable on a processor to implement the steps of the delivery scheduling method disclosed by the embodiment of the present application.
[0019] The method and device for dispatching, the electronic device and the storage medium provided by the embodiments of the present application determine the optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity, and then determine the evaluation index value of each candidate delivery capacity to which each to-be-allocated order is allocated, determine the regret value of each to-be-allocated order when the to-be-allocated order is not allocated to the candidate delivery capacity corresponding to the optimal evaluation index value, and allocate the to-be-allocated order with the maximum regret value to the candidate delivery capacity corresponding to the optimal evaluation index value. Since the regret value takes into account the influence of the current assignment on future scheduling, the algorithm can be prevented from falling into a local minimum, the order allocation quality can be improved, the delivery efficiency of the delivery capacity can be improved, and the user experience can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0021] Figure 1 is a flowchart of the method for dispatching of the first embodiment of the present application;
[0022] Figure 2 is a flowchart of the method for dispatching of the second embodiment of the present application;
[0023] Figures 3a-3c is a schematic diagram of the mutation processing in the embodiments of the present application;
[0024] Figures 4a-4c is a schematic diagram of the crossover processing in the embodiments of the present application;
[0025] Figure 5 is a structural schematic diagram of the device for dispatching of the third embodiment of the present application;
[0026] Figure 6 is a structural schematic diagram of the electronic device of the fourth embodiment of the present application. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0028] Embodiment one
[0029] The embodiment provides a delivery scheduling method, which is suitable for the field of real-time delivery such as take-out delivery, and the method comprises one or more of the following steps 110-150. Figure 1
[0030] In step 110, a plurality of to-be-allocated orders and a plurality of candidate delivery capacities are obtained.
[0031] Generally, one delivery capacity is responsible for the delivery of goods in a corresponding area, so the to-be-allocated orders in one area can be uniformly scheduled, and then the plurality of to-be-allocated orders and the plurality of candidate delivery capacities can be obtained.
[0032] In step 120, the optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity is determined.
[0033] When one to-be-allocated order is allocated to one candidate delivery capacity, the candidate delivery capacity can have multiple paths to deliver the to-be-allocated order and the allocated but not delivered orders, the evaluation index value corresponding to each path can be calculated, the optimal path with the optimal evaluation index value is determined as the optimal path of the candidate delivery capacity when the to-be-allocated order is allocated to the candidate delivery capacity.
[0034] When the optimal path is determined, a combined heuristic rule such as sorting, insertion, etc. can be used to generate the optimal path of the candidate delivery capacity when one to-be-allocated order is allocated to the candidate delivery capacity, that is, a greedy algorithm can be used to determine the optimal path. Of course, in addition to using the greedy algorithm to determine the optimal path, other ways can also be used to determine the optimal path, for example, population initialization, mutation and crossover can be used to determine the optimal path.
[0035] In step 130, the evaluation index value of each to-be-allocated order allocated to each candidate delivery capacity is determined according to the optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity.
[0036] The evaluation index is used to evaluate the pros and cons of a delivery path, for example, the sum of the overtime and the total distance of the delivery path can be used as the evaluation index, the unit of the overtime is minute, and the unit of the total distance is kilometer.
[0037] The evaluation index value of assigning each to-be-allocated order to each candidate distribution transport capacity corresponds to an optimal path, and the evaluation index value of each optimal path is determined based on the calculation manner of the evaluation index, so as to obtain the evaluation index value of assigning each to-be-allocated order to each candidate distribution transport capacity. Based on the plurality of to-be-allocated orders and the plurality of candidate distribution transport capacities, an evaluation index matrix composed of evaluation index values can be obtained, for example, taking the order as a row and taking the candidate distribution transport capacity as a column, so as to obtain an evaluation index matrix. For example, there are 5 to-be-allocated orders and 3 candidate distribution transport capacities, and a 5-row and 3-column evaluation index matrix can be obtained. The element A ij is the evaluation index value of assigning the i-th to-be-allocated order to the j-th candidate distribution transport capacity, i = 1, 2, 3, 4, 5, and j = 1, 2, 3.
[0038] In step 140, the regret value corresponding to the case that each to-be-allocated order is not allocated to the candidate distribution transport capacity corresponding to the optimal evaluation index value is determined according to the evaluation index value of assigning each to-be-allocated order to each candidate distribution transport capacity.
[0039] When the evaluation index is the sum of the overtime and the total distance of the distribution path, the optimal evaluation index value is the minimum evaluation index value, that is, the smaller the sum of the overtime and the total distance, the better the distribution path.
[0040] After obtaining the evaluation index value of assigning each to-be-allocated order to each candidate distribution transport capacity, the evaluation index value of a to-be-allocated order corresponding to each candidate distribution transport capacity can be determined, which includes the optimal evaluation index value. At this time, the regret value corresponding to the case that the to-be-allocated order is allocated to other candidate distribution transport capacity except the optimal evaluation index value can be determined according to the evaluation index value of the to-be-allocated order corresponding to each candidate distribution transport capacity, for example, the difference between the suboptimal evaluation index value and the optimal evaluation index value can be taken as the regret value.
[0041] In an embodiment of the present application, the regret value corresponding to the case that each to-be-allocated order is not allocated to the candidate distribution transport capacity corresponding to the optimal evaluation index value is determined according to the evaluation index value of assigning each to-be-allocated order to each candidate distribution transport capacity, including: determining the optimal evaluation index value and the suboptimal evaluation index value corresponding to each to-be-allocated order according to the evaluation index value of assigning each to-be-allocated order to each candidate distribution transport capacity; and taking the difference between the suboptimal evaluation index value and the optimal evaluation index value corresponding to each to-be-allocated order as the regret value corresponding to the case that the to-be-allocated order is not allocated to the candidate distribution transport capacity corresponding to the optimal evaluation index value.
[0042] If the to-be-assigned order is not assigned to the candidate distribution capacity corresponding to the optimal evaluation index value, it is likely to be assigned to the candidate distribution capacity corresponding to the suboptimal evaluation index value in the next round of order dispatching. Therefore, the difference between the suboptimal evaluation index value and the optimal evaluation index value is taken as the regret value corresponding to the case that the to-be-assigned order is not assigned to the candidate distribution capacity corresponding to the optimal evaluation index value. For each to-be-assigned order, the corresponding regret value is determined in the above manner. The regret value determined in this manner is more accurate, and therefore the distribution efficiency of the distribution capacity can be further improved.
[0043] In step 150, the to-be-assigned order with the largest regret value is assigned to the candidate distribution capacity corresponding to the optimal evaluation index value.
[0044] When a to-be-assigned order is assigned to a candidate distribution capacity, the evaluation index value obtained by assigning the remaining to-be-assigned orders to the candidate distribution capacity is updated and changed, thereby affecting the assignment of the remaining to-be-assigned orders and indirectly affecting the assignment result of the to-be-assigned orders. In order to consider the influence on the subsequent assignment result in the process of order dispatching, the embodiment of the present application introduces the regret value as an index for order dispatching, and comprehensively considers the influence between assigning different to-be-assigned orders through the regret value. Each time, the to-be-assigned order with the largest regret value is selected for assignment, and better results than the greedy assignment algorithm can be obtained.
[0045] The greater the difference between the suboptimal evaluation index value and the optimal evaluation index value, the greater the cost if the to-be-assigned order is not assigned to the candidate distribution capacity corresponding to the optimal evaluation index value, that is, the higher the regret degree. Therefore, the to-be-assigned order with the largest regret value should be assigned to the candidate distribution capacity corresponding to the optimal evaluation index value.
[0046] After the to-be-assigned order with the largest regret value is assigned to the candidate distribution capacity corresponding to the optimal evaluation index value, the optimal path and the evaluation index value for assigning other to-be-assigned orders to the candidate distribution capacity are affected. Therefore, it is necessary to determine the optimal path for assigning other to-be-assigned orders to the candidate distribution capacity again, and to recalculate the evaluation index value and the regret value, and to perform the next round of order assignment based on the regret value.
[0047] The distribution scheduling method provided by the embodiments of the present application can determine the optimal path of each candidate distribution capacity when each to-be-allocated order is allocated to each candidate distribution capacity, and then determine the evaluation index value of each to-be-allocated order allocated to each candidate distribution capacity, and determine the corresponding regret value of each to-be-allocated order when the to-be-allocated order is not allocated to the candidate distribution capacity corresponding to the optimal evaluation index value, and allocate the to-be-allocated order with the maximum regret value to the candidate distribution capacity corresponding to the optimal evaluation index value. Since the regret value takes into account the influence of the current assignment on future scheduling, the algorithm can be prevented from falling into a local minimum, the order allocation quality can be improved, the distribution efficiency of the distribution capacity can be improved, and the user experience can be improved.
[0048] Embodiment two
[0049] The embodiments provide a distribution scheduling method, which is suitable for the field of real-time distribution such as take-out delivery. Figure 2 As shown in the figure, the method comprises one or more of steps 201 to 211.
[0050] In step 201, a plurality of to-be-allocated orders and corresponding candidate distribution capacities are obtained.
[0051] In step 202, one to-be-allocated order is determined from the plurality of to-be-allocated orders as a current to-be-allocated order, and one candidate distribution capacity is determined from the plurality of candidate distribution capacities as a current candidate distribution capacity.
[0052] For each to-be-allocated order and each candidate distribution capacity, the optimal path corresponding to the to-be-allocated order and the candidate distribution capacity is determined.
[0053] In step 203, a preset number of distribution paths corresponding to the current candidate distribution capacity when the current to-be-allocated order is allocated to the current candidate distribution capacity are determined, one optimal path is determined from the preset number of distribution paths as an initial iteration optimal path, and the distribution path is taken as an iteration target path.
[0054] The preset number of distribution paths corresponding to the current candidate distribution capacity when the current to-be-allocated order is allocated to the current candidate distribution capacity are determined through population initialization. After the preset number of distribution paths corresponding to the current candidate distribution capacity are determined, the evaluation index value of each distribution path is calculated. When the evaluation index is the sum of the timeout time and the total distance of the distribution path, the distribution path with the minimum evaluation index value is determined as the optimal path, and the optimal path is taken as the initial iteration optimal path for comparison with the new distribution path obtained through subsequent iteration mutation and crossover processing to update the iteration optimal path. The distribution path is taken as the iteration target path for subsequent iteration mutation and crossover processing.
[0055] In an embodiment of the present application, the determining the preset number of delivery paths corresponding to the current candidate delivery capacity when the current to-be-assigned order is assigned to the current candidate delivery capacity comprises:
[0056] According to the estimated delivery time of the to-be-delivered order of the current to-be-assigned order and the current candidate delivery capacity, one delivery path corresponding to the current candidate delivery capacity when the current to-be-assigned order is assigned to the current candidate delivery capacity is determined, and other delivery paths are randomly generated to obtain the preset number of delivery paths corresponding to the current candidate delivery capacity.
[0057] Among them, the to-be-delivered order of the current candidate delivery capacity is an order that has been assigned to the current candidate delivery capacity but has not been completed.
[0058] When initializing the population, one delivery path is generated by heuristic rules, and other delivery paths are randomly generated to obtain the preset number of delivery paths, which are used as a population. When generating a delivery path by heuristic rules, the delivery path can be determined according to the urgency of the current to-be-assigned order and the to-be-delivered order of the current candidate delivery capacity. The urgency of each order can be measured by the estimated delivery time of each order, so the delivery path can be determined according to the estimated delivery time of each order, that is, the pickup address and the delivery address in each order are sorted in the order of estimated delivery time from early to late to generate a delivery path. By using heuristic rules to generate one delivery path, the quality of individuals (delivery paths) in the population can be guaranteed, and by randomly generating other delivery paths, the diversity of solutions can be improved.
[0059] In an embodiment of the present application, the determining one delivery path corresponding to the current candidate delivery capacity when the current to-be-assigned order is assigned to the current candidate delivery capacity according to the estimated delivery time of the current to-be-assigned order and the to-be-delivered order of the current candidate delivery capacity comprises: taking the delivery address of the to-be-delivered order of the current candidate delivery capacity that has completed pickup as a first set; taking the pickup address and the delivery address of the current to-be-assigned order, and the pickup address and the delivery address of the to-be-delivered order of the current candidate delivery capacity that has not completed pickup as a second set; according to the first set and the second set, splicing the delivery address in the first set and the pickup address and the delivery address in the second set to obtain a splicing sequence; and determining the delivery path corresponding to the current candidate delivery capacity according to each pickup address and delivery address in the splicing sequence.
[0060] Each address (including the pickup address and the delivery address) can be encoded in advance, such as being encoded into a digital identifier, i.e., each address can be represented by a digital identifier. Since the urgency of the to-be-delivered order whose pickup has been completed is higher than that of the to-be-delivered order whose pickup has not been completed and the to-be-allocated order, the addresses in the order are divided into two sets according to whether the pickup of the order has been completed, i.e., the delivery address in the to-be-delivered order whose pickup has been completed is put into a first set, and the pickup address and the delivery address in the to-be-delivered order whose pickup has not been completed and the pickup address and the delivery address in the current to-be-allocated order are put into a second set. Then, the delivery addresses of each to-be-delivered order in the first set are sorted according to the estimated arrival time of each to-be-delivered order in the first set, to obtain a first sequence, and the pickup addresses and the delivery addresses of the current to-be-allocated order and each to-be-delivered order in the second set are sorted according to the estimated arrival time of the current to-be-allocated order and each to-be-delivered order in the second set, to obtain a second sequence, and the first sequence and the second sequence are spliced to obtain a spliced sequence. Each pickup address and delivery address in the spliced sequence is arranged according to the principle of the shortest total distance and the shortest overtime, to generate a delivery path corresponding to the current candidate delivery capacity.
[0061] In the encoding rule of the delivery path, the first address corresponds to which position in the delivery path, such as the digital identifiers of the pickup addresses and the delivery addresses included in the delivery path are 0, 1, 3, and 2 in order, 0 represents the current position of the current candidate delivery capacity, 1 represents the first address to be reached by the current candidate delivery capacity, 3 represents the second address to be reached by the current candidate delivery capacity, and 2 represents the third address to be reached by the current candidate delivery capacity.
[0062] In the sorting of the delivery addresses of each order to be delivered in the first set according to the predicted delivery time of each order to be delivered in the first set, the delivery addresses of each order to be delivered in the first set can be sorted according to the order of the predicted delivery time of each order to be delivered in the first set from early to late or from late to early, and the first sequence is obtained. In the sorting of the pickup addresses and delivery addresses of the current order to be allocated and each order to be delivered in the second set according to the predicted delivery time of the current order to be allocated and each order to be delivered in the second set, the pickup addresses and delivery addresses of the current order to be allocated and each order to be delivered in the second set can be sorted according to the order of the predicted delivery time of the current order to be allocated and each order to be delivered in the second set from early to late or from late to early, and the second sequence is obtained. However, the order of the predicted delivery time of each order is the same when the first sequence is obtained and when the second sequence is obtained, that is, when the first sequence is obtained, the order of the predicted delivery time from early to late is followed, and when the second sequence is obtained, the order of the predicted delivery time from early to late is also followed. When the first sequence is obtained, if the order of the predicted delivery time from late to early is followed, the order of the predicted delivery time from late to early is also followed when the second sequence is obtained.
[0063] In the sorting of the delivery addresses of each order to be delivered in the first set according to the predicted delivery time of each order to be delivered in the first set, the delivery addresses of each order to be delivered in the first set can be sorted according to the order of the predicted delivery time of each order to be delivered in the first set from early to late or from late to early, and the first sequence is obtained. In the sorting of the pickup addresses and delivery addresses of the current order to be allocated and each order to be delivered in the second set according to the predicted delivery time of the current order to be allocated and each order to be delivered in the second set, the pickup addresses and delivery addresses of the current order to be allocated and each order to be delivered in the second set can be sorted according to the order of the predicted delivery time of the current order to be allocated and each order to be delivered in the second set from early to late or from late to early, and the second sequence is obtained. However, the order of the predicted delivery time of each order is the same when the first sequence is obtained and when the second sequence is obtained, that is, when the first sequence is obtained, the order of the predicted delivery time from early to late is followed, and when the second sequence is obtained, the order of the predicted delivery time from early to late is also followed. When the first sequence is obtained, if the order of the predicted delivery time from late to early is followed, the order of the predicted delivery time from late to early is also followed when the second sequence is obtained.
[0064] In the sorting of the delivery addresses of each order to be delivered in the first set according to the predicted delivery time of each order to be delivered in the first set, the delivery addresses of each order to be delivered in the first set can be sorted according to the order of the predicted delivery time of each order to be delivered in the first set from early to late or from late to early, and the first sequence is obtained. In the sorting of the pickup addresses and delivery addresses of the current order to be allocated and each order to be delivered in the second set according to the predicted delivery time of the current order to be allocated and each order to be delivered in the second set, the pickup addresses and delivery addresses of the current order to be allocated and each order to be delivered in the second set can be sorted according to the order of the predicted delivery time of the current order to be allocated and each order to be delivered in the second set from early to late or from late to early, and the second sequence is obtained. However, the order of the predicted delivery time of each order is the same when the first sequence is obtained and when the second sequence is obtained, that is, when the first sequence is obtained, the order of the predicted delivery time from early to late is followed, and when the second sequence is obtained, the order of the predicted delivery time from early to late is also followed. When the first sequence is obtained, if the order of the predicted delivery time from late to early is followed, the order of the predicted delivery time from late to early is also followed when the second sequence is obtained.
[0065] In an embodiment of the present application, the determining of the delivery path corresponding to the current candidate delivery capacity according to each pickup and delivery address in the splicing sequence comprises:
[0066] The pickup and delivery addresses in the splicing sequence are sequentially inserted into the position with the optimal evaluation index value in the pickup and delivery point sequence of the current candidate delivery capacity until the positions of all pickup and delivery addresses in the splicing sequence in the pickup and delivery point sequence are determined, and the pickup and delivery point sequence is taken as the delivery path corresponding to the current candidate delivery capacity.
[0067] The evaluation index can be the sum of the above-mentioned timeout time and total distance, and the optimal evaluation index value is the minimum evaluation index value.
[0068] According to the order of each address in the splicing sequence, each address in the splicing sequence is sequentially inserted into the position with the optimal evaluation index value in the pickup and delivery point sequence of the current candidate delivery capacity, that is, when each address is inserted into the pickup and delivery point sequence, the evaluation index values of possible multiple results need to be calculated, and the result with the optimal evaluation index value is selected as the insertion position of the address, and the address is inserted into the corresponding insertion position in the pickup and delivery point sequence, until the positions of all addresses in the splicing sequence in the pickup and delivery point sequence are determined. After the positions of all addresses in the splicing sequence in the pickup and delivery point sequence are determined, the pickup and delivery point sequence is the delivery path of the current candidate delivery capacity. The delivery path determined in this way is the path with the optimal evaluation index value, thereby ensuring the quality of individuals in the population.
[0069] For example, the addresses included in the splicing sequence are 1, 2, 3 in sequence, the current position of the current candidate distribution vehicle is 0, i.e., the starting path point, and the pick-up and drop-off point sequence of the current candidate distribution vehicle includes the position 0 before the addresses in the splicing sequence are inserted. Next, each address in the splicing sequence is inserted into the pick-up and drop-off point sequence in sequence. First, the first address 1 in the splicing sequence is inserted into the pick-up and drop-off point sequence. After 1 is inserted into 0 in the pick-up and drop-off point sequence, the pick-up and drop-off point sequence is 0, 1. Then, the second address 2 in the splicing sequence is inserted into the pick-up and drop-off point sequence. At this time, there are two results. 2 can be inserted between 0 and 1 or after 1, thereby obtaining two paths, 0, 2, 1 and 0, 1, 2. The evaluation index values of the two paths are calculated. If the evaluation index value of the first path is better than that of the second path, it is determined that 2 is inserted between 0 and 1 in the pick-up and drop-off point sequence. After the insertion, the pick-up and drop-off point sequence is updated to 0, 2, 1. Then, the third address 3 in the splicing sequence is inserted into the pick-up and drop-off point sequence. At this time, there are three results. 3 can be inserted between 0 and 2, between 2 and 1, or after 1, thereby obtaining three paths, 0, 3, 2, 1, 0, 2, 3, 1 and 0, 2, 1, 3. The evaluation index values of the three paths are calculated. If the evaluation index value of the second path is better than that of the first path and the second path, it is determined that 3 is inserted between 2 and 1 in the pick-up and drop-off point sequence. After the insertion, the pick-up and drop-off point sequence is updated to 0, 2, 3, 1. Thus, all addresses in the splicing sequence are inserted into the pick-up and drop-off point sequence, and the pick-up and drop-off point sequence 0, 2, 3, 1 is the distribution path of the current candidate distribution vehicle.
[0070] In step 204, the preset number of iteration target paths are subjected to mutation processing based on a discrete difference operator, and the mutation paths obtained after the mutation processing are subjected to cross processing in a local search manner to generate a preset number of new distribution paths.
[0071] The mutation operation is mainly based on a discrete difference operator, and difference information between different individuals (i.e., iteration target paths) is extracted to provide a direction for population evolution. The mutation paths generated by the discrete difference operator may contain repeated points and are not legal solutions, and therefore legal offspring individuals, i.e., new distribution paths, are generated through cross operation.
[0072] In an embodiment of the present application, the mutation processing of the preset number of iteration target paths based on the discrete difference operator includes:
[0073] The preset number of iteration target paths are subjected to mutation processing based on the discrete difference operator according to the following formula to obtain mutation paths:
[0074]
[0075] wherein V x is a mutation path, and are three paths randomly selected from the preset number of iteration target paths, F is a difference amplification coefficient, N is the number of path points in the iteration target path, and the symbol and are calculated as follows:
[0076]
[0077]
[0078] wherein △ x is a difference vector, is the hth element in the difference vector △ x , is the hth path point in the path X b , is the hth path point in the path X c , is the hth path point in the mutation path V x , and rand(h) is a random number between 0 and 1.
[0079] First, three iteration target paths are randomly selected from the preset number of iteration target paths as a first path X a , a second path X b , and a third path X c ; based on a discrete difference operator, the first path X a , the second path X b , and the third path X c are mutated according to the above formula, that is, first, the difference vector △ x is calculated according to the second path X b and the third path X c , and then the mutation path V x is calculated based on the first path X a and the difference vector △ x . The difference amplification coefficient F can be adjusted, that is, F can be determined according to the need.
[0080] Figures 3a-3c is a schematic diagram of the mutation process in the embodiments of the present application, as shown in Figures 3a-3c , the first path X a is 0, 3, 4, 5, 1, 2, the second path X b is 0, 3, 1, 2, 4, 5, and the third path X c is 0, 1, 4, 3, 2, 5, as shown in Figure 3a , first, Xb -X c , obtain X b -X c The values are 0, 2, -3, -1, 2, 0; for example... Figure 3b As shown, the difference vector Δ is then calculated. x With a difference amplification factor of 0.5 and random numbers rand(h) of 0.7, 0.3, 0.4, 0.6, 0.1, and 0.2 respectively, the difference vector Δ is calculated. x The values are 0, 2, -3, 0, 2, 0; for example... Figure 3c As shown, according to the first path X a With difference vector Δ x Calculate the variation of individual V x The mutated individual is the mutation path, and the mutation path V is obtained. x The values are 0, 5, 1, 5, 3, 2.
[0081] After a mutated path is generated, it is cross-processed to obtain a new delivery path. Then, three different iterative target paths are selected from a preset number of iterative target paths and mutated again until a preset number of new delivery paths are generated, at which point the iteration is complete.
[0082] In one embodiment of this application, the step of using a local search method to perform cross-processing on the mutated paths obtained after mutation processing to generate a preset number of new delivery paths includes: removing the starting path point and duplicate path points from the mutated paths to obtain the processed mutated paths; randomly selecting an iterative target path from the preset number of iterative target paths as the parent path, removing duplicate path points between the parent path and the processed mutated paths to obtain the processed parent path; and, under the constraints of pickup and delivery priority and the current candidate delivery capacity and delivery container capacity, sequentially inserting the path points in the processed mutated paths into the positions with the optimal evaluation index values in the processed parent paths to obtain new delivery paths.
[0083] The starting path point is the current location of the candidate delivery capacity, which is used as the starting point for the candidate delivery capacity. The pickup / delivery priority constraint means that when a delivery route includes both a pickup address and a delivery address for an order, the pickup address must be listed before the delivery address. The current candidate delivery capacity's delivery container capacity constraint means that the delivery capacity's delivery container has a capacity limit; the goods inside the delivery container cannot exceed the capacity limit. If it is estimated that putting a single item into the delivery container would exceed the capacity limit, a delivery address needs to be inserted first. For example, in the food delivery industry, if a delivery capacity has already picked up 3 orders, reaching the capacity of the delivery container (i.e., the delivery box), a delivery address needs to be inserted first to deliver one order and release the capacity occupied by that order in the delivery container.
[0084] Figures 4a-4c This is a schematic diagram of the cross-processing in the embodiments of this application, such as... Figure 4a As shown, the mutation path V obtained after mutation processing x Given the given path as 0, 5, 1, 5, 3, 2, remove duplicate path points and the starting path point 0 from the mutated path to obtain the processed mutated path V′. x The options are 1, 3, 2; randomly select one iteration target path from the preset number of iteration target paths as the parent path, such as... Figure 4b As shown, parent path X d Given 0, 1, 3, 4, 2, 5, the parent path X will be... d With the processed mutation path V′ x Repeated path points in the parent path X d Remove from the middle to obtain the processed parent path X′ d The values are 0, 4, and 5; then the processed mutation path V′ will be... x The path points in the code are inserted sequentially into the processed parent path X′. d The position of the optimal evaluation index value, such as Figure 4c As shown, the processed mutation path V′ is first... x Insert path point 1 into the parent path X′ d There are three ways to insert a path point 1 into its parent path X′. d Between 0 and 4, or between 4 and 5, or after 5, three paths can be formed. Under the condition that all three paths satisfy the pickup / delivery priority constraint and the current candidate delivery capacity / delivery container capacity constraint, the evaluation index values of these three paths are calculated. The position in the path with the lowest evaluation index value is the optimal position. After insertion, the processed parent path X′ is obtained. d The values are 0, 1, 4, 5, and then the processed mutation path V′ is... x Path points 3 and 2 are inserted into the processed parent path X′ in the manner described above. d The location with the optimal evaluation index value is used to obtain the new delivery route 0, 3, 1, 2, 4, 5.
[0085] Using a traversal insertion method for local search in the process of generating new delivery routes can improve the quality of the solution, that is, improve the quality of the new delivery routes obtained.
[0086] Step 205: Update the iterative optimal path based on the preset number of iterative target paths and the preset number of new delivery paths, and determine the preset number of iterative target paths for the next iteration.
[0087] selecting one optimal path from the preset number of iteration target paths and the preset number of new delivery paths, updating the iteration optimal path as the optimal path, and selecting preset number of optimal paths from the preset number of iteration target paths and the preset number of new delivery paths as iteration target paths for next iteration.
[0088] In an embodiment of the present application, the updating of the iteration optimal path and the determination of the preset number of iteration target paths for next iteration according to the preset number of iteration target paths and the preset number of new delivery paths comprises: determining a delivery path with optimal evaluation index value from the preset number of iteration target paths and the preset number of new delivery paths as a current optimal path; if the evaluation index value of the current optimal path is better than the evaluation index value of the iteration optimal path, replacing the iteration optimal path with the current optimal path; and determining the preset number of delivery paths with optimal evaluation index value from the preset number of iteration target paths and the preset number of new delivery paths as iteration target paths for next iteration.
[0089] In the iteration process, after the mutation and crossover processing of the preset number of iteration target paths, a delivery path with optimal evaluation index value is determined from the iteration target paths before mutation and crossover processing and the new delivery paths generated after mutation and crossover processing, the delivery path is taken as a current optimal path, the evaluation index value of the current optimal path is compared with the evaluation index value of the iteration optimal path, and if the evaluation index value of the current optimal path is better than the evaluation index value of the iteration optimal path, the iteration optimal path is replaced with the current optimal path.
[0090] The evaluation index values of the preset number of iteration target paths and the preset number of new delivery paths are calculated, the preset number of delivery paths with optimal evaluation index value are selected, that is, the iteration target paths and the new delivery paths are sorted in ascending order of evaluation index value, and the preset number of delivery paths with high order are selected as iteration target paths for next iteration.
[0091] In step 206, it is determined whether the iteration termination condition is met, if not, step 204 is performed, and if yes, step 207 is performed.
[0092] The iteration termination condition can be iteration time, and the iteration time can be related to the number of path points in the iteration target path, for example, the iteration time can be the product of 0.5 and the number of path points.
[0093] In the case that the iteration termination condition is the iteration time, the timing starts when the mutation processing and the crossover processing are started, and when one iteration is completed, i.e., when the preset number of new delivery paths are generated, it is determined whether the iteration termination condition is satisfied, i.e., whether the consumed time from the start of the timing to the present is greater than or equal to the iteration time. If not, the next iteration is performed in step 204. If yes, the optimal path is determined in step 207.
[0094] In step 207, the iteration optimal path is determined as the optimal path corresponding to the allocation of the current to-be-allocated order to the current candidate delivery capacity.
[0095] Through the above iteration processing, the iteration optimal path is the delivery path with the optimal evaluation index value from the initial iteration target path and the new delivery paths generated in the iteration process. Therefore, the iteration optimal path is the optimal path corresponding to the allocation of the current to-be-allocated order to the current candidate delivery capacity.
[0096] In step 208, it is determined whether the optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity has been determined. If not, step 202 is performed. If yes, step 209 is performed.
[0097] Through the above loop processing, the optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity is determined. Subsequently, the subsequent steps can be performed to assign the to-be-allocated orders.
[0098] In step 209, the evaluation index value of each to-be-allocated order allocated to each candidate delivery capacity is determined according to the optimal path of the candidate delivery capacity when the to-be-allocated order is allocated to the candidate delivery capacity.
[0099] In step 210, the regret value corresponding to the case that each to-be-allocated order is not allocated to the candidate delivery capacity corresponding to the optimal evaluation index value is determined according to the evaluation index value of each to-be-allocated order allocated to each candidate delivery capacity.
[0100] In step 211, the to-be-allocated order with the maximum regret value is allocated to the candidate delivery capacity corresponding to the optimal evaluation index value.
[0101] Through the above steps 201 to 211, the to-be-allocated order with the maximum regret value is allocated to the candidate delivery capacity corresponding to the optimal evaluation index value. Subsequently, steps 201 to 211 are performed again to allocate other to-be-allocated orders until all to-be-allocated orders are allocated.
[0102] The method for dispatching provided in the embodiments of the present application, after population initialization, carries out mutation processing based on a discrete differential algorithm, and carries out cross processing on the mutation path after mutation processing by using a local search method, and generates an optimal path through iteration. Since the differential information in the population is utilized during mutation processing, compared with the greedy algorithm in the prior art, the globality and optimality of the path planning algorithm are enhanced, the delivery path of the delivery capacity can be optimized, more reasonable input is provided for the subsequent order dispatching algorithm, and therefore the delivery efficiency of the delivery capacity can be further improved.
[0103] Embodiment three
[0104] The dispatching device provided in the embodiments, as shown in Figure 5 The dispatching device 500 comprises:
[0105] The dispatching object acquisition module 510 is configured to acquire a plurality of to-be-allocated orders and a plurality of candidate delivery capacities corresponding thereto;
[0106] The optimal path determination module 520 is configured to determine an optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity, respectively.
[0107] The evaluation index determination module 530 is configured to determine an evaluation index value of allocating each to-be-allocated order to each candidate delivery capacity according to the optimal path of the candidate delivery capacity when each to-be-allocated order is allocated to the candidate delivery capacity.
[0108] The regret value determination module 540 is configured to determine a corresponding regret value when each to-be-allocated order is not allocated to the candidate delivery capacity corresponding to the optimal evaluation index value according to the evaluation index value of allocating each to-be-allocated order to each candidate delivery capacity.
[0109] The order allocation module 550 is configured to allocate the to-be-allocated order with the maximum regret value to the candidate delivery capacity corresponding to the optimal evaluation index value.
[0110] Optionally, the optimal path determination module comprises:
[0111] The current processing object determination unit is configured to determine one to-be-allocated order from the plurality of to-be-allocated orders as a current to-be-allocated order, and determine one candidate delivery capacity from the plurality of candidate delivery capacities as a current candidate delivery capacity.
[0112] The population initialization unit is configured to determine a preset number of delivery paths corresponding to the current candidate delivery vehicle when the current to-be-assigned order is assigned to the current candidate delivery vehicle, and determine an optimal path from the preset number of delivery paths as an initial iteration optimal path, and take the delivery path as an iteration target path.
[0113] The mutation crossover processing unit is configured to perform mutation processing on the preset number of iteration target paths based on a discrete difference operator, and perform crossover processing on the mutation paths obtained after the mutation processing in a local search manner to generate a preset number of new delivery paths.
[0114] The iteration control unit is configured to update the iteration optimal path according to the preset number of iteration target paths and the preset number of new delivery paths, and determine a preset number of iteration target paths for next iteration, and iteratively perform the mutation processing, the crossover processing, and the updating of the iteration optimal path until an iteration termination condition is met.
[0115] The optimal path determination unit is configured to take the iteration optimal path as the optimal path corresponding to the current to-be-assigned order when the current to-be-assigned order is assigned to the current candidate delivery vehicle.
[0116] The loop control unit is configured to cyclically perform the determination of the current to-be-assigned order and the current candidate delivery vehicle, and the determination of the optimal path corresponding to the current to-be-assigned order when the current to-be-assigned order is assigned to the current candidate delivery vehicle, until the optimal path of each candidate delivery vehicle when each to-be-assigned order is assigned to each candidate delivery vehicle is determined.
[0117] Optionally, the population initialization unit comprises:
[0118] The population initialization sub-unit is configured to determine one delivery path corresponding to the current candidate delivery vehicle when the current to-be-assigned order is assigned to the current candidate delivery vehicle according to the estimated delivery time of the to-be-delivered order of the current to-be-assigned order and the current candidate delivery vehicle, and randomly generate other delivery paths to obtain a preset number of delivery paths corresponding to the current candidate delivery vehicle.
[0119] Optionally, the population initialization sub-unit comprises:
[0120] The address classification sub-module is configured to take the delivery addresses of the to-be-delivered orders in which the pickup is completed in the to-be-delivered orders of the current candidate delivery vehicle as a first set, and take the pickup addresses and delivery addresses of the current to-be-assigned order and the to-be-delivered orders in which the pickup is not completed in the to-be-delivered orders of the current candidate delivery vehicle as a second set.
[0121] The address splicing sub-module is configured to splice the pickup addresses and the delivery addresses in the second set with the delivery addresses in the first set according to the first set and the second set to obtain a spliced sequence.
[0122] The distribution path determination sub-module is configured to determine a distribution path corresponding to a current candidate distribution vehicle according to each pickup address and each delivery address in the spliced sequence.
[0123] Optionally, the address splicing sub-module is specifically configured to:
[0124] sort the delivery addresses of each to-be-distributed order in the first set in an order from early to late according to the predicted arrival times of the to-be-distributed orders in the first set to obtain a first sequence;
[0125] sort the pickup addresses and the delivery addresses of each to-be-distributed order in the second set in an order from early to late according to the predicted arrival times of the to-be-distributed orders and the current to-be-allocated order in the second set to obtain a second sequence;
[0126] splice the second sequence after the first sequence to obtain a spliced sequence.
[0127] Optionally, the distribution path determination sub-module is specifically configured to:
[0128] insert the pickup addresses or the delivery addresses in the spliced sequence into a position with an optimal evaluation index value in a sequence of pickup and delivery points of the current candidate distribution vehicle until positions of all the pickup addresses and the delivery addresses in the spliced sequence in the sequence of pickup and delivery points are determined, and the sequence of pickup and delivery points is taken as the distribution path corresponding to the current candidate distribution vehicle.
[0129] Optionally, the mutation and crossover processing unit includes:
[0130] The mutation processing sub-unit is configured to perform mutation processing on the preset number of iteration target paths according to the following formula based on a discrete difference operator to obtain a mutated path:
[0131]
[0132] wherein, V x is the mutated path, and are three paths randomly selected from the preset number of iteration target paths, F is a difference amplification coefficient, N is a number of path points in the iteration target path, and the operation modes of the symbols and are as follows:
[0133]
[0134]
[0135] wherein △ x is a difference vector, is the hth element of the difference vector △ x is the hth path point in the path X b is the hth path point in the path X c is the hth path point in the mutation path V x rand(h) is a random number between 0 and 1.
[0136] Optionally, the mutation and crossover processing unit further comprises:
[0137] a crossover processing subunit configured to remove the starting path point and the repeated path point in the mutation path to obtain a processed mutation path; randomly select one iteration target path from the preset number of iteration target paths as a parent path; remove the repeated path point in the parent path and the processed mutation path to obtain a processed parent path; under the constraints of the pick-up and delivery priority constraint and the current candidate distribution vehicle distribution container capacity constraint, sequentially insert the path points in the processed mutation path into the position with the optimal evaluation index value in the processed parent path to obtain a new distribution path.
[0138] Optionally, the iteration control unit comprises:
[0139] a current optimal path determination subunit configured to determine the distribution path with the optimal evaluation index value from the preset number of iteration target paths and the preset number of new distribution paths as a current optimal path;
[0140] an iteration optimal path updating subunit configured to replace the iteration optimal path with the current optimal path if the evaluation index value of the current optimal path is better than the evaluation index value of the iteration optimal path;
[0141] a next iteration path determination subunit configured to determine the preset number of distribution paths with the optimal evaluation index value from the preset number of iteration target paths and the preset number of new distribution paths as iteration target paths for the next iteration.
[0142] Optionally, the regret value determination module comprises:
[0143] an optimal suboptimal index determination unit configured to determine the optimal evaluation index value and the suboptimal evaluation index value corresponding to each to-be-assigned order according to the evaluation index value of assigning each to-be-assigned order to each candidate distribution vehicle.
[0144] The regret value determination unit is configured to determine, as a corresponding regret value of the to-be-assigned order not being assigned to the candidate distribution transport capacity corresponding to the optimal evaluation index value, a difference value between the suboptimal evaluation index value corresponding to each to-be-assigned order and the optimal evaluation index value.
[0145] The distribution scheduling device provided in the embodiments of the present application is used to implement each step of the distribution scheduling method described in the embodiments of the present application, and the specific implementation of each module of the device is described with reference to the corresponding step, which will not be repeated here.
[0146] The distribution scheduling device provided in the embodiments of the present application determines the optimal path of each candidate distribution transport capacity when each to-be-assigned order is assigned to each candidate distribution transport capacity, and then determines the evaluation index value of assigning each to-be-assigned order to each candidate distribution transport capacity, determines the corresponding regret value of each to-be-assigned order not being assigned to the candidate distribution transport capacity corresponding to the optimal evaluation index value, and assigns the to-be-assigned order with the maximum regret value to the candidate distribution transport capacity corresponding to the optimal evaluation index value. Since the regret value takes into account the impact of the current assignment on future scheduling, it can prevent the algorithm from falling into a local minimum, improve the order assignment quality, and thus improve the distribution efficiency of the distribution transport capacity and improve the user experience.
[0147] Embodiment Four
[0148] The embodiments of the present application also provide an electronic device. As shown in the figure, the electronic device 600 can include one or more processors 610 and one or more memories 620 connected with the processors 610. The electronic device 600 can also include an input interface 630 and an output interface 640 for communicating with another device or system. The program code executed by the processor 610 can be stored in the memory 620. Figure 6 The processor 610 in the electronic device 600 calls the program code stored in the memory 620 to execute the distribution scheduling method in the above-described embodiments.
[0149] The above-described elements in the above-described electronic device can be connected to each other through a bus, such as one of a data bus, an address bus, a control bus, an extension bus, and a local bus, or any combination thereof.
[0150] The embodiments of the present application also provide a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the steps of the distribution scheduling method described in the embodiments of the present application.
[0151]
[0152] Each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0153] The above describes in detail the distribution scheduling method and device, the electronic device and the storage medium provided by the embodiments of the present application. The principles and implementation manners of the present application are described by applying specific examples. The above embodiment description is only used to help understand the method and the core idea of the present application. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed. In summary, the content of the specification should not be understood as a limitation of the present application.
[0154] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and the necessary general hardware platform, and of course, it can also be realized by hardware. Based on such understanding, the above technical solutions or the essential part of the contribution to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in each embodiment or some parts of the embodiment.
Claims
1. A method of dispatching, characterized by, The method comprises the following steps: obtaining a plurality of to-be-allocated orders and a plurality of candidate delivery capacities corresponding to the to-be-allocated orders; determining an optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity respectively; determining an evaluation index value of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity according to the optimal path of the candidate delivery capacity; determining a regret value of each to-be-allocated order when the to-be-allocated order is not allocated to a candidate delivery capacity corresponding to an optimal evaluation index value according to the evaluation index value of each to-be-allocated order allocated to each candidate delivery capacity; allocating a to-be-allocated order with a maximum regret value to a candidate delivery capacity corresponding to an optimal evaluation index value. The method comprises the following steps: determining a to-be-allocated order from the plurality of to-be-allocated orders as a current to-be-allocated order and determining a candidate delivery capacity from the plurality of candidate delivery capacities as a current candidate delivery capacity; determining a preset number of delivery paths corresponding to the current candidate delivery capacity when the current to-be-allocated order is allocated to the current candidate delivery capacity, determining an optimal path from the preset number of delivery paths as an initial iteration optimal path, taking the delivery path as an iteration target path, processing the preset number of iteration target paths to generate a preset number of new delivery paths, and updating the iteration optimal path according to the preset number of iteration target paths and the preset number of new delivery paths until an optimal path meeting an iteration termination condition is generated; and the method for determining the regret value comprises the following steps: determining an optimal evaluation index value and a suboptimal evaluation index value corresponding to each to-be-allocated order according to the evaluation index value of each to-be-allocated order allocated to each candidate delivery capacity, and taking a difference between the suboptimal evaluation index value and the optimal evaluation index value corresponding to each to-be-allocated order as a regret value of the to-be-allocated order when the to-be-allocated order is not allocated to a candidate delivery capacity corresponding to the optimal evaluation index value.
2. The method of claim 1, wherein, The method for determining the optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity respectively comprises the following steps: performing mutation processing on the preset number of iteration target paths based on a discrete difference operator, performing crossover processing on the mutation paths obtained after the mutation processing by using a local search method to generate a preset number of new delivery paths; updating the iteration optimal path according to the preset number of iteration target paths and the preset number of new delivery paths, determining a preset number of iteration target paths for next iteration, and iteratively performing the mutation processing, the crossover processing, and the updating of the iteration optimal path until the iteration termination condition is met; taking the iteration optimal path as the optimal path when the current to-be-allocated order is allocated to the current candidate delivery capacity; performing the above steps of determining the current to-be-allocated order and the current candidate delivery capacity and determining the optimal path when the current to-be-allocated order is allocated to the current candidate delivery capacity in a loop until the optimal path of each candidate delivery capacity when each to-be-allocated order is allocated to each candidate delivery capacity is determined.
3. The method of claim 2, wherein, The determining the preset number of delivery paths corresponding to the current candidate delivery capacity when the current to-be-assigned order is assigned to the current candidate delivery capacity comprises: According to the estimated arrival time of the current to-be-assigned order and the to-be-delivered order of the current candidate delivery capacity, one delivery path corresponding to the current candidate delivery capacity when the current to-be-assigned order is assigned to the current candidate delivery capacity is determined, and other delivery paths are randomly generated to obtain the preset number of delivery paths corresponding to the current candidate delivery capacity.
4. The method of claim 3, wherein, The determining the preset number of delivery paths corresponding to the current candidate delivery capacity when the current to-be-assigned order is assigned to the current candidate delivery capacity comprises: The delivery address of the to-be-delivered order in the current candidate delivery capacity is taken as a first set; The pickup address and the delivery address of the current to-be-assigned order, and the pickup address and the delivery address of the to-be-delivered order in the current candidate delivery capacity are taken as a second set; According to the first set and the second set, the delivery address in the first set and the pickup address and the delivery address in the second set are spliced to obtain a splicing sequence; According to each pickup address and delivery address in the splicing sequence, the delivery path corresponding to the current candidate delivery capacity is determined.
5. The method of claim 4, wherein, The splicing the delivery address in the first set and the pickup address and the delivery address in the second set according to the first set and the second set to obtain a splicing sequence comprises: The delivery address of each to-be-delivered order in the first set is sorted in the order of the estimated arrival time from early to late to obtain a first sequence; The pickup address and the delivery address of the current to-be-assigned order and each to-be-delivered order in the second set are sorted in the order of the estimated arrival time from early to late to obtain a second sequence; The second sequence is spliced behind the first sequence to obtain a splicing sequence.
6. The method of claim 4, wherein, The determining the delivery path corresponding to the current candidate delivery capacity according to each pickup address and delivery address in the splicing sequence comprises: The pickup address or the delivery address in the splicing sequence is inserted into the position with the optimal evaluation index value in the pickup / delivery point sequence in order until the positions of all pickup addresses and delivery addresses in the splicing sequence in the pickup / delivery point sequence are determined, and the pickup / delivery point sequence is taken as the delivery path corresponding to the current candidate delivery capacity.
7. The method of claim 2, wherein, The mutation processing of the preset number of iteration target paths based on the discrete difference operator comprises: The preset number of iteration target paths is mutated based on the discrete difference operator according to the following formula to obtain a mutated path: wherein V x is a variation path, and are three paths randomly selected from the preset number of iteration target paths, F is a differential amplification coefficient, N is the number of path points in the iteration target path, and the operation modes of symbols and are as follows: where Δ x is a difference vector, is a difference vector Δ x is the hth element in Δ is the hth path point in X b is the hth path point in X is the hth path point in X c is the hth path point in X is the hth path point in V x is the hth path point in V 8. The method of claim 2, wherein, The mutated path obtained after the mutation processing is crossed using a local search method to generate a preset number of new delivery paths, comprising: The starting path point and the repeated path point in the mutated path are removed to obtain a processed mutated path; The starting path point and the repeated path point in the mutated path are removed to obtain a processed mutated path; randomly selecting one of the preset number of iteration target paths as a parent path, removing repeated path points in the parent path and the processed mutation path to obtain a processed parent path; under the constraints of the pick-up and delivery priority and the current candidate distribution vehicle capacity, inserting the path points in the processed mutation path into the position with the optimal evaluation index value in the processed parent path to obtain a new distribution path.
9. The method of claim 2, wherein, The updating of the iteration optimal path and the determination of the preset number of iteration target paths for next iteration according to the preset number of iteration target paths and the preset number of new distribution paths include: determining a distribution path with the optimal evaluation index value from the preset number of iteration target paths and the preset number of new distribution paths as a current optimal path; if the evaluation index value of the current optimal path is better than that of the iteration optimal path, replacing the iteration optimal path with the current optimal path; determining the preset number of distribution paths with the optimal evaluation index value from the preset number of iteration target paths and the preset number of new distribution paths as iteration target paths for next iteration.
10. A distribution scheduling apparatus characterized by comprising: It includes: a scheduling object acquisition module configured to acquire a plurality of to-be-allocated orders and a plurality of candidate distribution vehicles corresponding thereto; an optimal path determination module configured to determine an optimal path of each candidate distribution vehicle when each to-be-allocated order is allocated to each candidate distribution vehicle, wherein one to-be-allocated order is determined from the plurality of to-be-allocated orders as a current to-be-allocated order, one candidate distribution vehicle is determined from the plurality of candidate distribution vehicles as a current candidate distribution vehicle, a preset number of distribution paths corresponding to the current candidate distribution vehicle when the current to-be-allocated order is allocated to the current candidate distribution vehicle are determined, and one optimal path is determined from the preset number of distribution paths as an initial iteration optimal path, the distribution path is taken as an iteration target path, the preset number of iteration target paths are processed to generate a preset number of new distribution paths, and the iteration optimal path is updated according to the preset number of iteration target paths and the preset number of new distribution paths until an optimal path meeting an iteration termination condition is generated; an evaluation index determination module configured to determine an evaluation index value of allocating each to-be-allocated order to each candidate distribution vehicle according to the optimal path of the candidate distribution vehicle when each to-be-allocated order is allocated to the candidate distribution vehicle. The regret value determination module is configured to determine a corresponding regret value of each to-be-assigned order when the to-be-assigned order is not assigned to the candidate distribution vehicle corresponding to the optimal evaluation index value according to the evaluation index value of assigning each to-be-assigned order to each candidate distribution vehicle, wherein the optimal evaluation index value and the suboptimal evaluation index value of each to-be-assigned order are determined according to the evaluation index value of assigning each to-be-assigned order to each candidate distribution vehicle, and the difference between the suboptimal evaluation index value and the optimal evaluation index value of each to-be-assigned order is taken as the corresponding regret value of the to-be-assigned order when the to-be-assigned order is not assigned to the candidate distribution vehicle corresponding to the optimal evaluation index value; The order assignment module is configured to assign the to-be-assigned order with the maximum regret value to the candidate distribution vehicle corresponding to the optimal evaluation index value.
11. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the distribution scheduling method of any one of claims 1 to 9.
12. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps of the distribution scheduling method of any one of claims 1 to 9. The program is executed by the processor to implement the steps of the distribution scheduling method of any one of claims 1 to 9.
Citation Information
Patent Citations
Traffic navigation method and device for variable destinations
CN110887501A
Distribution path planning method and device, medium and computer equipment
CN111311005A