CN110826968A - Urban crowdsourcing distribution task optimal scheduling method based on path planning - Google Patents
Urban crowdsourcing distribution task optimal scheduling method based on path planning Download PDFInfo
- Publication number
- CN110826968A CN110826968A CN201911098883.3A CN201911098883A CN110826968A CN 110826968 A CN110826968 A CN 110826968A CN 201911098883 A CN201911098883 A CN 201911098883A CN 110826968 A CN110826968 A CN 110826968A
- Authority
- CN
- China
- Prior art keywords
- task
- rider
- sequence
- distribution
- crowdsourcing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
- G06Q10/08355—Routing methods
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Marketing (AREA)
- Development Economics (AREA)
- Tourism & Hospitality (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Game Theory and Decision Science (AREA)
- Educational Administration (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明提出了一种基于路径规划的城市众包配送任务优化调度方法,该方法包括:构建众包配送网络图;获取众包骑手和众包配送任务信息;构建基于路径规划的众包配送任务优化调度模型;基于贪心策略对初始众包任务调度方案进行求解;基于变邻域搜索对众包配送任务进行优化调度。本发明能够根据骑手、商家和客户的位置信息,每个任务的时间约束以及每个骑手的实时负载约束,制定优化的任务调度方案,包括每位骑手配送任务集合和最短配送路径序列,本发明能够合理地分配任务,减少总体配送路径的长度,降低众包配送成本。
The invention proposes an optimal scheduling method for urban crowdsourcing distribution tasks based on path planning. The method includes: constructing a crowdsourcing distribution network diagram; acquiring crowdsourcing riders and crowdsourcing distribution task information; constructing crowdsourcing distribution tasks based on path planning Optimize the scheduling model; solve the initial crowdsourcing task scheduling scheme based on greedy strategy; optimize the scheduling of crowdsourcing distribution tasks based on variable neighborhood search. The invention can formulate an optimized task scheduling scheme according to the position information of riders, merchants and customers, the time constraints of each task and the real-time load constraints of each rider, including the distribution task set and the shortest distribution path sequence for each rider. It can allocate tasks reasonably, reduce the length of the overall distribution path, and reduce the cost of crowdsourcing distribution.
Description
技术领域technical field
本发明属于物流资源调度领域,具体涉及一种基于路径规划的城市众包配送任务优化调度方法及支撑工具。The invention belongs to the field of logistics resource scheduling, and in particular relates to an optimal scheduling method and support tool for urban crowdsourcing distribution tasks based on route planning.
背景技术Background technique
随着基于互联网的电子商务和O2O行业的飞速发展,人们对物流配送的时效性要求越来越高,传统的物流配送是由物流公司的专职快递人员来完成,这种配送方式难以及时响应众多消费者的服务需求。针对当前物流配送资源不足的情况,出现了城市众包配送模式,城市众包配送把原来由物流公司专职快递人员所承担的配送任务转交给企业外的大众群体以自由自愿的形式来完成,这种配送模式可以有效地整合社会的闲置资源,缓解末端配送压力,对于解决“最后一公里”的配送问题起到了巨大的作用。目前,已经出现了许多城市众包配送服务提供商,例如Amazon、Uber、京东众包、点我达等。Amazon通过众包配送平台Amzon Flex,招募拥有私家车的兼职司机协助配送物流包裹,并按时薪付给他们相应的报酬。Uber联合当地快递企业和出租车运营公司,组建由出租车司机顺路实现快递的最后一公里的城市配送网络平台。With the rapid development of Internet-based e-commerce and O2O industry, people have higher and higher requirements for the timeliness of logistics and distribution. Traditional logistics and distribution are completed by full-time couriers of logistics companies. This distribution method is difficult to respond to many people in time. Consumer service needs. In view of the current shortage of logistics distribution resources, the urban crowdsourcing distribution mode has emerged. Urban crowdsourcing distribution transfers the distribution tasks originally undertaken by the full-time courier personnel of the logistics company to the public groups outside the enterprise to complete in a free and voluntary form. This distribution mode can effectively integrate idle resources in society, ease the pressure of terminal distribution, and play a huge role in solving the "last mile" distribution problem. At present, many urban crowdsourcing delivery service providers have emerged, such as Amazon, Uber, Jingdong crowdsourcing, DianwoDa, etc. Through the crowdsourcing delivery platform Amzon Flex, Amazon recruits part-time drivers with private cars to help deliver parcels and pays them accordingly. Uber, together with local express companies and taxi operators, has established an urban distribution network platform where taxi drivers can deliver the last mile of express delivery on the way.
城市众包配送服务主要涉及四类参与者:服务提供商、发货人、客户和自由快递人(也称为骑手)。服务提供商负责构建众包配送平台,该平台整合发货方、客户和骑手等各方资源,是城市众包配送服务的核心。发货方在平台上发布配送任务,平台对配送任务与可用骑手进行匹配,并将配送任务分配给最合适的骑手来执行,骑手接收配送任务后先到发货方地点取货,然后将货物送到指定的客户地点,客户接收货物后可以通过平台对骑手的服务进行质量评价。众包配送平台的主要功能包括参与者注册、资质认证、任务分分配、任务监控、质量评价等。Urban crowdsourcing delivery services mainly involve four categories of participants: service providers, shippers, customers, and freelance couriers (also known as riders). Service providers are responsible for building a crowdsourcing delivery platform that integrates resources from shippers, customers, and riders, and is the core of urban crowdsourcing delivery services. The shipper publishes the delivery task on the platform, the platform matches the delivery task with the available riders, and assigns the delivery task to the most suitable rider for execution. After the rider receives the delivery task, the rider first picks up the goods at the shipper’s location, and then puts the goods. Delivered to the designated customer location, after receiving the goods, the customer can evaluate the quality of the rider's service through the platform. The main functions of the crowdsourcing distribution platform include participant registration, qualification certification, task allocation, task monitoring, and quality evaluation.
众包配送任务分配分为两种模式:抢单模式和派单模式,抢单模式是骑手根据自己的偏好主动地去选择配送任务,派单模式则是由平台根据一定的策略将配送任务分配该指定的骑手来执行。There are two modes of crowdsourcing delivery task assignment: order grabbing mode and order dispatching mode. Order grabbing mode is that riders actively choose distribution tasks according to their own preferences, and order dispatching mode is that the platform allocates distribution tasks according to certain strategies. The designated rider to perform.
目前对于派单模式下的城市众包配送任务优化调度的研究有很多,这些研究要么是优化任务分配来提高任务分配率从而优化了任务的派发,要么是优化任务和骑手之间匹配关系,哪些任务更适合哪些骑手,或者优化骑手的选择方案,然而一些研究只针对任务的起点进行任务分配,忽略了任务终点,任务商家服务时间和任务客户服务时间等等一些其他影响任务分配和骑手配送因素。对于城市中待配送的众包任务,如何利用众包模式进行更优的任务调度,来使得总体成本最小或者总体配送路径最短,是当前需要解决的问题。At present, there are many studies on the optimal scheduling of urban crowdsourcing distribution tasks under the dispatch mode. These studies either optimize task allocation to improve the task allocation rate and thus optimize task distribution, or optimize the matching relationship between tasks and riders. Which riders are more suitable for the task, or optimize the rider's selection scheme, however, some researches only assign tasks at the starting point of the task, ignoring the task end, task merchant service time and task customer service time, etc. Some other factors that affect task allocation and rider delivery . For the crowdsourcing tasks to be distributed in the city, how to use the crowdsourcing mode to perform better task scheduling to minimize the overall cost or the shortest overall distribution path is a problem that needs to be solved at present.
发明内容SUMMARY OF THE INVENTION
本发明通过优化在派单模式下城市众包配送任务的调度来使得总体配送路径最短。本发明提供一种基于路径规划的城市众包配送任务优化调度方法,包括如下步骤:The present invention makes the overall distribution path the shortest by optimizing the scheduling of urban crowdsourcing distribution tasks in the order dispatch mode. The present invention provides an optimal scheduling method for urban crowdsourcing distribution tasks based on path planning, comprising the following steps:
步骤1:构建众包配送网络图;Step 1: Build a crowdsourcing distribution network diagram;
步骤2:获取众包骑手和众包配送任务信息;Step 2: Obtain crowdsourcing rider and crowdsourcing delivery task information;
步骤3:构建基于路径规划的众包配送任务优化调度模型;Step 3: Build a crowdsourcing distribution task optimization scheduling model based on path planning;
步骤4:基于贪心策略对初始众包任务调度方案进行求解;Step 4: Solve the initial crowdsourcing task scheduling scheme based on the greedy strategy;
步骤5:基于变邻域搜索对众包配送任务进行优化调度。Step 5: Optimizing the scheduling of crowdsourcing distribution tasks based on variable neighborhood search.
进一步的技术方案中,所述步骤1,构建众包配送网络图具体如下:In a further technical solution, in the
众包配送网络图可表示为图G=(V,E),其中,V=VS∪VC为节点集合,每个节点表示一个商家或客户,VS={1,2,…,ns}为商家的集合,VC={ns+1,ns+2,…,nc}为客户的集合,ns和nc分别为商家和客户的数量;E={(i,j)|i,j∈V}为边的集合,对于每条边(i,j)∈E,dij表示节点i与节点j之间的距离,dij=dji,dii=0。The crowdsourcing distribution network graph can be represented as a graph G=(V,E), where V=V S ∪VC C is a set of nodes, each node represents a merchant or customer, V S ={1,2,...,n s } is the set of merchants, V C ={n s +1,n s +2,...,n c } is the set of customers, ns and n c are the number of merchants and customers respectively; E={(i, j)|i,j∈V} is a set of edges, for each edge (i,j)∈E, d ij represents the distance between node i and node j, d ij =d ji , di ii =0.
进一步的技术方案中,所述步骤2,获取众包骑手和众包配送任务信息具体如下:In a further technical solution, in the step 2, the details of obtaining crowdsourcing riders and crowdsourcing delivery task information are as follows:
众包骑手表示为集合K={1,2,…,nk},nk为众包骑手的数量,对于每个骑手k∈K,Qk表示骑手k的最大载重量,vk表示骑手k的平均行驶速度,d′ki表示骑手k从所在位置到节点i∈V的距离;The crowdsourced riders are denoted as the set K={1,2,…, nk }, where nk is the number of crowdsourced riders, for each rider k∈K, Qk denotes the maximum load capacity of rider k, vk denotes the rider k The average travel speed of k, d′ ki represents the distance of rider k from the location to node i∈V;
众包配送任务表示为集合T={1,2,…,nt},nt为配送任务的数量,每个配送任务t∈T表示为一个六元组:(st,ct,bt,ft,et,wt),其中,st∈VS表示任务t的取货商家,ct∈VC表示任务t的送货客户,bt表示任务t的最早开始时间,即从商家st的最早开始取货时间,ft表示任务t的最晚开始时间,即从商家st的最晚开始取货时间,et表示任务t的最晚结束时间,即货物送到客户ct的最晚结束时间,wt表示任务t的货物重量,每个配送任务的货物重量都不超过任意骑手的最大载重,即wt≤min{Qk|k∈K};The crowdsourcing delivery task is represented as a set T={1,2,…,n t }, where nt is the number of delivery tasks, and each delivery task t∈T is represented as a hexagram: (s t ,c t ,b t , f t , e t , w t ), where s t ∈ V S represents the pickup merchant of task t, c t ∈ V C represents the delivery customer of task t, b t represents the earliest start time of task t, That is, the earliest pickup time from the merchant s t , ft represents the latest start time of the task t , that is, the latest pickup time from the merchant s t , and e t represents the latest end time of the task t, that is, the delivery of the goods. To the latest end time of customer c t , w t represents the cargo weight of task t, and the cargo weight of each delivery task does not exceed the maximum load of any rider, that is, wt t ≤min{Q k |k∈K};
对于每个节点i∈V,令si表示在节点i每个任务的平均服务时间,如果i∈VS,si表示骑手在商家i的平均取货时间,如果i∈VC,si表示骑手在客户i的平均送货时间,任务的平均服务时间根据历史数据采用数理统计的方法进行计算。For each node i ∈ V, let s i denote the average service time of each task at node i, if i ∈ V S , s i denote the average pickup time of riders at merchant i, and if i ∈ V C , s i Represents the average delivery time of the rider at customer i, and the average service time of the task is calculated by mathematical statistics based on historical data.
进一步的技术方案中,所述步骤3,构建基于路径规划的众包配送任务优化调度模型具体如下:In a further technical solution, in the step 3, building a crowdsourcing distribution task optimization scheduling model based on path planning is as follows:
建立任务配送方案:一个任务分配方案表示为一个从众包配送任务集合T到众包骑手集合K的映射函数a:T→K∪{0},对于任务t∈T,如果a(t)=k∈K,表示将任务t分配给骑手k来配送,如果a(t)=0,表示任务t没有被分配;令Ta(k)={t∈T|a(t)=k,k∈K}表示分配给骑手k的任务集合,如果表示没有给骑手k分配配送任务;令Ta表示所有被分配的任务集合,则Ta=∪k∈KTa(k);从集合T到集合K存在许多分配方案,令Ω(T,K)表示从T到K的所有任务分配方案的集合;Establish a task distribution scheme: A task distribution scheme is expressed as a mapping function a:T→K∪{0} from the crowdsourced delivery task set T to the crowdsourced rider set K, for a task t∈T, if a(t)=k ∈K means that the task t is assigned to the rider k for delivery, if a(t)=0, it means that the task t is not assigned; let T a (k)={t∈T|a(t)=k,k∈ K} denotes the set of tasks assigned to rider k, if Indicates that no delivery task is assigned to rider k; let T a denote the set of all assigned tasks, then T a = ∪ k∈K T a (k); there are many assignment schemes from set T to set K, let Ω(T, K) represents the set of all task assignment schemes from T to K;
定义任务序列和配送路径:a表示为一个任务分配方案,a∈Ω(T,K),分配给骑手k的任务集合表示为Ta(k)的一个任务序列为多重集的一个全排列,表示为:pak=pak(1),pak(2),…,pak(2|Ta(k)|),其中,pak(j)为任务序列pak中第j(j=1,2,…,2|Ta(k)|)个位置所对应的任务;Define the task sequence and delivery path: a is represented as a task assignment scheme, a ∈ Ω(T, K), and the task set assigned to rider k is represented as A task sequence of T a (k) is a multiset A full permutation of , expressed as: p ak =p ak (1),p ak (2),...,p ak (2|T a (k)|), where p ak (j) is the task sequence p ak The task corresponding to the jth (j=1,2,...,2|T a (k)|) position;
a∈Ω(T,K)表示为一个任务分配方案,Ta(k)表示为分配给骑手k的任务集合,pak∈Pa(k)表示为一个任务序列,则pak的配送路径为一条从骑手k的所在位置出发依次经过pak中的每个任务所对的商家或客户节点的序列,表示为vak=vak(0),vak(1),…,vak(2|Ta(k)|),其中,vak(0)=k,表示骑手k所在的位置,vak(j)表示Pa(k)中的第j(j=1,2,…,2|Ta(k)|)个任务所对应的节点,由于任务序列中的每个任务出现两次--取货和送货,我们规定排在前面的任务所对应的节点为商家节点,排在后面的任务所对应的节点为客户节点;a∈Ω(T,K) is a task assignment scheme, T a (k) is a set of tasks assigned to rider k, p ak ∈ P a (k) is a task sequence, then the distribution path of p ak is a sequence starting from the position of rider k and passing through the merchant or customer node corresponding to each task in p ak in turn, expressed as v ak = v ak (0), v ak (1),..., v ak ( 2|T a (k)|), where v ak (0)=k, represents the position of rider k, and v ak (j) represents the jth (
配送距离函数表示为其中,pak∈Pa(k)为一个任务序列,vak为所对应的配送路径,表示从骑手k(k=vak(0))到第一个节点vak(1)的距离,表示vak中相邻两个节点之间的距离之和,如果两个相邻节点为同一个节点,则其距离为0;The delivery distance function is expressed as Among them, p ak ∈ P a (k) is a task sequence, v ak is the corresponding delivery path, represents the distance from rider k (k=v ak (0)) to the first node v ak (1), Represents the sum of the distances between two adjacent nodes in v ak , if the two adjacent nodes are the same node, the distance is 0;
设置时间约束和负载约束:时间约束函数表示为H(pak,t)∈{true,false},其中,t∈Ta(k)表示为一个任务,pak∈Pa(k)表示为一个任务序列,如果任务t按照pak中所对应的配送路径vak配送货物满足商家的最晚取货时间和客户的最晚送货时间约束,则H(pak,t)=true,否则,H(pak,t)=false;Set time constraints and load constraints: The time constraint function is expressed as H(p ak ,t)∈{true,false}, where t∈T a (k) is a task, and p ak ∈ P a (k) is expressed as A task sequence, if task t delivers goods according to the delivery path v ak corresponding to p ak and satisfies the constraints of the merchant’s latest pick-up time and the customer’s latest delivery time, then H(p ak ,t)=true, otherwise , H(p ak ,t)=false;
负载约束函数表示为Q(pak)∈{true,false},其中,pak∈Pa(k)为一个任务序列,如果骑手k按照任务序列pak所对应的配送路径vak配送货物能够满足其最大载重约束,则Q(pak)=true,否则Q(pak)=false;The load constraint function is expressed as Q(p ak )∈{true,false}, where p ak ∈ P a (k) is a task sequence, if rider k can deliver goods according to the delivery path v ak corresponding to the task sequence p ak . Satisfy its maximum load constraint, then Q(p ak )=true, otherwise Q(p ak )=false;
定义基于路径规划的众包配送任务优化调度模型为:The optimal scheduling model for crowdsourcing distribution tasks based on path planning is defined as:
max∑k∈K|Ta(k)| (1)max∑ k∈K |T a (k)| (1)
min∑k∈K d(pak) (2)min∑ k∈K d(p ak ) (2)
s.t.s.t.
Q(pak)=true pak∈Pa(k) (3)Q(p ak )=true p ak ∈P a (k) (3)
H(pak)=true pak∈Pa(k) (4)H(p ak )=true p ak ∈P a (k) (4)
pak∈Pa(k)a∈Ω(T,K),k∈K (5)p ak ∈P a (k)a∈Ω(T,K),k∈K (5)
a∈Ω(T,K )(6)。a∈Ω(T,K )(6).
进一步的技术方案中,所述步骤4,基于贪心策略对初始众包任务调度方案进行求解具体如下:In a further technical solution, in the
定义T0 a(k)为当前已分配给骑手k的任务集,p0 ak为骑手k当前满足约束的任务序列,i∈T-∪k∈KT0 a(k)为一个未分配的任务,如果将i插入到p0 ak的两个适当位置后所得到新的任务序列仍满足负载约束和时间约束,则称i为p0 ak的一个可扩展任务,T1 a(k)=T0 a(k)∪{i}为插入任务i后骑手k的任务集;Define T 0 a (k) as the task set currently assigned to rider k, p 0 ak as the task sequence that rider k currently satisfies the constraints, i∈T-∪ k∈K T 0 a (k) is an unassigned task sequence If the new task sequence obtained by inserting i into two appropriate positions of p 0 ak still satisfies the load and time constraints, then i is called an extensible task of p 0 ak , T 1 a (k)= T 0 a (k)∪{i} is the task set of rider k after inserting task i;
将任务i插入到任务序列p0 ak有两种方式:相邻和相隔;相邻插入是指将任务i插入到p0 ak后,任务i在新任务序列中两个位置是相邻的;相隔插入是指任务i插入到p0 ak后,任务i在新任务序列中两个位置是不相邻的;There are two ways to insert task i into task sequence p 0 ak : adjacent and separated; adjacent insertion means that after task i is inserted into p 0 ak , the two positions of task i in the new task sequence are adjacent; Spaced insertion means that after task i is inserted into p 0 ak , the two positions of task i in the new task sequence are not adjacent;
具体步骤如下:Specific steps are as follows:
Step 1:根据骑手ki的位置,得到骑手ki与所有未配送任务商家点的距离集合S,得到所有未配送任务完成的最短路径长度集合D,两个集合对应下标值相加,按相加和从小到大排序,并保存至任务分配序列T0 a(ki);Step 1: According to the position of the rider k i , obtain the distance set S between the rider k i and all the merchants with undelivered tasks, and obtain the shortest path length set D of all undelivered tasks. Add the corresponding subscript values of the two sets, and press Add and sort from small to large, and save it to the task assignment sequence T 0 a ( ki );
Step 2:在T0 a(ki)选取第一个任务t1,将该任务添加到骑手ki的任务配送序列pa(ki),作为骑手ki的第一个配送任务,同时该任务状态置为已配送状态;Step 2: Select the first task t 1 at T 0 a ( ki ), add this task to the task delivery sequence p a ( ki ) of rider ki , as the first delivery task of rider ki , and at the same time The task status is set to delivered status;
Step 3:添加第二个任务,将T0 a(ki)中每个任务t2,t3,…,tj,利用相邻和相隔插入策略都添加至pa(ki)中一遍,若其中某种插入策略得到的pa(ki)满足t1和tj的时间约束,骑手ki的容量约束,则保存任务tj按照该种插入策略添加至骑手的任务配送序列pa(ki)的位置和路径长度至序列R中,待所有任务都插入一遍后,将序列R升序排列,路径长度最小的任务tj作为第二个配送任务,按照插入位置添加至pa(ki)中,同时将新的任务配送序列pa(ki)作为添加下一个任务的任务配送序列,tj状态变为已配送;若所有插入策略得到的pa(ki)都不满足约束,则pa(ki)为最终骑手ki的任务配送序列;Step 3: Add a second task, add each task t 2 , t 3 ,..., t j in T 0 a ( ki ) to p a ( ki ) using adjacent and spaced insertion strategies , if p a ( ki ) obtained by one of the insertion strategies satisfies the time constraints of t 1 and t j , and the capacity constraints of rider ki , then save task t j is added to the rider’s task distribution sequence p according to the insertion strategy The position of a (k i ) and the path length are added to the sequence R. After all tasks are inserted once, the sequence R is arranged in ascending order. The task t j with the smallest path length is used as the second delivery task, and is added to p a according to the insertion position. In (k i ), at the same time, the new task distribution sequence p a ( k i ) is used as the task distribution sequence for adding the next task, and the state of t j becomes distributed; If the constraint is not satisfied, then p a ( ki ) is the task distribution sequence of the final rider ki ;
Step 4:当序列R为空时,根据pa(ki)和任务关系图获取骑手ki的Vaki,同时得到骑手ki配送pa(ki)的路径长度d(paki);令i=i+1,返回Step 2;Step 4: When the sequence R is empty, obtain the V aki of the rider ki according to the p a ( ki ) and the task relationship diagram, and obtain the path length d (p aki ) of the rider ki to deliver the p a ( ki ) at the same time; Let i=i+1, return to Step 2;
Step 5:当i=L+1或者所有任务的状态均是已配送时,算法结束,得到初始解集。Step 5: When i=L+1 or the status of all tasks is delivered, the algorithm ends and the initial solution set is obtained.
进一步的技术方案中,所述步骤5,基于变邻域搜索对众包配送任务进行优化调度包括四个邻域结构,分别为:In a further technical solution, in the
(1)随机两个骑手,随机两个其任务序列中的任务,进行交换;(1) Two random riders and two random tasks in their task sequence are exchanged;
(2)随机交换一个骑手的任务序列中两个任务的商家点;(2) Randomly exchange merchant points of two tasks in a rider's task sequence;
(3)随机交换一个骑手的任务序列中两个任务的客户点;(3) Randomly swap the client points of two tasks in a rider's task sequence;
(4)随机两个骑手,随机一个骑手的任务序列中的任务,加在另一个骑手的任务序列中;(4) Two random riders, the tasks in the task sequence of one rider are randomly added to the task sequence of the other rider;
具体步骤如下:Specific steps are as follows:
Step 1:获取骑手k的初始解pak,设最优解为pak_best;Step 1: Obtain the initial solution p ak of rider k, and set the optimal solution to be p ak_best ;
Step 2:定义邻域结构集合Ni,i=1,2…,imax作为扰动操作,其中Ni包括交换骑手任务操作、交换任务序列商家点操作、交换任务序列客户点操作和迁移骑手任务操作;Step 2: Define the neighborhood structure set N i , i=1,2...,i max as the perturbation operation, where N i includes the task of exchanging riders, exchanging task sequence business point operations, exchanging task sequence customer point operations and transferring rider tasks operate;
Step 3:定义邻域结构集合Nj,j=1,2…,jnax作为邻域搜索,其中Nj包括交换骑手任务操作、交换任务序列商家点操作、交换任务序列客户点操作和迁移骑手任务操作;Step 3: Define the neighborhood structure set N j , j=1,2...,j nax as the neighborhood search, where N j includes the exchange rider task operation, the exchange task sequence merchant point operation, the exchange task sequence customer point operation and the transfer rider task operation;
Step 4:令i=1,j=1;Step 4: Let i=1, j=1;
Step 5:使用Ni对pak进行扰动,生成解p’ak;Step 5: Use Ni to perturb p ak to generate a solution p'ak;
Step 6:使用Nj对p’ak进行搜索,生成解p”ak;Step 6: Use N j to search for p' ak to generate the solution p"ak;
Step 7:若d(p’ak)<d(p”ak),则p’ak=p”ak,j=1;否则,j=j+1;Step 7: If d(p' ak )<d(p" ak ), then p' ak =p" ak , j=1; otherwise, j=j+1;
Step 8:若j<jnax,则跳转至Step 6;否则,执行Step 9;Step 8: If j<j nax , jump to Step 6; otherwise, execute Step 9;
Step 9:若d(p”ak)<d(pak),则pak=p”ak,i=1;否则,i=i+1;Step 9: If d(p” ak )<d(p ak ), then p ak =p” ak , i=1; otherwise, i=i+1;
Step 10:若i<imax,则跳转至Step 5;否则,pak_best=p”ak,执行Step 11;Step 10: If i<i max , then jump to
Step 11:输入最优解pak_best,算法结束。Step 11: Input the optimal solution p ak_best , and the algorithm ends.
本发明还提供一种实现基于路径规划的城市众包配送任务优化调度方法的支撑工具。The invention also provides a support tool for realizing the optimal scheduling method for urban crowdsourcing distribution tasks based on path planning.
支撑工具的功能模块主要分为Web端和App端。分为二个模块:基础信息管理和众包任务调度管理。The functional modules of the support tool are mainly divided into the Web side and the App side. It is divided into two modules: basic information management and crowdsourcing task scheduling management.
(1)基础信息管理的功能包括:用户信息管理、订单管理和骑手信息管理等等。(1) The functions of basic information management include: user information management, order management and rider information management, etc.
(2)众包任务调度管理是对任务订单进行分配,功能包括:任务调度算法管理、任务路径规划、任务实时分配和分配结果管理等。客户可以在Web端或App端上进行下单,支撑工具通过调度算法将任务分配给骑手。在骑手成功登录App端后,接受分配好的任务,按照算法规划好的路径进行配送。(2) Crowdsourcing task scheduling management is to allocate task orders. The functions include: task scheduling algorithm management, task path planning, real-time task assignment and assignment result management, etc. Customers can place orders on the Web or App, and the support tool assigns tasks to riders through scheduling algorithms. After the rider successfully logs in to the App, he accepts the assigned task and delivers it according to the path planned by the algorithm.
从以上技术方案可以看出,本发明具有以下优点:As can be seen from the above technical solutions, the present invention has the following advantages:
众包配送网络图能够形式化的将实际位置点映射为坐标系中的位置点,分析众包骑手和众包配送任务的主要信息来保证信息的有效性,形象的描绘了任务与骑手之间的映射关系;并且对任务序列,配送路径和配送路径长度建模,确定任务序列与任务集合的关系,分析任务序列与配送路径的关系,设置时间约束和负载约束,用来约束每个任务序列;同时定义基于路径规划的众包配送任务优化调度模型,确定优化目标及约束条件,基于贪心策略对初始众包任务调度方案进行求解和基于变邻域搜索对众包配送任务进行优化调度,能够合理的分配任务,减少总体配送路径的长度,降低配送成本。The crowdsourcing distribution network diagram can formally map the actual location points to the location points in the coordinate system, analyze the main information of the crowdsourcing riders and the crowdsourcing distribution tasks to ensure the validity of the information, and vividly depict the relationship between the tasks and the riders. and modeling the task sequence, distribution path and distribution path length, determine the relationship between task sequence and task set, analyze the relationship between task sequence and distribution path, set time constraints and load constraints to constrain each task sequence At the same time, define the optimal scheduling model of crowdsourcing distribution tasks based on path planning, determine the optimization objectives and constraints, solve the initial crowdsourcing task scheduling scheme based on the greedy strategy, and optimize the scheduling of crowdsourcing distribution tasks based on variable neighborhood search. Reasonably assign tasks, reduce the length of the overall distribution path, and reduce distribution costs.
附图说明Description of drawings
为了更清楚地说明本发明的技术方案,下面将对描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the present invention more clearly, the accompanying drawings required in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention, which are not relevant to ordinary skills in the art. As far as personnel are concerned, other drawings can also be obtained from these drawings on the premise of no creative work.
图1为基于路径规划的城市众包配送任务优化调度方法流程图;Fig. 1 is the flow chart of the optimal scheduling method for urban crowdsourcing distribution tasks based on route planning;
图2为本发明的众包配送网络示意图;2 is a schematic diagram of a crowdsourcing distribution network of the present invention;
图3为本发明的获取众包骑手和众包配送任务示意图;Fig. 3 is the schematic diagram of obtaining crowdsourcing riders and crowdsourcing distribution tasks of the present invention;
图4为本发明的基于贪心策略的初始众包任务调度方案求解算法流程图。FIG. 4 is a flowchart of an algorithm for solving an initial crowdsourcing task scheduling scheme based on a greedy strategy of the present invention.
图5为本发明的基于变邻域搜索的众包配送任务优化调度算法流程图。FIG. 5 is a flow chart of the optimal scheduling algorithm for crowdsourcing distribution tasks based on variable neighborhood search according to the present invention.
具体实施方式Detailed ways
本发明提供一种基于路径规划的城市众包配送任务优化调度方法,如图1至图5所示,方法包括:The present invention provides an optimal scheduling method for urban crowdsourcing distribution tasks based on path planning, as shown in Figures 1 to 5, the method includes:
步骤1:构建众包配送网络图;Step 1: Build a crowdsourcing distribution network diagram;
步骤2:获取众包骑手和众包配送任务信息;Step 2: Obtain crowdsourcing rider and crowdsourcing delivery task information;
步骤3:构建基于路径规划的众包配送任务优化调度模型;Step 3: Build a crowdsourcing distribution task optimization scheduling model based on path planning;
步骤4:基于贪心策略对初始众包任务调度方案进行求解;Step 4: Solve the initial crowdsourcing task scheduling scheme based on the greedy strategy;
步骤5:基于变邻域搜索对众包配送任务进行优化调度。Step 5: Optimizing the scheduling of crowdsourcing distribution tasks based on variable neighborhood search.
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将运用具体的实施例及附图,对本发明保护的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本发明一部分实施例,而非全部的实施例。基于本专利中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本专利保护的范围。In order to make the purpose, features and advantages of the present invention more obvious and understandable, the following will use specific embodiments and accompanying drawings to clearly and completely describe the technical solutions protected by the present invention. Obviously, the implementation described below Examples are only some embodiments of the present invention, but not all embodiments. Based on the embodiments in this patent, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this patent.
步骤1:众包配送网络图可表示为图G=(V,E),其中,V=VS∪VC为节点集合,每个节点表示一个商家或客户,VS={1,2,…,ns}为商家的集合,VC={ns+1,ns+2,…,nc}为客户的集合,ns和nc分别为商家和客户的数量;E={(i,j)|i,j∈V}为边的集合,对于每条边(i,j)∈E,dij表示节点i与节点j之间的距离,dij=dji,dii=0。Step 1: The crowdsourcing distribution network graph can be expressed as graph G=(V, E), where V=VS ∪VC C is a set of nodes, each node represents a merchant or customer, and V S = {1, 2, ...,n s } is the set of merchants, V C ={ ns +1,n s +2 ,...,n c } is the set of customers, ns and n c are the number of merchants and customers respectively; E = { (i,j)|i,j∈V} is a set of edges, for each edge (i,j)∈E, d ij represents the distance between node i and node j, d ij =d ji ,d ii =0.
本发明将实际位置点包括商家点、客户点等等映射为图的节点,并对每个节点的位置用二维坐标(x,y)表示,节点与节点之间都有边,并且节点与节点之间的距离利用节点的坐标来计算。The present invention maps the actual location points, including merchant points, customer points, etc., into nodes of the graph, and expresses the position of each node with two-dimensional coordinates (x, y). There are edges between nodes, and nodes are connected to The distance between nodes is calculated using the coordinates of the nodes.
图2描绘了将商家实际位置和客户的实际位置映射为图的节点,共有10个位置点,其中包括3个商家和7个客户,即,VS={1,2,3},VC={4,5,…,10},例如节点1代表着商家1。得到了一个众包配送网络图。Figure 2 depicts the nodes that map the actual locations of merchants and customers into a graph, there are 10 location points in total, including 3 merchants and 7 customers, i.e., V S ={1,2,3}, V C ={4,5,...,10}, eg
步骤2:众包骑手表示为集合K={1,2,…,nk},nk为众包骑手的数量,对于每个骑手k∈K,Qk表示骑手k的最大载重量,vk表示骑手k的平均行驶速度,d′ki表示骑手k从所在位置到节点i∈V的距离;Step 2: The crowdsourced riders are denoted as the set K = {1,2,..., nk }, where nk is the number of crowdsourced riders, for each rider k∈K, Qk denotes the maximum load capacity of rider k , v k represents the average driving speed of rider k, and d′ ki represents the distance from the location of rider k to node i∈V;
众包配送任务表示为集合T={1,2,…,nt},nt为配送任务的数量,每个配送任务t∈T表示为一个六元组:(st,ct,bt,ft,et,wt),其中,st∈VS表示任务t的取货商家,ct∈VC表示任务t的送货客户,bt表示任务t的最早开始时间,即从商家st的最早开始取货时间,ft表示任务t的最晚开始时间,即从商家st的最晚开始取货时间,et表示任务t的最晚结束时间,即货物送到客户ct的最晚结束时间,wt表示任务t的货物重量,每个配送任务的货物重量都不超过任意骑手的最大载重,即wt≤min{Qk|k∈K};The crowdsourcing delivery task is represented as a set T={1,2,…,n t }, where nt is the number of delivery tasks, and each delivery task t∈T is represented as a hexagram: (s t ,c t ,b t , f t , e t , w t ), where s t ∈ V S represents the pickup merchant of task t, c t ∈ V C represents the delivery customer of task t, b t represents the earliest start time of task t, That is, the earliest pickup time from the merchant s t , ft represents the latest start time of the task t , that is, the latest pickup time from the merchant s t , and e t represents the latest end time of the task t, that is, the delivery of the goods. To the latest end time of customer c t , w t represents the cargo weight of task t, and the cargo weight of each delivery task does not exceed the maximum load of any rider, that is, wt t ≤min{Q k |k∈K};
对于每个节点i∈V,令si表示在节点i每个任务的平均服务时间,如果i∈VS,si表示骑手在商家i的平均取货时间,如果i∈VC,si表示骑手在客户i的平均送货时间,任务的平均服务时间根据历史数据采用数理统计的方法进行计算。For each node i ∈ V, let s i denote the average service time of each task at node i, if i ∈ V S , s i denote the average pickup time of riders at merchant i, and if i ∈ V C , s i Represents the average delivery time of the rider at customer i, and the average service time of the task is calculated by mathematical statistics based on historical data.
本发明将众包骑手和众包任务配置到众包配送网络图中,通过互联网技术和物联网技术获取每个骑手的位置、每个骑手的基本信息和每个任务的基本信息。对骑手和任务进行编号,骑手信息和任务信息存储至数据库中。按照任务信息将确定该任务的商家节点和客户节点。The invention configures crowdsourcing riders and crowdsourcing tasks into a crowdsourcing distribution network diagram, and obtains the position of each rider, basic information of each rider and basic information of each task through Internet technology and Internet of Things technology. The riders and tasks are numbered, and the rider information and task information are stored in the database. According to the task information, the merchant node and customer node of the task will be determined.
图3描述了一个众包骑手和众包任务配置之后的众包配送网络图,共有3个骑手,即,K={1,2,3},骑手的主要信息包括骑手编号,骑手最大载重量和骑手的平均速度如表1所示。共有7个配送任务,即,T={1,2,…,7},任务的主要信息包括任务编号、商家、客户、货物重量、商家服务时间、客户服务时间、最早取货时间、最晚取货时间和最晚送货时间如表2所示。Figure 3 depicts a crowdsourcing distribution network diagram after crowdsourcing rider and crowdsourcing task configuration, there are 3 riders in total, namely, K={1, 2, 3}, the main information of the rider includes the rider number, the rider's maximum load and the average speed of the rider is shown in Table 1. There are 7 delivery tasks in total, namely, T={1,2,…,7}. The main information of the task includes task number, merchant, customer, cargo weight, merchant service time, customer service time, earliest pick-up time, latest The pickup time and latest delivery time are shown in Table 2.
表1骑手主要信息表Table 1 Rider Main Information Sheet
表2任务主要信息表Table 2 Task main information table
步骤3:建立任务配送方案:一个任务分配方案表示为一个从众包配送任务集合T到众包骑手集合K的映射函数a:T→K∪{0},对于任务t∈T,如果a(t)=k∈K,表示将任务t分配给骑手k来配送,如果a(t)=0,表示任务t没有被分配;令Ta(k)={t∈T|a(t)=k,k∈K}表示分配给骑手k的任务集合,如果表示没有给骑手k分配配送任务;令Ta表示所有被分配的任务集合,则Ta=∪k∈KTa(k);从集合T到集合K存在许多分配方案,令Ω(T,K)表示从T到K的所有任务分配方案的集合;Step 3: Establish a task distribution scheme: A task distribution scheme is expressed as a mapping function a:T→K∪{0} from the crowdsourced delivery task set T to the crowdsourced rider set K, for a task t∈T, if a(t )=k∈K, indicating that task t is assigned to rider k for delivery, if a(t)=0, indicating that task t is not assigned; let T a (k)={t∈T|a(t)=k ,k∈K} denotes the set of tasks assigned to rider k, if means that no delivery task is assigned to rider k; let T a denote the set of all assigned tasks, then T a = ∪ k∈K T a (k); there are many assignment schemes from set T to set K, let Ω(T, K) represents the set of all task assignment schemes from T to K;
定义任务序列和配送路径:a表示为一个任务分配方案,a∈Ω(T,K),分配给骑手k的任务集合表示为Ta(k)的一个任务序列为多重集的一个全排列,表示为:pak=pak(1),pak(2),…,pak(2|Ta(k)|),其中,pak(j)为任务序列pak中第j(j=1,2,…,2|Ta(k)|)个位置所对应的任务;Define the task sequence and delivery path: a is represented as a task assignment scheme, a ∈ Ω(T, K), and the task set assigned to rider k is represented as A task sequence of T a (k) is a multiset A full permutation of , expressed as: p ak =p ak (1),p ak (2),...,p ak (2|T a (k)|), where p ak (j) is the task sequence p ak The task corresponding to the jth (j=1,2,...,2|T a (k)|) position;
a∈Ω(T,K)表示为一个任务分配方案,Ta(k)表示为分配给骑手k的任务集合,pak∈Pa(k)表示为一个任务序列,则pak的配送路径为一条从骑手k的所在位置出发依次经过pak中的每个任务所对的商家或客户节点的序列,表示为vak=vak(0),vak(1),…,vak(2|Ta(k)|),其中,vak(0)=k,表示骑手k所在的位置,vak(j)表示Pa(k)中的第j(j=1,2,…,2|Ta(k)|)个任务所对应的节点,由于任务序列中的每个任务出现两次--取货和送货,我们规定排在前面的任务所对应的节点为商家节点,排在后面的任务所对应的节点为客户节点;a∈Ω(T,K) is a task assignment scheme, T a (k) is a set of tasks assigned to rider k, p ak ∈ P a (k) is a task sequence, then the distribution path of p ak is a sequence starting from the position of rider k and passing through the merchant or customer node corresponding to each task in p ak in turn, expressed as v ak = v ak (0), v ak (1),..., v ak ( 2|T a (k)|), where v ak (0)=k, represents the position of rider k, and v ak (j) represents the jth (
配送距离函数表示为其中,pak∈Pa(k)为一个任务序列,vak为所对应的配送路径,表示从骑手k(k=vak(0))到第一个节点vak(1)的距离,表示vak中相邻两个节点之间的距离之和,如果两个相邻节点为同一个节点,则其距离为0;The delivery distance function is expressed as Among them, p ak ∈ P a (k) is a task sequence, v ak is the corresponding delivery path, represents the distance from rider k (k=v ak (0)) to the first node v ak (1), Represents the sum of the distances between two adjacent nodes in v ak , if the two adjacent nodes are the same node, the distance is 0;
设置时间约束和负载约束:时间约束函数表示为H(pak,t)∈{true,false},其中,t∈Ta(k)表示为一个任务,pak∈Pa(k)表示为一个任务序列,如果任务t按照pak中所对应的配送路径vak配送货物满足商家的最晚取货时间和客户的最晚送货时间约束,则H(pak,t)=true,否则,H(pak,t)=false;Set time constraints and load constraints: The time constraint function is expressed as H(p ak ,t)∈{true,false}, where t∈T a (k) is a task, and p ak ∈ P a (k) is expressed as A task sequence, if task t delivers goods according to the delivery path v ak corresponding to p ak and satisfies the constraints of the merchant’s latest pick-up time and the customer’s latest delivery time, then H(p ak ,t)=true, otherwise , H(p ak ,t)=false;
负载约束函数表示为Q(pak)∈{true,false},其中,pak∈Pa(k)为一个任务序列,如果骑手k按照任务序列pak所对应的配送路径vak配送货物能够满足其最大载重约束,则Q(pak)=true,否则Q(pak)=false;The load constraint function is expressed as Q(p ak )∈{true,false}, where p ak ∈ P a (k) is a task sequence, if rider k can deliver goods according to the delivery path v ak corresponding to the task sequence p ak . Satisfy its maximum load constraint, then Q(p ak )=true, otherwise Q(p ak )=false;
定义基于路径规划的众包配送任务优化调度模型为:The optimal scheduling model for crowdsourcing distribution tasks based on path planning is defined as:
max∑k∈K|Ta(k)| (1)max∑ k∈K |T a (k)| (1)
min∑k∈Kd(pak) (2)min∑ k∈K d(p ak ) (2)
s.t.s.t.
Q(pak)=true pak∈Pa(k) (3)Q(p ak )=true p ak ∈P a (k) (3)
H(pak)=true pak∈Pa(k) (4)H(p ak )=true p ak ∈P a (k) (4)
pak∈Pa(k)a∈Ω(T,K),k∈K (5)p ak ∈P a (k)a∈Ω(T,K),k∈K (5)
a∈Ω(T,K) (6)。a∈Ω(T,K) (6).
本发明定义了基于路径规划的众包配送任务优化调度模型,目的是在分配任务数量最多的情况下,总体配送路径最短。任务分配方案和任务序列,构造了配送距离函数、时间约束函数和负载约束函数。每位骑手可以对应着多种任务分配方案,每种任务分配方案又对应着多个任务序列。通过配送距离函数来确定任务序列的配送路径长短,进而比较大小选择配送路径较小的任务序列。通过时间约束函数和负载约束函数来判断每个任务序列是否满足条件,不满足则舍弃。The invention defines a crowdsourced distribution task optimization scheduling model based on path planning, and aims to achieve the shortest overall distribution path under the condition that the number of distributed tasks is the largest. The task allocation scheme and task sequence are constructed. The distribution distance function, time constraint function and load constraint function are constructed. Each rider can correspond to multiple task assignment schemes, and each task assignment scheme corresponds to multiple task sequences. The length of the delivery path of the task sequence is determined by the delivery distance function, and then the task sequence with the smaller delivery path is selected by comparing the size. The time constraint function and the load constraint function are used to determine whether each task sequence satisfies the conditions, and if not, it is discarded.
步骤4:定义T0 a(k)为当前已分配给骑手k的任务集,p0 ak为骑手k当前满足约束的任务序列,i∈T-∪k∈KT0 a(k)为一个未分配的任务,如果将i插入到p0 ak的两个适当位置后所得到新的任务序列仍满足负载约束和时间约束,则称i为p0 ak的一个可扩展任务,T1 a(k)=T0 a(k)∪{i}为插入任务i后骑手k的任务集;Step 4: Define T 0 a (k) as the task set currently assigned to rider k, p 0 ak as the task sequence that rider k currently satisfies the constraints, i∈T-∪ k∈K T 0 a (k) is a For an unassigned task, if the new task sequence obtained by inserting i into two appropriate positions of p 0 ak still satisfies the load and time constraints, then i is called a scalable task of p 0 ak , T 1 a ( k)=T 0 a (k)∪{i} is the task set of rider k after inserting task i;
将任务i插入到任务序列p0 ak有两种方式:相邻和相隔;相邻插入是指将任务i插入到p0 ak后,任务i在新任务序列中两个位置是相邻的;相隔插入是指任务i插入到p0 ak后,任务i在新任务序列中两个位置是不相邻的;There are two ways to insert task i into task sequence p 0 ak : adjacent and separated; adjacent insertion means that after task i is inserted into p 0 ak , the two positions of task i in the new task sequence are adjacent; Spaced insertion means that after task i is inserted into p 0 ak , the two positions of task i in the new task sequence are not adjacent;
具体步骤如下:Specific steps are as follows:
Step 1:根据骑手ki的位置,得到骑手ki与所有未配送任务商家点的距离集合S,得到所有未配送任务完成的最短路径长度集合D,两个集合对应下标值相加,按相加和从小到大排序,并保存至任务分配序列T0 a(ki);Step 1: According to the position of the rider k i , obtain the distance set S between the rider k i and all the merchants with undelivered tasks, and obtain the shortest path length set D of all undelivered tasks. Add the corresponding subscript values of the two sets, and press Add and sort from small to large, and save it to the task assignment sequence T 0 a ( ki );
Step 2:在T0 a(ki)选取第一个任务t1,将该任务添加到骑手ki的任务配送序列pa(ki),作为骑手ki的第一个配送任务,同时该任务状态置为已配送状态;Step 2: Select the first task t 1 at T 0 a ( ki ), add this task to the task delivery sequence p a ( ki ) of rider ki , as the first delivery task of rider ki , and at the same time The task status is set to delivered status;
Step 3:添加第二个任务,将T0 a(ki)中每个任务t2,t3,…,tj,利用相邻和相隔插入策略都添加至pa(ki)中一遍,若其中某种插入策略得到的pa(ki)满足t1和tj的时间约束,骑手ki的容量约束,则保存任务tj按照该种插入策略添加至骑手的任务配送序列pa(ki)的位置和路径长度至序列R中,待所有任务都插入一遍后,将序列R升序排列,路径长度最小的任务tj作为第二个配送任务,按照插入位置添加至pa(ki)中,同时将新的任务配送序列pa(ki)作为添加下一个任务的任务配送序列,tj状态变为已配送;若所有插入策略得到的pa(ki)都不满足约束,则pa(ki)为最终骑手ki的任务配送序列;Step 3: Add a second task, add each task t 2 , t 3 ,..., t j in T 0 a ( ki ) to p a ( ki ) using adjacent and spaced insertion strategies , if p a ( ki ) obtained by one of the insertion strategies satisfies the time constraints of t 1 and t j , and the capacity constraints of rider ki , then save task t j is added to the rider’s task distribution sequence p according to the insertion strategy The position of a (k i ) and the path length are added to the sequence R. After all tasks are inserted once, the sequence R is arranged in ascending order. The task t j with the smallest path length is used as the second delivery task, and is added to p a according to the insertion position. In (k i ), at the same time, the new task distribution sequence p a (k i ) is used as the task distribution sequence for adding the next task, and the state of t j becomes distributed; if the p a (k i ) obtained by all insertion strategies are If the constraint is not satisfied, then p a ( ki ) is the task distribution sequence of the final rider ki ;
Step 4:当序列R为空时,根据pa(ki)和任务关系图获取骑手ki的Vaki,同时得到骑手ki配送pa(ki)的路径长度d(paki);令i=i+1,返回Step 2;Step 4: When the sequence R is empty, obtain the V aki of the rider ki according to the p a ( ki ) and the task relationship diagram, and obtain the path length d (p aki ) of the rider ki to deliver the p a ( ki ) at the same time; Let i=i+1, return to Step 2;
Step 5:当i=L+1或者所有任务的状态均是已配送时,算法结束,得到初始解集。Step 5: When i=L+1 or the status of all tasks is delivered, the algorithm ends and the initial solution set is obtained.
本发明定义了基于贪心策略的初始众包任务调度方案求解算法,核心思想就是利用贪心策略找出每位骑手当前较优的任务调度方案。The invention defines an initial crowdsourcing task scheduling scheme solution algorithm based on a greedy strategy, and the core idea is to use the greedy strategy to find the current optimal task scheduling scheme for each rider.
图4描述了基于贪心策略的初始众包任务调度方案求解算法的流程。Figure 4 describes the flow of the initial crowdsourcing task scheduling solution solution algorithm based on the greedy strategy.
步骤5:包括四个邻域结构,分别为:Step 5: Include four neighborhood structures, namely:
(1)随机两个骑手,随机两个其任务序列中的任务,进行交换;(1) Two random riders and two random tasks in their task sequence are exchanged;
(2)随机交换一个骑手的任务序列中两个任务的商家点;(2) Randomly exchange merchant points of two tasks in a rider's task sequence;
(3)随机交换一个骑手的任务序列中两个任务的客户点;(3) Randomly swap the client points of two tasks in a rider's task sequence;
(4)随机两个骑手,随机一个骑手的任务序列中的任务,加在另一个骑手的任务序列中;(4) Two random riders, the tasks in the task sequence of one rider are randomly added to the task sequence of the other rider;
具体步骤如下:Specific steps are as follows:
Step 1:获取骑手k的初始解pak,设最优解为pak_best;Step 1: Obtain the initial solution p ak of rider k, and set the optimal solution to be p ak_best ;
Step 2:定义邻域结构集合Ni,i=1,2…,imax作为扰动操作,其中Ni包括交换骑手任务操作、交换任务序列商家点操作、交换任务序列客户点操作和迁移骑手任务操作;Step 2: Define the neighborhood structure set N i , i=1,2...,im ax as the perturbation operation, where N i includes the task of exchanging riders, exchanging task sequence merchant point operations, exchanging task sequence customer point operations and transferring rider tasks operate;
Step 3:定义邻域结构集合Nj,j=1,2…,jmax作为邻域搜索,其中Nj包括交换骑手任务操作、交换任务序列商家点操作、交换任务序列客户点操作和迁移骑手任务操作;Step 3: Define the neighborhood structure set N j , j=1,2..., jmax as the neighborhood search, where N j includes the exchange rider task operation, the exchange task sequence merchant point operation, the exchange task sequence customer point operation and the transfer rider task operation;
Step 4:令i=1,j=1;Step 4: Let i=1, j=1;
Step 5:使用Ni对pak进行扰动,生成解p’ak;Step 5: Use Ni to perturb p ak to generate a solution p'ak;
Step 6:使用Nj对p’ak进行搜索,生成解p”ak;Step 6: Use N j to search for p' ak to generate the solution p"ak;
Step 7:若d(p’ak)<d(p”ak),则p’ak=p”ak,j=1;否则,j=j+1;Step 7: If d(p' ak )<d(p" ak ), then p' ak =p" ak , j=1; otherwise, j=j+1;
Step 8:若j<jmax,则跳转至Step 6;否则,执行Step 9;Step 8: If j<j max , then jump to Step 6; otherwise, execute Step 9;
Step 9:若d(p”ak)<d(pak),则pak=p”ak,i=1;否则,i=i+1;Step 9: If d(p” ak )<d(p ak ), then p ak =p” ak , i=1; otherwise, i=i+1;
Step 10:若i<imax,则跳转至Step 5;否则,pak_best=p”ak,执行Step 11;Step 10: If i<i max , then jump to
Step 11:输入最优解pak_best,算法结束。Step 11: Input the optimal solution p ak_best , and the algorithm ends.
本发明提出了基于变邻域搜索的众包配送任务优化调度算法,核心思想就是通过局部搜索、扰动和邻域结构搜索三个过程来分配任务和计算总体配送路径长度。任务分配结果如表3所示,骑手配送任务结果如表4所示,骑手配送路径结果如表5所示。The invention proposes a crowdsourcing distribution task optimization scheduling algorithm based on variable neighborhood search. The core idea is to allocate tasks and calculate the overall distribution path length through three processes of local search, disturbance and neighborhood structure search. The task assignment results are shown in Table 3, the rider distribution task results are shown in Table 4, and the rider distribution path results are shown in Table 5.
图5描述了基于变邻域搜索众包配送任务优化调度算法的流程。Figure 5 depicts the flow of the optimal scheduling algorithm for crowdsourcing distribution tasks based on variable neighborhood search.
表3任务分配表Table 3 Task allocation table
表4骑手配送任务表Table 4 Rider distribution task table
表5骑手配送路径表Table 5 Rider distribution route table
本发明还提供一种实现基于路径规划的城市众包配送任务优化调度方法的支撑工具。The invention also provides a support tool for realizing the optimal scheduling method for urban crowdsourcing distribution tasks based on path planning.
支撑工具的功能模块主要分为Web端和App端。分为二个模块:基础信息管理和众包任务调度管理。The functional modules of the support tool are mainly divided into the Web side and the App side. It is divided into two modules: basic information management and crowdsourcing task scheduling management.
(1)基础信息管理的功能包括:用户信息管理、订单管理和骑手信息管理等等。(1) The functions of basic information management include: user information management, order management and rider information management, etc.
(2)众包任务调度管理是对任务订单进行分配,功能包括:任务调度算法管理、任务路径规划、任务实时分配和分配结果管理等。客户可以在Web端或App端上进行下单,支撑工具通过调度算法将任务分配给骑手。在骑手成功登录App端后,接受分配好的任务,按照算法规划好的路径进行配送。(2) Crowdsourcing task scheduling management is to allocate task orders. The functions include: task scheduling algorithm management, task path planning, real-time task assignment and assignment result management, etc. Customers can place orders on the web or app, and the support tool assigns tasks to riders through scheduling algorithms. After the rider successfully logs in to the App, he accepts the assigned task and delivers it according to the path planned by the algorithm.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911098883.3A CN110826968B (en) | 2019-11-12 | 2019-11-12 | Urban crowdsourcing distribution task optimal scheduling method based on path planning |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911098883.3A CN110826968B (en) | 2019-11-12 | 2019-11-12 | Urban crowdsourcing distribution task optimal scheduling method based on path planning |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110826968A true CN110826968A (en) | 2020-02-21 |
| CN110826968B CN110826968B (en) | 2022-12-06 |
Family
ID=69554207
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911098883.3A Active CN110826968B (en) | 2019-11-12 | 2019-11-12 | Urban crowdsourcing distribution task optimal scheduling method based on path planning |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110826968B (en) |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111800739A (en) * | 2020-06-22 | 2020-10-20 | 河南理工大学 | Rider Meal Delivery Navigation Auto Dial System and Workflow |
| CN111915185A (en) * | 2020-07-31 | 2020-11-10 | 湖北大学 | Space-time crowdsourcing task allocation method and device based on path planning strategy |
| CN112541610A (en) * | 2020-08-13 | 2021-03-23 | 深圳优地科技有限公司 | Robot control method, device, electronic device and storage medium |
| CN112801347A (en) * | 2021-01-11 | 2021-05-14 | 华南理工大学 | Multi-target city two-stage distribution planning method based on mobile transfer station and crowdsourcing |
| CN112884253A (en) * | 2021-04-12 | 2021-06-01 | 圆通速递有限公司 | Crowdsourcing vehicle and goods matching method and path optimization method thereof |
| CN113469611A (en) * | 2021-06-10 | 2021-10-01 | 哈尔滨工业大学 | Express crowdsourcing distribution task scheduling method, system and equipment |
| CN113664821A (en) * | 2020-05-13 | 2021-11-19 | 广东博智林机器人有限公司 | Robot path planning method and device, storage medium and control terminal |
| CN114742617A (en) * | 2022-04-18 | 2022-07-12 | 李建云 | Service order data processing method and device and computer equipment |
| CN115727861A (en) * | 2021-08-25 | 2023-03-03 | 北京顺丰同城科技有限公司 | Vehicle path planning method and device, computer equipment and storage medium |
| CN119558620A (en) * | 2025-01-15 | 2025-03-04 | 昆明理工大学 | A limited resource multi-task matching method based on greedy strategy |
| TWI905008B (en) * | 2022-05-30 | 2025-11-11 | 韓商韓領有限公司 | Method for providing delivery agent mission information and electronic device supporting thereof |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190075009A1 (en) * | 2017-09-07 | 2019-03-07 | Symbol Technologies, Llc | Control method and apparatus in a mobile automation system |
| CN110059934A (en) * | 2019-03-27 | 2019-07-26 | 浙江工商大学 | The method of fuel vehicle and the scheduling of new energy vehicle coperating distribution |
| CN110097288A (en) * | 2019-05-08 | 2019-08-06 | 哈尔滨工业大学(威海) | A kind of city crowdsourcing dispatching method for allocating tasks and device based on graph search |
-
2019
- 2019-11-12 CN CN201911098883.3A patent/CN110826968B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190075009A1 (en) * | 2017-09-07 | 2019-03-07 | Symbol Technologies, Llc | Control method and apparatus in a mobile automation system |
| CN110059934A (en) * | 2019-03-27 | 2019-07-26 | 浙江工商大学 | The method of fuel vehicle and the scheduling of new energy vehicle coperating distribution |
| CN110097288A (en) * | 2019-05-08 | 2019-08-06 | 哈尔滨工业大学(威海) | A kind of city crowdsourcing dispatching method for allocating tasks and device based on graph search |
Non-Patent Citations (1)
| Title |
|---|
| 陈久梅等: "两级定位-路径问题模型及变邻域粒子群算法", 《运筹与管理》 * |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113664821A (en) * | 2020-05-13 | 2021-11-19 | 广东博智林机器人有限公司 | Robot path planning method and device, storage medium and control terminal |
| CN111800739A (en) * | 2020-06-22 | 2020-10-20 | 河南理工大学 | Rider Meal Delivery Navigation Auto Dial System and Workflow |
| CN111800739B (en) * | 2020-06-22 | 2022-10-25 | 河南理工大学 | Rider Meal Delivery Navigation Auto Dial System and Workflow |
| CN111915185A (en) * | 2020-07-31 | 2020-11-10 | 湖北大学 | Space-time crowdsourcing task allocation method and device based on path planning strategy |
| CN112541610A (en) * | 2020-08-13 | 2021-03-23 | 深圳优地科技有限公司 | Robot control method, device, electronic device and storage medium |
| CN112541610B (en) * | 2020-08-13 | 2022-10-21 | 深圳优地科技有限公司 | Robot control method, device, electronic device and storage medium |
| CN112801347A (en) * | 2021-01-11 | 2021-05-14 | 华南理工大学 | Multi-target city two-stage distribution planning method based on mobile transfer station and crowdsourcing |
| CN112801347B (en) * | 2021-01-11 | 2022-10-21 | 华南理工大学 | Multi-target city two-stage distribution planning method based on mobile transfer station and crowdsourcing |
| CN112884253A (en) * | 2021-04-12 | 2021-06-01 | 圆通速递有限公司 | Crowdsourcing vehicle and goods matching method and path optimization method thereof |
| CN113469611A (en) * | 2021-06-10 | 2021-10-01 | 哈尔滨工业大学 | Express crowdsourcing distribution task scheduling method, system and equipment |
| CN115727861A (en) * | 2021-08-25 | 2023-03-03 | 北京顺丰同城科技有限公司 | Vehicle path planning method and device, computer equipment and storage medium |
| CN114742617A (en) * | 2022-04-18 | 2022-07-12 | 李建云 | Service order data processing method and device and computer equipment |
| TWI905008B (en) * | 2022-05-30 | 2025-11-11 | 韓商韓領有限公司 | Method for providing delivery agent mission information and electronic device supporting thereof |
| CN119558620A (en) * | 2025-01-15 | 2025-03-04 | 昆明理工大学 | A limited resource multi-task matching method based on greedy strategy |
| CN119558620B (en) * | 2025-01-15 | 2025-10-10 | 昆明理工大学 | A limited resource multi-task matching method based on greedy strategy |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110826968B (en) | 2022-12-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110826968A (en) | Urban crowdsourcing distribution task optimal scheduling method based on path planning | |
| CN112270135B (en) | Intelligent distribution method, device and equipment for logistics dispatching and storage medium | |
| CN108681857B (en) | Distribution order distribution method and device and computer readable storage medium | |
| Cheng et al. | Cooperation-aware task assignment in spatial crowdsourcing | |
| Zhang et al. | Simulation-based assessment of cargo bicycle and pick-up point in urban parcel delivery | |
| CN116708446B (en) | Network performance comprehensive weight decision-based computing network scheduling service method and system | |
| CN106779910B (en) | Distribution order distribution method and device | |
| CN107094165A (en) | Distribution capacity is determined, dispatching task obtains, dispenses resource regulating method and equipment | |
| Wolfson et al. | Fairness versus optimality in ridesharing | |
| CN110110903A (en) | A kind of distribution vehicle paths planning method based on neural evolution | |
| CN114548723A (en) | Real-time vehicle and goods matching and path recommendation method and system based on cloud edge cooperation | |
| CN110070289A (en) | Method for allocating tasks, device, equipment and storage medium | |
| Gaul et al. | Solving the dynamic dial-a-ride problem using a rolling-horizon event-based graph | |
| CN116090931A (en) | A terminal distribution method and device based on customer classification | |
| CN115187169A (en) | Logistics distribution system and method based on collaborative path planning | |
| CN117474185A (en) | Order delivery optimization method, device, equipment and storage medium | |
| CN115829451A (en) | Logistics route planning method, device, computer equipment and storage medium | |
| CN113127176A (en) | Multi-role task allocation method and system for working platform | |
| CN113739812B (en) | Distribution plan generation method, device, system, and computer-readable storage medium | |
| CN116364256A (en) | Emergency medical rescue command dispatching method and dispatching system | |
| CN115759906A (en) | A large-scale multi-warehouse logistics distribution method, system, device and storage medium | |
| CN116151397A (en) | Network appointment vehicle order dispatching method under mixed service mode | |
| CN108550004A (en) | A kind of warehouse management system of high degree of automation | |
| CN114612024B (en) | Regional delivery quantity optimization method, device, computer equipment and storage medium | |
| CN114693199A (en) | Logistics order information processing method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |















