CN103246969B - A kind of implementation method of logistics deployment and device - Google Patents
A kind of implementation method of logistics deployment and device Download PDFInfo
- Publication number
- CN103246969B CN103246969B CN201310165121.7A CN201310165121A CN103246969B CN 103246969 B CN103246969 B CN 103246969B CN 201310165121 A CN201310165121 A CN 201310165121A CN 103246969 B CN103246969 B CN 103246969B
- Authority
- CN
- China
- Prior art keywords
- logistics
- allocation
- station
- node
- deployment
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000013178 mathematical model Methods 0.000 claims abstract description 54
- 239000003016 pheromone Substances 0.000 claims description 69
- 241000257303 Hymenoptera Species 0.000 claims description 52
- 239000011159 matrix material Substances 0.000 claims description 38
- 230000006870 function Effects 0.000 claims description 36
- 238000005457 optimization Methods 0.000 claims description 29
- 230000007704 transition Effects 0.000 claims description 22
- 238000009826 distribution Methods 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 13
- 230000008447 perception Effects 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 claims description 7
- 238000012986 modification Methods 0.000 claims description 3
- 230000009191 jumping Effects 0.000 claims 4
- 238000006243 chemical reaction Methods 0.000 claims 2
- 238000002156 mixing Methods 0.000 claims 2
- 238000005516 engineering process Methods 0.000 abstract description 9
- 230000003068 static effect Effects 0.000 description 10
- 230000009466 transformation Effects 0.000 description 6
- 238000007726 management method Methods 0.000 description 5
- 238000010845 search algorithm Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000002922 simulated annealing Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种物流调配的实现方法和装置,通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;在所述数学模型基础之上应用蚁群算法调配物流。本发明实现物流调配的技术能通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;并在所述数学模型基础之上应用蚁群算法调配物流,因此能够在最少数量、最小范围内生成接近最佳的物流调配方案,这能在很大程度上提高物流调配效率,节省物流调配成本。
The invention discloses a method and device for realizing logistics allocation. A mathematical model for realizing logistics allocation is generated by modeling logistics allocation constraint conditions, allocation station distance modeling, and logistics allocation algorithm modeling; on the basis of the mathematical model On top of that, the ant colony algorithm is used to allocate logistics. The technology for realizing logistics allocation in the present invention can generate a mathematical model for realizing logistics allocation through logistics allocation constraint modeling, allocation station distance modeling, and logistics allocation algorithm modeling; and apply ant colony on the basis of the mathematical model Algorithmic allocation of logistics, so it can generate a near-optimal logistics allocation plan in the smallest quantity and within the smallest range, which can greatly improve the efficiency of logistics allocation and save logistics allocation costs.
Description
技术领域technical field
本发明涉及物联网技术,具体涉及一种物流调配的实现方法和装置。The invention relates to the Internet of Things technology, in particular to a method and device for realizing logistics allocation.
背景技术Background technique
物流调配方案寻优属于组合优化范畴,是非确定性多项式(Non-deterministicPolynomial,NP)问题,该问题的解决方案是一大研究热点。此外,由于实际的物流调配状态处在动态变化中,因而要求组合优化算法既要具有良好的性能,同时又要能适应动态调配的变化特性。目前的一些物流调配算法采用非启发式的传统算法,在性能上存在效率不高的问题,而另外一些性能较好的启发式算法又未考虑到调配状态的变化特性,因此不能及时、动态地对方案进行调整,导致了物流调配方案的低效性。The optimization of logistics allocation plan belongs to the category of combinatorial optimization, which is a non-deterministic polynomial (NP) problem, and the solution to this problem is a major research hotspot. In addition, because the actual state of logistics allocation is in dynamic changes, it is required that the combinatorial optimization algorithm should not only have good performance, but also be able to adapt to the changing characteristics of dynamic allocation. Some of the current logistics allocation algorithms use non-heuristic traditional algorithms, which have low efficiency in performance, while other heuristic algorithms with better performance do not take into account the changing characteristics of the allocation state, so they cannot be timely and dynamically The adjustment of the plan has led to the inefficiency of the logistics deployment plan.
发明内容Contents of the invention
有鉴于此,本发明的主要目的在于提供一种物流调配的实现方法和装置,用于实现高效率物流调配,并适应物流调配过程中的动态变化特性。In view of this, the main purpose of the present invention is to provide a method and device for realizing logistics allocation, which are used to realize high-efficiency logistics allocation and adapt to the dynamic characteristics of the logistics allocation process.
为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, technical solution of the present invention is achieved in that way:
一种物流调配的实现方法,该方法包括:A method for implementing logistics allocation, the method comprising:
通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;在所述数学模型基础之上应用蚁群算法调配物流。A mathematical model for realizing logistics allocation is generated by modeling logistics allocation constraint conditions, allocation station distance modeling, and logistics allocation algorithm; on the basis of the mathematical model, an ant colony algorithm is used to allocate logistics.
所述物流调配约束条件建模的方法为:The method for modeling the logistics allocation constraints is:
设物流调配系统总共有n个物流调配站,每个调配站表示为ai(i=1…n),在时刻T(t),调配站ai的某物流货物库存量为Si(T(t)),而在这一时刻该调配站对该物流货物的需求量为yi(T(t)),满足状态约束条件Si(T(t))≥yi(T(t));(i=1…n)。Assume that the logistics allocation system has n logistics allocation stations in total, and each allocation station is denoted as a i (i=1...n), at time T(t), the inventory of a certain logistics goods in the allocation station a i is S i (T (t)), and at this moment, the deployment station’s demand for the logistics goods is y i (T(t)), which satisfies the state constraint condition S i (T(t))≥y i (T(t) ); (i=1...n).
该方法还包括:The method also includes:
通过对每个物流调配站建立和维护一个有限状态机,来进行物流调配的管理;物流调配站ai的状态机函数定义为:Sti(T(t));其中(i=1…n);Logistics allocation management is carried out by establishing and maintaining a finite state machine for each logistics allocation station; the state machine function of logistics allocation station a i is defined as: St i (T(t)); where (i=1...n );
当状态机不能满足未来相应时间点的所述状态约束条件时,通过启动物流调配方案对状态机进行状态的转换,使其满足所述状态约束条件。When the state machine cannot meet the state constraints at the corresponding time point in the future, the state transition of the state machine is performed by starting the logistics allocation plan to make it meet the state constraints.
所述配送站距离建模包括绝对距离建模和相对距离建模;其中,The distribution station distance modeling includes absolute distance modeling and relative distance modeling; wherein,
绝对距离建模时,设站点ai和站点aj之间的距离为dij,建立不同站点之间距离的二维矩阵:In absolute distance modeling, set the distance between site a i and site a j as d ij , and establish a two-dimensional matrix of distances between different sites:
相对距离建模时,如果站点ai到站点aj之间的通路上不存在其他站点,则设站点ai到站点aj之间的距离为dij;如果站点ai到站点aj之间存在第三个站点k,则dij=dik+dkj;When modeling relative distance, if there are no other stations on the path between station a i and station a j , then set the distance between station a i and station a j as d ij ; if the distance between station a i and station a j There is a third station k in between, then d ij =d ik +d kj ;
依次类推,把所有不同站点之间的距离表示为不可分解的两两最小站点间距离的和:By analogy, the distance between all different sites is expressed as the sum of the indecomposable pairwise minimum distances between sites:
其中,d′ij表示站点ai到站点aj之间的相对距离,表示为两两最小站点间距离的相对值。Among them, d′ ij represents the relative distance between site a i and site a j , expressed as the relative value of the minimum distance between two sites.
所述物流调配算法建模用于对未来状态进行预测,包括未来状态函数定义、物流调配矩阵定义;其中,The logistics allocation algorithm modeling is used to predict the future state, including the definition of the future state function and the definition of the logistics allocation matrix; wherein,
进行未来状态函数定义时,未来状态预测函数定义为:Numi=fc(sti(T(t)),yi(T(t)),Si(T(t)));When defining the future state function, the future state prediction function is defined as: Num i = fc(st i (T(t)), y i (T(t)), S i (T(t)));
如果Numi>0,表示调配站ai有剩余的物流货物,数目为Numi;如果Numi=0,表示调配站ai没有剩余物流货物;Numi≥0时,表示调配站ai不需要通过物流调配程序来补充物流货物;如果Numi<0,表示调配站ai需要启动物流调配程序,且调配到调配站ai的物流货物数量为Numi的绝对值;If Num i > 0, it means that the allocation station a i has remaining logistics goods, and the number is Num i ; if Num i = 0, it means that the allocation station a i has no remaining logistics goods; when Num i ≥ 0, it means that the allocation station a i does not The logistics goods need to be supplemented through the logistics allocation program; if Num i <0, it means that the allocation station a i needs to start the logistics allocation program, and the number of logistics goods allocated to the allocation station a i is the absolute value of Num i ;
进行物流调配矩阵定义时,建立调配站间的物流调配二维矩阵,如果调配站ai不需要向调配站aj调配货物,则用0表示;如果需要调配,则表示为调配的物流货物数值tij:When defining the logistics allocation matrix, establish a two-dimensional logistics allocation matrix between the allocation stations. If the allocation station a i does not need to allocate goods to the allocation station a j , it is represented by 0; if it needs to be allocated, it is expressed as the value of the allocated logistics goods t ij :
该方法还包括:The method also includes:
用表示运往调配站aj的所有物流货物的总和,需要满足条件:use Indicates the sum of all logistics goods shipped to the deployment station a j , which needs to meet the conditions:
即运往调配站aj的物流货物要能满足未来状态机的要求。 That is, the logistics goods transported to the deployment station a j must meet the requirements of the future state machine.
用表示从调配站ai运往其他所有调配站的物流货物总和,需满足条件:即调配站ai运往其他所有调配站的物流货物总和,需满足调配站ai未来的状态机约束条件。use Indicates the sum of the logistics goods transported from the deployment station a i to all other deployment stations, and the conditions must be met: That is, the sum of the logistics goods transported by the deployment station a i to all other deployment stations must meet the future state machine constraints of the deployment station a i .
在所述数学模型基础之上应用蚁群算法调配物流的过程包括以下步骤:The process of applying the ant colony algorithm to allocate logistics on the basis of the mathematical model includes the following steps:
步骤1:设定最大循环次数Ncmax,蚂蚁个数m′,初始化时间片t=0,循环控制变量Nc=0,蚂蚁循环变量k=0,禁忌表tabuk(k=1,2,…,m′),节点动态调整表tabvk(k=1,2,…,m′),路径表pathk(k=1,2,…,m′),将m′只蚂蚁放置在m′个出发节点上,令不同节点相连弧上的信息素τij(t)=const,其中const为常数;把所有目的节点集合中的节点放入节点动态调整表tabvk(k=1,2,…,m′)中;所述蚂蚁为蚁群算法中用于寻优的变量;Step 1: Set the maximum number of cycles N cmax , the number of ants m′, the initialization time slice t=0, the cycle control variable N c =0, the ant cycle variable k=0, the tabu table tabu k (k=1, 2, ..., m'), node dynamic adjustment table tabv k (k=1, 2,..., m'), path table path k (k=1, 2,..., m'), place m' ants in m On a starting node, make the pheromone τ ij (t)=const on the connected arcs of different nodes, where const is a constant; put the nodes in all destination node sets into the node dynamic adjustment table tabv k (k=1, 2 ,..., m'); the ant is a variable used for optimization in the ant colony algorithm;
步骤2:循环次数Nc=Nc+1,如果Nc>Ncmax,退出循环,跳转到步骤11;Step 2: Number of cycles N c =N c+1 , if N c >N cmax , exit the cycle and jump to step 11;
步骤3:蚂蚁数目k=k+1,如果k>m,退出k循环,跳转到步骤8;Step 3: The number of ants k=k+1, if k>m, exit the k loop and jump to step 8;
步骤4:确定蚂蚁目前所在的节点,检测该节点是否属于目的节点集合,如果是,则将该节点对应的目的节点从节点动态调整表tabvk中删除,否则跳转到下一步;Step 4: Determine the node where the ant is currently located, and detect whether the node belongs to the destination node set, if so, delete the destination node corresponding to the node from the node dynamic adjustment table tabv k , otherwise jump to the next step;
步骤5:寻找与蚂蚁所在节点相连的路径,根据状态转移概率公式计算转移概率,选择从此节点出发的下一个节点;Step 5: Find the path connected to the node where the ant is located, calculate the transition probability according to the state transition probability formula, and select the next node starting from this node;
步骤6:修改禁忌表tabuk,将新选择的节点放入禁忌表中;并进行信息素的更新;Step 6: Modify the tabu table tabuk , put the newly selected node into the tabu table; and update the pheromone;
步骤7:如果禁忌表tabuk已包含了所有出发节点集合和目的节点集合中的所有节点,则蚂蚁本次选路结束,跳转到步骤9,否则跳转到步骤5;Step 7: If the tabu table tabu k already contains all the nodes in the set of starting nodes and the set of destination nodes, then the ant's current route selection is over, and jump to step 9, otherwise, jump to step 5;
步骤8:计算并记录蚂蚁此轮选择节点的新增信息素总和,如果此轮所有蚂蚁选路结束,则跳转到步骤9,否则跳转到步骤3;Step 8: Calculate and record the sum of new pheromones added by the ants in this round of node selection. If the route selection of all ants in this round is over, go to step 9, otherwise go to step 3;
步骤9:比较该轮中所有蚂蚁选择的组合计算节点的新增信息素总和,取新增信息素总和值最大的计算节点组合序列,对相应路径上的信息素按照信息素更新规则进行信息素的更新;Step 9: Compare the sum of the newly added pheromones of the combined computing nodes selected by all ants in this round, take the combined sequence of computing nodes with the largest sum of newly added pheromones, and perform pheromone update on the pheromones on the corresponding path according to the pheromone update rules. update;
步骤10:清空禁忌表tabuk、路径表pathk,跳转到步骤2;Step 10: Clear tabu table tabu k and path table path k , and jump to step 2;
步骤11:将信息素最大路径表示的调配路线作为调配方案的最优解。Step 11: Take the deployment route represented by the maximum pheromone path as the optimal solution of the deployment scheme.
该方法还包括:The method also includes:
对应已经生成的本次最佳物流调配方案,应用实时感知信息,确定该方案是否需要进行动态调整,对于已经调配完成的任务,从出发节点集合和目的节点集合中删除相应的节点,从最优调度路径中删除相应的路径;对于当前要删除、新增、修改的调度任务,在出发节点集合和目的节点集合中删除、新增相应的节点;确定调度车当前所在的节点位置或即将到达的节点位置,进行最新的状态更新后,生成相应的节点状态图;将所有k只蚂蚁放置在调度车当前位置节点,重新进行最优化求解。Corresponding to the best logistics deployment plan that has been generated, apply real-time perception information to determine whether the plan needs to be dynamically adjusted. Delete the corresponding path in the dispatching path; for the dispatching task to be deleted, added, or modified currently, delete or add the corresponding node in the set of starting nodes and the set of destination nodes; determine the current node position of the dispatching vehicle or the upcoming arrival Node position, after the latest state update, generate the corresponding node state diagram; place all k ants on the current position node of the dispatching vehicle, and re-optimize the solution.
一种物流调配的实现装置,该装置包括数学模型生成模块、物流调配模块;其中,A device for implementing logistics allocation, the device includes a mathematical model generation module and a logistics allocation module; wherein,
所述数学模型生成模块,用于通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;The mathematical model generation module is used to generate a mathematical model for realizing logistics deployment through modeling of logistics deployment constraints, modeling of distances from deployment stations, and modeling of logistics deployment algorithms;
所述物流调配模块,用于在所述数学模型基础之上应用蚁群算法调配物流。The logistics allocation module is used for applying the ant colony algorithm to allocate logistics on the basis of the mathematical model.
所述数学模型生成模块包括物流调配约束条件建模单元,用于:The mathematical model generation module includes a logistics allocation constraint modeling unit for:
设物流调配系统总共有n个物流调配站,每个调配站表示为ai(i=1…n),在未来时刻T(t),调配站ai的某物流货物库存量为Si(T(t)),而在这一时刻该调配站对该物流货物的需求量为yi(T(t)),满足状态约束条件Si(T(t))≥yi(T(t));(i=1…n)。Assume that the logistics allocation system has n logistics allocation stations in total, and each allocation station is denoted as a i (i=1...n). At the future time T(t), the inventory of certain logistics goods in the allocation station a i is S i ( T(t)), and at this moment, the deployment station’s demand for the logistics goods is y i (T(t)), which satisfies the state constraint condition S i (T(t))≥y i (T(t )); (i=1...n).
所述物流调配约束条件建模单元还用于:The logistics allocation constraint modeling unit is also used for:
通过对每个物流调配站建立和维护一个有限状态机,来进行物流调配的管理;物流调配站ai的状态机函数定义为:Sti(T(t));其中(i=1…n);Logistics allocation management is carried out by establishing and maintaining a finite state machine for each logistics allocation station; the state machine function of logistics allocation station a i is defined as: St i (T(t)); where (i=1...n );
当状态机不能满足未来相应时间点的所述状态约束条件时,对状态机进行状态的转换。When the state machine cannot satisfy the state constraint condition at the corresponding time point in the future, the state transition of the state machine is performed.
所述数学模型生成模块包括配送站距离建模单元,用于进行绝对距离建模和相对距离建模;其中,The mathematical model generation module includes a distribution station distance modeling unit for absolute distance modeling and relative distance modeling; wherein,
绝对距离建模时,设站点ai和站点aj之间的距离为dij,建立不同站点之间距离的二维矩阵:In absolute distance modeling, set the distance between site a i and site a j as d ij , and establish a two-dimensional matrix of distances between different sites:
相对距离建模时,如果站点ai到站点aj之间的通路上不存在其他站点,则设站点ai到站点aj之间的距离为dij;如果站点ai到站点aj之间存在第三个站点k,则dij=dik+dkj;When modeling relative distance, if there are no other stations on the path between station a i and station a j , then set the distance between station a i and station a j as d ij ; if the distance between station a i and station a j There is a third station k in between, then d ij =d ik +d kj ;
依次类推,把所有不同站点之间的距离表示为不可分解的两两最小站点间距离的和:By analogy, the distance between all different sites is expressed as the sum of the indecomposable pairwise minimum distances between sites:
其中,d′ij表示站点ai到站点aj之间的相对距离,表示为两两最小站点间距离的相对值。Among them, d′ ij represents the relative distance between site a i and site a j , expressed as the relative value of the minimum distance between two sites.
所述数学模型生成模块包括物流调配算法建模单元,用于对未来状态进行预测,包括未来状态函数定义、物流调配矩阵定义;其中,The mathematical model generation module includes a logistics allocation algorithm modeling unit for predicting the future state, including the definition of a future state function and the definition of a logistics allocation matrix; wherein,
进行未来状态函数定义时,未来状态预测函数定义为:Numi=fc(sti(T(t)),yi(T(t)),Si(T(t)));When defining the future state function, the future state prediction function is defined as: Num i = fc(st i (T(t)), y i (T(t)), S i (T(t)));
如果Numi>0,表示调配站ai有剩余的物流货物,数目为Numi;如果Numi=0,表示调配站ai没有剩余物流货物;Numi≥0时,表示调配站ai不需要通过物流调配程序来补充物流货物;如果Numi<0,表示调配站ai需要启动物流调配程序,且调配到调配站ai的物流货物数量为Numi的绝对值;If Num i > 0, it means that the allocation station a i has remaining logistics goods, and the number is Num i ; if Num i = 0, it means that the allocation station a i has no remaining logistics goods; when Num i ≥ 0, it means that the allocation station a i does not The logistics goods need to be supplemented through the logistics allocation program; if Num i <0, it means that the allocation station a i needs to start the logistics allocation program, and the number of logistics goods allocated to the allocation station a i is the absolute value of Num i ;
进行物流调配矩阵定义时,建立调配站间的物流调配二维矩阵,如果调配站ai不需要向调配站aj调配货物,则用0表示;如果需要调配,则表示为调配的物流货物数值tij:When defining the logistics allocation matrix, establish a two-dimensional logistics allocation matrix between the allocation stations. If the allocation station a i does not need to allocate goods to the allocation station a j , it is represented by 0; if it needs to be allocated, it is expressed as the value of the allocated logistics goods t ij :
所述物流调配算法建模单元还用于:The logistics allocation algorithm modeling unit is also used for:
用表示运往调配站aj的所有物流货物的总和,需要满足条件:use Indicates the sum of all logistics goods shipped to the deployment station a j , which needs to meet the conditions:
即运往调配站aj的物流货物要能满足未来状态机的要求。 That is, the logistics goods transported to the deployment station a j must meet the requirements of the future state machine.
用表示从调配站ai运往其他所有调配站的物流货物总和,需满足条件:即调配站ai运往其他所有调配站的物流货物总和,需满足调配站ai未来的状态机约束条件。use Indicates the sum of the logistics goods transported from the deployment station a i to all other deployment stations, and the conditions must be met: That is, the sum of the logistics goods transported by the deployment station a i to all other deployment stations must meet the future state machine constraints of the deployment station a i .
所述物流调配模块在数学模型基础之上应用蚁群算法调配物流时,用于执行以下步骤:When the logistics allocation module applies the ant colony algorithm to allocate logistics on the basis of the mathematical model, it is used to perform the following steps:
步骤1:设定最大循环次数Ncmax,蚂蚁个数m′,初始化时间片t=0,循环控制变量Nc=0,蚂蚁循环变量k=0,禁忌表tabuk(k=1,2,…,m′),节点动态调整表tabvk(k=1,2,…,m′),路径表pathk(k=1,2,…,m′),将m′只蚂蚁放置在m′个出发节点上,令不同节点相连弧上的信息素τij(t)=const,其中const为常数;把所有目的节点集合中的节点放入节点动态调整表tabvk(k=1,2,…,m′)中;所述蚂蚁为蚁群算法中用于寻优的变量;Step 1: Set the maximum number of cycles N cmax , the number of ants m′, the initialization time slice t=0, the cycle control variable N c =0, the ant cycle variable k=0, the tabu table tabu k (k=1, 2, ..., m'), node dynamic adjustment table tabv k (k=1, 2,..., m'), path table path k (k=1, 2,..., m'), place m' ants in m On a starting node, make the pheromone τ ij (t)=const on the connected arcs of different nodes, where const is a constant; put the nodes in all destination node sets into the node dynamic adjustment table tabv k (k=1, 2 ,..., m'); the ant is a variable used for optimization in the ant colony algorithm;
步骤2:循环次数Nc=Nc+1,如果Nc>Ncmax,退出循环,跳转到步骤11;Step 2: Number of cycles N c =N c+1 , if N c >N cmax , exit the cycle and jump to step 11;
步骤3:蚂蚁数目k=k+1,如果k>m,退出k循环,跳转到步骤8;Step 3: The number of ants k=k+1, if k>m, exit the k loop and jump to step 8;
步骤4:确定蚂蚁目前所在的节点,检测该节点是否属于目的节点集合,如果是,则将该节点对应的目的节点从节点动态调整表tabvk中删除,否则跳转到下一步;Step 4: Determine the node where the ant is currently located, and detect whether the node belongs to the destination node set, if so, delete the destination node corresponding to the node from the node dynamic adjustment table tabv k , otherwise jump to the next step;
步骤5:寻找与蚂蚁所在节点相连的路径,根据状态转移概率公式计算转移概率,选择从此节点出发的下一个节点;Step 5: Find the path connected to the node where the ant is located, calculate the transition probability according to the state transition probability formula, and select the next node starting from this node;
步骤6:修改禁忌表tabuk,将新选择的节点放入禁忌表中;并进行信息素的更新;Step 6: Modify the tabu table tabuk , put the newly selected node into the tabu table; and update the pheromone;
步骤7:如果禁忌表tabuk已包含了所有出发节点集合和目的节点集合中的所有节点,则蚂蚁本次选路结束,跳转到步骤9,否则跳转到步骤5;Step 7: If the tabu table tabu k already contains all the nodes in the set of starting nodes and the set of destination nodes, then the ant's current route selection is over, and jump to step 9, otherwise, jump to step 5;
步骤8:计算并记录蚂蚁此轮选择节点的新增信息素总和,如果此轮所有蚂蚁选路结束,则跳转到步骤9,否则跳转到步骤3;Step 8: Calculate and record the sum of new pheromones added by the ants in this round of node selection. If the route selection of all ants in this round is over, go to step 9, otherwise go to step 3;
步骤9:比较该轮中所有蚂蚁选择的组合计算节点的新增信息素总和,取新增信息素总和值最大的计算节点组合序列,对相应路径上的信息素按照信息素更新规则进行信息素的更新;Step 9: Compare the sum of the newly added pheromones of the combined computing nodes selected by all ants in this round, take the combined sequence of computing nodes with the largest sum of newly added pheromones, and perform pheromone update on the pheromones on the corresponding path according to the pheromone update rules. update;
步骤10:清空禁忌表tabuk、路径表pathk,跳转到步骤2;Step 10: Clear tabu table tabu k and path table path k , and jump to step 2;
步骤11:将信息素最大路径表示的调配路线作为调配方案的最优解。Step 11: Take the deployment route represented by the maximum pheromone path as the optimal solution of the deployment scheme.
所述物流调配模块还用于:The logistics allocation module is also used for:
对应已经生成的本次最佳物流调配方案,应用实时感知信息,确定该方案的执行程度,对于已经调配完成的任务,从出发节点集合和目的节点集合中删除相应的节点,从最优调度路径中删除相应的路径;对于当前要删除、新增、修改的调度任务,在出发节点集合和目的节点集合中删除、新增相应的节点;确定调度车当前所在的节点位置或即将到达的节点位置,进行最新的状态更新后,生成相应的节点状态图;将所有k只蚂蚁放置在调度车当前位置节点,重新进行最优化求解。Corresponding to the best logistics deployment plan that has been generated, apply real-time perception information to determine the execution degree of the plan. For the tasks that have been deployed, delete the corresponding nodes from the set of starting nodes and the set of destination nodes, and start from the optimal scheduling path. Delete the corresponding path in ; for the current dispatching task to be deleted, added, or modified, delete or add the corresponding node in the starting node set and destination node set; determine the current node position of the dispatching vehicle or the upcoming node position , after the latest state update, generate the corresponding node state diagram; place all k ants on the current position node of the dispatching vehicle, and re-optimize the solution.
本发明实现物流调配的技术能通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;并在所述数学模型基础之上应用蚁群算法调配物流,因此能够适应物流调配过程中的动态变化特性,在最少数量、最小范围内生成接近最佳的物流调配方案,这能在很大程度上提高物流调配效率,实现高效率物流调配,并节省物流调配成本。The technology for realizing logistics allocation in the present invention can generate a mathematical model for realizing logistics allocation through logistics allocation constraint modeling, allocation station distance modeling, and logistics allocation algorithm modeling; and apply ant colony on the basis of the mathematical model Algorithmic allocation of logistics, so it can adapt to the dynamic characteristics of the logistics allocation process, and generate a near-optimal logistics allocation plan within the minimum quantity and range, which can greatly improve the efficiency of logistics allocation and achieve high-efficiency logistics allocation. And save logistics deployment costs.
附图说明Description of drawings
图1为本发明实施例实现物流调配的流程简图;Fig. 1 is a schematic flow diagram of realizing logistics allocation according to an embodiment of the present invention;
图2为本发明实施例实现物流调配的装置图。Fig. 2 is a diagram of a device for implementing logistics allocation according to an embodiment of the present invention.
具体实施方式detailed description
本发明采用一种动态、改进的蚁群算法进行调配方案的动态寻优,该算法是一种启发式算法。启发式算法又称智能计算,也称为“软计算”,是人们受自然规律的启迪,根据自然规律模仿求解问题的算法,该类算法具有全局优化性能好、鲁棒性强、通用性强、适于并行处理等优点,并且因高效的优化性能、无需问题特殊信息等优点,已广泛用于计算机科学、优化调度、运输问题、组合优化等领域。蚁群算法(antcolonyalgorithm)是由意大利学者Dorigo,Maniezzo等人在20世纪90年代初首先提出来的。蚁群算法是继模拟退火算法、遗传算法、禁忌搜索算法、人工神经网络算法等元启发式搜索算法以后的又一种应用于组合优化问题的启发式搜索算法。因蚁群算法本身具备的特性,使其能较好的适应寻优过程中的动态性问题。The present invention adopts a dynamic and improved ant colony algorithm for dynamic optimization of deployment schemes, and the algorithm is a heuristic algorithm. Heuristic algorithm, also known as intelligent computing, also known as "soft computing", is an algorithm that people are inspired by the laws of nature and imitate and solve problems according to the laws of nature. This type of algorithm has good global optimization performance, strong robustness, and strong versatility , suitable for parallel processing, etc., and because of the advantages of efficient optimization performance and no need for problem-specific information, it has been widely used in computer science, optimal scheduling, transportation problems, combinatorial optimization and other fields. Ant colony algorithm (ant colony algorithm) was first proposed by Italian scholars Dorigo, Maniezzo and others in the early 1990s. Ant colony algorithm is another heuristic search algorithm applied to combinatorial optimization problems after simulated annealing algorithm, genetic algorithm, tabu search algorithm, artificial neural network algorithm and other meta-heuristic search algorithms. Due to the characteristics of the ant colony algorithm itself, it can better adapt to the dynamic problems in the optimization process.
基于物联网技术的智能管理系统的建立,使得物流调配站物品库存量、物品名称、类型、物品的实时需求量、物流调配车的具体位置等信息的实时获取成为可能,通过对这些实时获取到的感知数据进行分析和预测,可生成接近最佳的物流调配方案,还可实现对物流调配方案的实时更新、动态调整。The establishment of an intelligent management system based on the Internet of Things technology makes it possible to obtain real-time information such as the inventory of items in the logistics allocation station, item names, types, real-time demand for items, and the specific location of logistics allocation vehicles. Through these real-time acquisitions Analysis and prediction of the sensory data can generate a near-optimal logistics allocation plan, and can also realize real-time update and dynamic adjustment of the logistics allocation plan.
本发明建立有数学模型并基于蚁群算法进行改进,给出了寻优效果良好,效率较高的物流调配方案。本发明对基于物联网技术的物流调配问题进行了研究。首先通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来设计用于实现物流调配的数学模型,然后在数学模型基础之上对物流调配问题进行了研究,包括应用蚁群算法对静态物流调配算法的研究和动态物流调配算法的研究。The invention establishes a mathematical model and improves it based on the ant colony algorithm, and provides a logistics allocation scheme with good optimization effect and high efficiency. The present invention studies the logistics allocation problem based on the Internet of Things technology. Firstly, the mathematical model for logistics deployment is designed through the modeling of logistics allocation constraints, the distance modeling of allocation stations, and the modeling of logistics allocation algorithms. Then, based on the mathematical model, the logistics allocation problem is studied, including the application of ant colony Algorithm research on static logistics allocation algorithm and dynamic logistics allocation algorithm.
具体而言,蚁群算法是一种启发式优化算法(又称智能计算,也有人称之为软计算),具有高效的优化性能、全局优化性能、鲁棒性强、通用性强等特点,已广泛用于计算机科学、优化调度、运输问题、组合优化等领域。Specifically, the ant colony algorithm is a heuristic optimization algorithm (also known as intelligent computing, also known as soft computing), which has the characteristics of efficient optimization performance, global optimization performance, strong robustness, and strong versatility. It is widely used in computer science, optimal scheduling, transportation problems, combinatorial optimization, etc.
需要说明的是,物流调配非常重要,因为只有所需的货物及时调配,才能保证正常的运营,提高物流调配的质量。物联网技术的应用,使得实时感知信息的获取以及信息的预测成为可能。本发明应用预测技术、实时感知等技术,在最少数量、最小范围内生成接近最佳的物流调配方案,能在很大程度上节省物流调配成本。It should be noted that logistics allocation is very important, because only the timely allocation of required goods can ensure normal operation and improve the quality of logistics allocation. The application of Internet of Things technology makes it possible to obtain real-time perception information and predict information. The present invention applies forecasting technology, real-time perception and other technologies to generate a near-optimal logistics allocation plan within the minimum quantity and minimum range, which can save logistics allocation costs to a large extent.
在进行数学建模时,可以进行如下操作:When performing mathematical modeling, the following operations can be performed:
物流调配约束条件建模:Modeling of logistics allocation constraints:
设物流调配系统总共有n个物流调配站,每个调配站表示为ai(i=1…n),在未来某时刻T(t),调配站ai的某物流货物库存量为Si(T(t)),而在这一时刻该调配站对该物流货物的需求量为yi(T(t)),为了不影响生产及交易的顺利进行,系统必须满足以下状态约束条件:Assume that the logistics allocation system has n logistics allocation stations in total, and each allocation station is denoted as a i (i=1...n). At a certain time T(t) in the future, the inventory of certain logistics goods in the allocation station a i is S i (T(t)), and at this moment, the demand of the dispatching station for the logistics goods is y i (T(t)), in order not to affect the smooth progress of production and transactions, the system must meet the following state constraints:
Si(T(t))≥yi(T(t));(i=1…n)(1)S i (T(t))≥y i (T(t)); (i=1...n)(1)
为更好地阐述和解决问题,引入有限状态机理论。通过对每个物流调配站建立和维护一个有限状态机,来进行物流调配的管理。有限状态机包含和维护的信息包括:时间、某时间点时相应物流调配站的物流货物库存量、该时间点时相应物流调配站的物流货物需求量。当状态机不能满足未来相应时间点的状态约束条件(1)时,就需要对状态机进行状态的转换。可以促使物流调配站状态机状态改变的条件函数有f、g等;其中,In order to better explain and solve the problem, the theory of finite state machine is introduced. Logistics allocation management is carried out by establishing and maintaining a finite state machine for each logistics allocation station. The information contained and maintained by the finite state machine includes: time, the logistics goods inventory of the corresponding logistics allocation station at a certain time point, and the logistics goods demand of the corresponding logistics allocation station at this time point. When the state machine cannot satisfy the state constraint condition (1) at the corresponding time point in the future, the state transition of the state machine is required. The conditional functions that can promote the state change of the state machine of the logistics deployment station include f, g, etc.; among them,
g:物流调配函数;g: logistics allocation function;
f:其他影响因素。f: other influencing factors.
物流调配站ai的状态机函数定义为:Sti(T(t));其中(i=1…n)。The state machine function of logistics deployment station a i is defined as: St i (T(t)); where (i=1...n).
配送站距离建模:Distribution station distance modeling:
物流调配站点间距离的建模,可以分为绝对距离建模和相对距离建模。The modeling of the distance between logistics deployment sites can be divided into absolute distance modeling and relative distance modeling.
1)绝对距离建模1) Absolute distance modeling
设站点ai和站点aj之间的距离为dij,建立不同站点之间距离的二维矩阵。由于道路的特殊性,站点ai到站点aj的距离,和站点aj到站点ai间的距离可能是不同的,因而建模所形成的矩阵不是对称矩阵:Set the distance between site a i and site a j as d ij , and establish a two-dimensional matrix of distances between different sites. Due to the particularity of the road, the distance from site a i to site a j may be different from the distance from site a j to site a i , so the matrix formed by modeling is not a symmetric matrix:
2)相对距离建模2) Relative distance modeling
所有物流调配站点组成一个大的互联网络,这其中有的站点之间可能直接相连,有的站点之间可能还存在其他站点。All logistics deployment sites form a large Internet network, some of which may be directly connected to each other, and some of which may also have other sites.
为了更直观地表示出不同站点之间的相对距离,另外建立相对距离矩阵,设定以下规则:In order to express the relative distance between different sites more intuitively, a relative distance matrix is also established, and the following rules are set:
如果站点ai到站点aj之间的通路上不存在其他站点,则设站点ai到站点aj之间的距离为dij,dij可以为绝对距离值,也可为相对距离值。If there are no other stations on the path between station a i and station a j , then set the distance between station a i and station a j as d ij , where d ij can be an absolute distance value or a relative distance value.
如果站点ai到站点aj之间存在第三个站点k,则dij=dik+dkj。If there is a third station k between station a i and station a j , then d ij =d ik +d kj .
依次类推,把所有不同站点之间的距离表示为不可分解的两两最小站点间距离的和:By analogy, the distance between all different sites is expressed as the sum of the indecomposable pairwise minimum distances between sites:
其中,d′ij表示站点ai到站点aj之间的相对距离,表示为两两最小站点间距离的相对值。Among them, d′ ij represents the relative distance between site a i and site a j , expressed as the relative value of the minimum distance between two sites.
物流调配算法建模:Logistics allocation algorithm modeling:
正确合理地确定物流调配方案,需要考虑未来库存量、需求量、状态变化等因素。因此需要建立未来状态函数:To correctly and reasonably determine the logistics deployment plan, factors such as future inventory, demand, and status changes need to be considered. Therefore, the future state function needs to be established:
1)未来状态函数定义1) Future state function definition
在未来某时刻需调配的货物数量,可通过经验值、历史数据、未来变化等特征进行预测。未来状态函数定义为:Numi=fc(sti(T(t)),yi(T(t)),Si(T(t)));The quantity of goods to be deployed at a certain point in the future can be predicted based on characteristics such as experience values, historical data, and future changes. The future state function is defined as: Num i = fc(st i (T(t)), y i (T(t)), S i (T(t)));
如果Numi>0,表示调配站ai有剩余的物流货物,数目为Numi;如果Numi=0,表示调配站ai没有剩余物流货物。Numi≥0时,表示调配站ai不需要通过物流调配程序来补充物流货物;如果Numi<0,表示调配站ai需要启动物流调配程序,且调配到调配站ai的物流货物数量为Numi的绝对值。If Num i > 0, it means that the deployment station a i has remaining logistics goods, the number is Num i ; if Num i = 0, it means that the deployment station a i has no remaining logistics goods. When Num i ≥ 0, it means that the deployment station a i does not need to supplement the logistics goods through the logistics deployment procedure; if Num i <0, it means that the deployment station a i needs to start the logistics deployment procedure, and the number of logistics goods deployed to the deployment station a i is the absolute value of Num i .
2)物流调配矩阵定义2) Definition of logistics allocation matrix
建立调配站间的物流调配二维矩阵,如果调配站ai不需要向调配站aj调配货物,则用0表示;如果需要调配,则表示为调配的物流货物数值tij:Establish a two-dimensional matrix of logistics allocation between allocation stations. If allocation station a i does not need to allocate goods to allocation station a j , it is represented by 0; if allocation is required, it is expressed as the value of the allocated logistics goods t ij :
可以用表示运往调配站aj的所有物流货物的总和,需要满足条件:Can use Indicates the sum of all logistics goods shipped to the deployment station a j , which needs to meet the conditions:
即运往调配站aj的物流货物要能满足未来状态机的要求。 That is, the logistics goods transported to the deployment station a j must meet the requirements of the future state machine.
可以用表示从调配站ai运往其他所有调配站的物流货物总和,需满足条件:即调配站ai运往其他所有调配站的物流货物总和,需满足调配站ai未来的状态机约束条件。Can use Indicates the sum of the logistics goods transported from the deployment station a i to all other deployment stations, and the conditions must be met: That is, the sum of the logistics goods transported by the deployment station a i to all other deployment stations must meet the future state machine constraints of the deployment station a i .
在进行具体的物流调配时,可以应用静态物流调配算法,还可以应用动态物流调配算法。具体而言,当物流调配站的目标状态机不能满足约束条件时,就需要在规定时间内启动物流调配系统进行货物的调配。静态物流调配算法是物流调配尚未开始时制定的调配算法;动态物流调配算法是在调配任务进行时,通过实时感知到的信息确定情况发生变化,从而对原调配方案进行实时修改的调整算法。When performing specific logistics allocation, static logistics allocation algorithms can be applied, and dynamic logistics allocation algorithms can also be applied. Specifically, when the target state machine of the logistics deployment station cannot meet the constraint conditions, it is necessary to start the logistics deployment system within the specified time for the deployment of goods. The static logistics allocation algorithm is an allocation algorithm formulated when the logistics allocation has not yet started; the dynamic logistics allocation algorithm is an adjustment algorithm for real-time modification of the original allocation plan when the allocation task is in progress, through the real-time perceived information to determine the situation changes.
静态物流调配算法总体包括启动、调配方案的求解及方案最优化:The static logistics allocation algorithm generally includes start-up, solution of allocation scheme and scheme optimization:
1)静态物流调配算法的启动1) Start-up of the static logistics allocation algorithm
根据实时感知的信息,检测调配站在未来时间是否将发生相应状态机不满足约束条件的情况,据此确定是否启动静态物流调配算法。According to the real-time perceived information, it is detected whether the corresponding state machine does not meet the constraint conditions at the allocation station in the future, and based on this, it is determined whether to start the static logistics allocation algorithm.
2)调配方案求解2) Deployment plan solution
静态物流调配算法在约束条件下对物流调配矩阵进行求解,同时需满足生成的调配方案涉及范围最小、运输费用最少,即调配方案的最优化问题。具体的操作是:对于满足目标状态机约束条件的物流调配矩阵的每一组满足条件的解,对该组解进行物流调配方案最优化计算,从而得出该组解下的最优调配方案,最后对所有解的最优调配方案进行比较,得出全局最优的调配方案。The static logistics allocation algorithm solves the logistics allocation matrix under the constraint conditions, and at the same time needs to meet the minimum scope and the least transportation cost of the generated allocation plan, that is, the optimization problem of the allocation plan. The specific operation is: for each group of solutions that meet the conditions of the logistics deployment matrix that meets the constraints of the target state machine, the optimal calculation of the logistics deployment plan is performed on the group of solutions, so as to obtain the optimal deployment plan under the group of solutions. Finally, the optimal allocation schemes of all solutions are compared, and the global optimal allocation scheme is obtained.
具体而言,调配方案的求解,是将状态预测函数计算出的为负数的值通过加法运算使其变为0,同时记录变换过程,生成相应的变换方案,该变换方案就是一个物流调配方案。变换过程的记录是通过一个初始化状态全为零的二维矩阵来实现的,相应的加法运算只发生在正负值之间,矢量进行一次加法运算,则相应的在调配矩阵中也在相应的位置进行标注,这样当一次变换完成也就生成了对应的调配矩阵。不同的变换过程将产生不同的调配矩阵,也就是不同调配方案,至于其中哪个调配方案是最优调度方案,还需进一步应用调配方案最优化算法进一步寻优,最后生成接近最佳调度方案。Specifically, the solution of the deployment plan is to add the negative value calculated by the state prediction function to 0, record the transformation process at the same time, and generate a corresponding transformation plan. This transformation plan is a logistics deployment plan. The recording of the transformation process is realized through a two-dimensional matrix whose initialization state is all zero, and the corresponding addition operation only occurs between positive and negative values, and the vector is added once, and the corresponding addition is also in the corresponding allocation matrix. The position is marked, so that when a transformation is completed, the corresponding allocation matrix is generated. Different transformation processes will produce different allocation matrices, that is, different allocation schemes. As for which allocation scheme is the optimal scheduling scheme, it is necessary to further apply the allocation scheme optimization algorithm for further optimization, and finally generate a nearly optimal scheduling scheme.
3)调配方案最优化3) Optimization of deployment plan
首先为每个调配方案生成最佳运输方案。为简化起见,设物流调配费用只与调度距离有关,同一辆调度车同一时间调配一块货物和调配多块货物具有相同费用。首先对生成的调配方案矩阵,应用距离矩阵和相对距离矩阵计算不同站点间货物的调度是否存在重复路线,重复路线上的货物可搭乘顺路车,这样就节省了路费,把搭乘顺路车的重复路线进行合并,调配方案最优化问题在重复线路合并后就转化成为一个特殊的、条件受限的旅行商问题(TravelingSalesmanProblem,TSP)。First generate an optimal transportation plan for each deployment scenario. For the sake of simplicity, it is assumed that the cost of logistics deployment is only related to the dispatching distance, and the same dispatching vehicle has the same cost for dispatching one piece of goods and deploying multiple pieces of goods at the same time. First of all, for the generated deployment plan matrix, apply the distance matrix and relative distance matrix to calculate whether there are repeated routes for the dispatch of goods between different stations. After merging, the allocation plan optimization problem is transformed into a special, limited condition Traveling Salesman Problem (TSP) after the repeated lines are merged.
TSP理论上存在最优解,但在实际应用中还未找到有效的方法来求得此值,只能逐渐向最优解逼近,即只能得到最接近理论最优解的次优解,TSP求解问题是典型的NP问题。调配方案最优化问题是特殊的、条件受限的TSP,这是因为TSP的求解过程没有节点访问顺序的限制,而调配方案最优化问题存在访问顺序的限制,需要从调出货物的站点出发,到达调入货物的站点。TSP theoretically has an optimal solution, but no effective method has been found to obtain this value in practical applications. It can only gradually approach the optimal solution, that is, only the suboptimal solution closest to the theoretical optimal solution can be obtained. TSP The solution problem is a typical NP problem. The optimization problem of deployment plan is a special TSP with limited conditions, because the solution process of TSP has no restrictions on the order of node visits, while the optimization problem of deployment plan has restrictions on the order of visits, and it needs to start from the station where the goods are transferred. Arrive at the station where the goods are transferred.
下面应用蚁群算法来求解以上特殊的、条件受限的TSP。The following uses the ant colony algorithm to solve the above special and limited TSP.
设m′是出发节点集合中节点的数量,相应的设置蚂蚁的数量也为m′,将m′只蚂蚁放置在m′个出发节点上。所述蚂蚁为蚁群算法中用于寻优的变量,n′表示出发节点集合和目的节点集合中所有的节点数目,dij是节点i和节点j之间的距离,τij(t)为t时刻路径(i,j)上的信息素量,初始时刻τij(t)取常数const,τij(t)决定着状态转移概率的计算。下面是状态转移概率计算公式:Let m' be the number of nodes in the starting node set, and the corresponding number of ants is also m', and m' ants are placed on m' starting nodes. Described ant is the variable that is used for optimization in the ant colony algorithm, and n ' represents the number of all nodes in the set of starting nodes and the set of destination nodes, and d ij is the distance between node i and node j, and τ ij (t) is The amount of pheromone on the path (i, j) at time t, the initial time τ ij (t) takes a constant const, τ ij (t) determines the calculation of the state transition probability. The following is the formula for calculating the state transition probability:
式(2)中,表示在t时刻第k只蚂蚁由节点i转移到与i有边相连的节点j的状态转移概率,allowedk是所有与i节点有边相连的节点集合。α为信息启发式因子,表示轨迹的相对重要性,反映了蚂蚁在运动过程中所积累的信息在蚂蚁运动时所起的作用,其值越大,则该蚂蚁越倾向于选择其它蚂蚁经过的路径,蚂蚁之间协作越强。β为期望启发式因子,表示能见度的相对重要性,反映了蚂蚁在运动过程中启发信息在蚂蚁选择路径中的受重视程度。ηij(t)为启发函数,若该计算节点无历史信息则ηij(t)取经验值。In formula (2), Indicates the state transition probability of the k-th ant transferring from node i to node j connected to i at time t, and allowed k is the set of all nodes connected to node i. α is an information heuristic factor, which represents the relative importance of the trajectory, and reflects the role of the information accumulated by the ant during the movement of the ant. The larger the value, the more the ant is inclined to choose the path that other ants pass The path, the stronger the cooperation between ants. β is the expected heuristic factor, which represents the relative importance of visibility, and reflects the importance of heuristic information in the ant's choice of path during the movement process. η ij (t) is a heuristic function, if the computing node has no historical information, then η ij (t) is an empirical value.
t+n时刻,在节点(i,j)弧段上信息素的更新规则如下:At time t+n, the update rule of pheromone on the node (i, j) arc is as follows:
τij(t+n)=(1-ρ)×τij(t)+ρ×Δτij;τ ij (t+n)=(1-ρ)×τ ij (t)+ρ×Δτ ij ;
第k只蚂蚁在时刻t和t+n时刻经过节点i,j,否则为0。其中,τij(t)表示(i,j)弧段上t时刻信息素的值,表示t+n时刻某只蚂蚁新感受到的计算节点(i,j)上的信息素量的值。ρ表示信息素更新因子,1-ρ表示信息素残留因子,这里ρ表示计算节点以多大的程度借鉴新体验到的τij(t)值,1-ρ表示以多大的程度借鉴之前的τij(t)值。The kth ant passes through nodes i and j at time t and t+n, otherwise it is 0. Among them, τ ij (t) represents the value of pheromone on the (i, j) arc at time t, Indicates the value of the pheromone amount on the computing node (i, j) newly felt by an ant at time t+n. ρ represents the pheromone update factor, 1-ρ represents the pheromone residual factor, here ρ represents the extent to which the computing node learns from the newly experienced τ ij (t) value, and 1-ρ represents the extent to which the previous τ ij is borrowed (t) value.
根据出发节点集合和目的节点集合中节点间的一一对应关系,把出发节点对应的目的节点放入相应的tabvk(k=1,2,…,m′)中。According to the one-to-one correspondence between the nodes in the starting node set and the destination node set, put the destination node corresponding to the starting node into the corresponding tabv k (k=1, 2, . . . , m′).
为了得到全局最优化的调配方案,可以执行以下步骤:In order to obtain the globally optimal allocation scheme, the following steps can be performed:
步骤1:设定最大循环次数Ncmax,蚂蚁个数m′,初始化时间片t=0,循环控制变量Nc=0,蚂蚁循环变量k=0,禁忌表tabuk(k=1,2,…,m′),节点动态调整表tabvk(k=1,2,…,m′),路径表pathk(k=1,2,…,m′),将m′只蚂蚁放置在m′个出发节点上,令不同节点相连弧上的信息素τij(t)=const,其中const为常数,const的取值以不影响后续算法运行结果为宜,把所有目的节点集合中的节点放入节点动态调整表tabvk(k=1,2,…,m′)中;Step 1: Set the maximum number of cycles N cmax , the number of ants m′, the initialization time slice t=0, the cycle control variable N c =0, the ant cycle variable k=0, the tabu table tabu k (k=1, 2, ..., m'), node dynamic adjustment table tabv k (k=1, 2,..., m'), path table path k (k=1, 2,..., m'), place m' ants in m ′ on a starting node, let the pheromone τ ij (t) on the connected arcs of different nodes=const, where const is a constant, and the value of const should not affect the result of subsequent algorithm operation. Put into node dynamic adjustment table tabv k (k=1,2,...,m');
步骤2:循环次数Nc=Nc+1,如果Nc>Ncmax,退出循环,跳转到步骤11;Step 2: Number of cycles N c =N c+1 , if N c >N cmax , exit the cycle and jump to step 11;
步骤3:蚂蚁数目k=k+1,如果k>m,退出k循环,跳转到步骤8;Step 3: The number of ants k=k+1, if k>m, exit the k loop and jump to step 8;
步骤4:确定蚂蚁目前所在的节点,检测该节点是否属于目的节点集合,如果是,则将该节点对应的目的节点从节点动态调整表tabvk中删除,否则跳转到下一步;Step 4: Determine the node where the ant is currently located, and detect whether the node belongs to the destination node set, if so, delete the destination node corresponding to the node from the node dynamic adjustment table tabv k , otherwise jump to the next step;
步骤5:寻找与蚂蚁所在节点相连的路径,根据状态转移概率公式计算转移概率,选择从此节点出发的下一个节点,即选择此节点和下一节点确定的计算节点;Step 5: Find the path connected to the node where the ant is located, calculate the transition probability according to the state transition probability formula, and select the next node starting from this node, that is, select the calculation node determined by this node and the next node;
步骤6:修改禁忌表tabuk,将新选择的节点放入禁忌表中;并进行信息素的更新;Step 6: Modify the tabu table tabuk , put the newly selected node into the tabu table; and update the pheromone;
步骤7:如果禁忌表tabuk已包含了所有出发节点集合和目的节点集合中的所有节点,则蚂蚁本次选路结束,跳转到步骤9,否则跳转到步骤5;Step 7: If the tabu table tabu k already contains all the nodes in the set of starting nodes and the set of destination nodes, then the ant's current route selection is over, and jump to step 9, otherwise, jump to step 5;
步骤8:计算并记录蚂蚁此轮选择节点的新增信息素总和,这里的新增信息素总和是各个子节点新增信息素的加总;如果此轮所有蚂蚁选路结束,则跳转到步骤9,否则跳转到步骤3;Step 8: Calculate and record the sum of the newly added pheromones of the nodes selected by the ants in this round. The sum of the newly added pheromones here is the sum of the newly added pheromones of each child node; Step 9, otherwise jump to step 3;
步骤9:比较该轮中所有蚂蚁选择的组合计算节点的新增信息素总和,取新增信息素总和值最大的计算节点组合序列,对相应路径上的信息素按照信息素更新规则进行信息素的更新;Step 9: Compare the sum of the newly added pheromones of the combined computing nodes selected by all ants in this round, take the combined sequence of computing nodes with the largest sum of newly added pheromones, and perform pheromone update on the pheromones on the corresponding path according to the pheromone update rules. update;
步骤10:清空禁忌表tabuk、路径表pathk,跳转到步骤2;Step 10: Clear tabu table tabu k and path table path k , and jump to step 2;
步骤11:信息素最大路径表示的调配路线就是调配方案的最优解。Step 11: The deployment route represented by the maximum pheromone path is the optimal solution of the deployment scheme.
通过对所有调度方案进行最佳运输线路及最低运输费用的求解,最终获取本次调度的最佳调度方案。By solving the best transportation route and the lowest transportation cost for all scheduling schemes, the best scheduling scheme for this scheduling is finally obtained.
由以上所述可见,静态物流调配算法是在物流调配程序启动以前启动的,用于对本次调配生成最佳调配方案。但由于系统的状态一直处在变化之中,因而即使在本次物流调配方案已经生成并实行的过程中,也需要根据信息的变化进行动态、实时的调整,以生成动态物流调配方案。动态物流调配算法是在静态物流调配算法的基础上,增加算法的动态性设计,动态地删除节点或增加节点以及改变相应的算法流程来实现的。It can be seen from the above that the static logistics allocation algorithm is started before the logistics allocation program is started, and is used to generate the best allocation plan for this allocation. However, since the state of the system is always changing, even in the process of generating and implementing the current logistics allocation plan, it is necessary to make dynamic and real-time adjustments according to changes in information to generate a dynamic logistics allocation plan. The dynamic logistics allocation algorithm is based on the static logistics allocation algorithm, adding the dynamic design of the algorithm, dynamically deleting or adding nodes and changing the corresponding algorithm flow.
动态物流调配算法可以包括以下操作:The dynamic logistics allocation algorithm can include the following operations:
对应已经生成的本次最佳物流调配方案,应用实时感知信息,确定该方案的执行程度,对于已经调配完成的任务,从出发节点集合和目的节点集合中删除相应的节点,从最优调度路径中删除相应的路径;对于当前要删除、新增、修改的调度任务,在出发节点集合和目的节点集合中删除、新增相应的节点;确定调度车当前所在的节点位置或即将到达的节点位置,进行最新的状态更新后,生成相应的节点状态图;Corresponding to the best logistics deployment plan that has been generated, apply real-time perception information to determine the execution degree of the plan. For the tasks that have been deployed, delete the corresponding nodes from the set of starting nodes and the set of destination nodes, and start from the optimal scheduling path. Delete the corresponding path in ; for the current dispatching task to be deleted, added, or modified, delete or add the corresponding node in the starting node set and destination node set; determine the current node position of the dispatching vehicle or the upcoming node position , after the latest status update, generate the corresponding node status graph;
另外,在初始化时将所有k只蚂蚁放置在调度车当前位置节点,应用前述的静态物流调配算法重新进行最优化求解。In addition, during initialization, all k ants are placed on the current position node of the dispatching vehicle, and the aforementioned static logistics allocation algorithm is used to re-optimize the solution.
结合以上所述可见,本发明实现物流调配的操作思路可以表示如图1所示的流程,该流程包括以下步骤:In combination with the above, it can be seen that the operation idea of the present invention to realize logistics allocation can represent the flow shown in Figure 1, which includes the following steps:
步骤110:通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;Step 110: Generate a mathematical model for logistics allocation by modeling logistics allocation constraint conditions, allocation station distance modeling, and logistics allocation algorithm modeling;
步骤120:在所述数学模型基础之上应用蚁群算法调配物流。Step 120: Applying the ant colony algorithm to allocate logistics on the basis of the mathematical model.
为了保证上述操作能够顺利进行,可以设置如图2所示的装置,该装置包括可以相连的数学模型生成模块、物流调配模块;其中,数学模型生成模块能够通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;物流调配模块能够在所述数学模型基础之上应用蚁群算法调配物流。In order to ensure that the above operations can be carried out smoothly, a device as shown in Figure 2 can be set up, which includes a mathematical model generation module and a logistics allocation module that can be connected; wherein, the mathematical model generation module can model through logistics allocation constraints, and the allocation station Distance modeling and logistics allocation algorithm modeling are used to generate a mathematical model for realizing logistics allocation; the logistics allocation module can apply ant colony algorithm to allocate logistics on the basis of the mathematical model.
可见,本发明可以通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;在所述数学模型基础之上应用蚁群算法调配物流。It can be seen that the present invention can generate a mathematical model for logistics allocation by modeling logistics allocation constraint conditions, allocation station distances, and logistics allocation algorithms; on the basis of the mathematical model, an ant colony algorithm is used to allocate logistics.
所述物流调配约束条件建模的方法可以为:The method for modeling the logistics allocation constraints can be:
设物流调配系统总共有n个物流调配站,每个调配站表示为ai(i=1…n),在时刻T(t),调配站ai的某物流货物库存量为Si(T(t)),而在这一时刻该调配站对该物流货物的需求量为yi(T(t)),满足状态约束条件Si(T(t))≥yi(T(t));(i=1…n)。Assume that the logistics allocation system has n logistics allocation stations in total, and each allocation station is denoted as a i (i=1...n), at time T(t), the inventory of a certain logistics goods in the allocation station a i is S i (T (t)), and at this moment, the deployment station’s demand for the logistics goods is y i (T(t)), which satisfies the state constraint condition S i (T(t))≥y i (T(t) ); (i=1...n).
还可以通过对每个物流调配站建立和维护一个有限状态机,来进行物流调配的管理;物流调配站ai的状态机函数定义为:Sti(T(t));其中(i=1…n);It is also possible to manage logistics allocation by establishing and maintaining a finite state machine for each logistics allocation station; the state machine function of logistics allocation station a i is defined as: St i (T(t)); where (i=1 ...n);
当状态机不能满足未来相应时间点的所述状态约束条件时,通过启动物流调配方案对状态机进行状态的转换,使其满足所述状态约束条件。When the state machine cannot meet the state constraints at the corresponding time point in the future, the state transition of the state machine is performed by starting the logistics allocation plan to make it meet the state constraints.
所述配送站距离建模可以包括绝对距离建模和相对距离建模;其中,The delivery station distance modeling may include absolute distance modeling and relative distance modeling; wherein,
绝对距离建模时,设站点ai和站点aj之间的距离为dij,建立不同站点之间距离的二维矩阵:In absolute distance modeling, set the distance between site a i and site a j as d ij , and establish a two-dimensional matrix of distances between different sites:
相对距离建模时,如果站点ai到站点aj之间的通路上不存在其他站点,则设站点ai到站点aj之间的距离为dij;如果站点ai到站点aj之间存在第三个站点k,则dij=dik+dkj;When modeling relative distance, if there are no other stations on the path between station a i and station a j , then set the distance between station a i and station a j as d ij ; if the distance between station a i and station a j There is a third station k in between, then d ij =d ik +d kj ;
依次类推,把所有不同站点之间的距离表示为不可分解的两两最小站点间距离的和:By analogy, the distance between all different sites is expressed as the sum of the indecomposable pairwise minimum distances between sites:
其中,d′ij表示站点ai到站点aj之间的相对距离,表示为两两最小站点间距离的相对值。Among them, d′ ij represents the relative distance between site a i and site a j , expressed as the relative value of the minimum distance between two sites.
所述物流调配算法建模可以用于对未来状态进行预测,包括未来状态函数定义、物流调配矩阵定义;其中,The logistics allocation algorithm modeling can be used to predict the future state, including the definition of the future state function and the definition of the logistics allocation matrix; wherein,
进行未来状态函数定义时,未来状态预测函数定义为:Numi=fc(sti(T(t)),yi(T(t)),Si(T(t)));When defining the future state function, the future state prediction function is defined as: Num i = fc(st i (T(t)), y i (T(t)), S i (T(t)));
如果Numi>0,表示调配站ai有剩余的物流货物,数目为Numi;如果Numi=0,表示调配站ai没有剩余物流货物;Numi≥0时,表示调配站ai不需要通过物流调配程序来补充物流货物;如果Numi<0,表示调配站ai需要启动物流调配程序,且调配到调配站ai的物流货物数量为Numi的绝对值;If Num i > 0, it means that the allocation station a i has remaining logistics goods, and the number is Num i ; if Num i = 0, it means that the allocation station a i has no remaining logistics goods; when Num i ≥ 0, it means that the allocation station a i does not The logistics goods need to be supplemented through the logistics allocation program; if Num i <0, it means that the allocation station a i needs to start the logistics allocation program, and the number of logistics goods allocated to the allocation station a i is the absolute value of Num i ;
进行物流调配矩阵定义时,建立调配站间的物流调配二维矩阵,如果调配站ai不需要向调配站aj调配货物,则用0表示;如果需要调配,则表示为调配的物流货物数值tij:When defining the logistics allocation matrix, establish a two-dimensional logistics allocation matrix between the allocation stations. If the allocation station a i does not need to allocate goods to the allocation station a j , it is represented by 0; if it needs to be allocated, it is expressed as the value of the allocated logistics goods t ij :
另外,可以用表示运往调配站aj的所有物流货物的总和,需要满足条件:Alternatively, you can use Indicates the sum of all logistics goods shipped to the deployment station a j , which needs to meet the conditions:
即运往调配站aj的物流货物要能满足未来状态机的要求。 That is, the logistics goods transported to the deployment station a j must meet the requirements of the future state machine.
用表示从调配站ai运往其他所有调配站的物流货物总和,需满足条件:即调配站ai运往其他所有调配站的物流货物总和,需满足调配站ai未来的状态机约束条件。use Indicates the sum of the logistics goods transported from the deployment station a i to all other deployment stations, and the conditions must be met: That is, the sum of the logistics goods transported by the deployment station a i to all other deployment stations must meet the future state machine constraints of the deployment station a i .
在所述数学模型基础之上应用蚁群算法调配物流的过程可以包括以下步骤:The process of applying the ant colony algorithm to allocate logistics on the basis of the mathematical model may include the following steps:
步骤1:设定最大循环次数Ncmax,蚂蚁个数m′,初始化时间片t=0,循环控制变量Nc=0,蚂蚁循环变量k=0,禁忌表tabuk(k=1,2,…,m′),节点动态调整表tabvk(k=1,2,…,m′),路径表pathk(k=1,2,…,m′),将m′只蚂蚁放置在m′个出发节点上,令不同节点相连弧上的信息素τij(t)=const,其中const为常数;把所有目的节点集合中的节点放入节点动态调整表tabvk(k=1,2,…,m′)中;所述蚂蚁为蚁群算法中用于寻优的变量;Step 1: Set the maximum number of cycles N cmax , the number of ants m′, the initialization time slice t=0, the cycle control variable N c =0, the ant cycle variable k=0, the tabu table tabu k (k=1, 2, ..., m'), node dynamic adjustment table tabv k (k=1, 2,..., m'), path table path k (k=1, 2,..., m'), place m' ants in m On a starting node, make the pheromone τ ij (t)=const on the connected arcs of different nodes, where const is a constant; put the nodes in all destination node sets into the node dynamic adjustment table tabv k (k=1, 2 ,..., m'); the ant is a variable used for optimization in the ant colony algorithm;
步骤2:循环次数Nc=Nc+1,如果Nc>Ncmax,退出循环,跳转到步骤11;Step 2: The number of cycles N c =N c+1 , if Nc>N cmax , exit the cycle and jump to step 11;
步骤3:蚂蚁数目k=k+1,如果k>m,退出k循环,跳转到步骤8;Step 3: The number of ants k=k+1, if k>m, exit the k loop and jump to step 8;
步骤4:确定蚂蚁目前所在的节点,检测该节点是否属于目的节点集合,如果是,则将该节点对应的目的节点从节点动态调整表tabvk中删除,否则跳转到下一步;Step 4: Determine the node where the ant is currently located, and detect whether the node belongs to the destination node set, if so, delete the destination node corresponding to the node from the node dynamic adjustment table tabv k , otherwise jump to the next step;
步骤5:寻找与蚂蚁所在节点相连的路径,根据状态转移概率公式计算转移概率,选择从此节点出发的下一个节点;Step 5: Find the path connected to the node where the ant is located, calculate the transition probability according to the state transition probability formula, and select the next node starting from this node;
步骤6:修改禁忌表tabuk,将新选择的节点放入禁忌表中;并进行信息素的更新;Step 6: Modify the tabu table tabuk , put the newly selected node into the tabu table; and update the pheromone;
步骤7:如果禁忌表tabuk已包含了所有出发节点集合和目的节点集合中的所有节点,则蚂蚁本次选路结束,跳转到步骤9,否则跳转到步骤5;Step 7: If the tabu table tabu k already contains all the nodes in the set of starting nodes and the set of destination nodes, then the ant's current route selection is over, and jump to step 9, otherwise, jump to step 5;
步骤8:计算并记录蚂蚁此轮选择节点的新增信息素总和,如果此轮所有蚂蚁选路结束,则跳转到步骤9,否则跳转到步骤3;Step 8: Calculate and record the sum of new pheromones added by the ants in this round of node selection. If the route selection of all ants in this round is over, go to step 9, otherwise go to step 3;
步骤9:比较该轮中所有蚂蚁选择的组合计算节点的新增信息素总和,取新增信息素总和值最大的计算节点组合序列,对相应路径上的信息素按照信息素更新规则进行信息素的更新;Step 9: Compare the sum of the newly added pheromones of the combined computing nodes selected by all ants in this round, take the combined sequence of computing nodes with the largest sum of newly added pheromones, and perform pheromone update on the pheromones on the corresponding path according to the pheromone update rules. update;
步骤10:清空禁忌表tabuk、路径表pathk,跳转到步骤2;Step 10: Clear tabu table tabu k and path table path k , and jump to step 2;
步骤11:将信息素最大路径表示的调配路线作为调配方案的最优解。Step 11: Take the deployment route represented by the maximum pheromone path as the optimal solution of the deployment scheme.
还可以对应已经生成的本次最佳物流调配方案,应用实时感知信息,确定该方案是否需要进行动态调整,对于已经调配完成的任务,从出发节点集合和目的节点集合中删除相应的节点,从最优调度路径中删除相应的路径;对于当前要删除、新增、修改的调度任务,在出发节点集合和目的节点集合中删除、新增相应的节点;确定调度车当前所在的节点位置或即将到达的节点位置,进行最新的状态更新后,生成相应的节点状态图;将所有k只蚂蚁放置在调度车当前位置节点,重新进行最优化求解。It is also possible to apply real-time perception information to the best logistics deployment plan that has been generated to determine whether the plan needs to be adjusted dynamically. Delete the corresponding path in the optimal scheduling path; for the current scheduling task to be deleted, added, or modified, delete or add the corresponding node in the starting node set and destination node set; determine the current node position of the dispatching vehicle or the upcoming Arrived at the node position, after updating the latest state, generate the corresponding node state graph; place all k ants on the node at the current position of the dispatching vehicle, and re-optimize the solution.
本发明的物流调配实现装置可以包括数学模型生成模块、物流调配模块;其中,The logistics allocation implementation device of the present invention may include a mathematical model generation module and a logistics allocation module; wherein,
所述数学模型生成模块,用于通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;The mathematical model generation module is used to generate a mathematical model for realizing logistics deployment through modeling of logistics deployment constraints, modeling of distances from deployment stations, and modeling of logistics deployment algorithms;
所述物流调配模块,用于在所述数学模型基础之上应用蚁群算法调配物流。The logistics allocation module is used for applying the ant colony algorithm to allocate logistics on the basis of the mathematical model.
所述数学模型生成模块可以包括物流调配约束条件建模单元,用于:The mathematical model generation module may include a logistics allocation constraint modeling unit for:
设物流调配系统总共有n个物流调配站,每个调配站表示为ai(i=1…n),在未来时刻T(t),调配站ai的某物流货物库存量为Si(T(t)),而在这一时刻该调配站对该物流货物的需求量为yi(T(t)),满足状态约束条件Si(T(t))≥yi(T(t));(i=1…n)。Assume that the logistics allocation system has n logistics allocation stations in total, and each allocation station is denoted as a i (i=1...n). At the future time T(t), the inventory of certain logistics goods in the allocation station a i is S i ( T(t)), and at this moment, the deployment station’s demand for the logistics goods is y i (T(t)), which satisfies the state constraint condition S i (T(t))≥y i (T(t )); (i=1...n).
所述物流调配约束条件建模单元还可以用于:The logistics allocation constraint modeling unit can also be used for:
通过对每个物流调配站建立和维护一个有限状态机,来进行物流调配的管理;物流调配站ai的状态机函数定义为:Sti(T(t));其中(i=1…n);Logistics allocation management is carried out by establishing and maintaining a finite state machine for each logistics allocation station; the state machine function of logistics allocation station a i is defined as: St i (T(t)); where (i=1...n );
当状态机不能满足未来相应时间点的所述状态约束条件时,对状态机进行状态的转换。When the state machine cannot satisfy the state constraint condition at the corresponding time point in the future, the state transition of the state machine is performed.
所述数学模型生成模块可以包括配送站距离建模单元,用于进行绝对距离建模和相对距离建模;其中,The mathematical model generation module may include a distribution station distance modeling unit for absolute distance modeling and relative distance modeling; wherein,
绝对距离建模时,设站点ai和站点aj之间的距离为dij,建立不同站点之间距离的二维矩阵:In absolute distance modeling, set the distance between site a i and site a j as d ij , and establish a two-dimensional matrix of distances between different sites:
相对距离建模时,如果站点ai到站点aj之间的通路上不存在其他站点,则设站点ai到站点aj之间的距离为dij;如果站点ai到站点aj之间存在第三个站点k,则dij=dik+dkj;When modeling relative distance, if there are no other stations on the path between station a i and station a j , then set the distance between station a i and station a j as d ij ; if the distance between station a i and station a j There is a third station k in between, then d ij =d ik +d kj ;
依次类推,把所有不同站点之间的距离表示为不可分解的两两最小站点间距离的和:By analogy, the distance between all different sites is expressed as the sum of the indecomposable pairwise minimum distances between sites:
其中,d′ij表示站点ai到站点aj之间的相对距离,表示为两两最小站点间距离的相对值。Among them, d′ ij represents the relative distance between site a i and site a j , expressed as the relative value of the minimum distance between two sites.
所述数学模型生成模块可以包括物流调配算法建模单元,用于对未来状态进行预测,包括未来状态函数定义、物流调配矩阵定义;其中,The mathematical model generation module may include a logistics allocation algorithm modeling unit for predicting the future state, including the definition of a future state function and the definition of a logistics allocation matrix; wherein,
进行未来状态函数定义时,未来状态预测函数定义为:Numi=fc(sti(T(t)),yi(T(t)),Si(T(t)));When defining the future state function, the future state prediction function is defined as: Num i = fc(st i (T(t)), y i (T(t)), S i (T(t)));
如果Numi>0,表示调配站ai有剩余的物流货物,数目为Numi;如果Numi=0,表示调配站ai没有剩余物流货物;Numi≥0时,表示调配站ai不需要通过物流调配程序来补充物流货物;如果Numi<0,表示调配站ai需要启动物流调配程序,且调配到调配站ai的物流货物数量为Numi的绝对值;If Num i > 0, it means that the allocation station a i has remaining logistics goods, and the number is Num i ; if Num i = 0, it means that the allocation station a i has no remaining logistics goods; when Num i ≥ 0, it means that the allocation station a i does not The logistics goods need to be supplemented through the logistics allocation program; if Num i <0, it means that the allocation station a i needs to start the logistics allocation program, and the number of logistics goods allocated to the allocation station a i is the absolute value of Num i ;
进行物流调配矩阵定义时,建立调配站间的物流调配二维矩阵,如果调配站ai不需要向调配站aj调配货物,则用0表示;如果需要调配,则表示为调配的物流货物数值tij:When defining the logistics allocation matrix, establish a two-dimensional logistics allocation matrix between the allocation stations. If the allocation station a i does not need to allocate goods to the allocation station a j , it is represented by 0; if it needs to be allocated, it is expressed as the value of the allocated logistics goods t ij :
所述物流调配算法建模单元还可以用于:The logistics allocation algorithm modeling unit can also be used for:
用表示运往调配站aj的所有物流货物的总和,需要满足条件:use Indicates the sum of all logistics goods shipped to the deployment station a j , which needs to meet the conditions:
即运往调配站aj的物流货物要能满足未来状态机的要求。 That is, the logistics goods transported to the deployment station a j must meet the requirements of the future state machine.
用表示从调配站ai运往其他所有调配站的物流货物总和,需满足条件:即调配站ai运往其他所有调配站的物流货物总和,需满足调配站ai未来的状态机约束条件。use Indicates the sum of the logistics goods transported from the deployment station a i to all other deployment stations, and the conditions must be met: That is, the sum of the logistics goods transported by the deployment station a i to all other deployment stations must meet the future state machine constraints of the deployment station a i .
所述物流调配模块在数学模型基础之上应用蚁群算法调配物流时,可以执行以下步骤:When the logistics allocation module applies the ant colony algorithm to allocate logistics on the basis of the mathematical model, the following steps can be performed:
步骤1:设定最大循环次数Ncmax,蚂蚁个数m′,初始化时间片t=0,循环控制变量Nc=0,蚂蚁循环变量k=0,禁忌表tabuk(k=1,2,…,m′),节点动态调整表tabvk(k=1,2,…,m′),路径表pathk(k=1,2,…,m′),将m′只蚂蚁放置在m′个出发节点上,令不同节点相连弧上的信息素τij(t)=const,其中const为常数;把所有目的节点集合中的节点放入节点动态调整表tabvk(k=1,2,…,m′)中;所述蚂蚁为蚁群算法中用于寻优的变量;Step 1: Set the maximum number of cycles N cmax , the number of ants m′, the initialization time slice t=0, the cycle control variable N c =0, the ant cycle variable k=0, the tabu table tabu k (k=1, 2, ..., m'), node dynamic adjustment table tabv k (k=1, 2,..., m'), path table path k (k=1, 2,..., m'), place m' ants in m On a starting node, make the pheromone τ ij (t)=const on the connected arcs of different nodes, where const is a constant; put the nodes in all destination node sets into the node dynamic adjustment table tabv k (k=1, 2 ,..., m'); the ant is a variable used for optimization in the ant colony algorithm;
步骤2:循环次数Nc=Nc+1,如果Nc>Ncmax,退出循环,跳转到步骤11;Step 2: Number of cycles N c =N c+1 , if N c >N cmax , exit the cycle and jump to step 11;
步骤3:蚂蚁数目k=k+1,如果k>m,退出k循环,跳转到步骤8;Step 3: The number of ants k=k+1, if k>m, exit the k loop and jump to step 8;
步骤4:确定蚂蚁目前所在的节点,检测该节点是否属于目的节点集合,如果是,则将该节点对应的目的节点从节点动态调整表tabvk中删除,否则跳转到下一步;Step 4: Determine the node where the ant is currently located, and detect whether the node belongs to the destination node set, if so, delete the destination node corresponding to the node from the node dynamic adjustment table tabv k , otherwise jump to the next step;
步骤5:寻找与蚂蚁所在节点相连的路径,根据状态转移概率公式计算转移概率,选择从此节点出发的下一个节点;Step 5: Find the path connected to the node where the ant is located, calculate the transition probability according to the state transition probability formula, and select the next node starting from this node;
步骤6:修改禁忌表tabuk,将新选择的节点放入禁忌表中;并进行信息素的更新;Step 6: Modify the tabu table tabuk , put the newly selected node into the tabu table; and update the pheromone;
步骤7:如果禁忌表tabuk已包含了所有出发节点集合和目的节点集合中的所有节点,则蚂蚁本次选路结束,跳转到步骤9,否则跳转到步骤5;Step 7: If the tabu table tabu k already contains all the nodes in the set of starting nodes and the set of destination nodes, then the ant's current route selection is over, and jump to step 9, otherwise, jump to step 5;
步骤8:计算并记录蚂蚁此轮选择节点的新增信息素总和,如果此轮所有蚂蚁选路结束,则跳转到步骤9,否则跳转到步骤3;Step 8: Calculate and record the sum of new pheromones added by the ants in this round of node selection. If the route selection of all ants in this round is over, go to step 9, otherwise go to step 3;
步骤9:比较该轮中所有蚂蚁选择的组合计算节点的新增信息素总和,取新增信息素总和值最大的计算节点组合序列,对相应路径上的信息素按照信息素更新规则进行信息素的更新;Step 9: Compare the sum of the newly added pheromones of the combined computing nodes selected by all ants in this round, take the combined sequence of computing nodes with the largest sum of newly added pheromones, and perform pheromone update on the pheromones on the corresponding path according to the pheromone update rules. update;
步骤10:清空禁忌表tabuk、路径表pathk,跳转到步骤2;Step 10: Clear tabu table tabu k and path table path k , and jump to step 2;
步骤11:将信息素最大路径表示的调配路线作为调配方案的最优解。Step 11: Take the deployment route represented by the maximum pheromone path as the optimal solution of the deployment scheme.
所述物流调配模块还可以对应已经生成的本次最佳物流调配方案,应用实时感知信息,确定该方案的执行程度,对于已经调配完成的任务,从出发节点集合和目的节点集合中删除相应的节点,从最优调度路径中删除相应的路径;对于当前要删除、新增、修改的调度任务,在出发节点集合和目的节点集合中删除、新增相应的节点;确定调度车当前所在的节点位置或即将到达的节点位置,进行最新的状态更新后,生成相应的节点状态图;将所有k只蚂蚁放置在调度车当前位置节点,重新进行最优化求解。The logistics allocation module can also correspond to the optimal logistics allocation plan that has been generated, apply real-time perception information, determine the execution degree of the plan, and delete corresponding tasks from the starting node set and destination node set for tasks that have been allocated. Node, delete the corresponding path from the optimal scheduling path; for the current scheduling task to be deleted, added, or modified, delete or add the corresponding node in the starting node set and destination node set; determine the node where the dispatching vehicle is currently located The position or the node position that is about to arrive, after the latest state update, generate the corresponding node state diagram; place all k ants on the current position node of the dispatching vehicle, and re-optimize the solution.
综上所述可见,无论是方法还是实现该方法的装置,本发明实现物流调配的技术能通过物流调配约束条件建模、调配站距离建模、物流调配算法建模来生成用于实现物流调配的数学模型;并在所述数学模型基础之上应用蚁群算法调配物流,因此能够适应物流调配过程中的动态变化特性,在最少数量、最小范围内生成接近最佳的物流调配方案,这能在很大程度上提高物流调配效率,实现高效率物流调配,并节省物流调配成本。To sum up, it can be seen that, whether it is a method or a device for realizing the method, the technology for realizing logistics deployment in the present invention can generate logistics deployment constraints modeling, distribution station distance modeling, and logistics deployment algorithm modeling to realize logistics deployment. The mathematical model; and on the basis of the mathematical model, the ant colony algorithm is used to allocate logistics, so it can adapt to the dynamic changes in the logistics allocation process, and generate a nearly optimal logistics allocation plan in the least amount and within the smallest range, which can Improve the efficiency of logistics allocation to a large extent, achieve high-efficiency logistics allocation, and save logistics allocation costs.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310165121.7A CN103246969B (en) | 2013-05-07 | 2013-05-07 | A kind of implementation method of logistics deployment and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310165121.7A CN103246969B (en) | 2013-05-07 | 2013-05-07 | A kind of implementation method of logistics deployment and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103246969A CN103246969A (en) | 2013-08-14 |
CN103246969B true CN103246969B (en) | 2016-05-18 |
Family
ID=48926479
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310165121.7A Expired - Fee Related CN103246969B (en) | 2013-05-07 | 2013-05-07 | A kind of implementation method of logistics deployment and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103246969B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104901927B (en) * | 2014-03-06 | 2019-03-19 | 菜鸟智能物流控股有限公司 | service processing method and device |
CN104700251B (en) * | 2015-03-16 | 2018-02-02 | 华南师范大学 | The improvement minimax ant colony optimization method and system of a kind of vehicle dispatching problem |
CN105488750A (en) * | 2015-11-25 | 2016-04-13 | 国家电网公司 | Intelligent logistics method and system |
CN106919998B (en) * | 2015-12-28 | 2021-07-06 | 航天信息股份有限公司 | Logistics model and method based on AOE network |
CN107341628B (en) * | 2016-12-30 | 2021-04-27 | 闽江学院 | A hub-and-spoke logistics network hub site selection and allocation method based on probabilistic taboo algorithm |
CN109146345A (en) * | 2017-06-16 | 2019-01-04 | 北京三快在线科技有限公司 | Information-pushing method and device, electronic equipment |
CN108269041A (en) * | 2018-01-16 | 2018-07-10 | 广州市信富信息科技有限公司 | Material flows automation dispatching method and system based on Cloud Server big data analysis |
CN110581837B (en) * | 2019-03-15 | 2022-07-12 | 上海大学 | An intelligent first aid box management system and method based on the Internet of Things |
CN110673560B (en) * | 2019-10-10 | 2021-02-05 | 清华大学 | Integrated circuit production line scheduling method based on operation completion time rapid prediction |
CN114690703A (en) * | 2020-12-27 | 2022-07-01 | 富联裕展科技(深圳)有限公司 | Device and method for planning workpiece point location detection path |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20020034462A (en) * | 2000-11-02 | 2002-05-09 | 나윤대 | Method of Application using Internet Delivery System |
CN101894314A (en) * | 2010-04-23 | 2010-11-24 | 南京邮电大学 | A storage application method based on the Internet of Things |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120317059A1 (en) * | 2011-06-13 | 2012-12-13 | Infosys Limited | System and method for space and resource optimization |
-
2013
- 2013-05-07 CN CN201310165121.7A patent/CN103246969B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20020034462A (en) * | 2000-11-02 | 2002-05-09 | 나윤대 | Method of Application using Internet Delivery System |
CN101894314A (en) * | 2010-04-23 | 2010-11-24 | 南京邮电大学 | A storage application method based on the Internet of Things |
Non-Patent Citations (2)
Title |
---|
一种基于蚁群算法的物流配送VRP解决方案;薛戈丽等;《计算机系统应用》;20120215;第21卷(第2期);第200-203页 * |
基于改进蚁群算法的服务组合优化;夏亚梅等;《计算机学报》;20120215;第35卷(第2期);第270-280页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103246969A (en) | 2013-08-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103246969B (en) | A kind of implementation method of logistics deployment and device | |
CN112016812B (en) | Multi-unmanned aerial vehicle task scheduling method, system and storage medium | |
WO2021248607A1 (en) | Deep reinforcement learning-based taxi dispatching method and system | |
CN110782086B (en) | A method and system for optimizing the distribution path of vehicles with unmanned aerial vehicles for rescue | |
US12078984B2 (en) | Safeguarding resources of physical entities in a shared environment | |
CN112418497A (en) | Material distribution path optimization method for manufacturing Internet of things | |
CN108846623A (en) | Based on the complete vehicle logistics dispatching method and device of multiple target ant group algorithm, storage medium, terminal | |
CN109934388A (en) | One kind sorting optimization system for intelligence | |
CN104217258A (en) | Method for power load condition density prediction | |
CN104463379A (en) | Associated logistics transportation optimized dispatching method with time-varying demand | |
CN102542411A (en) | Method for carrying out dispatching control on multi-variety multi-process manufacturing enterprise workshop on basis of ACA (Automatic Circuit Analyzer) model | |
CN113962464A (en) | Emergency vehicle scheduling method, device, equipment and storage medium | |
CN113850414B (en) | Logistics scheduling planning method based on graph neural network and reinforcement learning | |
CN113344320B (en) | Dynamic automatic planning method and system for distribution path of logistics robot under multiple targets | |
CN101840200A (en) | Adaptive processing method for optimizing dynamic data in dispatching control | |
Arvind et al. | Architecture for industry 4.0-based manufacturing systems | |
Zhang et al. | Vehicle dynamic dispatching using curriculum-driven reinforcement learning | |
CN117290071A (en) | Fine-grained task scheduling method and service architecture in vehicle edge calculation | |
CN115271130B (en) | Dynamic scheduling method and system for maintenance order of ship main power equipment | |
CN101909078A (en) | A Dynamic Service Selection Method Based on New Service Set Construction | |
CN118246607A (en) | Machine position distribution method based on dynamic task graph modeling | |
CN116738239B (en) | Model training method, resource scheduling method, device, system, equipment and medium | |
Chen et al. | Multiconstrained network intensive vehicle routing adaptive ant colony algorithm in the context of neural network analysis | |
Peng et al. | Network-wide coordinated control based on space-time trajectories | |
Zhong et al. | An emergency resource scheduling model based on edge computing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160518 |