CN114970103A - Instant delivery path optimization method considering dispenser experience and random travel time - Google Patents

Instant delivery path optimization method considering dispenser experience and random travel time Download PDF

Info

Publication number
CN114970103A
CN114970103A CN202210446140.6A CN202210446140A CN114970103A CN 114970103 A CN114970103 A CN 114970103A CN 202210446140 A CN202210446140 A CN 202210446140A CN 114970103 A CN114970103 A CN 114970103A
Authority
CN
China
Prior art keywords
customer
time
solution
value
remove
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.)
Pending
Application number
CN202210446140.6A
Other languages
Chinese (zh)
Inventor
张树柱
邱兵兵
楼芝兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Finance and Economics
Original Assignee
Zhejiang University of Finance and Economics
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Finance and Economics filed Critical Zhejiang University of Finance and Economics
Priority to CN202210446140.6A priority Critical patent/CN114970103A/en
Publication of CN114970103A publication Critical patent/CN114970103A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0835Relationships between shipper or supplier and carriers
    • G06Q10/08355Routing methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/08Probabilistic or stochastic CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • General Business, Economics & Management (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种考虑配送员经验与随机行驶时间的即时配送路径优化方法,S11,问题描述;S12,问题假设;S13,参数与变量表示;S14,配送员经验的函数表示;S15,单阶段数学模型建立;S16,多阶段数学模型建立;S21,仿真启发式方法框架设计;S22,蒙特卡洛模拟设计;S23,改进自适应大邻域搜索算法设计。本发明方法结合仿真方法与启发式算法对即时配送路径问题进行求解。

Figure 202210446140

The invention discloses a real-time delivery route optimization method considering delivery staff experience and random travel time. S11, problem description; S12, problem assumption; S13, parameter and variable representation; S14, function representation of delivery staff experience; S15, single Stage mathematical model establishment; S16, multi-stage mathematical model establishment; S21, simulation heuristic method framework design; S22, Monte Carlo simulation design; S23, improved adaptive large neighborhood search algorithm design. The method of the invention solves the real-time distribution route problem by combining the simulation method and the heuristic algorithm.

Figure 202210446140

Description

考虑配送员经验与随机行驶时间的即时配送路径优化方法A real-time delivery route optimization method considering delivery staff experience and random travel time

技术领域technical field

本发明属于物流配送路径优化技术领域,涉及一种考虑配送员经验与随机行驶时间的即时配送路径优化方法。The invention belongs to the technical field of logistics distribution path optimization, and relates to a real-time distribution path optimization method that considers the experience of the distribution staff and random travel time.

背景技术Background technique

近年来,随着网络购物热潮的不断攀升,即时配送逐渐成为城市物流的重要组成部分。在即时配送物流活动中,企业实时接收顾客提出的配送需求,并即时完成对顾客的配送服务,其应用领域包括外卖、生鲜、医药、商超等。作为一种新型的物流配送模式,即时配送具有多频次、小批量、车辆资源有限等特点。此外,顾客往往需要在下单后的一两个小时之内得到配送服务,这使得即时配送具有很强的时效性。因此,企业在制定即时配送方案时,不仅需要尽可能降低物流成本以获得更高的经济效益,也需要保证商品准时送达率以提高顾客满意度。In recent years, with the rising tide of online shopping, instant delivery has gradually become an important part of urban logistics. In real-time distribution logistics activities, enterprises receive real-time distribution needs from customers and complete distribution services to customers in real time. Its application areas include takeaway, fresh food, medicine, and supermarkets. As a new type of logistics distribution mode, instant distribution has the characteristics of multiple frequencies, small batches, and limited vehicle resources. In addition, customers often need to get delivery services within an hour or two after placing an order, which makes instant delivery highly time-sensitive. Therefore, when making an instant delivery plan, enterprises not only need to reduce logistics costs as much as possible to obtain higher economic benefits, but also need to ensure the on-time delivery rate of goods to improve customer satisfaction.

在实际的物流配送过程中,车辆的行驶时间受到众多因素的影响。一方面,交通拥堵、恶劣天气等外部环境导致行驶时间具有随机性。如果行驶时间的随机性被忽略,企业可能制定出低效的物流配送方案。另一方面,当重复为某一区域内的顾客提供配送服务时,配送员会对配送区域内的道路情况进行学习,由此产生的经验能够进一步缩短行驶时间。例如,当配送员了解配送区域内的捷径、红绿灯的间隔、道路的车流量等交通信息时,其配送时间会明显缩短。据相关专家估计,在配送员经验的影响下,行驶时间最长可缩短40%。因此,如何结合现实的物流配送活动,做出更准确的评估,规划出更好的配送路径,是企业提供即时配送服务所面临的重大难题。In the actual logistics and distribution process, the travel time of vehicles is affected by many factors. On the one hand, external environments such as traffic jams and bad weather lead to randomness of travel time. If the randomness of travel time is ignored, companies may develop inefficient logistics and distribution schemes. On the other hand, when repeatedly providing delivery services to customers in a certain area, the delivery staff will learn the road conditions in the delivery area, and the resulting experience can further shorten the travel time. For example, when the delivery staff knows the shortcuts in the delivery area, the interval of traffic lights, the traffic flow on the road and other traffic information, the delivery time will be significantly shortened. According to estimates by relevant experts, the driving time can be shortened by up to 40% under the influence of the experience of the delivery staff. Therefore, how to make a more accurate assessment and plan a better distribution path in combination with the actual logistics distribution activities is a major problem faced by enterprises in providing instant distribution services.

发明内容SUMMARY OF THE INVENTION

本发明针对现有技术的不足,结合仿真方法与启发式算法对即时配送路径问题进行求解,将提出的方法称为仿真启发式方法,具体提出一种考虑配送员经验与随机行驶时间的即时配送路径优化方法。包括以下步骤:Aiming at the deficiencies of the prior art, the present invention solves the real-time distribution path problem by combining the simulation method and the heuristic algorithm, and the proposed method is called the simulation heuristic method, and specifically proposes a real-time distribution that considers the experience of the delivery staff and the random travel time. Path optimization method. Include the following steps:

包括以下步骤:Include the following steps:

S10,建立即时配送路径优化模型;S10, establishing an instant distribution route optimization model;

S20,设计模型的求解方法;S20, the solution method of the design model;

其中,S20具体包括以下步骤:Wherein, S20 specifically includes the following steps:

S21,仿真启发式方法框架设计;S21, simulation heuristic method framework design;

S22,蒙特卡洛模拟设计;S22, Monte Carlo simulation design;

S23,改进自适应大邻域搜索算法设计。S23, improving the design of an adaptive large neighborhood search algorithm.

优选地,所述S10,建立即时配送路径优化模型,具体包括以下步骤:Preferably, the S10, establishing an instant distribution path optimization model, specifically includes the following steps:

S11,问题描述;S11, problem description;

S12,问题假设;S12, problem hypothesis;

S13,参数与变量表示;S13, parameter and variable representation;

S14,配送员经验的函数表示;S14, the function representation of the experience of the delivery staff;

S15,单阶段数学模型建立;S15, single-stage mathematical model establishment;

S16,多阶段数学模型建立。S16, establishing a multi-stage mathematical model.

优选地,所述S12,问题假设,包括对车辆的设定、对顾客的设定和对企业的设定。Preferably, the S12, the problem assumption, includes the setting for the vehicle, the setting for the customer and the setting for the enterprise.

优选地,所述S14,配送员经验的函数表示为:Preferably, in S14, the function of the experience of the delivery staff is expressed as:

Figure BDA0003616949430000021
Figure BDA0003616949430000021

其中,T0为配送员完全不具有经验时的车辆行驶时间,xi与xj表示访问次数,l为学习因子,表示经验的增长速度;当车辆在节点i与j之间行驶时,若i与j均表示顾客点,则行驶时间取决于配送员对两个顾客的经验平均值;若i或j中有一节点为配送中心,则行驶时间只取决于配送员对其中顾客的经验值;在配送员经验的影响下,行驶时间最长缩短为αT0,其中α表示行驶时间的最长缩短比例;从该函数表达式可知,车辆的行驶时间实际上受到顾客访问次数的影响。Among them, T 0 is the travel time of the vehicle when the delivery person has no experience at all, x i and x j represent the number of visits, and l is the learning factor, representing the growth rate of experience; when the vehicle travels between nodes i and j, if Both i and j represent customer points, and the travel time depends on the average experience of the delivery staff on the two customers; if a node in i or j is a distribution center, the travel time only depends on the experience value of the delivery staff on the customers among them; Under the influence of the experience of the delivery staff, the longest travel time can be shortened as αT 0 , where α represents the longest shortening ratio of the travel time; from this function expression, it can be seen that the travel time of the vehicle is actually affected by the number of customer visits.

优选地,所述S16,多阶段数学模型建立,包括建立多阶段随机车辆路径优化模型,其目标为:Preferably, in S16, the establishment of a multi-stage mathematical model includes establishing a multi-stage stochastic vehicle path optimization model, the objectives of which are:

Figure BDA0003616949430000031
Figure BDA0003616949430000031

其中,f为车辆启动的固定成本;

Figure BDA0003616949430000032
表示第r阶段车辆k是否被使用,若是,则
Figure BDA0003616949430000033
否则
Figure BDA0003616949430000034
Vc r为第r阶段的顾客集合;K为企业拥有的车辆集合,K={1,2,…,m},共m辆;Vr为阶段r决策时的节点集合,Vr={0}∪Vc r;E(·)表示随机变量的期望值;
Figure BDA0003616949430000035
为阶段r派出的车辆从节点i到节点j的行驶时间;
Figure BDA0003616949430000036
为在阶段r的决策中若车辆k从节点i行驶到节点j,则为1,否则为0;c1为每单位行驶时间成本;c2为每单位延迟配送时间修正成本;c3为每单位超出最长在途时间的时间修正成本;DTi为顾客i的订单延迟送达时间;ZTk为车辆k超出最长在途时间的时间。where f is the fixed cost of vehicle startup;
Figure BDA0003616949430000032
Indicates whether the vehicle k is used in the rth stage, if so, then
Figure BDA0003616949430000033
otherwise
Figure BDA0003616949430000034
Vc r is the set of customers in the rth stage; K is the set of vehicles owned by the enterprise, K={1,2,...,m}, a total of m vehicles; V r is the set of nodes in the decision-making stage r, V r ={ 0} ∪V cr ; E(·) represents the expected value of the random variable;
Figure BDA0003616949430000035
travel time of the vehicle dispatched for phase r from node i to node j;
Figure BDA0003616949430000036
In the decision of stage r, if vehicle k travels from node i to node j, it is 1, otherwise it is 0; c 1 is the cost per unit of travel time; c 2 is the correction cost per unit of delayed delivery time; c 3 is the cost per unit of delayed delivery time. Unit time correction cost exceeding the maximum transit time; DT i is the delayed delivery time of customer i's order; ZT k is the time when vehicle k exceeds the maximum transit time.

优选地,所述S22,蒙特卡洛模拟设计,包括以下步骤:Preferably, the S22, Monte Carlo simulation design, includes the following steps:

S221,根据概率分布随机生成每个随机变量的具体值;S221, randomly generate the specific value of each random variable according to the probability distribution;

S222,计算解的目标函数值;S222, calculate the objective function value of the solution;

S223,重复S221与S222Nsim次,计算解的期望目标值,其中,Nsim为仿真次数。S223 , repeating S221 and S222 N sim times to calculate the expected target value of the solution, where N sim is the number of simulations.

优选地,所述S23,改进自适应大邻域搜索算法设计,包括以下步骤:Preferably, the S23, improving the design of an adaptive large neighborhood search algorithm, includes the following steps:

S231,解的编码设计;S231, the coding design of the solution;

S232,初始化设计;S232, initialize the design;

S233,破坏算子设计;S233, destroy the operator design;

S234,修复算子设计;S234, repair the operator design;

S235,局部搜索设计;S235, local search design;

S236,解的放弃准则设计;S236, design of the abandonment criterion of the solution;

S237,算子选择机制设计。S237, the operator selection mechanism design.

优选地,所述S232,初始化设计,包括以下步骤:Preferably, the S232, initializing the design, includes the following steps:

S2321,生成只包含车辆起点与终点的空路径序列;S2321, generate an empty path sequence that only includes the starting point and the ending point of the vehicle;

S2322,随机选择一个顾客i,判断插入顾客i后该条路径上的总需求是否超过车辆容量。若超过则转S2321,否则转S2323;S2322, randomly select a customer i, and determine whether the total demand on the route after customer i is inserted exceeds the vehicle capacity. If it exceeds, go to S2321, otherwise go to S2323;

S2323,判断该条路径上已有的连续两个顾客j、j+1以及顾客i的最迟服务时间,若LTj<LTi<LTj+1,则将顾客i插入到顾客j与顾客j+1之间,LTi为顾客i的订单承诺的最迟送达时间;S2323, determine the latest service time of two consecutive customers j, j+1 and customer i on the route, if LTj<LT i <LT j+1 , insert customer i into customer j and customer j Between +1, LT i is the latest delivery time promised by customer i's order;

S2324,判断所有顾客是否都插入到路径当中,若是,则转S2325,否则转S2322;S2324, determine whether all customers are inserted into the path, if so, go to S2325, otherwise go to S2322;

S2325,将所有序列合并到同一个序列当中,并去除序列中相邻两个0值中的一个;S2325, merge all sequences into the same sequence, and remove one of two adjacent 0 values in the sequence;

S2326,判断序列中的路径数量是否达到车辆数量,若达到,则停止,否则在序列当中添加0值直到路径数量与车辆数量相等为止。S2326, determine whether the number of paths in the sequence reaches the number of vehicles, if so, stop, otherwise add a 0 value in the sequence until the number of paths and the number of vehicles are equal.

优选地,所述S233,破坏算子设计,包括以下步骤:Preferably, the S233, destroying the operator design, includes the following steps:

S2331,随机移除:从当前解中随机选择Nremove个顾客点移除;S2331, random removal: randomly select N remove customer points from the current solution to remove;

S2332,路径移除:随机选择解中的一条子路径,将子路径中的所有顾客点移除;S2332, path removal: randomly select a sub-path in the solution, and remove all customer points in the sub-path;

S2333,最差移除:定义顾客点i在当前解中的成本为cost(s,i)=Z(s)-Z-i(s),其中Z(s)为当前解的目标值,而Z-i(s)为移除顾客点i后的目标值,最差移除算子先计算当前解的目标值,然后计算每个顾客点被移除后的目标值,从而得到每个顾客点的成本,最后从当前解中选择成本最高的顾客点进行移除,重复这一步骤直到Nremove个顾客点被移除;S2333, worst removal: define the cost of customer point i in the current solution as cost(s,i)=Z(s)-Z- i (s), where Z(s) is the target value of the current solution, and Z -i (s) is the target value after removing customer point i. The worst removal operator first calculates the target value of the current solution, and then calculates the target value after each customer point is removed, so as to obtain each customer The cost of the point, and finally select the customer point with the highest cost from the current solution to remove, and repeat this step until N remove customer points are removed;

S2334,最差距离移除:定义顾客点i在当前解中的距离成本为顾客i到其前一个顾客点的距离与到其后一个顾客点的距离之和,即discost(s,i)=di-1,i+di,i+1,每次选择距离成本最大的顾客点移除直到Nremove个顾客点被移除;S2334, the worst distance removal: define the distance cost of customer point i in the current solution as the sum of the distance from customer i to its previous customer point and the distance to its next customer point, namely cost(s,i)= d i-1,i +d i,i+1 , each time the customer points with the largest distance cost are selected and removed until N remove customer points are removed;

S2335,最差时间移除:定义顾客点i在当前解中的时间成本为最迟送达时间与到达时间的差值,即timecost(s,i)=|LTi-si|,每次选择时间成本最大的顾客点移除直到Nremove个顾客点被移除;S2335, worst time removal: define the time cost of customer point i in the current solution as the difference between the latest delivery time and the arrival time, that is, timecost(s,i)=|LT i -s i |, each time Select the customer point with the largest time cost to remove until N remove customer points are removed;

S2336,相似移除:定义两个顾客点之间的相似度为Rij=φ1dij2|LTi-LTj|+φ3rij4|qi-qj|,其中dij为两个顾客之间的距离,LTi为最迟送达时间,qi为顾客需求量,而rij表示是否顾客i与顾客j在同一条子路径当中,若在,则rij=1,否则rij=-1。φ14为各自的权重;相似移除算子随机选择一个顾客点从当前解中移除,同时将移除的顾客点存入序列Cremove中;计算解中的每个顾客点与序列Cremove中最后一个顾客点的相似度并选择相似度最大的顾客点移除并存入序列Cremove中,重复这一步骤直到Nremove个顾客点被移除;S2336, similarity removal: define the similarity between two customer points as R ij1 d ij2 |LT i -LT j |+φ 3 r ij4 |q i -q j |, where d ij is the distance between two customers, LT i is the latest delivery time, qi is the customer demand, and r ij represents whether customer i and customer j are in the same sub-path, if so, r ij =1, otherwise r ij =-1. φ 14 are their respective weights; the similar removal operator randomly selects a customer point to remove from the current solution, and stores the removed customer point in the sequence C remove ; calculates the relationship between each customer point in the solution and The similarity of the last customer point in the sequence C remove and select the customer point with the largest similarity to remove and store it in the sequence C remove , repeat this step until N remove customer points are removed;

S2337,邻近相似移除:该算子是相似移除算子的一个特例,其中φ1=φ2=φ3=0,φ4=1,这个算子移除距离相近的顾客点。S2337, adjacent similarity removal: this operator is a special case of the similarity removal operator, where φ 123 =0, φ 4 =1, this operator removes customer points with similar distances.

优选地,所述S234,修复算子设计,包括以下步骤:Preferably, the S234, repairing the operator design, includes the following steps:

S2341,贪婪插入:从序列Cremove中随机选择一个顾客,计算该顾客插入解Sremove中每个位置后引起的目标增加值,选择增加值最小的位置将该顾客插入解中,重复这一步骤直到Cremove中所有顾客点全部插入解中。S2341, greedy insertion: randomly select a customer from the sequence C remove , calculate the target increase value caused by inserting the customer into each position in the solution S remove , select the position with the smallest increase value to insert the customer into the solution, and repeat this step Until all customer points in C remove are inserted into the solution.

S2342,后悔值插入:计算每个顾客插入解中每个位置后引起的目标增加值,定义后悔值为

Figure BDA0003616949430000051
其中
Figure BDA0003616949430000052
为顾客i插入后引起的最小目标增加值,
Figure BDA0003616949430000053
表示顾客i插入后引起的第二小目标增加值。选择后悔值最大的顾客并将该顾客插入到增加值最小的位置上,重复这一步骤直到Cremove中所有顾客点全部插入解中。S2342, regret value insertion: Calculate the target increase value caused by each customer inserting each position in the solution, and define the regret value as
Figure BDA0003616949430000051
in
Figure BDA0003616949430000052
the minimum target increment after insertion for customer i,
Figure BDA0003616949430000053
Represents the second smallest target increase after insertion by customer i. Select the customer with the largest regret value and insert the customer into the position with the smallest increase value. Repeat this step until all customer points in C remove are inserted into the solution.

S2343,距离贪婪插入:从序列Cremove中随机选择一个顾客,计算该顾客插入解Sremove中每个位置后引起的距离增量,公式为di=dhi+dij-dhj。选择距离增量最小的位置插入该顾客,重复这一步骤直到Cremove中所有顾客点全部插入解中。S2343, distance greedy insertion: randomly select a customer from the sequence C remove , calculate the distance increment caused by inserting the customer into each position in the solution S remove , the formula is d i =d hi +d ij -d hj . Select the position with the smallest distance increment to insert the customer, and repeat this step until all customer points in C remove are inserted into the solution.

S2344,带噪声扰动的成本贪婪插入:贪婪插入算子在选择每个顾客的插入位置时都是选择最优位置,这种缺少随机性的插入方式容易使得算法陷入局部最优。带噪声扰动的成本贪婪插入在贪婪插入算子的基础之上,加入了噪声对目标增加值进行扰动,噪声扰动后的目标增加值计算公式为:insertcost-i=insertcosti+u*r*insertcostmax,其中insertcosti为噪声扰动前的目标增加值,insertcostmax为插入所有位置中的最大目标增加值,u为噪声参数,而r为[-1,1]内的随机数。S2344, Cost greedy insertion with noise disturbance: The greedy insertion operator selects the optimal position when selecting the insertion position of each customer. This lack of randomness easily makes the algorithm fall into a local optimum. The cost greedy insertion with noise perturbation is based on the greedy insertion operator, adding noise to perturb the target increase value. The calculation formula of the target increase value after noise perturbation is: insertcost -i =insertcost i +u*r*insertcost max , where insertcost i is the target increase value before noise disturbance, insertcost max is the maximum target increase value inserted in all positions, u is the noise parameter, and r is a random number in [-1,1].

S2345,带噪声扰动的距离贪婪插入:该算子是距离贪婪插入算子的一个扩展形式,同样是在计算距离增量时加入了噪声扰动,计算公式与带噪声扰动的成本贪婪插入类似。S2345, distance greedy insertion with noise perturbation: This operator is an extended form of the distance greedy insertion operator. It also adds noise perturbation when calculating the distance increment. The calculation formula is similar to the cost greedy insertion with noise perturbation.

本发明的有益效果如下:The beneficial effects of the present invention are as follows:

与现有技术相比,本发明针对即时配送路径问题,创新性地考虑了由配送员经验引起的随机行驶时间的期望值变化,并定义了基于配送员经验的行驶时间函数来衡量这一重要变化,以总配送成本最小为目标构建了单阶段与多阶段配送路径优化模型。此外,本发明重点对自适应大邻域搜索算法进行改进,并结合蒙特卡洛模拟设计了仿真启发式的求解框架。Compared with the prior art, the present invention innovatively considers the change in the expected value of the random travel time caused by the experience of the dispatcher, and defines a travel time function based on the experience of the dispatcher to measure this important change for the instant distribution route problem. , a single-stage and multi-stage distribution route optimization model is constructed with the goal of minimizing the total distribution cost. In addition, the present invention focuses on improving the adaptive large-neighborhood search algorithm, and designs a simulation heuristic solving framework combined with Monte Carlo simulation.

对于企业来说,本发明有利于合理规划车辆路径,降低物流配送成本;有利于提高物流配送效率,保持企业在市场中的竞争力;对于配送员来说,本发明有利于配送员积累配送经验,提高配送能力;有利于提高配送员工作量的均衡性,保证收入的公平性。对于顾客来说,本发明有利于顾客得到更好的物流服务体验,提高顾客满意度。For enterprises, the present invention is conducive to rationally planning vehicle paths and reducing logistics distribution costs; it is beneficial to improve logistics distribution efficiency and maintain the competitiveness of enterprises in the market; for delivery staff, the present invention is beneficial to delivery staff to accumulate delivery experience , improve the distribution capacity; it is beneficial to improve the balance of the workload of the distribution staff and ensure the fairness of the income. For customers, the present invention is beneficial for customers to obtain better logistics service experience and improve customer satisfaction.

附图说明Description of drawings

图1为本发明实施例的考虑配送员经验与随机行驶时间的即时配送路径优化方法的框架示意图;1 is a schematic diagram of a framework of an instant delivery route optimization method considering delivery staff experience and random travel time according to an embodiment of the present invention;

图2为本发明实施例的考虑配送员经验与随机行驶时间的即时配送路径优化方法的解的编码方式示意图;2 is a schematic diagram of a coding scheme of a solution of an instant delivery route optimization method considering delivery staff experience and random travel time according to an embodiment of the present invention;

图3为本发明实施例的考虑配送员经验与随机行驶时间的即时配送路径优化方法的cross-exchange算子示意图;3 is a schematic diagram of a cross-exchange operator of an instant delivery route optimization method considering delivery staff experience and random travel time according to an embodiment of the present invention;

图4为本发明实施例的考虑配送员经验与随机行驶时间的即时配送路径优化方法的收敛速度对比图;4 is a comparison diagram of the convergence speed of an instant delivery route optimization method considering delivery staff experience and random travel time according to an embodiment of the present invention;

图5为本发明实施例的考虑配送员经验与随机行驶时间的即时配送路径优化方法的实验结果对比图;5 is a comparison diagram of experimental results of an instant delivery route optimization method considering delivery staff experience and random travel time according to an embodiment of the present invention;

图6为本发明实施例的考虑配送员经验与随机行驶时间的即时配送路径优化方法的车辆行驶路径对比图。FIG. 6 is a comparison diagram of vehicle travel paths of an instant delivery path optimization method considering delivery staff experience and random travel time according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

相反,本发明涵盖任何由权利要求定义的在本发明的精髓和范围上做的替代、修改、等效方法以及方案。进一步,为了使公众对本发明有更好的了解,在下文对本发明的细节描述中,详尽描述了一些特定的细节部分。对本领域技术人员来说没有这些细节部分的描述也可以完全理解本发明。On the contrary, the present invention covers any alternatives, modifications, equivalents and arrangements within the spirit and scope of the present invention as defined by the appended claims. Further, in order to give the public a better understanding of the present invention, some specific details are described in detail in the following detailed description of the present invention. The present invention can be fully understood by those skilled in the art without the description of these detailed parts.

S10,建立即时配送路径优化模型;S10, establishing an instant distribution route optimization model;

S11,问题描述;S11, problem description;

一家企业在线上平台销售商品,同时为每个顾客提供即时配送服务。顾客在营业时间内实时下单,下单后的订单信息会显示在企业系统上,然后企业依据某一规则进行决策,将订单分配给车辆并为其规划行驶路径,最后车辆完成任务后必须回到企业配送中心接受后续的配送任务。由于顾客所购商品的异质性,车辆无法提前携带新订单的商品。一般来说,对于这类动态问题的优化,企业可以从时间轴上将营业时间划分为多个时间段,在每个阶段结束的时间节点针对本阶段新出现的顾客订单进行决策。因此,该类问题也称为多阶段优化问题。A business sells goods on an online platform while offering instant delivery to every customer. Customers place orders in real time during business hours, and the order information after placing the order will be displayed on the enterprise system, and then the enterprise makes decisions based on a certain rule, assigns the order to the vehicle and plans the driving path for it, and finally the vehicle must return after completing the task. Go to the enterprise distribution center to accept subsequent distribution tasks. Due to the heterogeneity of products purchased by customers, vehicles cannot carry new orders in advance. Generally speaking, for the optimization of such dynamic problems, enterprises can divide the business hours into multiple time periods from the time axis, and make decisions for the new customer orders that appear in this period at the time node at the end of each period. Therefore, this type of problem is also called a multi-stage optimization problem.

由于交通拥堵、恶劣天气等因素的影响,行驶时间具有随机性。行驶时间的随机性对整个配送系统的表现具有显著的影响,尤其是在多阶段决策问题中,行驶时间随机性会导致企业在决策时无法提前预知车辆的可用时间,极大地增加了问题的复杂性。此外,随着在特定区域内的多次配送,配送员对特定道路逐渐会积累经验,而配送员经验进而也会影响车辆的实际行驶时间。The driving time is random due to factors such as traffic congestion and bad weather. The randomness of travel time has a significant impact on the performance of the entire distribution system, especially in multi-stage decision-making problems, the randomness of travel time will cause companies to fail to predict the availability of vehicles in advance when making decisions, which greatly increases the complexity of the problem. sex. In addition, with multiple deliveries in a specific area, the delivery staff will gradually accumulate experience on specific roads, and the delivery staff experience will also affect the actual driving time of the vehicle.

S12,问题假设;S12, problem hypothesis;

假设1(关于车辆的设定):车辆与配送员一一对应,其中配送车辆均为同型车辆。每辆车都有一定的容量限制,因此每辆车服务的顾客需求量之和不能超过车辆的最大容量。车辆有最长在途时间限制,并且完成所有配送任务后须返回配送中心。Assumption 1 (setting about vehicles): vehicles and delivery staff correspond one-to-one, and delivery vehicles are all vehicles of the same type. Each vehicle has a certain capacity limit, so the sum of customer demands served by each vehicle cannot exceed the maximum capacity of the vehicle. Vehicles have a maximum transit time limit and must return to the distribution center after completing all delivery tasks.

假设2(关于顾客的设定):顾客订单不能被拆分,每个顾客只能被一辆车服务并且只被服务一次。每个顾客订单在配送之前需要在配送中心取货,并且订单配送有承诺最迟送达时间限制。本发明默认服务时间相较于配送时间不显著,因此不考虑顾客服务时间。Assumption 2 (setting about customers): customer orders cannot be split, each customer can only be served by one vehicle and only once. Each customer order needs to be picked up at the distribution center before it is shipped, and there is a promised latest delivery time limit for order delivery. The default service time of the present invention is not significant compared to the delivery time, so the customer service time is not considered.

假设3(关于企业的设定):企业线上营业有工作时间限制,只在工作时间内接受订单并派出车辆进行配送。企业拥有的车辆与配送员的数量有限。Assumption 3 (about the setting of the enterprise): The online business of the enterprise is limited by working hours, and it only accepts orders and sends vehicles for delivery during working hours. Businesses have a limited number of vehicles and delivery staff.

S13,参数与变量表示;S13, parameter and variable representation;

模型使用的参数与变量说明如表1所示。The parameters and variables used in the model are described in Table 1.

表1模型相关参数与变量说明Table 1. Description of parameters and variables related to the model

Figure BDA0003616949430000081
Figure BDA0003616949430000081

Figure BDA0003616949430000091
Figure BDA0003616949430000091

Figure BDA0003616949430000101
Figure BDA0003616949430000101

S14,配送员经验的函数表示;S14, the function representation of the experience of the delivery staff;

在实际的物流配送过程中,很多环境条件会影响车辆的行驶时间,而由配送员学习积累的经验一定程度上能够缩短行驶时间。因此,本发明在已有研究基础上,重新提出了一个函数关系式,以表征在配送员经验的影响下行驶时间的变化趋势,公式如式(18)所示。In the actual logistics distribution process, many environmental conditions will affect the driving time of the vehicle, and the experience accumulated by the delivery staff can shorten the driving time to a certain extent. Therefore, on the basis of the existing research, the present invention proposes a new functional relationship to represent the change trend of the travel time under the influence of the experience of the delivery staff. The formula is shown in formula (18).

Figure BDA0003616949430000102
Figure BDA0003616949430000102

其中,T0为配送员完全不具有经验时的车辆行驶时间,xi与xj表示访问次数,l为学习因子,表示经验的增长速度。当车辆在节点i与j之间行驶时,若i与j均表示顾客点,则行驶时间取决于配送员对两个顾客的经验平均值。若i或j中有一节点为配送中心,则行驶时间只取决于配送员对其中顾客的经验值。此外,在配送员经验的影响下,行驶时间最长缩短为αT0。从该函数表达式可知,车辆的行驶时间实际上受到顾客访问次数的影响。Among them, T 0 is the travel time of the vehicle when the delivery person has no experience at all, x i and x j represent the number of visits, and l is the learning factor, which represents the growth rate of experience. When the vehicle travels between nodes i and j, if i and j both represent customer points, the travel time depends on the average experience of the delivery person for the two customers. If a node in i or j is a distribution center, the travel time only depends on the experience value of the delivery staff to the customers in it. In addition, under the influence of the experience of the courier, the travel time can be shortened to αT 0 at the longest. From this function expression, it can be known that the travel time of the vehicle is actually affected by the number of customer visits.

与此同时,车辆的行驶时间具有随机性。本发明假设其服从正态分布,即TTij~N(uij2)。在以往的文献研究中,期望值uij一般默认等于T0。然而,由于考虑了配送员经验的影响,行驶时间虽然都服从正态分布,但是其期望值uij需要通过式(18)计算得出。因此,对于不同配送员来说,其在同一条路径上行驶时间的期望值并不相同。对于同一个配送员来说,其经验对不同路径的影响程度也存在差异。At the same time, the driving time of the vehicle is random. The present invention assumes that it obeys a normal distribution, that is, TT ij ~N(u ij2 ). In previous literature studies, the expected value u ij is generally equal to T 0 by default. However, since the influence of the experience of the delivery staff is considered, although the travel time obeys the normal distribution, its expected value u ij needs to be calculated by formula (18). Therefore, for different couriers, the expected value of travel time on the same route is not the same. For the same courier, the influence of his experience on different routes is also different.

S15,单阶段数学模型建立;S15, single-stage mathematical model establishment;

在单一配送阶段中,可用车辆数量以及顾客订单的信息已知,且所有车辆均位于配送中心。由于行驶时间ZTij具有随机性,故顾客订单的送达时间ATi、顾客订单的延迟送达时间DTi以及车辆超出最长在途时间的时间ZTk同样具有随机性。因此,该问题可以视为随机静态车辆路径问题。同时,针对可能存在违背顾客最迟送达时间以及车辆最长在途时间的情况,采用最简单的惩罚修正策略。基于上述说明,以企业的配送成本最小为目标构建单阶段随机车辆路径优化模型如下所示。In a single delivery phase, the number of vehicles available and information on customer orders are known, and all vehicles are located in the distribution center. Since the travel time ZT ij is random, the delivery time AT i of the customer order, the delayed delivery time DT i of the customer order and the time ZT k when the vehicle exceeds the longest transit time are also random. Therefore, the problem can be regarded as a stochastic static vehicle routing problem. At the same time, the simplest punishment correction strategy is adopted for the situation that may violate the latest delivery time of customers and the longest transit time of vehicles. Based on the above description, a single-stage stochastic vehicle routing optimization model is constructed with the goal of minimizing the distribution cost of the enterprise as shown below.

Figure BDA0003616949430000111
Figure BDA0003616949430000111

Figure BDA0003616949430000112
Figure BDA0003616949430000112

Figure BDA0003616949430000113
Figure BDA0003616949430000113

Figure BDA0003616949430000114
Figure BDA0003616949430000114

Figure BDA0003616949430000115
Figure BDA0003616949430000115

Figure BDA0003616949430000116
Figure BDA0003616949430000116

Figure BDA0003616949430000117
Figure BDA0003616949430000117

Figure BDA0003616949430000118
Figure BDA0003616949430000118

Figure BDA0003616949430000119
Figure BDA0003616949430000119

Figure BDA00036169494300001110
Figure BDA00036169494300001110

Figure BDA00036169494300001111
Figure BDA00036169494300001111

目标函数式(1)表示最小化配送成本,其中配送成本分为四部分:车辆固定成本、车辆行驶成本、顾客订单延迟送达以及超出车辆最长在途时间的修正成本。式(2)(3)是流量平衡约束,表示车辆如果为顾客提供服务,则必须访问该顾客,并且在服务结束后必须从该顾客处离开。式(4)表示每个顾客只能被一辆车服务。式(5)表示所有派出的车辆都是从配送中心出发,完成配送任务后必须回到配送中心。式(6)表示车辆数量有限,派出的车辆数不能超过企业拥有的车辆数。式(7)表示每条配送路径上的所有顾客订单的容量不能超过车辆的最大容量。式(8)为消除车辆路径子回路的约束。式(9)(10)分别为计算订单延迟送达以及车辆超过最长时间的时间计算表达式。式(11)为决策变量取值约束。The objective function formula (1) represents the minimization of the delivery cost, where the delivery cost is divided into four parts: the fixed cost of the vehicle, the cost of the vehicle, the delayed delivery of the customer order, and the correction cost exceeding the maximum travel time of the vehicle. Equations (2) and (3) are flow balance constraints, which means that if a vehicle serves a customer, it must visit the customer, and must leave the customer after the service is over. Equation (4) indicates that each customer can only be served by one vehicle. Equation (5) indicates that all dispatched vehicles start from the distribution center and must return to the distribution center after completing the distribution task. Equation (6) indicates that the number of vehicles is limited, and the number of vehicles dispatched cannot exceed the number of vehicles owned by the enterprise. Equation (7) indicates that the capacity of all customer orders on each delivery route cannot exceed the maximum capacity of the vehicle. Equation (8) is to eliminate the constraints of the vehicle path sub-loop. Equations (9) and (10) are the expressions for calculating the delay in order delivery and the time when the vehicle exceeds the maximum time. Equation (11) is the value constraint of decision variable.

S16,多阶段数学模型建立。S16, establishing a multi-stage mathematical model.

在即时配送问题中,顾客订单的到达是动态的,这要求企业进行多阶段决策优化。此外,企业当前的决策会影响车辆返回配送中心的时间,进而影响下一阶段的决策。例如,派出更多的车辆可以提高订单的准时送达率,但会减少下阶段的可用车辆数量。因此,当企业进行决策时,有可能会出现这样一种情况:如果本阶段出现大量的顾客下单,但是仍然还有较多车辆未完成上一次的配送任务回到配送中心。这时配送中心现有的可用车辆太少,无法满足过多顾客订单的配送要求。为此,本发明将正在进行配送任务还未回到配送中心的车辆作为潜在可用资源,以所有车辆的可用时间为前提进行订单分配及路径规划。In the just-in-time delivery problem, the arrival of customer orders is dynamic, which requires companies to perform multi-stage decision optimization. In addition, the company's current decision-making affects the time when the vehicle returns to the distribution center, which in turn affects the next stage of decision-making. For example, dispatching more vehicles can increase the on-time delivery rate of an order, but reduce the number of vehicles available in the next phase. Therefore, when a company makes a decision, it may happen that if a large number of customers place orders at this stage, there are still many vehicles that have not completed the last delivery task and returned to the distribution center. At this time, there are too few available vehicles in the distribution center to meet the delivery requirements of excessive customer orders. To this end, the present invention regards vehicles that are in the process of delivery tasks but have not returned to the distribution center as potentially available resources, and performs order allocation and route planning on the premise of the availability of all vehicles.

从以上描述可知,阶段r决策后的物流方案中企业派出的车辆可能分为两种:配送中心现有的可用车辆

Figure BDA0003616949430000121
和潜在可用车辆
Figure BDA0003616949430000122
对于可用车辆
Figure BDA0003616949430000123
其最早可用时间就等于决策的时间节点。对于潜在可用车辆
Figure BDA0003616949430000124
其最早可用时间等于它们回到配送中心的时间。然而,行驶时间的随机性导致了潜在可用车辆回到配送中心的时间也具有随机性。因此对于企业的决策来说,潜在可用车辆的可用时间信息是不确定的。It can be seen from the above description that the vehicles dispatched by the enterprise in the logistics plan after the decision in stage r may be divided into two types: the existing vehicles available in the distribution center
Figure BDA0003616949430000121
and potentially available vehicles
Figure BDA0003616949430000122
for available vehicles
Figure BDA0003616949430000123
The earliest available time is equal to the time node of the decision. For potentially available vehicles
Figure BDA0003616949430000124
Their earliest available time is equal to their return to the distribution center. However, the randomness of travel times results in randomness in the time when potentially available vehicles return to the distribution center. Therefore, the availability time information of potentially available vehicles is uncertain for enterprise decision-making.

针对研究的即时配送路径问题,建立多阶段随机车辆路径优化模型,其目标如下所示:Aiming at the real-time distribution routing problem studied, a multi-stage stochastic vehicle routing optimization model is established, and its objectives are as follows:

Figure BDA0003616949430000125
Figure BDA0003616949430000125

从单个阶段来看,该目标式与式(1)等价。此外,多阶段问题中不仅每个阶段需满足单阶段模型规定的约束条件,还需满足以下约束:From the point of view of a single stage, this objective formula is equivalent to formula (1). In addition, in a multi-stage problem, not only each stage needs to meet the constraints specified by the single-stage model, but also the following constraints:

Figure BDA0003616949430000131
Figure BDA0003616949430000131

Figure BDA0003616949430000132
Figure BDA0003616949430000132

Figure BDA0003616949430000133
Figure BDA0003616949430000133

Figure BDA0003616949430000134
Figure BDA0003616949430000134

Figure BDA0003616949430000135
Figure BDA0003616949430000135

式(13)表示企业只会在营业时间内进行决策。式(14)表示每次决策只针对本阶段内出现的顾客订单。式(15)表示顾客订单的送达时间不早于车辆的出发时间。式(16)表示派出车辆的出发时间应该在其可用时间之后。式(17)为决策变量取值约束。Equation (13) indicates that the enterprise will only make decisions during business hours. Equation (14) indicates that each decision is only for customer orders that appear in this stage. Equation (15) indicates that the delivery time of the customer order is not earlier than the departure time of the vehicle. Equation (16) indicates that the departure time of the dispatched vehicle should be after its available time. Equation (17) is the value constraint of decision variable.

S20,设计模型的求解方法。S20, the solution method of the design model.

S21,仿真启发式方法框架设计;S21, simulation heuristic method framework design;

仿真启发式方法结合了元启发式算法与仿真方法对随机组合优化问题进行求解,具有灵活性、易实现的优点,已经成功运用于求解随机车辆路径问题。在仿真启发式方法框架中,元启发式算法负责解的搜索更新,仿真方法负责对元启发式算法得到的解进行评估。本发明设计的仿真启发式方法框架如图1所示。The simulation heuristic method combines the meta-heuristic algorithm and the simulation method to solve the stochastic combinatorial optimization problem. It has the advantages of flexibility and easy implementation, and has been successfully applied to solve the random vehicle routing problem. In the simulation heuristic method framework, the meta-heuristic algorithm is responsible for the search and update of the solution, and the simulation method is responsible for evaluating the solution obtained by the meta-heuristic algorithm. The framework of the simulation heuristic method designed by the present invention is shown in FIG. 1 .

基于仿真启发式方法求解随机组合优化问题有一个这样的前提:一个高效的元启发式算法能够求出随机组合优化问题对应的确定性问题的高质量解,并且确定性问题的高质量解很可能也是对应随机问题的高质量解。在即时配送路径问题中,行驶时间具有随机性,并且服从正态分布。因此,在设计的仿真启发式方法框架中,行驶时间的期望值被用于取代随机行驶时间,以将具有随机行驶时间的随机模型转换变为确定模型。Solving stochastic combinatorial optimization problems based on simulation heuristics has a premise: an efficient meta-heuristic algorithm can obtain high-quality solutions to deterministic problems corresponding to stochastic combinatorial optimization problems, and the high-quality solutions of deterministic problems are likely to be It is also a high-quality solution for random problems. In the instant delivery routing problem, the travel time is random and obeys a normal distribution. Therefore, in the designed simulation heuristics framework, the expected value of travel time is used in place of random travel time to transform a stochastic model with random travel time into a deterministic model.

然后,本发明在自适应大邻域搜索算法(Adaptive Large Neighborhood Search,ALNS)基础上设计了改进自适应大邻域搜索算法(Improved Adaptive LargeNeighborhood Search,IANLS)对确定模型进行求解。在每次迭代过程中,IALNS得到的更新解需要在随机环境下进行仿真以评估解的质量。本发明采用的仿真方法为蒙特卡洛模拟。考虑到仿真启发式方法的求解效率,只有被IALNS接受的更新解才会进行快速仿真过程以计算解的期望目标值,并且该阶段的仿真次数Nfs较少。此外,仿真启发式方法框架定义了一个大小为Nl的解序列,用于存储进行快速仿真后的更新解。当解序列中解的数量小于Nl时,更新解直接被存入其中,并依据期望目标值大小进行排序。否则,更新解需要与解序列中的末尾解进行比较,两者中期望值更小的解被保留在解序列中。Then, the present invention designs an improved adaptive large neighborhood search algorithm (Improved Adaptive Large Neighborhood Search, IANLS) based on the adaptive large neighborhood search algorithm (Adaptive Large Neighborhood Search, ALNS) to solve the determination model. During each iteration, the updated solution obtained by IALNS needs to be simulated in a stochastic environment to evaluate the quality of the solution. The simulation method adopted in the present invention is Monte Carlo simulation. Considering the solution efficiency of the simulation heuristic method, only the updated solution accepted by IALNS will undergo a fast simulation process to calculate the expected target value of the solution, and the number of simulations N fs in this stage is small. In addition, the simulation heuristics framework defines a solution sequence of size N l for storing updated solutions after fast simulations. When the number of solutions in the solution sequence is less than N l , the updated solutions are directly stored in it and sorted according to the expected target value. Otherwise, the updated solution needs to be compared with the solution at the end of the solution sequence, and the solution with the lower expected value of the two is kept in the solution sequence.

最后,当IALNS迭代结束时,解序列中已经存储了Nl个可能作为随机模型最优解的解。此时,解序列进行第二轮仿真过程来计算每个解的期望目标值。值得注意的是,相比于第一轮仿真过程,本轮仿真次数Ns远大于Nfs,以更准确地评估每个解。Finally, when the IALNS iteration ends, the solution sequence has stored N l possible solutions as the optimal solution of the stochastic model. At this point, the solution sequence goes through a second simulation run to calculate the desired target value for each solution. It is worth noting that the number of simulations N s in this round is much larger than N fs in order to more accurately evaluate each solution compared to the first round of simulations.

S22,蒙特卡洛模拟设计;S22, Monte Carlo simulation design;

在建立的问题模型中,行驶时间具有随机性。因此,本发明采用蒙特卡洛模拟方法计算解的期望目标值,主要可以分为以下三个步骤:S221,根据概率分布随机生成每个随机变量的具体值;S222,计算解的目标函数值;S223,重复S221与S222Nsim次,计算解的期望目标值。详细的计算步骤如表2所示。In the established problem model, the travel time is random. Therefore, the present invention adopts the Monte Carlo simulation method to calculate the expected target value of the solution, which can be mainly divided into the following three steps: S221, randomly generating the specific value of each random variable according to the probability distribution; S222, calculating the objective function value of the solution; S223, repeating S221 and S222N sim times to calculate the expected target value of the solution. The detailed calculation steps are shown in Table 2.

表2蒙特卡洛模拟计算过程Table 2 Monte Carlo simulation calculation process

Figure BDA0003616949430000141
Figure BDA0003616949430000141

Figure BDA0003616949430000151
Figure BDA0003616949430000151

S23,改进自适应大邻域搜索算法设计。S23, improving the design of an adaptive large neighborhood search algorithm.

本发明设计了一种改进自适应大邻域搜索算法。首先,根据问题的特点设计或改进了破坏与修复算子。其次,一个局部搜索过程被加入到IALNS当中,以增强算法的局部搜索能力的目的。最后,人工蜂群算法(Artificial Bee Colony Algorithm,ABC)中解的放弃准则取代了传统ALNS中的模拟退火准则。IALNS的基本流程如表3所示。The present invention designs an improved adaptive large neighborhood search algorithm. First, the destruction and repair operators are designed or improved according to the characteristics of the problem. Second, a local search process is added to IALNS for the purpose of enhancing the local search capability of the algorithm. Finally, the abandonment criterion of the solution in Artificial Bee Colony Algorithm (ABC) replaces the simulated annealing criterion in traditional ALNS. The basic flow of IALNS is shown in Table 3.

表3 IALNS的基本流程Table 3 The basic process of IALNS

Figure BDA0003616949430000152
Figure BDA0003616949430000152

Figure BDA0003616949430000161
Figure BDA0003616949430000161

S231,解的编码设计S231, Coding Design of Solutions

首先对问题的解采用自然数的编码方式,参见图2。假如问题中包含6个顾客,3辆车,这种情况下问题的解可用如图2所示的序列进行表示。两个数值0之间的序列代表一辆车的行驶路径,前一个0值表示路径的起点,后一个0值表示路径的终点,非0值表示访问的顾客编号,所有车辆的行驶路径构成问题的一个解。First, the solution of the problem is encoded by natural numbers, see Figure 2. If the problem contains 6 customers and 3 cars, the solution to the problem in this case can be represented by the sequence shown in Figure 2. The sequence between two values 0 represents the driving path of a vehicle. The first 0 value represents the starting point of the path, the latter 0 value represents the end point of the path, and the non-zero value represents the visited customer number. The driving path of all vehicles constitutes a problem a solution of .

S232,初始化设计;S232, initialize the design;

由于具有规则式的破坏与修复算子,ALNS可以很容易从质量差的解迭代成质量高的解。因此,初始解的质量并不是那么的重要,高质量的初始解反而容易使得算法过早收敛从而陷入局部最优。本发明在保证车辆容量可行性的前提下,采用简单的插入启发式方法生成初始解,具体过程如下所示:(1)生成只包含车辆起点与终点的空路径序列;(2)随机选择一个顾客i,判断插入顾客i后该条路径上的总需求是否超过车辆容量。若超过则转步骤(1),否则转步骤(3);(3)判断该条路径上已有的连续两个顾客j、j+1以及顾客i的最迟服务时间,若LTj<LTi<LTj+1,则将顾客i插入到顾客j与顾客j+1之间;(4)判断所有顾客是否都插入到路径当中,若是,则转步骤(5),否则转步骤(2);(5)将所有序列合并到同一个序列当中,并去除序列中相邻两个0值中的一个;(6)判断序列中的路径数量是否达到车辆数量,若达到,则停止,否则在序列当中添加0值直到路径数量与车辆数量相等为止。Due to its regular destruction and repair operators, ALNS can easily iterate from poor quality solutions to high quality solutions. Therefore, the quality of the initial solution is not so important, and a high-quality initial solution can easily cause the algorithm to converge prematurely and fall into a local optimum. On the premise of ensuring the feasibility of the vehicle capacity, the present invention adopts a simple insertion heuristic method to generate the initial solution, and the specific process is as follows: (1) generate an empty path sequence that only includes the starting point and the ending point of the vehicle; (2) randomly select one For customer i, determine whether the total demand on this route exceeds the vehicle capacity after inserting customer i. If it exceeds, go to step (1), otherwise go to step (3); (3) judge the latest service time of two consecutive customers j, j+1 and customer i on the route, if LT j < LT i <LT j+1 , insert customer i between customer j and customer j+1; (4) judge whether all customers are inserted into the path, if so, go to step (5), otherwise go to step (2) ); (5) merge all sequences into the same sequence, and remove one of the two adjacent 0 values in the sequence; (6) judge whether the number of paths in the sequence reaches the number of vehicles, if so, stop, otherwise Add 0 values to the sequence until the number of paths equals the number of vehicles.

S233,破坏算子设计;S233, destroy the operator design;

IALNS使用的破坏算子包括随机移除算子、路径移除算子、最差移除算子、最差距离移除算子、最差时间移除算子、相似移除算子与邻近相似移除算子。在破坏阶段,IALNS会选择这些算子中的一个对解进行破坏。破坏算子会从当前解Scurrent中移除一定数量的顾客,同时将被移除的顾客存入序列Cremove中并得到移除顾客后的解Sremove。其中,移除顾客的数量Nremove对算法的求解性能具有重要影响。Nremove值过大会使得算法的求解速度变慢,过小不利于算法跳出局部最优。在本发明中,Nremove与顾客数量n相关。The destruction operators used by IALNS include random removal operator, path removal operator, worst removal operator, worst distance removal operator, worst time removal operator, similarity removal operator and adjacent similarity Remove operator. During the destruction phase, IALNS will choose one of these operators to destroy the solution. The destruction operator will remove a certain number of customers from the current solution S current , and at the same time store the removed customers in the sequence C remove and get the solution S remove after removing the customers. Among them, the number of removed customers N remove has an important influence on the solution performance of the algorithm. If the N remove value is too large, the solution speed of the algorithm will be slowed down, and if it is too small, it is not conducive for the algorithm to jump out of the local optimum. In the present invention, N remove is related to the number n of customers.

S2331,随机移除:从当前解中随机选择Nremove个顾客点移除,该算子虽然操作简单,但顾客点移除的随机性能够很大程度上扩大解的搜索空间,增加算法搜索的多样性。S2331, random removal: randomly select N remove customer points from the current solution to remove. Although this operator is simple to operate, the randomness of customer point removal can greatly expand the search space of the solution and increase the search efficiency of the algorithm. Diversity.

S2332,路径移除:随机选择解中的一条子路径,将子路径中的所有顾客点移除,这样有利于得到具有最少车辆数的解。S2332, path removal: randomly select a sub-path in the solution, and remove all customer points in the sub-path, which is beneficial to obtain a solution with the least number of vehicles.

S2333,最差移除:定义顾客点i在当前解中的成本为cost(s,i)=Z(s)-Z-i(s),其中Z(s)为当前解的目标值,而Z-i(s)为移除顾客点i后的目标值。最差移除算子需要先计算当前解的目标值,然后计算每个顾客点被移除后的目标值,从而得到每个顾客点的成本,最后从当前解中选择成本最高的顾客点进行移除,重复这一步骤直到Nremove个顾客点被移除。S2333, worst removal: define the cost of customer point i in the current solution as cost(s,i)=Z(s)-Z- i (s), where Z(s) is the target value of the current solution, and Z -i (s) is the target value after removing customer point i. The worst removal operator needs to first calculate the target value of the current solution, and then calculate the target value after each customer point is removed, so as to obtain the cost of each customer point, and finally select the customer point with the highest cost from the current solution. Remove, repeat this step until N remove customer points are removed.

S2334,最差距离移除:定义顾客点i在当前解中的距离成本为顾客i到其前一个顾客点的距离与到其后一个顾客点的距离之和,即discost(s,i)=di-1,i+di,i+1,每次选择距离成本最大的顾客点移除直到Nremove个顾客点被移除。S2334, the worst distance removal: define the distance cost of customer point i in the current solution as the sum of the distance from customer i to its previous customer point and the distance to its next customer point, namely cost(s,i)= d i-1,i +d i,i+1 , each time the customer points with the largest distance cost are selected and removed until N remove customer points are removed.

S2335,最差时间移除:定义顾客点i在当前解中的时间成本为最迟送达时间与到达时间的差值,即timecost(s,i)=|LTi-si|,每次选择时间成本最大的顾客点移除直到Nremove个顾客点被移除。S2335, worst time removal: define the time cost of customer point i in the current solution as the difference between the latest delivery time and the arrival time, that is, timecost(s,i)=|LT i -s i |, each time Select the customer point with the largest time cost to remove until N remove customer points are removed.

S2336,相似移除:定义两个顾客点之间的相似度为Rij=φ1dij2|LTi-LTj|+φ3rij6|qi-qj|,其中dij为两个顾客之间的距离,LTi为最迟送达时间,qi为顾客需求量,而rij表示是否顾客i与顾客j在同一条子路径当中,若在,则rij=1,否则rij=-1。φ14为各自的权重。相似移除算子随机选择一个顾客点从当前解中移除,同时将移除的顾客点存入序列Cremove中。计算解中的每个顾客点与序列Cremove中最后一个顾客点的相似度并选择相似度最大的顾客点移除并存入序列Cremove中,重复这一步骤直到Nremove个顾客点被移除。S2336, similarity removal: define the similarity between two customer points as R ij1 d ij2 |LT i -LT j |+φ 3 r ij6 |q i -q j |, where d ij is the distance between two customers, LT i is the latest delivery time, qi is the customer demand, and r ij represents whether customer i and customer j are in the same sub-path, if so, r ij =1, otherwise r ij =-1. φ 14 are the respective weights. The similarity removal operator randomly selects a customer point to remove from the current solution, and stores the removed customer point in the sequence C remove . Calculate the similarity between each customer point in the solution and the last customer point in the sequence C remove , and select the customer point with the largest similarity to remove and store it in the sequence C remove . Repeat this step until N remove customer points are removed. remove.

S2337,邻近相似移除:该算子是相似移除算子的一个特例,其中φ1=φ2φ3=0,φ4=1,这个算子移除一些距离相近的顾客点。S2337, adjacent similarity removal: this operator is a special case of the similarity removal operator, where φ 12 = φ 3=0, φ 4 =1, this operator removes some customer points with similar distances.

S234,修复算子设计;S234, repair the operator design;

修复阶段IALNS会从众多修复算子选择一个将被移除的顾客序列Cremove重新插入到Sremove,从而生成了与当前解Scurrent相对应的更新解Supd8te。在修复阶段,IALNS使用了五个修复算子,分别为贪婪插入、后悔插入、距离贪婪插入、带噪声扰动的成本贪婪插入、带噪声扰动的距离贪婪插入。In the repair phase, IALNS will select a customer sequence C remove to be removed from many repair operators and re-insert it into S remove , thereby generating an updated solution S upd8te corresponding to the current solution S current . In the repair phase, IALNS uses five repair operators, namely greedy insertion, regret insertion, distance greedy insertion, cost greedy insertion with noise perturbation, and distance greedy insertion with noise perturbation.

S2341,贪婪插入:从序列Cremove中随机选择一个顾客,计算该顾客插入解Sremove中每个位置后引起的目标增加值,选择增加值最小的位置将该顾客插入解中,重复这一步骤直到Cremove中所有顾客点全部插入解中。S2341, greedy insertion: randomly select a customer from the sequence C remove , calculate the target increase value caused by inserting the customer into each position in the solution S remove , select the position with the smallest increase value to insert the customer into the solution, and repeat this step Until all customer points in C remove are inserted into the solution.

S2342,后悔值插入:计算每个顾客插入解中每个位置后引起的目标增加值,定义后悔值为

Figure BDA0003616949430000181
其中
Figure BDA0003616949430000182
为顾客i插入后引起的最小目标增加值,
Figure BDA0003616949430000183
表示顾客i插入后引起的第二小目标增加值。选择后悔值最大的顾客并将该顾客插入到增加值最小的位置上,重复这一步骤直到Cremove中所有顾客点全部插入解中。S2342, regret value insertion: Calculate the target increase value caused by each customer inserting each position in the solution, and define the regret value as
Figure BDA0003616949430000181
in
Figure BDA0003616949430000182
the minimum target increment after insertion for customer i,
Figure BDA0003616949430000183
Represents the second smallest target increase after insertion by customer i. Select the customer with the largest regret value and insert the customer into the position with the smallest increase value. Repeat this step until all customer points in C remove are inserted into the solution.

S2343,距离贪婪插入:从序列Cremove中随机选择一个顾客,计算该顾客插入解Sremove中每个位置后引起的距离增量,公式为di=dhi+dij-dhj。选择距离增量最小的位置插入该顾客,重复这一步骤直到Cremove中所有顾客点全部插入解中。S2343, distance greedy insertion: randomly select a customer from the sequence C remove , calculate the distance increment caused by inserting the customer into each position in the solution S remove , the formula is d i =d hi +d ij -d hj . Select the position with the smallest distance increment to insert the customer, and repeat this step until all customer points in C remove are inserted into the solution.

S2344,带噪声扰动的成本贪婪插入:贪婪插入算子在选择每个顾客的插入位置时都是选择最优位置,这种缺少随机性的插入方式容易使得算法陷入局部最优。带噪声扰动的成本贪婪插入在贪婪插入算子的基础之上,加入了噪声对目标增加值进行扰动,噪声扰动后的目标增加值计算公式为:insertcost-i=insertcosti+u*r*insertcostmax,其中insertcosti为噪声扰动前的目标增加值,insertcostmax为插入所有位置中的最大目标增加值,u为噪声参数,而r为[-1,1]内的随机数。S2344, Cost greedy insertion with noise disturbance: The greedy insertion operator selects the optimal position when selecting the insertion position of each customer. This lack of randomness easily makes the algorithm fall into a local optimum. The cost greedy insertion with noise perturbation is based on the greedy insertion operator, adding noise to perturb the target increase value. The calculation formula of the target increase value after noise perturbation is: insertcost -i =insertcost i +u*r*insertcost max , where insertcost i is the target increase value before noise disturbance, insertcost max is the maximum target increase value inserted in all positions, u is the noise parameter, and r is a random number in [-1,1].

S2345,带噪声扰动的距离贪婪插入:该算子是距离贪婪插入算子的一个扩展形式,同样是在计算距离增量时加入了噪声扰动,计算公式与带噪声扰动的成本贪婪插入类似。S2345, distance greedy insertion with noise perturbation: This operator is an extended form of the distance greedy insertion operator. It also adds noise perturbation when calculating the distance increment. The calculation formula is similar to the cost greedy insertion with noise perturbation.

S235,局部搜索设计;S235, local search design;

在破坏与修复阶段之后,IALNS增加了一个局部搜索阶段,这一阶段主要是为了增强算法的局部搜索能力。在该阶段,算法根据子路径的长度选择使用2-opt*或3-opt*进行局部搜索,即对解中的每条子路径交换两个顾客点或则三个顾客点来优化当前解。从本质上来说,IALNS在破坏与修复阶段通过从众多个算子当中选择一个进行解的迭代更新,这样虽然扩大了解的搜索空间,但也意味着带来了更多的随机性,而局部搜索算子的加入可以在一定程度上弥补这种缺陷,平衡算法在搜索上的广度与深度。After the destruction and repair phase, IALNS adds a local search phase, which is mainly to enhance the local search ability of the algorithm. At this stage, the algorithm chooses to use 2-opt* or 3-opt* for local search according to the length of the subpath, that is, exchange two customer points or three customer points for each subpath in the solution to optimize the current solution. Essentially, IALNS performs iterative update of the solution by selecting one of many operators in the destruction and repair phase. Although this expands the search space of understanding, it also means that it brings more randomness, while local search The addition of operators can make up for this defect to a certain extent, and balance the breadth and depth of the algorithm in search.

S236,解的放弃准则设计;S236, design of the abandonment criterion of the solution;

传统ALNS中加入了模拟退火的判断准则接受非改进解,即当迭代过程中产生的更新解不优于当前解时,算法具有一定的概率接受这个更新解。然而,虽然模拟退火准则在迭代前期有助于算法在全局范围内搜寻更优的解,但这种做法明显不利于算法在一个局部区域内寻找一个更好的解。因此,本发明借鉴ABC放弃解的思想,使用一个放弃准则取代模拟退火准则,以期望IALNS在搜索深度与广度方面得到更好的平衡。In traditional ALNS, the judgment criterion of simulated annealing is added to accept the non-improved solution, that is, when the updated solution generated in the iterative process is not better than the current solution, the algorithm has a certain probability to accept the updated solution. However, although the simulated annealing criterion helps the algorithm to search for a better solution in the global scope in the early iteration, it is obviously not conducive to the algorithm to find a better solution in a local area. Therefore, the present invention draws on the idea of abandoning the solution of ABC, and replaces the simulated annealing criterion with an abandonment criterion, so as to expect IALNS to obtain a better balance in terms of search depth and breadth.

放弃准则的具体做法是在每次迭代过程中生成一个更新解,若更新解不优于当前解,连续未改进次数加一,否则连续未改进次数归零。当连续未改进次数达到阈值Nt时,使用一个cross-exchange算子对当前解进行扰动。cross-exchange算子随机选择解中的两条子路径,然后分别从两条子路径中选择一段连续的顾客点,最后交换两条子路径上选出的顾客点。算子示意图如图3所示。The specific method of abandoning the criterion is to generate an updated solution in each iteration process. If the updated solution is not better than the current solution, the number of consecutive unimproved is increased by one, otherwise the number of consecutive unimproved is reset to zero. When the number of consecutive unimproved times reaches the threshold Nt , a cross-exchange operator is used to perturb the current solution. The cross-exchange operator randomly selects two sub-paths in the solution, then selects a segment of continuous customer points from the two sub-paths, and finally exchanges the selected customer points on the two sub-paths. The schematic diagram of the operator is shown in Figure 3.

S237,算子选择机制设计。S237, the operator selection mechanism design.

对于第二种破坏算子以及所有修复算子,本发明采取自适应的算子选择策略。在算法最开始的时候,所有算子具有相同的初始权重与初始分数,初始权重设置为1,初始分数为0,并且每进行Ns次迭代就更新一次权重与分数。每次迭代算法根据轮盘赌法则选择一个破坏算子与一个修复算子进行解的更新,同时记录算子i被选中的次数ui,权重越大的算子越容易被选中。然后根据每次迭代后得到的更新解的质量赋予算子不同的分数。更新解优于全局最优解时,赋予破坏与修复算子分数σ1。更新解差于全局最优解但是优于当前解时,赋予分数σ2。当更新解差于当前解,不赋予任何分数。当一个Ns次迭代结束时,使用公式更新算子的权重,作为下一个Ns次迭代算子的初始权重。同时在该Ns次迭代算子得到的总分si以及被选择的次数ui归零。公式如(19)所示,其中ρ为权重调整系数,表示算子权重更新时历史权重与算子表现的重要程度,

Figure BDA0003616949430000201
表示第i个算子在第r个Ns次迭代的权重。通过这一公式,算子权重与其历史表现挂钩,达到算子权重自适应调整的目的。For the second destruction operator and all repair operators, the present invention adopts an adaptive operator selection strategy. At the very beginning of the algorithm, all operators have the same initial weight and initial score, the initial weight is set to 1, the initial score is 0, and the weight and score are updated every N s iterations. Each iteration algorithm selects a destruction operator and a repair operator to update the solution according to the roulette rule, and records the number of times u i that operator i is selected, and the operator with a larger weight is easier to be selected. The operator is then given different scores according to the quality of the updated solution obtained after each iteration. When the updated solution is better than the global optimal solution, the damage and repair operator scores σ 1 are assigned. When the updated solution is worse than the global optimal solution but better than the current solution, a score σ 2 is assigned. When the updated solution is worse than the current solution, no score is assigned. When one N s iterations ends, the weight of the operator is updated using the formula as the initial weight of the next N s iteration operator. At the same time, the total score s i and the selected times u i obtained in the N s iterations are reset to zero. The formula is shown in (19), where ρ is the weight adjustment coefficient, indicating the importance of the historical weight and the operator performance when the operator weight is updated,
Figure BDA0003616949430000201
Represents the weight of the ith operator in the rth Ns iterations. Through this formula, the operator weight is linked to its historical performance to achieve the purpose of adaptive adjustment of the operator weight.

Figure BDA0003616949430000202
Figure BDA0003616949430000202

实验结果与分析:Experimental results and analysis:

本发明的实验内容主要分为两部分:仿真启发式方法的性能验证以及即时配送路径优化模型的计算与分析,这两部分内容分别对应一下实施例一与实施例二。The experimental content of the present invention is mainly divided into two parts: the performance verification of the simulation heuristic method and the calculation and analysis of the real-time distribution route optimization model. These two parts correspond to the first embodiment and the second embodiment respectively.

实施例一;Embodiment 1;

基于IALNS与蒙特卡洛模拟的仿真启发式方法的求解性能很大程度上受到上述定义的各类参数的影响,本发明设置的参数如表4所示。The solution performance of the simulation heuristic method based on IALNS and Monte Carlo simulation is largely affected by the above-defined various parameters, and the parameters set in the present invention are shown in Table 4.

表4参数设置Table 4 Parameter settings

Figure BDA0003616949430000211
Figure BDA0003616949430000211

在本发明设计的仿真启发式方法框架中,蒙特卡洛模拟并不是一种优化方法,仿真启发式方法的求解性能主要取决于IALNS。因此,本节首先对所研究问题的单一配送阶段的确定性问题进行实验,而不考虑车辆行驶时间的随机性,以验证IALNS算法的求解效果。同时,我们使用著名的Solomon数据集进行实验,并选择与求解器Gurobi得到的结果进行对比。Solomon数据集主要是针对带时间窗的车辆路径问题生成,并根据顾客点的地理分布特征,可以分为三类:聚类分布(标号为C)、随机分布(标号为R)、聚类与随机混合分布(标号为RC)。此外,考虑到Gurobi的求解效率,从Solomon数据集中选择合适的数据进行实验,同时将Gurobi的最长求解时间限制为1800秒。In the framework of the simulation heuristic method designed by the present invention, Monte Carlo simulation is not an optimization method, and the solution performance of the simulation heuristic method mainly depends on IALNS. Therefore, this section first conducts experiments on the deterministic problem of the single delivery stage of the research problem, without considering the randomness of the vehicle travel time, to verify the solution effect of the IALNS algorithm. At the same time, we use the well-known Solomon dataset for experiments and choose to compare with the results obtained by the solver Gurobi. The Solomon dataset is mainly generated for the vehicle routing problem with time windows, and can be divided into three categories according to the geographical distribution characteristics of customer points: cluster distribution (labeled C), random distribution (labeled R), clustering and Random mixed distribution (labeled RC). In addition, considering the solution efficiency of Gurobi, suitable data are selected from the Solomon dataset for experiments, while the maximum solution time of Gurobi is limited to 1800 seconds.

实验结果如表5所示,相较于Gurobi,IALNS在运算时间上有明显的优势,同时在求解精度方面与Gurobi相当,其中在算例R103、C106、C109表现上IALNS优于Gurobi。这充分说明了IALNS能在短时间内得到较好的解,表现出了很好的性能。The experimental results are shown in Table 5. Compared with Gurobi, IALNS has obvious advantages in operation time and is comparable to Gurobi in solution accuracy. Among them, IALNS is better than Gurobi in the performance of examples R103, C106 and C109. This fully shows that IALNS can get a better solution in a short time, showing good performance.

为了进一步证明IALAS的性能,在标准的ALNS中也加入与IALNS同样的局部搜索操作。同时为了比较的公平性,IALNS与ALNS均使用相同的破坏与修复算子,其他参数设置值也均相同。两种算法先对solomon_100_C101数据集进行不同的迭代次数的计算,然后分别计算具有100个顾客点的C101、C102、C103、R101、R102、R103、RC101、RC102、RC103算例的最终结果,实验结果如图4与图5所示。ABC放弃准则与模拟退火准则的主要作用都是提高算法的寻优能力,避免算法较快陷入局部最优。然而,从图中结果可知,ABC放弃准则使得IALNS具有更高的求解精度,效果明显优于IALNS。In order to further prove the performance of IALAS, the same local search operation as IALNS is also added to the standard ALNS. At the same time, for the fairness of the comparison, both IALNS and ALNS use the same destruction and repair operator, and other parameter settings are also the same. The two algorithms first calculate the solomon_100_C101 data set with different iteration times, and then calculate the final results of the C101, C102, C103, R101, R102, R103, RC101, RC102, RC103 cases with 100 customer points respectively. The experimental results As shown in Figure 4 and Figure 5. The main functions of the ABC abandonment criterion and the simulated annealing criterion are to improve the optimization ability of the algorithm and avoid the algorithm falling into local optimum quickly. However, it can be seen from the results in the figure that the ABC abandonment criterion makes IALNS have a higher solution accuracy, and the effect is obviously better than that of IALNS.

表5 IALNS与Gurobi计算结果对比Table 5 Comparison of calculation results between IALNS and Gurobi

Figure BDA0003616949430000221
Figure BDA0003616949430000221

Figure BDA0003616949430000231
Figure BDA0003616949430000231

实施例二Embodiment 2

本发明对Solomon数据集中具有100个顾客点的数据进行转换。首先,企业的整个营业时间被分为10个阶段,每个阶段的时间长度为1小时。然后,针对每一个阶段,从100个顾客点中随机选择15~25个顾客作为本阶段下单的顾客,并在该阶段的时间内随机生成其下单时间。最后,我们只保留算例中的顾客点坐标、需求以及车辆容量数据。而对于顾客的最晚送达时间,通过综合考虑顾客下单时间以及商户到客户的距离进行随机生成。最终,我们以C101、R101以及RC101作为基准算例,并分别针对每个算例生成4组不同的多阶段算例集,一共12组数据集被用于本次实验。The present invention transforms data with 100 customer points in the Solomon data set. First, the entire business hours of the business are divided into 10 stages, each with a duration of 1 hour. Then, for each stage, 15 to 25 customers are randomly selected from 100 customer points as customers who place orders in this stage, and their order time is randomly generated within the time period of this stage. Finally, we only keep the customer point coordinates, demand, and vehicle capacity data in the study. The latest delivery time for customers is randomly generated by comprehensively considering the time when customers place an order and the distance from the merchant to the customer. Finally, we take C101, R101 and RC101 as the benchmark examples, and generate 4 different multi-stage example sets for each example, a total of 12 sets of data sets are used for this experiment.

对于12组算例,我们采用设计的仿真启发式方法分别进行行驶时间确定、行驶时间随机并且不考虑配送员的经验影响、行驶时间随机并且考虑配送员的经验影响三种场景下的数值实验,分别对应场景一、场景二与场景三。For 12 sets of examples, we use the designed simulation heuristic method to carry out numerical experiments in three scenarios: travel time determination, random travel time without considering the influence of the experience of the courier, random travel time and the influence of the experience of the courier are considered. Corresponding to scene 1, scene 2 and scene 3 respectively.

以C101_1数据集的第一阶段数据为例,分别计算三个实验场景下的行驶路径。值得注意的是,配送员的经验为该组算例中在全部10个阶段的配送任务之后所获得的。如图6所示,三个实验场景下的行驶路径均存在较大差异。当行驶时间具有随机性时,原本能够在最迟时间之前进行服务的顾客可能会得到延迟配送。而延迟配送会额外增加了惩罚成本,进而导致了配送员的最优行驶路径发生变化。当进一步考虑配送员的经验影响时,最优配送方案会更倾向于将顾客订单分配给更具有经验的配送员进行配送,从而也进一步导致最优配送路径发生变化。因此,在进行车辆路径规划时,考虑行驶时间的随机性以及配送员的经验影响是十分必要的。Taking the first stage data of the C101_1 dataset as an example, the driving paths in three experimental scenarios are calculated respectively. It is worth noting that the experience of the delivery staff is obtained after all 10 stages of delivery tasks in this group of examples. As shown in Figure 6, the driving paths in the three experimental scenarios are quite different. When travel times are random, customers who could otherwise be served by the latest time may be delayed. Delayed delivery will increase the penalty cost, which will lead to the change of the optimal driving path of the delivery staff. When further considering the influence of the experience of the delivery staff, the optimal delivery plan will be more inclined to assign customer orders to more experienced delivery staff for delivery, which will further lead to changes in the optimal delivery route. Therefore, it is necessary to consider the randomness of the travel time and the experience of the delivery staff when planning the vehicle path.

表6算例计算结果Table 6 The calculation results of the calculation example

Figure BDA0003616949430000232
Figure BDA0003616949430000232

Figure BDA0003616949430000241
Figure BDA0003616949430000241

12组算例在三种不同实验场景下的总成本及其变化比例如表6所示,相比于场景一,场景二的总成本平均降低了8.68%。其主要原因在于当派出车辆数量相当时,考虑随机行驶时间的修正成本会明显更低,从而导致配送的总成本也更低。同时,更低的修正成本侧面体现了商品准时送达率更高。而相比于场景二,场景三的总成本平均降低了10.65%。从这一结果可知,在制定物流配送方案时,考虑随机行驶时间以及配送员经验的影响,有利于降低配送成本,提高商品准时送达率以及配送员的配送效率。Table 6 shows the total cost of 12 groups of examples in three different experimental scenarios and their change ratios. Compared with scenario one, the total cost of scenario two is reduced by 8.68% on average. The main reason for this is that when the number of dispatched vehicles is comparable, the correction cost considering random travel time will be significantly lower, resulting in a lower total delivery cost. At the same time, the lower revision cost side reflects the higher on-time delivery rate of goods. Compared with scenario two, the total cost of scenario three is reduced by an average of 10.65%. From this result, it can be seen that when formulating the logistics distribution plan, considering the influence of random travel time and the experience of the delivery staff, it is beneficial to reduce the delivery cost, improve the on-time delivery rate of the goods and the delivery efficiency of the delivery staff.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.

Claims (10)

1. An instant delivery route optimization method considering dispenser experience and random travel time, comprising the steps of:
s10, establishing an instant distribution path optimization model;
s20, designing a solving method of the model;
wherein, S20 specifically includes the following steps:
s21, simulating heuristic method frame design;
s22, carrying out Monte Carlo simulation design;
and S23, improving the design of the self-adaptive large neighborhood search algorithm.
2. The method according to claim 1, wherein the step S10 of establishing the immediate delivery route optimization model specifically includes the steps of:
s11, problem description;
s12, problem hypothesis;
s13, representing parameters and variables;
s14, function representation of the distributor experience;
s15, establishing a single-stage mathematical model;
s16, establishing a multi-stage mathematical model.
3. The method of claim 2, wherein the question hypothesis, S12, includes a setting for a vehicle, a setting for a customer, and a setting for a business.
4. The method of claim 2, wherein said S14, the function of the distributor' S experience is expressed as:
Figure FDA0003616949420000011
wherein, T 0 For the time of travel of the vehicle when the dispenser is completely inexperienced, x i And x j Expressing the number of visits, and l is a learning factor and expressing the growth speed of the experience; when the vehicle is traveling between nodes i and j, if both i and j represent customer points, the travel time depends on the average of the dealer's experience with both customers; if one node in i or j is a distribution center, the running time only depends on the experience value of a distributor to customers; under the influence of the experience of the distributor, the travel time is shortened to alpha T at the maximum 0 Wherein α represents the longest reduction ratio of the travel time; from this functional expression, it is understood that the travel time of the vehicle is actually affected by the number of times of customer visits.
5. The method according to claim 2, wherein the S16, the multi-stage mathematical model building, comprises building a multi-stage stochastic vehicle path optimization model with the goal of:
Figure FDA0003616949420000021
wherein f is the fixed cost of vehicle starting;
Figure FDA0003616949420000022
indicating whether the vehicle k is used in the r stage, if yes, the vehicle k is used in the r stage
Figure FDA0003616949420000023
Otherwise
Figure FDA0003616949420000024
Figure FDA0003616949420000025
Is the set of customers of phase r; k is a set of vehicles owned by the enterprise, wherein K is {1,2, …, m }, and m vehicles; v r Set of nodes at decision time for stage r, V r
Figure FDA0003616949420000026
E (-) represents the expected value of the random variable;
Figure FDA0003616949420000027
the travel time of the vehicle from node i to node j dispatched for stage r;
Figure FDA0003616949420000028
if the vehicle k runs from the node i to the node j in the decision of the stage r, the value is 1, otherwise, the value is 0; c. C 1 Cost per unit travel time; c. C 2 Correcting the cost for delivery time per unit delay; c. C 3 Cost is corrected for time per unit exceeding the longest time in transit; DT i Delay delivery time for an order for customer i; ZT k The time that the vehicle k exceeds the longest time in transit.
6. The method of claim 1, wherein the S22, monte carlo simulation design, comprises the steps of:
s221, randomly generating a specific value of each random variable according to probability distribution;
s222, calculating an objective function value of the solution;
s223, repeating S221 and S222N sim Next, calculating an expected target value of the solution, where N sim Is the simulation times.
7. The method of claim 1, wherein the step of improving the adaptive large neighborhood search algorithm design S23 comprises the steps of:
s231, designing the decoding;
s232, initializing design;
s233, operator design is destroyed;
s234, repairing operator design;
s235, local search design;
s236, designing a abandoning criterion of the solution;
and S237, designing an operator selection mechanism.
8. The method according to claim 7, wherein the S232, initializing the design, comprises the following steps:
s2321, generating an empty path sequence only comprising a vehicle starting point and a vehicle finishing point;
s2322, randomly selecting a customer i, and judging whether the total demand on the path exceeds the vehicle capacity after the customer i is inserted. If the current value exceeds the preset value, turning to S2321, otherwise, turning to S2323;
s2323, judging the latest service time of two consecutive customers j, j +1 and customer i on the path, if LT is judged j <LT i <LT j+1 Insert customer i between customer j and customer j +1, LT i A latest delivery time promised for an order for customer i;
s2324, judging whether all customers are inserted into the path, if so, turning to S2325, and otherwise, turning to S2322;
s2325, merging all sequences into the same sequence, and removing one of two adjacent 0 values in the sequence;
s2326, judging whether the number of the paths in the sequence reaches the number of the vehicles, if so, stopping, and otherwise, adding a value of 0 in the sequence until the number of the paths is equal to the number of the vehicles.
9. The method of claim 8, wherein the step S233, destroying operator design, comprises the steps of:
s2331, random removal: randomly selecting N from the current solution remove Removing each customer point;
s2332, route removal: randomly selecting a sub-path in the solution, and removing all customer points in the sub-path;
s2333, worst removal: defining the cost of customer point i in the current solution as cost (s, i) ═ Z(s) -Z -i (s), wherein Z(s) is a target value of the current solution, and Z -i (s) for the target value after removing customer point i, the worst removal operator calculates the target value of the current solution, then calculates the target value after each customer point is removed, thereby obtaining the cost of each customer point, finally selects the customer point with the highest cost from the current solution to remove, and repeats the steps until N is reached remove Individual customer points are removed;
s2334, finally, removing: defining the distance cost of the customer point i in the current solution as the sum of the distance from the customer i to the previous customer point and the distance from the customer i to the next customer point, namely, discost (s, i) ═ d i-1,i +d i,i+1 Removing the customer points with the largest distance cost until N remove Individual customer points are removed;
s2335, worst time removal: defining the time cost of customer point i in the current solution as the difference between the latest arrival time and the arrival time, i.e. timetop (s, i) ═ LT i -s i L, remove up to N each time the most time-costly customer site is selected remove Individual customer points are removed;
s2336, similarly remove: defining the similarity between two customer points as R ij =φ 1 d ij2 |LT i -LT j |+φ 3 r ij4 |q i -q j L where d ij Distance between two customers, LT i To the latest arrival time, q i Is the customer demand, and r ij Indicating whether customer i and customer j are in the same sub-path, if yes, then r ij 1, otherwise r ij =-1。φ 14 Are respective weights; the similarity removal operator randomly selects a customer point to remove from the current solution, and stores the removed customer point in the sequence C remove Performing the following steps; each customer point in the computational solution and the sequence C remove The similarity of the last customer point in the sequence C is removed and the customer point with the maximum similarity is selected and stored in the sequence C remove Repeating this step until N remove Individual customer points are removed;
s2337, proximity similarity removal: this operator is a special case of a similar removal operator, where φ 1 =φ 2 =φ 3 =0,φ 4 This operator removes customer points that are close together.
10. The method of claim 9, wherein the S234 repairing operator design comprises the following steps:
s2341, greedy insertion: from sequence C remove Randomly selecting a customer, calculating the customer insertion solution S remove The target increment value caused after each position is selected, the position with the minimum increment value is selected to insert the customer into the solution, and the steps are repeated until C remove All customer points are inserted into the solution;
s2342, inserting the regret value: calculating the target added value caused by each customer inserting each position in the solution, and defining the regret value as
Figure FDA0003616949420000041
Wherein
Figure FDA0003616949420000042
The minimum target increment value caused after insertion for customer i,
Figure FDA0003616949420000043
indicating a second small target increment value caused by insertion of customer i; selecting the customer with the maximum regret value and inserting the customer into the position with the minimum increment value, and repeating the steps until C remove All customer points are inserted into the solution;
s2343, greedy distance insertion: from sequence C remove Randomly selecting a customer, calculating the customer insertion solution S remove The distance increment caused after each position in the equation d i =d hi +d ij -d hj (ii) a Selecting the position with the minimum distance increment to insert the customer, and repeating the steps until C remove All customer points are inserted into the solution;
s2344, cost greedy insertion with noise disturbance: the greedy insertion operator selects the optimal position when selecting the insertion position of each customer, and the algorithm is easy to fall into local optimization due to the insertion mode lacking randomness; the cost greedy insertion with noise disturbance is based on a greedy insertion operator, the noise is added to disturb the target added value, and the calculation formula of the target added value after the noise disturbance is as follows: insert cost -i =insertcost i +u*r*insertcost max Wherein insert cost i Adding value to the target before noise disturbance, insertcost max For the maximum target add value inserted in all positions, u is the noise parameter and r is [ -1,1 [ ]]A random number within;
s2345, distance greedy insertion with noise disturbance: the operator is an extension form of a distance greedy insertion operator, noise disturbance is added in distance increment calculation, and a calculation formula is similar to cost greedy insertion with noise disturbance.
CN202210446140.6A 2022-04-26 2022-04-26 Instant delivery path optimization method considering dispenser experience and random travel time Pending CN114970103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210446140.6A CN114970103A (en) 2022-04-26 2022-04-26 Instant delivery path optimization method considering dispenser experience and random travel time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210446140.6A CN114970103A (en) 2022-04-26 2022-04-26 Instant delivery path optimization method considering dispenser experience and random travel time

Publications (1)

Publication Number Publication Date
CN114970103A true CN114970103A (en) 2022-08-30

Family

ID=82979151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210446140.6A Pending CN114970103A (en) 2022-04-26 2022-04-26 Instant delivery path optimization method considering dispenser experience and random travel time

Country Status (1)

Country Link
CN (1) CN114970103A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115952944A (en) * 2023-03-15 2023-04-11 南京邮电大学 Multi-compartment point-to-point goods taking and delivering path planning method considering loading and unloading constraints
TWI873467B (en) * 2022-10-18 2025-02-21 緯創資通股份有限公司 Method of route planning and electronic device using the same

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798067A (en) * 2020-07-17 2020-10-20 大连理工大学 Distribution path planning method for autonomous vehicles based on adaptive large neighborhood search algorithm
US20210142248A1 (en) * 2018-04-18 2021-05-13 Ford Global Technologies, Llc Mixed vehicle selection and route optimization
CN112884409A (en) * 2021-02-26 2021-06-01 上海东普信息科技有限公司 Distribution route recommendation method, device, equipment and storage medium
CN113177762A (en) * 2021-05-14 2021-07-27 大连海事大学 Multi-center electric vehicle-unmanned aerial vehicle distribution path optimization method
CN114202286A (en) * 2021-12-18 2022-03-18 安庆师范大学 Logistics service vehicle path solving method and system for customer satisfaction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210142248A1 (en) * 2018-04-18 2021-05-13 Ford Global Technologies, Llc Mixed vehicle selection and route optimization
CN111798067A (en) * 2020-07-17 2020-10-20 大连理工大学 Distribution path planning method for autonomous vehicles based on adaptive large neighborhood search algorithm
CN112884409A (en) * 2021-02-26 2021-06-01 上海东普信息科技有限公司 Distribution route recommendation method, device, equipment and storage medium
CN113177762A (en) * 2021-05-14 2021-07-27 大连海事大学 Multi-center electric vehicle-unmanned aerial vehicle distribution path optimization method
CN114202286A (en) * 2021-12-18 2022-03-18 安庆师范大学 Logistics service vehicle path solving method and system for customer satisfaction

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI873467B (en) * 2022-10-18 2025-02-21 緯創資通股份有限公司 Method of route planning and electronic device using the same
CN115952944A (en) * 2023-03-15 2023-04-11 南京邮电大学 Multi-compartment point-to-point goods taking and delivering path planning method considering loading and unloading constraints
CN115952944B (en) * 2023-03-15 2023-08-15 南京邮电大学 Multi-carriage point-to-point picking and delivering path planning method considering loading and unloading constraint

Similar Documents

Publication Publication Date Title
Ulmer et al. The restaurant meal delivery problem: Dynamic pickup and delivery with deadlines and random ready times
Chen et al. Vehicle routing problem of contactless joint distribution service during COVID-19 pandemic
CN104102953B (en) A kind of logistics delivery line optimization generation method and system
Vareias et al. Assessing customer service reliability in route planning with self-imposed time windows and stochastic travel times
CN114970103A (en) Instant delivery path optimization method considering dispenser experience and random travel time
Lopes et al. Simulating carsharing operations through agent-based modelling: An application to the city of Lisbon, Portugal
CN110309436B (en) Automobile service network collaborative site selection method and system considering owner selection behavior
CN115829183B (en) Cold chain logistics path planning method, device, equipment and readable storage medium
CN110705798A (en) Warehouse assembly and assembly integrated product distribution route and technician scheduling optimization method
CN111445094B (en) A method and system for route optimization of express delivery vehicles combined with time requirements
CN116415882A (en) A real-time delivery order distribution system for rider-unmanned vehicle collaborative delivery
CN113128761A (en) Elastic supply chain network optimization method based on genetic algorithm
CN110097218B (en) Unmanned commodity distribution method and system in time-varying environment
Bakas et al. A flexible transportation service for the optimization of a fixed-route public transport network
Wang et al. Research of oil product secondary distribution optimization based on collaborative distribution
Sun et al. Research on Coordination and Optimization of Order Allocation and Delivery Route Planning in Take‐Out System
Fallaha et al. A green competitive vehicle routing problem under uncertainty solved by an improved differential evolution algorithm
Charisis et al. Logistics hub location-scheduling model for innercity last mile deliveries
CN118411103A (en) A cargo distribution planning method, device and storage medium based on self-pickup point determination
CN111861279A (en) A multi-objective high-speed toll station shuttle scheduling method considering transfer
Jiménez et al. A new dynamic repositioning approach for bike sharing systems
CN114819819A (en) A realization method of route planning in real-time logistics scenario
CN114004564A (en) Order dispatching method, apparatus, electronic device and readable storage medium
Wang et al. Research on Urban End-Delivery Paths Considering the Consumer's Delivery Time Demand
CN118735233B (en) Intercity dynamic carpooling scheduling optimization method and device integrating intra-city vehicle relocation

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