Crowdsourcing scheduling method and system based on hybrid genetic algorithm and location allocation algorithm

By adopting a crowdsourcing scheduling method with hybrid genetic algorithms and location update allocation algorithms in VRP, the problems of poor local search capabilities of genetic algorithms and poor allocation of crowdsourcing vehicle tasks in the prior art are solved, and more efficient logistics services and cost reduction are achieved.

CN116629736BActive Publication Date: 2025-04-22SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310445861.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-23
Publication Date
2025-04-22
Estimated Expiration
2043-04-23

AI Technical Summary

Technical Problem

In the prior art, genetic algorithms for VRP have poor local search capabilities, and optimization performance depends on the initial solution; while task allocation for crowdsourcing vehicles generally adopts a one-to-one allocation method, which cannot fully match the remaining capacity of crowdsourcing vehicles and customer needs.

Method used

The crowdsourcing scheduling method based on hybrid genetic algorithm and location update allocation algorithm is adopted. By building a self-owned vehicle route optimization model and crowdsourcing task allocation model, and using a hybrid genetic algorithm and position update allocation algorithm to solve it, the self-owned vehicle route and crowdsourcing vehicle task allocation is optimized.

Benefits of technology

It improves the efficiency and quality of the route planning of own vehicles, enhances the local search capabilities of the algorithm, better utilizes the remaining capacity of crowdsourcing vehicles, and reduces logistics scheduling costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116629736B_ABST
    Figure CN116629736B_ABST
Patent Text Reader

Abstract

The present invention relates to the VRP field of logistics. The present invention provides a crowdsourcing scheduling method and system based on a hybrid genetic algorithm and a position allocation algorithm, obtaining a customer set, a self-owned vehicle set, a warehouse set and a crowdsourcing vehicle set; constructing a self-owned vehicle route optimization model, solving it through a hybrid genetic algorithm, obtaining an optimal solution that achieves the optimization goal and satisfies the preset constraints; the optimal solution represents the customer set served by each self-owned vehicle, the optimal route plan of each self-owned vehicle and the customer set that needs to be served by the crowdsourcing vehicle; constructing a crowdsourcing task allocation model, solving it through a position update allocation algorithm, obtaining an optimal solution that achieves the optimization goal and satisfies the constraints, the optimal solution represents the customer set served by each crowdsourcing vehicle and the service order; dispatching self-owned vehicles and crowdsourcing vehicles to serve customers according to the optimal solution of the self-owned vehicle route optimization model and the crowdsourcing task allocation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of VRP (Vehicle Routing Problem) of logistics, and specifically relates to a crowdsourcing VRP scheduling method and a system thereof based on a hybrid genetic algorithm and a position update allocation algorithm. Background Art

[0002] The rapid development of online sales on the Internet has brought many challenges to logistics service providers in completing the logistics and transportation of goods ordered online. The main challenge is how to provide economical distribution services. In order to meet this challenge, logistics service providers use their own vehicles to transport goods for multiple customers, and solve the VRP (Vehicle Routing Problem) problem to achieve high economical logistics services. However, as the scale of customers continues to increase, the logistics service provider's own vehicles are difficult to meet all the needs of customers. At this time, crowdsourcing transportation has become a new opportunity for logistics service providers to meet the service needs of customers. Crowdsourcing transportation refers to the use of the excess capacity of crowdsourcing vehicles to provide logistics services to customers. Logistics service providers only need to pay a certain detour compensation to crowdsourcing drivers. This type of problem involves the route planning of own vehicles and the task allocation of crowdsourcing vehicles. We collectively call it VRPOD (Vehicle Routing Problem with Occational Driver) problem. There is no doubt that this model can effectively reduce the distribution costs of logistics service providers while providing customers with high-quality logistics services. Therefore, studying this problem has important practical significance.

[0003] The VRPOD problem is a derivative of the traditional VRP problem and also has NP (Non-deterministic Polynomial) characteristics. Traditional exact algorithms are difficult to obtain satisfactory solutions for large-scale combinatorial optimization problems in polynomial time. It is effective to use heuristic algorithms to solve NP problems. Genetic algorithms are a type of global search method that evolved from the evolutionary law of survival of the fittest in the biological world. This algorithm does not have the limitations of derivatives and function continuity, and can effectively solve combinatorial optimization problems. Its disadvantages are poor local search capabilities and the optimization performance depends on the initial solution. In addition, a one-to-one allocation method is often used for task allocation problems, but for crowdsourcing vehicles, the number of customers that can be served depends on their remaining capacity. At the same time as task allocation, the order of completing tasks also needs to be given. Therefore, it is necessary to design a new algorithm based on the characteristics of crowdsourcing task allocation. Summary of the invention

[0004] The technical problem to be solved by the present invention is that the genetic algorithm used for VRP in the prior art has poor local search ability and the optimization performance depends on the initial solution; and the task allocation for crowdsourcing vehicles in the prior art generally adopts a one-to-one allocation method, which cannot fully match the remaining capacity of the crowdsourcing vehicles with customer needs.

[0005] The technical solution of the present invention to solve the technical problem is to provide a crowdsourcing scheduling method based on a hybrid genetic algorithm and a position allocation algorithm, which includes the following steps:

[0006] Step 1: Obtain a customer set, a self-owned vehicle set, a warehouse set, and a crowdsourced vehicle set;

[0007] The customer set includes location information of all serviceable customers, time windows of serviceable customers, and revenue values ​​of serviceable customers;

[0008] The owned vehicle set includes the available capacity of owned vehicles, the fixed cost of owned vehicles, the unit variable cost of owned vehicles and the transportation speed of owned vehicles;

[0009] The warehouse set includes warehouse location information and a maximum tolerated route duration;

[0010] The crowdsourcing vehicle set includes the location information of the crowdsourcing vehicles, the earliest departure time, the latest time when the crowdsourcing vehicles return to their destinations, the available capacity of the crowdsourcing vehicles, and the speed of the crowdsourcing vehicles;

[0011] Step 2: Build a vehicle route optimization model;

[0012] The optimization model of the route of the owned vehicle takes maximizing the profit obtained from serving customers as the optimization goal; the profit obtained from serving customers is determined by the difference between the revenue value of the serviceable customers and the total cost consisting of the fixed cost of the owned vehicle, the unit variable cost of the owned vehicle, the compensation cost of the customer being served by the crowdsourced vehicle, and the penalty cost of violating the time window constraint of the serviceable customer;

[0013] The preset transportation scenarios of the owned vehicle route optimization model include: the number of owned vehicles is fixed; the overall transportation capacity of owned vehicles cannot meet the needs of all customers; vehicles depart from the warehouse to serve customers; once the customer demand served exceeds the available capacity of owned vehicles, the customer demand is split and the remaining demand is completed by crowdsourcing vehicles; owned vehicles do not need to visit all customers, but only need to visit the customer subset that maximizes the overall profit of owned vehicles when the owned vehicles are fully loaded; customers are compensated by crowdsourcing vehicles; and penalty costs are incurred by violating the time window constraints for serving customers.

[0014] The constraints of the owned vehicle route optimization model include: each customer can only be served once by the owned vehicle; once the owned vehicle is fully loaded after departing from the warehouse, it returns to the warehouse; the time when the owned vehicle arrives at the customer must be within the customer's time window. If it arrives early, it will incur a penalty cost for waiting time; if it arrives late, it will incur a penalty cost for delay time; when the available vehicle capacity of the owned vehicle cannot meet all the needs of the customer, the needs of the customer are split, and the needs of the customer are met by the owned vehicle and the crowdsourcing vehicle together;

[0015] Step 3: Solve the owned vehicle route optimization model by hybrid genetic algorithm to obtain the optimal solution that achieves the optimization goal and satisfies the preset constraints; the optimal solution represents the set of customers served by each owned vehicle, the optimal route plan for each owned vehicle, and the set of customers that need to be served by crowdsourcing vehicles;

[0016] Step 4: Construct a crowdsourcing task allocation model; the crowdsourcing task is the set of customers that need to be served by the crowdsourcing vehicle in the optimal solution obtained by the hybrid genetic algorithm;

[0017] The crowdsourcing task allocation model takes minimizing the compensation cost generated by the crowdsourcing vehicle service as the optimization goal, and the compensation cost is determined by the difference between the customer cost of the crowdsourcing vehicle service and the cost of the crowdsourcing vehicle returning directly from the starting point to the destination;

[0018] The preset scenarios of the crowdsourcing task allocation model include: the available capacity of the crowdsourcing vehicle is much greater than the total demand of the customers to be served; the crowdsourcing vehicle can provide services to multiple customers who need to be served in the process of returning to the destination, but the service time cannot exceed the latest time when the crowdsourcing vehicle returns to its destination; the customer incurs compensation costs when served by the crowdsourcing vehicle; if the available capacity of the crowdsourcing vehicle is less than the demand of the customer to be served, the demand is split; the crowdsourcing vehicle goes directly to the warehouse with a full load and then returns to the destination;

[0019] The preset constraints of the crowdsourcing task allocation model include: the customer demand served by the crowdsourcing vehicle does not exceed the available capacity of the crowdsourcing vehicle, and the arrival time of the crowdsourcing vehicle at the customer must be within the time window for serving the customer;

[0020] Step 5: Solve the crowdsourcing task allocation model through the location update allocation algorithm to obtain the optimal solution that achieves the optimization goal and satisfies the constraints, and the optimal solution represents the customer set and service order served by each crowdsourcing vehicle;

[0021] Step 6: Dispatch owned vehicles and crowdsourced vehicles to serve customers based on the optimal solution of the owned vehicle route optimization model and the crowdsourcing task allocation model.

[0022] In one embodiment, in step 2, the objective function of the owned vehicle route optimization model is:

[0023]

[0024]

[0025] The constraints of the owned vehicle route optimization model are:

[0026]

[0027]

[0028]

[0029]

[0030]

[0031]

[0032]

[0033]

[0034]

[0035]

[0036]

[0037]

[0038]

[0039]

[0040] Among them, expression (1) is used to characterize the profit value obtained by maximizing the service of customers by own vehicles; formula (2) represents the total cost of visiting customers by own vehicles, including the fixed cost of own vehicles, the unit variable cost of own vehicles, the penalty cost of violating the time window and the compensation cost of making customers accept crowdsourcing after demand splitting; formula (3) represents the maximum number of own vehicles starting from the warehouse; formula (4) represents the conservation of traffic flow, and vehicles visiting node p must leave from node p; formula (5) indicates that warehouses cannot be directly accessed; formula (6) is the classic subpath elimination constraint; formula (7) guarantees that customers Only when a vehicle visits a node can it be served; Formula (8) indicates that the total customer demand for service provided by the owner's vehicle cannot exceed the available capacity of the owner's vehicle; Formula (9) indicates that when customer demand cannot be fully met by the owner's vehicle, the remaining demand is met by crowdsourcing vehicles; Formula (10) indicates the time constraints for vehicles to visit different nodes; Formula (11) indicates the waiting time caused by the vehicle arriving at the node in advance; Formula (12) indicates the delay time caused by the vehicle arriving at the node late; Formula (13) indicates that the owner's vehicle only visits the customer once; Formulas (14)-(16) indicate the constraint range of the variables.

[0041] In one embodiment, the step 3 further includes the following steps:

[0042] Step 31: Use spatiotemporal clustering to divide the customer set into clusters of corresponding number according to the number of owned vehicles, plan routes for owned vehicles in each cluster, and thus generate an initial population P(t) with N individuals; customers that cannot be served by owned vehicles are served by crowdsourced vehicles;

[0043] Step 32: Initialize the current number of iterations t=0 and preset the maximum number of iterations T;

[0044] Step 33: Generate parent solutions from the initial population P(t) according to the binary competition, and generate a child population Q of N / 2 size through sequential crossover operator and Swap mutation operator between the parent solutions; select the top 50% elite individuals from the initial population P(t) according to the fitness value, perform a two-stage field search on each elite individual, and generate a population O of N / 2;

[0045] Step 34: Merge the initial population P(t), population Q and population O to generate a new population P(t+1);

[0046] Step 35: According to the fitness value of each individual in the new population, use roulette to select individuals to enter the offspring population until the size of the offspring population is N;

[0047] Step 36: Determine whether the preset maximum number of iterations has been reached. If yes, stop and output the solution with the smallest fitness value in the current population; otherwise, return to step 33 to continue iterating.

[0048] In one embodiment, the step 31 further includes the following steps:

[0049] Step 311: Calculate the temporal and spatial distances between customers, and use a traditional genetic algorithm to divide the customers into k clusters, where k is the number of owned vehicles;

[0050] Step 312: randomly select a customer cluster with no planned vehicle route, find the customer in the cluster that meets the warehouse-to-customer time window constraint and is closest to the warehouse, and use it as the new starting point of the vehicle;

[0051] Step 313: Calculate the spatiotemporal distance from the new starting point to the remaining customers in the cluster, and select the next visiting customer from the remaining customers in a roulette wheel manner until the vehicle is fully loaded or all customers are visited;

[0052] Step 314: After traversing all clusters, check whether each owned vehicle is fully loaded. For vehicles that are not fully loaded, select the next customer to be visited from the remaining unserved customer sets of all clusters according to the time and space distances in a roulette manner until all vehicles are fully loaded; customers that cannot be served by owned vehicles are served by crowdsourced vehicles;

[0053] Step 315: Check whether the number of individuals generated reaches the maximum population number. If yes, output the initial population P(t); otherwise, return to step 312.

[0054] In one embodiment, the spatiotemporal distance between the customers is obtained by weighting the spatial distance and the temporal distance between the customers, as shown in formula (17);

[0055]

[0056]

[0057] In the formula, l ij represents the spatial distance between customer i and customer j, which is calculated from their two-dimensional spatial coordinates, as shown in formula (18); where (x i ,y i ) and (x j ,y j ) represent the geographic coordinates of customer i and customer j respectively; represents the time distance between customer i and customer j, which is calculated by the time windows of the two. Suppose the time windows of customer i and customer j are [ET i ,LT i ] and [ET j ,LT j ], and ET i <ET j , when the service time of customer i is st i, the spatial distance between customer i and customer j is l ij , the vehicle speed is v, then the time when the vehicle arrives from customer i to customer j must fall within the time window [ET i +st i +l ij / v,LT i +st i +l ij / v] interval, set to [a,b], there will be four cases, the calculation formula of time distance is shown in formula (19);

[0058]

[0059] Among them, λ1 is the waiting time penalty coefficient, λ2 is the delay time penalty coefficient, and λ3 is the deviation coefficient; the time distance is directional, so The final time distance between customer i and customer j is Finally, the spatial distance l ij and time distance After normalization and weighting, the final space-time distance can be obtained

[0060] In one embodiment, the step 311 further includes the following steps:

[0061] Step 3111: Determine the number of owned vehicles as the number of customer clusters k, and set the maximum number of iterations and the population size N;

[0062] Step 3112: randomly select k customers as the initial cluster centers, calculate the time-space distances from the remaining customers to the k cluster centers, and divide the remaining customers into k clusters according to the time-space distances; repeatedly perform this operation until the number of new individuals generated reaches the population size N;

[0063] Step 3113: Calculate the clustering fitness function of each individual in the population to minimize the sum of the temporal and spatial distances from other customers in each cluster to the center of the cluster. The formula is as follows:

[0064]

[0065] Step 3114: Determine whether the maximum number of iterations has been reached. If not, return to step 3112. If the maximum number of iterations has been reached, output the solution of the individual with the smallest fitness value to obtain the customer cluster.

[0066] In one embodiment, the step 33 further comprises the following steps:

[0067] Step 331: Select elite individuals, initialize the number of searches, and preset the maximum number of local searches;

[0068] Step 332: randomly selecting a method for generating a new route, wherein the method for generating a new route includes generating a new route by changing the service customers between different owned vehicles and generating a new route by changing the service customers of the owned vehicles and the crowdsourced vehicles;

[0069] Step 333: After determining the method for generating a new route, in the first stage, the Exchange operator and the Insert operator are executed in sequence to generate a new route, and it is determined whether the fitness value of the generated new route is better than the fitness value of the route of the elite individual; if a new route with a better fitness value is searched, the second stage is entered; otherwise, step 333 is repeated until the maximum number of local searches is reached, and the generated new route is directly output as the offspring output of the elite individual;

[0070] Step 334: Enter the second stage, execute the 2-opt operator, Insert operator, Exchange operator and Swap operator in sequence inside each vehicle, once a route with a better fitness value than the original route is searched, immediately enter the next vehicle to continue to execute the four local search operators until all vehicles complete the local search, and output the generated new route as the offspring output of the elite individual;

[0071] Step 335: Determine whether the fitness value of the new route finally generated is better than the fitness value of the route of the original elite individual; if a new route with a better fitness value is found, output the route as the offspring of the elite individual; otherwise, repeatedly execute steps 332-334 until the maximum number of local searches is reached;

[0072] In one embodiment, in step 4, the objective function of the crowdsourcing task allocation model is as follows:

[0073]

[0074] The constraints of the crowdsourcing task allocation model are as follows:

[0075]

[0076]

[0077]

[0078]

[0079]

[0080]

[0081]

[0082]

[0083]

[0084]

[0085]

[0086]

[0087]

[0088]

[0089] Among them, expression (21) is used to characterize the minimization of the compensation cost of crowdsourcing vehicle detour; formula (22) limits the number of available crowdsourcing vehicles; formula (23) indicates that crowdsourcing vehicles that do not serve customers do not need to visit warehouses, and warehouses cannot be directly connected; formula (24) indicates that crowdsourcing vehicles that serve customers must return to the destination after completing delivery; formula (25) is the capacity constraint, indicating that when crowdsourcing vehicles serve multiple customers, the available capacity must meet the order of service; formula (26) ensures that customers can only be served when they are visited by vehicles; formulas (27)-(29) are the time constraints of crowdsourcing vehicles, indicating that crowdsourcing vehicles start from the starting point, first serve customers, then go to the warehouse, and finally return to the destination; formula (30) is the time window constraint of crowdsourcing vehicle service, and crowdsourcing vehicles must provide services to customers within the customer's time window; formula (31) defines the logical relationship between variables, indicating that the number of crowdsourcing vehicles that provide logistics services to customers cannot exceed the number of crowdsourcing vehicles that can provide services to the customer; formula (32) indicates that each customer is served by at least one vehicle; formulas (33)-(35) represent the constraint range of variables.

[0090] In one embodiment, step 5 further includes the following steps:

[0091] Step 51: Find the customer with the smallest demand from the current crowdsourcing task, and find a subset of crowdsourcing vehicles that meets the time window of the customer from the crowdsourcing vehicle set;

[0092] Step 52: Find the crowdsourced vehicle closest to the customer in the crowdsourced vehicle subset, and assign the customer to the crowdsourced vehicle;

[0093] Step 53: If the crowdsourcing vehicle has no available capacity, delete the crowdsourcing vehicle from the crowdsourcing vehicle set; otherwise, update the location of the crowdsourcing vehicle to the location of the customer being served, and update the available capacity and departure time of the crowdsourcing vehicle; if the customer being served still has unmet needs, update the customer's demand; otherwise, delete the customer from the crowdsourcing task;

[0094] Step 54: Determine whether the crowdsourcing task set is empty. If so, stop and output the optimal solution, which represents the customer set and service order served by each crowdsourcing vehicle. Otherwise, return to step 51 to continue iteration.

[0095] The present invention also provides a crowdsourcing dispatching system based on a hybrid genetic algorithm and a location allocation algorithm, comprising a data module, an owned vehicle route optimization model construction module, an owned vehicle route optimization model solution module, a crowdsourcing task allocation model construction module, a crowdsourcing task allocation model solution module and a dispatching module;

[0096] The data module is used to receive input data, and the input data includes:

[0097] Obtain customer sets, owned vehicle sets, warehouse sets, and crowdsourced vehicle sets;

[0098] The customer set includes location information of all serviceable customers, time windows of serviceable customers, and revenue values ​​of serviceable customers;

[0099] The owned vehicle set includes the available capacity of owned vehicles, the fixed cost of owned vehicles, the unit variable cost of owned vehicles and the transportation speed of owned vehicles;

[0100] The warehouse set includes warehouse location information and a maximum tolerated route duration;

[0101] The crowdsourcing vehicle set includes the location information of the crowdsourcing vehicles, the earliest departure time, the latest time when the crowdsourcing vehicles return to their destinations, the available capacity of the crowdsourcing vehicles, and the speed of the crowdsourcing vehicles;

[0102] The owned vehicle route optimization model construction module is used to construct an owned vehicle route optimization model according to input data and the owned vehicle route optimization model construction method provided in any one of the above items;

[0103] The owned vehicle route optimization model solving module is used to solve the owned vehicle route optimization model according to the hybrid genetic algorithm provided in any one of the above embodiments to obtain an optimal solution that achieves the optimization goal and satisfies the preset constraints; the optimal solution represents the set of customers served by each owned vehicle, the optimal route plan for each owned vehicle, and the set of customers that need to be served by the crowdsourcing vehicle;

[0104] A crowdsourcing task allocation model construction module, used to construct a crowdsourcing task allocation model according to input data and a crowdsourcing task allocation model construction method provided in any one of the above items;

[0105] A crowdsourcing task allocation model solving module, used to solve the crowdsourcing task allocation model according to the position update allocation algorithm provided in any one of the above items to obtain an optimal solution that achieves the optimization goal and satisfies the constraints, wherein the optimal solution represents the customer set and service order served by each crowdsourcing vehicle;

[0106] The scheduling module is used to schedule owned vehicles and crowdsourced vehicles according to the customer set served by each owned vehicle and the optimal route plan of each owned vehicle obtained by the route optimization model solving module, and the customer set served by each crowdsourced vehicle and the service order confirmed by the crowdsourced task allocation model solving module.

[0107] The beneficial effect of the present invention is that the present invention provides a crowdsourcing VRP scheduling method and system based on a hybrid genetic algorithm and a position update allocation algorithm, wherein the optimal route of the own vehicle is obtained by constructing a self-owned vehicle route model and solving it using a hybrid genetic algorithm. At the same time, the initial population of the hybrid genetic algorithm provided by the present invention is generated by spatiotemporal clustering, which ensures the quality of the initial solution. In the iterative process, the offspring population is jointly generated by a traditional genetic algorithm and a two-stage variable neighborhood search algorithm, which strengthens the local search capability of the algorithm without losing the global search capability of the genetic algorithm, and reduces the impact of the initial solution on the performance of the genetic algorithm. The present invention also constructs a crowdsourcing task allocation model and solves it through a position update allocation algorithm, thereby realizing the allocation of multiple tasks to the same crowdsourcing vehicle and planning the service order at the same time, and achieving the purpose of making full use of the remaining transportation capacity of the crowdsourcing vehicle. The two algorithms are integrated into the crowdsourcing VRP scheduling system to guide the scheduling arrangements of logistics service providers. On the one hand, it solves the problem of how to maximize profits for logistics service providers when their own vehicles have insufficient capacity. On the other hand, it utilizes the surplus capacity of crowdsourced vehicles in society to provide services for customers who cannot be served by their own vehicles. Only a small amount of detour compensation costs need to be paid to crowdsourced drivers, which greatly saves logistics scheduling costs and has extremely strong practical application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0108] Figure 1 , flow chart of the hybrid genetic algorithm in Example 1 of the present invention.

[0109] Figure 2 , a flow chart of initializing a population in the hybrid genetic algorithm in Example 1 of the present invention.

[0110] Figure 3 , a relationship diagram between arrival time and time window in space-time distance in embodiment 1 of the present invention.

[0111] Figure 4 , the spatiotemporal clustering flow chart in Example 1 of the present invention.

[0112] Figure 5, a flow chart of generating offspring solutions by a two-stage neighborhood search algorithm in a hybrid genetic algorithm in Example 1 of the present invention.

[0113] Figure 6 , a flowchart of the location update allocation algorithm in Example 1 of the present invention.

[0114] Figure 7 , structural diagram of the crowdsourcing scheduling system based on the hybrid genetic algorithm and the location update allocation algorithm in Example 2 of the present invention. DETAILED DESCRIPTION

[0115] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the present invention. Before describing the specific technical solution of the present invention, the abbreviations and key terms that appear in the present invention are first explained:

[0116] Crowdsourcing vehicles: Private vehicles in society. When returning from the starting point to the destination, they can accept detours that do not violate the latest return time to the destination. After the logistics service provider provides certain compensation for the detour of private vehicles, private vehicles can provide services to customers.

[0117] Crowdsourcing tasks: Customers who need to be served by crowdsourced vehicles.

[0118] Roulette selection method: a method of selecting an individual from multiple individuals. In this method, the fitness value of an individual is proportional to its probability of being selected. The larger the fitness value, the greater the probability of the individual being selected. In the actual process of selecting individuals, the final selected individual is determined based on the cumulative probability of all individual selection probability values.

[0119] Binary Tournament: A type of sampling with replacement used to select parents from a population that will generate the next generation. This method takes a certain number of individuals from the population each time and then selects the two best ones as parents.

[0120] Genetic algorithm: a randomized search method evolved from the law of evolution of survival of the fittest in the biological world.

[0121] Crossover operator: The core part of the genetic algorithm, which uses the crossover operator to generate new offspring individuals in the population;

[0122] Mutation operator: The mutation operator is used for a group to change the gene values ​​at certain gene positions of the individual strings in the group to generate new offspring individuals to increase the ability of the genetic operator to explore unknown search space;

[0123] 2-opt operator: A local search operator. The basic idea is to randomly select two nodes at different positions in a path, flip the path between the two points, and thus obtain a new path.

[0124] Insert operator: A local search operator. The basic idea is to randomly select two nodes at different positions in a path, and insert one of them after the other node to obtain a new path.

[0125] Exchange operator: A local search operator. The basic idea is to randomly select two nodes at different positions in a path, exchange the positions of the two nodes, and thus obtain a new path.

[0126] Swap operator: A local search operator. The basic idea is to randomly select two adjacent nodes in a path and then swap the positions of the two nodes.

[0127] Example 1

[0128] The crowdsourcing VRP scheduling method based on the hybrid genetic algorithm and the location update allocation algorithm provided by the present invention is described in detail below through a crowdsourcing VRP scheduling scenario.

[0129] The logistics service provider needs to provide pickup service for a group of customers. However, all owned vehicles can only meet the needs of some customers, and the remaining customer needs can only be met by crowdsourcing vehicles. For owned vehicles, each vehicle must depart from a warehouse, and the vehicle load is much greater than any customer demand. Each customer can only be served once by an owned vehicle. The owned vehicle must return to the nearest warehouse after being fully loaded. Once the owned vehicle cannot fully meet the current customer's needs, the demand is split, and the split customer needs are served by crowdsourcing vehicles. For crowdsourcing vehicles, each vehicle can provide pickup service for multiple customers. Once the vehicle is fully loaded, it will go to a warehouse to deliver the goods and then go to the destination. The time to return to the destination cannot exceed the latest time to return to the destination. The logistics service provider provides compensation based on the detour distance of the crowdsourcing vehicle. It is worth noting that the customer set served by the crowdsourcing vehicle comes from the customer set that is not fully served by the owned vehicle. When all customer needs are met, the overall profit obtained by the logistics service provider through crowdsourcing VRP scheduling is maximized through the cooperation of owned vehicles and crowdsourcing vehicles.

[0130] The crowdsourcing VRP scheduling method based on a hybrid genetic algorithm and a location update allocation algorithm provided by the present invention comprises the following steps:

[0131] Step 1: Obtain a set of customers, a set of owned vehicles, a set of warehouses, and a set of crowdsourced vehicles;

[0132] The customer set includes location information of all serviceable customers, time windows of serviceable customers, and revenue values ​​of serviceable customers;

[0133] The owned vehicle set includes information on available capacity of owned vehicles, fixed costs of owned vehicles, unit variable costs of owned vehicles, and transportation speed of owned vehicles;

[0134] The warehouse set includes warehouse location information and a maximum tolerated route duration;

[0135] The crowdsourcing vehicle set includes the location information of the crowdsourcing vehicles, the earliest departure time, the latest time when the crowdsourcing vehicles return to their destinations, the available capacity of the crowdsourcing vehicles, and the speed of the crowdsourcing vehicles;

[0136] Step 2: Build a vehicle route optimization model;

[0137] The owned vehicle route optimization model takes maximizing the profit obtained from serving customers as the optimization goal; the profit obtained from serving customers is determined by the difference between the revenue value of the serviceable customers and the total cost consisting of the fixed cost of the owned vehicle, the unit variable cost of the owned vehicle, the compensation cost for customers served by crowdsourced vehicles, and the penalty cost for violating the time window constraint of the serviceable customers.

[0138] The objective function of the owned vehicle route optimization model is as follows:

[0139]

[0140]

[0141] The preset transportation scenarios of the owned vehicle route optimization model include: the number of owned vehicles is fixed; the overall transportation capacity of owned vehicles cannot meet the needs of all customers; vehicles depart from the warehouse to serve customers; once the customer demand served exceeds the available capacity of owned vehicles, the customer demand is split and the remaining demand is completed by crowdsourcing vehicles; owned vehicles do not need to visit all customers, but only need to visit the subset of customers that maximizes the overall profit of owned vehicles when the owned vehicles are fully loaded; customers served by crowdsourcing vehicles incur compensation costs; and violation of the time window constraints on the available customers incurs penalty costs.

[0142] The constraints of the owned vehicle route optimization model include: each customer can only be served once by the owned vehicle; once the owned vehicle is fully loaded after departing from the warehouse, it returns to the warehouse; the time when the owned vehicle arrives at the customer must be within the customer's time window. If it arrives early, a penalty cost for waiting time will be incurred; if it arrives late, a penalty cost for delay time will be incurred; when the available vehicle capacity of the owned vehicle serving the customer cannot meet all the customer's needs, the customer's needs will be split, and the customer's needs will be completed jointly by the owned vehicle and the crowdsourcing vehicle.

[0143] The constraint condition of the owned vehicle route is as follows:

[0144]

[0145]

[0146]

[0147]

[0148]

[0149]

[0150]

[0151]

[0152]

[0153]

[0154]

[0155]

[0156]

[0157]

[0158] Among them, expression (1) is used to characterize the profit value obtained by maximizing the service of customers by own vehicles; formula (2) represents the total cost of visiting customers by own vehicles, including fixed vehicle costs, variable transportation costs, penalty costs for violating time windows, and compensation costs for customers to accept crowdsourcing after demand splitting; formula (3) represents the maximum number of own vehicles departing from the warehouse; formula (4) represents the conservation of traffic flow, and vehicles visiting node p must leave from node p; formula (5) indicates that warehouses cannot be directly accessed; formula (6) is the classic subpath elimination constraint; formula (7) ensures that customers only Only when a vehicle visits a node can it be served; Formula (8) indicates that the total customer demand served by the owned vehicle cannot exceed its maximum capacity; Formula (9) indicates that when customer demand cannot be fully met by the owned vehicle, the remaining demand is met by the crowdsourcing vehicle; Formula (10) indicates the time constraints for vehicles to visit different nodes; Formula (11) indicates the waiting time caused by the vehicle arriving at the node in advance; Formula (12) indicates the delay time caused by the vehicle arriving at the node late; Formula (13) indicates that the owned vehicle only visits the customer once; Formulas (14)-(16) indicate the constraint range of the variables. The symbols in the above owned vehicle route optimization model are shown in Table 1:

[0159] Table 1 Symbols

[0160]

[0161] Step 3: Solve the owned vehicle route optimization model through a hybrid genetic algorithm to obtain an optimal solution that achieves the optimization goal and satisfies the preset constraints; the optimal solution represents the set of customers served by each owned vehicle, the optimal route plan for each owned vehicle, and the set of customers that need to be served by crowdsourcing vehicles.

[0162] The flowchart solved by hybrid genetic algorithm is as follows Figure 1 As shown, the following steps are included:

[0163] Step 31: Use spatiotemporal clustering to divide the customer set into clusters of corresponding number according to the number of owned vehicles, plan routes for owned vehicles in each cluster, and thus generate an initial population P(t) with N individuals; customers that cannot be served by owned vehicles are served by crowdsourced vehicles;

[0164] Step 32: Initialize the current number of iterations t=0 and preset the maximum number of iterations T;

[0165] Step 33: Generate parent solutions from the initial population P(t) according to the binary competition, and generate a child population Q of N / 2 size through sequential crossover operator and Swap mutation operator between the parent solutions; select the top 50% elite individuals from the initial population P(t) according to the fitness value, perform a two-stage field search on each elite individual, and generate a population O of N / 2;

[0166] Step 34: Merge the initial population P(t), population Q and population O to generate a new population P(t+1);

[0167] Step 35: According to the fitness value of each individual in the new population, use roulette to select individuals to enter the offspring population until the size of the offspring population is N;

[0168] Step 36: Determine whether the preset maximum number of iterations has been reached. If yes, stop and output the solution with the smallest fitness value in the current population; otherwise, return to step 33 to continue iterating.

[0169] The initial population of the hybrid genetic algorithm is generated by spatiotemporal clustering, which ensures the quality of the initial solution. During the iteration process, the offspring population is jointly generated by the traditional genetic algorithm and the two-stage variable neighborhood search algorithm, which strengthens the local search ability of the algorithm without losing the global search ability of the genetic algorithm. This can solve the shortcomings of the genetic algorithm in the prior art, that is, the local search ability is poor and it depends on the initial solution, thereby enhancing the local search ability of the genetic algorithm and reducing the impact of the initial solution on the performance of the genetic algorithm.

[0170] Among them, the method of generating the initial population P(t) is as follows Figure 2 As shown, the following steps are included:

[0171] Step 311: Calculate the time-space distance between customers, and use the traditional genetic algorithm to divide the customers into k clusters, where k is the number of free vehicles;

[0172] Step 312: randomly select a customer cluster with no planned vehicle route, find the customer in the cluster that meets the warehouse-to-customer time window constraint and is closest to the warehouse, and use it as the new starting point of the vehicle;

[0173] Step 313: Calculate the spatiotemporal distance from the new starting point to the remaining customers in the cluster, and select the next visiting customer from the remaining customers in a roulette wheel manner until the vehicle is fully loaded or all customers are visited;

[0174] Step 314: After traversing all clusters, check whether each owned vehicle is fully loaded. For vehicles that are not fully loaded, select the next customer to be visited from the remaining unserved customer sets of all clusters according to the time and space distances in a roulette manner until all vehicles are fully loaded; customers that cannot be served by owned vehicles are served by crowdsourced vehicles;

[0175] Step 315: Check whether the number of individuals generated reaches the maximum population number. If yes, output the initial population P(t); otherwise, repeat step 312.

[0176] The relationship between arrival time and time window in space-time distance is shown in the figure Figure 3 shown.

[0177] The space-time distance is obtained by weighting the spatial distance and time distance between customers, as shown in formula (17);

[0178]

[0179]

[0180] In the formula, l ij represents the spatial distance between customer i and customer j, which is calculated from their two-dimensional spatial coordinates, as shown in formula (18); where (x i ,y i ) and (x j ,y j ) represent the geographic coordinates of customer i and customer j respectively; represents the spatial distance between customer i and customer j, which is calculated by the time windows of the two. Suppose the time windows of customer i and customer j are [ET i ,LT i ] and [ET j ,LT j ], and ET i <ET j , when the service time of customer i is st i, the spatial distance between customer i and customer j is l ij , the vehicle speed is v, then the time when the vehicle arrives from customer i to customer j must fall within the time window [ET i +st i +l ij / v,LT i +st i +l ij / v] interval, set to [a,b], there will be four cases, and the calculation formula of time distance is shown in formula (19).

[0181]

[0182] Among them, λ1 is the waiting time penalty coefficient, λ2 is the delay time penalty coefficient, and λ3 is the deviation coefficient; the time distance is directional, so The final time distance between customer i and customer j is Finally, the spatial distance l ij and time distance After normalization and weighting, the final space-time distance can be obtained

[0183] The specific spatiotemporal clustering process is as follows: Figure 4 As shown, the following steps are included:

[0184] Step 3111: Determine the number of owned vehicles as the number of customer clusters k, and set the maximum number of iterations and the population size N;

[0185] Step 3112: randomly select k customers as the initial cluster centers, calculate the time-space distances from the remaining customers to the k cluster centers, and divide the remaining customers into k clusters according to the time-space distances; repeatedly perform this operation until the number of new individuals generated reaches the population size N;

[0186] Step 3113: Calculate the clustering fitness function of each individual in the population to minimize the sum of the temporal and spatial distances from other customers in each cluster to the center of the cluster. The formula is as follows:

[0187]

[0188] Step 3114: Determine whether the maximum number of iterations has been reached. If not, return to step 3112. If the maximum number of iterations has been reached, output the solution of the individual with the smallest fitness value to obtain the customer cluster.

[0189] The flowchart of the two-stage domain search algorithm in the hybrid genetic algorithm in step 33 to generate the offspring solution is as follows: Figure 5 , specifically including the following steps:

[0190] Step 331: Select elite individuals, initialize the number of searches, and preset the maximum number of local searches;

[0191] Step 332: randomly selecting a method for generating a new route, wherein the method for generating a new route includes generating a new route by changing the service customers between different owned vehicles and generating a new route by changing the service customers of the owned vehicles and the crowdsourced vehicles;

[0192] Step 333: After determining the method for generating a new route, in the first stage, execute the Exchange operator and the Insert operator in sequence to generate a new route, and determine whether the fitness value of the generated new route is better than the fitness value of the elite individual's route. If a new route with a better fitness value is found, enter the second stage; otherwise, repeat step 333 until the maximum number of local searches is reached, and directly output the generated new route as the output of the elite individual's offspring;

[0193] Step 334: Enter the second stage, execute the 2-opt operator, Insert operator, Exchange operator and Swap operator in sequence inside each vehicle, once a route with a better fitness value than the original route is searched, immediately enter the next vehicle to continue to execute the four local search operators until all vehicles complete the local search, and output the generated new route as the offspring output of the elite individual;

[0194] Step 335: Determine whether the fitness value of the new route finally generated is better than the fitness value of the route of the original elite individual. If a new route with a better fitness value is found, the route is output as the offspring of the elite individual; otherwise, steps 332-334 are repeatedly executed until the maximum number of local searches is reached.

[0195] In summary, the hybrid genetic algorithm provided by the present invention can effectively solve the route planning problem of owned vehicles. First, the location relationship and time window relationship between customers are comprehensively considered, and the initial population is generated by spatiotemporal clustering; after obtaining the initial population, 50% of the offspring individuals are generated by using the crossover mutation operator, the purpose of which is to use the global search ability of the genetic algorithm to ensure the diversity of the population as much as possible and avoid falling into the local optimum; on the 50% of elite individuals, a two-stage neighborhood search is used to generate offspring individuals, the purpose of which is to use the neighborhood search to enhance the local search ability of the algorithm. The former ensures the breadth of the search, and the latter ensures the depth of the search. Finally, the maximized profit value is obtained on the basis of fully utilizing the transportation capacity of owned vehicles.

[0196] This example then describes in detail how to dispatch crowdsourced vehicles to serve customers.

[0197] Step 4: Construct a crowdsourcing task allocation model; the crowdsourcing task is the set of customers that need to be served by the crowdsourcing vehicle in the optimal solution obtained by the hybrid genetic algorithm;

[0198] The crowdsourcing task allocation model takes minimizing the compensation cost generated by the crowdsourcing vehicle service as the optimization goal, and the compensation cost is determined by the difference between the customer cost of the crowdsourcing vehicle service and the cost of the crowdsourcing vehicle returning directly from the starting point to the destination;

[0199] The preset scenarios of the crowdsourcing task allocation model include: the overall remaining capacity of the crowdsourcing vehicle is far greater than the total demand of the customers to be served; the crowdsourcing vehicle can provide services to multiple customers who need to be served in the process of returning to the destination, but the service time cannot exceed the latest return time to the destination; the customer incurs compensation costs for the crowdsourcing vehicle service; if the available capacity of the crowdsourcing vehicle is less than the demand of the customer to be served, the demand is split; the crowdsourcing vehicle goes directly to the warehouse with a full load and then returns to the destination;

[0200] The preset constraints of the crowdsourcing task allocation model include that the customer demand for crowdsourcing vehicles to serve customers does not exceed the available vehicle capacity, and the time when the crowdsourcing vehicles arrive at the customer must be within its time window.

[0201] Among them, the objective function of the crowdsourcing task allocation model is as follows:

[0202]

[0203] The constraints of the crowdsourcing task allocation model are as follows:

[0204]

[0205]

[0206]

[0207]

[0208]

[0209]

[0210]

[0211]

[0212]

[0213]

[0214]

[0215]

[0216]

[0217]

[0218] Among them, expression (21) is used to characterize the minimization of the compensation cost of crowdsourcing vehicle detour; formula (22) limits the number of available crowdsourcing vehicles; formula (23) indicates that crowdsourcing vehicles that do not serve customers do not need to visit warehouses, and warehouses cannot be directly connected; formula (24) indicates that crowdsourcing vehicles that serve customers must return to the destination after completing delivery; formula (25) is the capacity constraint, indicating that when crowdsourcing vehicles serve multiple customers, the available capacity must meet the order of service; formula (26) ensures that customers can only be served when they are visited by vehicles; formulas (27)-(29) are the time constraints of crowdsourcing vehicles, indicating that crowdsourcing vehicles start from the starting point, first serve customers, then go to the warehouse, and finally return to the destination; formula (30) is the time window constraint of crowdsourcing vehicle service, and crowdsourcing vehicles must provide services to customers within the customer's time window; formula (31) defines the logical relationship between variables, indicating that the number of crowdsourcing vehicles that provide logistics services to customers cannot exceed the number of crowdsourcing vehicles that can provide services to the customer; formula (32) indicates that each customer is served by at least one vehicle; formulas (33)-(35) represent the constraint range of variables. The symbols in the above crowdsourcing task allocation model are explained in Table 1.

[0219] Step 5: Solve the crowdsourcing task allocation model through the location update allocation algorithm to obtain the optimal solution that achieves the optimization goal and satisfies the constraints, and the optimal solution represents the customer set and service order served by each crowdsourcing vehicle;

[0220] like Figure 6 As shown in Figure 2, the steps of the location update allocation algorithm to solve the crowdsourcing task allocation model are as follows:

[0221] Step 51: Find the customer with the smallest demand from the current crowdsourcing task, and find a subset of crowdsourcing vehicles that meets the time window of the customer from the crowdsourcing vehicle set;

[0222] Step 52: Find the crowdsourced vehicle closest to the customer in the crowdsourced vehicle subset, and assign the customer to the crowdsourced vehicle;

[0223] Step 53: If the crowdsourcing vehicle has no available capacity, delete the crowdsourcing vehicle from the crowdsourcing vehicle set; otherwise, update the location of the crowdsourcing vehicle to the location of the customer being served, and update the available capacity and departure time of the crowdsourcing vehicle; if the customer being served still has unmet needs, update the customer's demand; otherwise, delete the customer from the crowdsourcing task;

[0224] Step 54: Determine whether the crowdsourcing task set is empty. If so, stop and output all allocation results; otherwise, go to step 51 and continue iterating until all crowdsourcing tasks are allocated, and output the optimal solution, which represents the customer set and service order served by each crowdsourcing vehicle.

[0225] Step 6: Dispatch owned vehicles and crowdsourced vehicles to serve customers according to the optimal solution of the owned vehicle route optimization model and the crowdsourced task allocation model. Specifically, the first customer location information can be fed back to the corresponding vehicle driver according to the owned vehicle route and the crowdsourced vehicle route. When the driver arrives at the customer's location, the next customer location information or destination is provided to the driver until all customers are served.

[0226] The position update allocation algorithm fully utilizes the remaining capacity of crowdsourcing vehicles by updating the positions of crowdsourcing vehicles, while solving the problem of multiple customers being served by the same crowdsourcing vehicle and sorting tasks.

[0227] Example 2

[0228] This example provides a crowdsourcing scheduling system based on a hybrid genetic algorithm and a location update allocation algorithm. Figure 7 As shown, the system includes a data module, an owned vehicle route optimization model construction module, an owned vehicle route optimization model solution module, a crowdsourcing task allocation model construction module, a crowdsourcing task allocation model solution module and a scheduling module;

[0229] The data module is used to receive input data, wherein the input data includes: a customer set, a self-owned vehicle set, a warehouse set, and a crowdsourced vehicle set;

[0230] The customer set includes location information of all serviceable customers, time windows of serviceable customers, and revenue values ​​of serviceable customers;

[0231] The owned vehicle set includes information on available capacity of owned vehicles, fixed costs of owned vehicles, unit variable costs of owned vehicles, and transportation speed of owned vehicles;

[0232] The warehouse set includes warehouse location information and a maximum tolerated route duration;

[0233] The crowdsourcing vehicle set includes the location information of the crowdsourcing vehicles, the earliest departure time, the latest time when the crowdsourcing vehicles return to their destinations, the available capacity of the crowdsourcing vehicles, and the speed of the crowdsourcing vehicles;

[0234] The owned vehicle route optimization model construction module is used to construct an owned vehicle route optimization model according to the input data and the owned vehicle route optimization model construction method provided in Example 1;

[0235] The owned vehicle route optimization model solving module is used to solve the owned vehicle route optimization model according to the hybrid genetic algorithm provided in Example 1 to obtain an optimal solution that achieves the optimization goal and satisfies the preset constraints; the optimal solution represents the set of customers served by each owned vehicle, the optimal route plan for each owned vehicle, and the set of customers that need to be served by the crowdsourcing vehicle;

[0236] A crowdsourcing task allocation model construction module, used to construct a crowdsourcing task allocation model according to input data and the crowdsourcing task allocation model construction method provided in Example 1;

[0237] A crowdsourcing task allocation model solving module, used to solve the crowdsourcing task allocation model according to the location update allocation algorithm provided in Example 1 to obtain an optimal solution that achieves the optimization goal and satisfies the constraint conditions, wherein the optimal solution represents the customer set and service order served by each crowdsourcing vehicle;

[0238] The scheduling module is used to schedule owned vehicles and crowdsourced vehicles according to the customer set served by each owned vehicle and the optimal route plan of each owned vehicle obtained by the route optimization model solving module, and the customer set served by each crowdsourced vehicle and the service order confirmed by the crowdsourced task allocation model solving module.

Claims

1. A crowdsourcing scheduling method based on a hybrid genetic algorithm and a location allocation algorithm, characterized in that: It includes the following steps: Step 1: Obtain a customer set, a self-owned vehicle set, a warehouse set, and a crowdsourced vehicle set; The customer set includes location information of all serviceable customers, time windows of serviceable customers, and revenue values ​​of serviceable customers; The owned vehicle set includes the available capacity of owned vehicles, the fixed cost of owned vehicles, the unit variable cost of owned vehicles and the transportation speed of owned vehicles; The warehouse set includes warehouse location information and a maximum tolerated route duration; The crowdsourcing vehicle set includes the location information of the crowdsourcing vehicles, the earliest departure time, the latest time when the crowdsourcing vehicles return to their destinations, the available capacity of the crowdsourcing vehicles, and the speed of the crowdsourcing vehicles; Step 2: Build a vehicle route optimization model; The optimization model of the route of the owned vehicle takes maximizing the profit obtained from serving customers as the optimization goal; the profit obtained from serving customers is determined by the difference between the revenue value of the serviceable customers and the total cost consisting of the fixed cost of the owned vehicle, the unit variable cost of the owned vehicle, the compensation cost of the customer being served by the crowdsourced vehicle, and the penalty cost of violating the time window constraint of the serviceable customer; The preset transportation scenarios of the owned vehicle route optimization model include: the number of owned vehicles is fixed; the overall transportation capacity of owned vehicles cannot meet the needs of all customers; vehicles depart from the warehouse to serve customers; once the customer demand served exceeds the available capacity of owned vehicles, the customer demand is split and the remaining demand is completed by crowdsourcing vehicles; owned vehicles do not need to visit all customers, but only need to visit the customer subset that maximizes the overall profit of owned vehicles when the owned vehicles are fully loaded; customers are compensated by crowdsourcing vehicles; and penalty costs are incurred by violating the time window constraints for serving customers. The constraints of the owned vehicle route optimization model include: each customer can only be served once by the owned vehicle; once the owned vehicle is fully loaded after departing from the warehouse, it returns to the warehouse; the time when the owned vehicle arrives at the customer must be within the customer's time window. If it arrives early, it will incur a penalty cost for waiting time; if it arrives late, it will incur a penalty cost for delay time; when the available vehicle capacity of the owned vehicle cannot meet all the needs of the customer, the needs of the customer are split, and the needs of the customer are met by the owned vehicle and the crowdsourcing vehicle together; Step 3: Solve the owned vehicle route optimization model by hybrid genetic algorithm to obtain the optimal solution that achieves the optimization goal and satisfies the preset constraints; the optimal solution represents the set of customers served by each owned vehicle, the optimal route plan for each owned vehicle, and the set of customers that need to be served by crowdsourcing vehicles; Step 4: Construct a crowdsourcing task allocation model; the crowdsourcing task is the set of customers that need to be served by the crowdsourcing vehicle in the optimal solution obtained by the hybrid genetic algorithm; The crowdsourcing task allocation model takes minimizing the compensation cost generated by the crowdsourcing vehicle service as the optimization goal, and the compensation cost is determined by the difference between the customer cost of the crowdsourcing vehicle service and the cost of the crowdsourcing vehicle directly returning from the starting point to the destination; The preset scenarios of the crowdsourcing task allocation model include: the available capacity of the crowdsourcing vehicle is much greater than the total demand of the customers to be served; the crowdsourcing vehicle can provide services to multiple customers who need to be served in the process of returning to the destination, but the service time cannot exceed the latest time when the crowdsourcing vehicle returns to its destination; the customer incurs compensation costs when served by the crowdsourcing vehicle; if the available capacity of the crowdsourcing vehicle is less than the demand of the customer to be served, the demand is split; the crowdsourcing vehicle goes directly to the warehouse with a full load and then returns to the destination; The preset constraints of the crowdsourcing task allocation model include: the customer demand of the crowdsourcing vehicle service must not exceed the available capacity of the crowdsourcing vehicle; the arrival time of the crowdsourcing vehicle at the customer must be within the time window for serving the customer; Step 5: Solve the crowdsourcing task allocation model through the location update allocation algorithm to obtain the optimal solution that achieves the optimization goal and satisfies the constraints; the optimal solution represents the customer set and service order served by each crowdsourcing vehicle; Step 6: Dispatch owned vehicles and crowdsourced vehicles to serve customers based on the optimal solution of the owned vehicle route optimization model and the crowdsourcing task allocation model.

2. The crowdsourcing scheduling method based on a hybrid genetic algorithm and a location allocation algorithm according to claim 1, characterized in that: In step 2, the objective function of the owned vehicle route optimization model is: The constraints of the owned vehicle route optimization model are: Among them, expression (1) is used to characterize the profit value obtained by maximizing the service of customers by own vehicles; formula (2) represents the total cost of visiting customers by own vehicles, including the fixed cost of own vehicles, the unit variable cost of own vehicles, the penalty cost of violating the time window and the compensation cost of making customers accept crowdsourcing after demand splitting; formula (3) represents the maximum number of own vehicles starting from the warehouse; formula (4) represents the conservation of traffic flow, and vehicles visiting node p must leave from node p; formula (5) indicates that warehouses cannot be directly accessed; formula (6) is the classic subpath elimination constraint; formula (7) ensures that customers can only be served if they are visited by vehicles; formula (8) represents the The total customer demand served by the owned vehicle cannot exceed the available capacity of the owned vehicle; Formula (9) indicates that when customer demand cannot be fully met by the owned vehicle, the remaining demand is met by the crowdsourcing vehicle; Formula (10) indicates the time constraint for vehicles to visit different nodes; Formula (11) indicates the waiting time caused by the vehicle arriving at the node in advance; Formula (12) indicates the delay time caused by the vehicle arriving at the node late; Formula (13) indicates that the owned vehicle only visits the customer once; Formulas (14)-(16) indicate the constraint range of the variables; C: customer set; R: customer set that must be served by the owned vehicle; E: arc set between nodes; U: starting point set of crowdsourcing vehicles; p i : The revenue value of the i-th customer; θ i : If the i-th customer accepts the discount rate of crowdsourcing service; d i : the demand of the i-th customer; e i : The earliest service time for the i-th customer; c1: Unit penalty cost of waiting time; F: Fixed cost of owned vehicles; Q: Capacity of owned vehicles; u k : The starting position of crowdsourcing vehicle k; x ijk : Binary variable, if the owned vehicle k goes from node i to node j, it is 1, otherwise it is 0; y ik : The service demand of owned vehicle k for customer i; a ik is the waiting time of owned vehicle k at customer i; r ijk : Binary variable, if crowdsourcing vehicle k goes from node i to node j, it is 1, otherwise it is 0; o ik : The service demand of crowdsourcing vehicle k for customer i; f ik : The time when crowdsourcing vehicle k arrives at customer i; D: warehouse set; K1: owned vehicle set; K2: crowdsourcing vehicle set; V: crowdsourcing vehicle destination set; c ij : The travel cost from node i to node j; t ij : travel time from node i to node j; st i : The service time of the i-th customer; l i : The latest service start time for the i-th customer; c2: Delay time unit penalty cost; ρ: Unit detour distance cost; Q k : Available capacity of crowdsourcing vehicles, k∈K2; v k : The destination location of crowdsourcing vehicle k; z i : Binary variable, 1 if the customer is served by a crowdsourced vehicle, 0 otherwise; ik : The time when the owned vehicle k arrives at customer i; b ik : The delay time of owned vehicle k at customer i; β ik : binary variable, 1 if crowdsourcing vehicle k can serve customer i, otherwise 0; δ ijk : The vehicle load of crowdsourcing vehicle k when it arrives at customer i; w jk : The time when crowdsourcing vehicle k arrives at warehouse j.

3. The crowdsourcing scheduling method based on a hybrid genetic algorithm and a position allocation algorithm according to claim 2 is characterized in that: The step 3 also includes the following steps: Step 31: Use spatiotemporal clustering to divide the customer set into clusters of corresponding number according to the number of owned vehicles, plan routes for owned vehicles in each cluster, and thus generate an initial population P(t) with N individuals; customers that cannot be served by owned vehicles are served by crowdsourced vehicles; Step 32: Initialize the current number of iterations t=0 and preset the maximum number of iterations T; Step 33: Generate parent solutions from the initial population P(t) according to the binary competition, and generate a child population Q of N / 2 size through sequential crossover operator and Swap mutation operator between the parent solutions; select the top 50% elite individuals from the initial population P(t) according to the fitness value, perform a two-stage field search on each elite individual, and generate a population O of N / 2; Step 34: Merge the initial population P(t), population Q and population O to generate a new population P(t+1); Step 35: According to the fitness value of each individual in the new population, use roulette to select individuals to enter the offspring population until the size of the offspring population is N; Step 36: Determine whether the preset maximum number of iterations has been reached. If yes, stop and output the solution with the smallest fitness value in the current population; otherwise, return to step 33 to continue iterating.

4. The crowdsourcing scheduling method based on a hybrid genetic algorithm and a location allocation algorithm according to claim 3 is characterized in that: The step 31 further includes the following steps: Step 311: Calculate the temporal and spatial distances between customers, and use a traditional genetic algorithm to divide the customers into k clusters, where k is the number of owned vehicles; Step 312: randomly select a customer cluster with no planned vehicle route, find the customer in the cluster that meets the warehouse-to-customer time window constraint and is closest to the warehouse, and use it as the new starting point of the vehicle; Step 313: Calculate the spatiotemporal distance from the new starting point to the remaining customers in the cluster, and select the next visiting customer from the remaining customers in a roulette wheel manner until the vehicle is fully loaded or all customers are visited; Step 314: After traversing all clusters, check whether each owned vehicle is fully loaded. For vehicles that are not fully loaded, select the next customer to be visited from the remaining unserved customer sets of all clusters according to the time and space distances in a roulette manner until all vehicles are fully loaded; customers that cannot be served by owned vehicles are served by crowdsourced vehicles; Step 315: Check whether the number of individuals generated reaches the maximum population number. If yes, output the initial population P(t); otherwise, return to step 312.

5. The crowdsourcing scheduling method based on a hybrid genetic algorithm and a location allocation algorithm according to claim 4 is characterized in that: The spatiotemporal distance between the customers is obtained by weighting the spatial distance and temporal distance between the customers, as shown in formula (17); In the formula, l ij represents the spatial distance between customer i and customer j, which is calculated from their two-dimensional spatial coordinates, as shown in formula (18); where (x i ,y i ) and (x j ,y j ) represent the geographic coordinates of customer i and customer j respectively; represents the time distance between customer i and customer j, which is calculated by the time windows of the two. Suppose the time windows of customer i and customer j are [ET i ,LT i ] and [ET j ,LT j ], and ET i <ET j , when the service time of customer i is st i , the spatial distance between customer i and customer j is l ij , the vehicle speed is v, then the time when the vehicle arrives from customer i to customer j must fall within the time window [ET i +st i +l ij / v,LT i +st i +l ij / v] interval, set to [a,b], there will be four cases, the calculation formula of time distance is shown in formula (19); Among them, λ1 is the waiting time penalty coefficient, λ2 is the delay time penalty coefficient, and λ3 is the deviation coefficient; the time distance is directional, so The final time distance between customer i and customer j is Finally, the spatial distance l ij and time distance After normalization and weighting, the final space-time distance can be obtained 6. The crowdsourcing scheduling method based on a hybrid genetic algorithm and a location allocation algorithm according to claim 5, characterized in that: The step 311 further includes the following steps: Step 3111: Determine the number of owned vehicles as the number of customer clusters k, and set the maximum number of iterations and the population size N; Step 3112: randomly select k customers as the initial cluster centers, calculate the time-space distances from the remaining customers to the k cluster centers, and divide the remaining customers into k clusters according to the time-space distances; repeatedly perform this operation until the number of new individuals generated reaches the population size N; Step 3113: Calculate the clustering fitness function of each individual in the population to minimize the sum of the temporal and spatial distances from other customers in each cluster to the center of the cluster. The formula is as follows: Step 3114: Determine whether the maximum number of iterations has been reached. If not, return to step 3112. If the maximum number of iterations has been reached, output the solution of the individual with the smallest fitness value to obtain the customer cluster.

7. The crowdsourcing scheduling method based on a hybrid genetic algorithm and a position allocation algorithm according to claim 6, characterized in that: The step 33 further comprises the following steps: Step 331: Select elite individuals, initialize the number of searches, and preset the maximum number of local searches; Step 332: randomly selecting a method for generating a new route, wherein the method for generating a new route includes generating a new route by changing the service customers between different owned vehicles and generating a new route by changing the service customers of the owned vehicles and the crowdsourced vehicles; Step 333: After determining the method for generating a new route, in the first stage, the Exchange operator and the Insert operator are executed in sequence to generate a new route, and it is determined whether the fitness value of the generated new route is better than the fitness value of the route of the elite individual; if a new route with a better fitness value is searched, the second stage is entered; otherwise, step 333 is repeated until the maximum number of local searches is reached, and the generated new route is directly output as the offspring output of the elite individual; Step 334: Enter the second stage, execute the 2-opt operator, Insert operator, Exchange operator and Swap operator in sequence inside each vehicle, once a route with a better fitness value than the original route is searched, immediately enter the next vehicle to continue to execute the four local search operators until all vehicles complete the local search, and output the generated new route as the offspring output of the elite individual; Step 335: Determine whether the fitness value of the new route finally generated is better than the fitness value of the route of the initial elite individual; if a new route with a better fitness value is searched, output the route as the offspring of the elite individual; otherwise, repeatedly execute steps 332-334 until the maximum number of local searches is reached.

8. The crowdsourcing scheduling method based on a hybrid genetic algorithm and a location allocation algorithm according to claim 7, characterized in that: The step 5 also includes the following steps: Step 51: Find the customer with the smallest demand from the current crowdsourcing task, and find a subset of crowdsourcing vehicles that meets the time window of the customer from the crowdsourcing vehicle set; Step 52: Find the crowdsourced vehicle closest to the customer in the crowdsourced vehicle subset, and assign the customer to the crowdsourced vehicle; Step 53: If the crowdsourcing vehicle has no available capacity, the crowdsourcing vehicle is deleted from the crowdsourcing vehicle set; otherwise, the location of the crowdsourcing vehicle is updated to the location of the served customer, and the available capacity and departure time of the crowdsourcing vehicle are updated at the same time; If the customer has unmet needs, update the customer's demand; otherwise, delete the customer from the crowdsourcing task. Step 54: Determine whether the crowdsourcing task set is empty. If so, stop and output the optimal solution, which represents the customer set and service order served by each crowdsourcing vehicle. Otherwise, return to step 51 to continue iteration.

9. A crowdsourcing scheduling system based on a hybrid genetic algorithm and a location allocation algorithm, characterized in that: It includes a data module, a self-owned vehicle route optimization model construction module, a self-owned vehicle route optimization model solution module, a crowdsourcing task allocation model construction module, a crowdsourcing task allocation model solution module and a scheduling module; The data module is used to receive input data, and the input data includes: Obtain customer sets, owned vehicle sets, warehouse sets, and crowdsourced vehicle sets; The customer set includes location information of all serviceable customers, time windows of serviceable customers, and revenue values ​​of serviceable customers; The owned vehicle set includes the available capacity of owned vehicles, the fixed cost of owned vehicles, the unit variable cost of owned vehicles and the transportation speed of owned vehicles; The warehouse set includes warehouse location information and a maximum tolerated route duration; The crowdsourcing vehicle set includes the location information of the crowdsourcing vehicles, the earliest departure time, the latest time when the crowdsourcing vehicles return to their destinations, the available capacity of the crowdsourcing vehicles, and the speed of the crowdsourcing vehicles; The owned vehicle route optimization model construction module is used to construct an owned vehicle route optimization model according to input data and the owned vehicle route optimization model construction method provided in any one of claims 1 to 8; The owned vehicle route optimization model solving module is used to solve the owned vehicle route optimization model according to the hybrid genetic algorithm provided in any one of claims 1 to 8 to obtain an optimal solution that achieves the optimization goal and satisfies the preset constraints; the optimal solution represents the set of customers served by each owned vehicle, the optimal route plan for each owned vehicle, and the set of customers that need to be served by the crowdsourcing vehicle; A crowdsourcing task allocation model construction module, used to construct a crowdsourcing task allocation model according to input data and the crowdsourcing task allocation model construction method provided in any one of claims 1 to 8; A crowdsourcing task allocation model solving module, used to solve the crowdsourcing task allocation model according to the location update allocation algorithm provided in any one of claims 1 to 8 to obtain an optimal solution that achieves the optimization goal and satisfies the constraints, wherein the optimal solution represents the customer set and service order served by each crowdsourcing vehicle; The scheduling module is used to schedule owned vehicles and crowdsourced vehicles according to the customer set served by each owned vehicle and the optimal route plan of each owned vehicle obtained by the route optimization model solving module, and the customer set served by each crowdsourced vehicle and the service order confirmed by the crowdsourced task allocation model solving module.

Citation Information

Patent Citations

  • Vehicle-mounted mobile crowdsourcing multi-target task distribution method

    CN108364125A

  • Crowdsourcing mode-based traditional industrial cluster cargo collection path optimization method

    CN112085271A