CN109784603B - Method for solving flexible job shop scheduling based on mixed whale swarm algorithm - Google Patents
Method for solving flexible job shop scheduling based on mixed whale swarm algorithm Download PDFInfo
- Publication number
- CN109784603B CN109784603B CN201811359927.9A CN201811359927A CN109784603B CN 109784603 B CN109784603 B CN 109784603B CN 201811359927 A CN201811359927 A CN 201811359927A CN 109784603 B CN109784603 B CN 109784603B
- Authority
- CN
- China
- Prior art keywords
- scheduling
- egk
- whale
- value
- individual
- 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.)
- Active
Links
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域Technical field
本发明属于柔性作业车间调度技术领域,具体涉及一种基于混合鲸鱼群算法求解柔性作业车间调度的方法。The invention belongs to the technical field of flexible job shop scheduling, and specifically relates to a method for solving flexible job shop scheduling based on a hybrid whale swarm algorithm.
背景技术Background technique
柔性作业车间调度问题(Flexible Job-shop Scheduling Problem,FJSP)作为传统作业车间调度问题的扩展形式,增加了工件柔性加工路径的选择问题,其求解的难度更大,也更贴近于生产实际,已被证明是一种具有NP难特性的组合优化问题。对于该问题的求解,各种智能算法目前为其的主要手段,也成为了当前生产调度领域的研究热点。As an extended form of the traditional job shop scheduling problem, the Flexible Job-shop Scheduling Problem (FJSP) adds the problem of selecting a flexible processing path for the workpiece. Its solution is more difficult and closer to the actual production. It has been It is proved to be a combinatorial optimization problem with NP-hard characteristics. Various intelligent algorithms are currently the main means to solve this problem, and have also become a research hotspot in the current field of production scheduling.
现有技术中,加工顺序与开始时间相关联的FJSP,通过对分离图模型的学习,设计了一种领域具体化和解空间多样化的禁忌搜索算法,并通过标准算例的测试验证了算法的优越性;基于离散和谐搜索算法的用于求解最小化最大完工时间FJSP的高效排序的方法,改进混合灰狼优化算法,通过进化种群动态、反向学习初始化种群,以及最优个体变异等三个方面对算法进行改进操作,并对标准算例进行了仿真,结果表明,改进后的混合灰狼优化算法能够有效跳出局部最优值,找到更好的解,且结果鲁棒性更强。通过应用多色集合理论中围道布尔矩阵来构建柔性作业车间调度问题的多重约束模型和单层遗传编码方式,使GA算法的搜索范围得以缩小,染色体的空间和时间复杂度得到有效降低,进而提高了算法求解FJSP问题的速度和精度。混合型灰狼优化算法(HGWO),采用两段式个体编码方式实现离散调度解的连续编码,并利用变邻域搜索策略加强了算法的局部搜索能力,同时引入遗传算法的交叉和变异操作增强了种群的多样性,通过对柔性作业车间调度问题标准算例的仿真测验,结果表明该算法能有效地避免了早熟,提高了求解速度和精度。应用量子计算理论改进的鲸鱼优化算法(WOA),并应用其对作业车间调度问题进行了求解,证明了算法的收敛性和正确性,而作业车间调度问题属于离散的调度问题,而改进的鲸鱼算法主要通过对连续的鲸鱼个体位置向量进行迭代操作来实现求解与寻优的,现有技术并未给出两者之间的具体转换过程。因此,应用新型算法来求解生产调度问题依然是制造领域研究的热点之一。In the existing technology, FJSP associates the processing sequence with the start time. By learning the separation graph model, a tabu search algorithm with domain specificization and solution space diversification was designed, and the algorithm was verified through testing of standard examples. Advantages; an efficient ranking method for solving the minimum maximum completion time FJSP based on the discrete harmonious search algorithm, an improved hybrid gray wolf optimization algorithm, and three initialization populations through evolutionary population dynamics, reverse learning, and optimal individual mutation. On the other hand, the algorithm was improved and a standard example was simulated. The results show that the improved hybrid gray wolf optimization algorithm can effectively jump out of the local optimum and find a better solution, and the results are more robust. By applying the enclosing Boolean matrix in the polychromatic set theory to construct a multi-constraint model and a single-layer genetic coding method for the flexible job shop scheduling problem, the search range of the GA algorithm can be narrowed, and the space and time complexity of the chromosome can be effectively reduced. The speed and accuracy of the algorithm for solving FJSP problems are improved. The Hybrid Gray Wolf Optimization Algorithm (HGWO) uses a two-stage individual coding method to achieve continuous coding of discrete scheduling solutions, and uses a variable neighborhood search strategy to enhance the local search capability of the algorithm. At the same time, it introduces the crossover and mutation operations of the genetic algorithm to enhance In order to improve the diversity of the population, through simulation tests on standard examples of flexible job shop scheduling problems, the results show that this algorithm can effectively avoid premature maturity and improve the solution speed and accuracy. The whale optimization algorithm (WOA) improved by quantum computing theory was applied to solve the job shop scheduling problem, which proved the convergence and correctness of the algorithm. The job shop scheduling problem is a discrete scheduling problem, and the improved whale The algorithm mainly achieves solution and optimization by performing iterative operations on continuous whale individual position vectors. The existing technology does not provide a specific conversion process between the two. Therefore, applying new algorithms to solve production scheduling problems is still one of the hot topics in the manufacturing field.
WSA是受到鲸鱼捕食捕食过程中个体之间利用超声波相互交流引导的启发而提出的一种新的元启发式算法。WSA以其特殊的迭代方式,证明了其求解组合优化问题的优越性。但要应用其来求解离散类问题,首先要解决问题解与个体位置向量之间的相互转换问题,因此,本文通过引入经典转化机制解决调度问题解与个体位置向量之间相互转化的基础上,应用该算法来对FJSP这一经典组合优化问题进行求解,并通过实施例求解和对比分析来验证算法的优越性,以期探索出一条解决FJSP的新的途径。WSA is a new metaheuristic algorithm inspired by the use of ultrasonic communication between individuals to guide whales during their hunting process. With its special iterative method, WSA has proven its superiority in solving combinatorial optimization problems. However, to apply it to solve discrete problems, we must first solve the mutual conversion problem between the problem solution and the individual position vector. Therefore, this paper solves the mutual conversion between the scheduling problem solution and the individual position vector by introducing the classic transformation mechanism. This algorithm is applied to solve the classic combinatorial optimization problem of FJSP, and the superiority of the algorithm is verified through practical solutions and comparative analysis, in order to explore a new way to solve FJSP.
发明内容Contents of the invention
本发明的目的是提供一种基于混合鲸鱼群算法求解柔性作业车间调度的方法,解决了现有技术中存在的柔性作业车间调度问题中表现出的求解精度不高、收敛速度较慢的问题。The purpose of the present invention is to provide a method for solving flexible job shop scheduling based on the hybrid whale swarm algorithm, which solves the problems of low solution accuracy and slow convergence speed in flexible job shop scheduling problems existing in the prior art.
本发明所采用的技术方案是,一种基于混合鲸鱼群算法求解柔性作业车间调度的方法,具体按照以下步骤实施:The technical solution adopted by the present invention is a method for solving flexible job shop scheduling based on the hybrid whale swarm algorithm, which is specifically implemented in accordance with the following steps:
步骤1、定义柔性作业车间调度的编码方式为两段式随机键编码,然后采用转换机制进行映射转换;Step 1. Define the coding method of flexible job shop scheduling as two-stage random key coding, and then use the conversion mechanism to perform mapping conversion;
步骤2、定义适应度函数,以求解总加工时间最短为优化目标;Step 2. Define the fitness function to minimize the total processing time as the optimization goal;
步骤3、采用鲸鱼群算法,对柔性作业车间调度问题中的参数以及鲸鱼种群初始化,首先对鲸鱼群算法中个体位置变量元素的上下界ε、声源强度ρ0、当前迭代次数t、最大迭代次数M参数进行设定;种群初始化分为两步进行,第一步随机生成工序的排序方案,第二步采用改进遗传算法的遗传变异方式生成与工序排序方案对应的较优的机器分配方案,进而产生较优的初始种群;Step 3. Use the whale swarm algorithm to initialize the parameters in the flexible job shop scheduling problem and the whale population. First, the upper and lower bounds ε of the individual position variable elements in the whale swarm algorithm, the sound source intensity ρ 0 , the current iteration number t, and the maximum iteration The number M parameter is set; the population initialization is divided into two steps. The first step is to randomly generate the sorting scheme of the process, and the second step is to use the genetic mutation method of the improved genetic algorithm to generate a better machine allocation scheme corresponding to the process sorting scheme. Then produce a better initial population;
步骤4、计算各调度方案的适应度值,寻找并保留最好的调度解S*;Step 4. Calculate the fitness value of each scheduling solution, find and retain the best scheduling solution S * ;
步骤5、输出最优的调度解S*及其对应的适应度函数值,S*即为所求最优调度方案。Step 5. Output the optimal scheduling solution S * and its corresponding fitness function value. S * is the optimal scheduling solution sought.
本发明的特点还在于,The present invention is also characterized in that,
步骤1中转换机制具体按照以下步骤实施:The conversion mechanism in step 1 is specifically implemented according to the following steps:
a、调度方案向个体位置的转换:a. Conversion of scheduling plan to individual location:
i)机器选择:按照下式将工序可选机器集中序号转换成个体位置向量元素值:i) Machine selection: Convert the sequence number of the optional machine in the process into the element value of the individual position vector according to the following formula:
x(i)=[2m/(s(i)-1)](n(i)-1)-m,s(i)≠1x(i)=[2m/(s(i)-1)](n(i)-1)-m,s(i)≠1
其中:x(i)表示个体位置向量的第i个元素;s(i)表示元素i对应工序可以选择的机器个数;n(i)∈[1,s(i)]表示选定机器在可选机器集里面的序号。如果s(i)=1,则x(i)在[-m,m]内任意取值。Among them: x(i) represents the i-th element of the individual position vector; s(i) represents the number of machines that can be selected for the process corresponding to element i; n(i)∈[1,s(i)] represents the selected machine in The serial number in the optional machine set. If s(i)=1, then x(i) takes any value within [-m,m].
ii)工序排序:首先生成[-m,m]内的一组随机数,并按升序排列ROV规则为每个随机数赋予一个唯一的ROV值,使每个ROV值对应一个工序,然后根据工序的编码顺序对ROV值进行重排,重排后的ROV值所对应的随机数顺序即为个体位置向量中各元素的值。ii) Process sorting: First generate a set of random numbers within [-m, m], and arrange the ROV rules in ascending order to assign a unique ROV value to each random number so that each ROV value corresponds to a process, and then according to the process The ROV values are rearranged in the coding order, and the random number sequence corresponding to the rearranged ROV values is the value of each element in the individual position vector.
b、个体位置向量向调度方案的转换:b. Conversion of individual position vectors to scheduling plans:
i)机器选择:按照所述a中调度方案向个体位置的转换中的公式的逆操作执行,由此获得机器的编号:i) Machine selection: Perform the reverse operation of the formula in the conversion of the scheduling plan to individual positions in a, thereby obtaining the number of the machine:
ii)工序排序:首先使每一个元素编号对应一个唯一的编码中的工序顺序及位置元素,然后根据ROV规则对位置元素进行升序排列,此时的ROV值对应元素编号进而构造工序排序方案;ii) Process sorting: First, each element number corresponds to the process sequence and position element in a unique code, and then the position elements are arranged in ascending order according to the ROV rules. At this time, the ROV value corresponds to the element number to construct a process sequencing scheme;
步骤2具体按照以下步骤实施:Step 2 is specifically implemented according to the following steps:
步骤2.1、柔性作业车间调度的问题模型FJSP描述如下:Step 2.1. The problem model FJSP of flexible job shop scheduling is described as follows:
假设M为加工设备的数量,N为待加工工件数量,P为工序数,I为所有设备的集合;Ieg代表工件e的第g道工序的可用设备集合,Je为工件e的工序数,x为所有工件的加工次序,Segk表示工件e的第g道工序在设备k上加工的开始时间;Eegk为工件e的第g道工序在设备k上的加工结束时间;Tegk为工件e的第g道工序在设备k上的持续加工时间,且k∈Ieg则有Eegk=Segk+Tegk;Ep表示最后工序的完工时间;MS表示所有工件的最后完工时间;Suppose M is the number of processing equipment, N is the number of workpieces to be processed, P is the number of processes, and I is the set of all equipment; I eg represents the set of available equipment for the gth process of workpiece e, J e is the number of processes for workpiece e, x is the processing order of all workpieces, S egk represents the start time of the gth process of workpiece e on equipment k; E egk is the gth process of workpiece e on equipment k The processing end time of _ Indicates the final completion time of all workpieces;
当工件i的第j道工序和工件e的第g道工序在同一台设备上执行,若工序j先于工序g加工时,Qijeg=1,否则Qijeg=0;若工件e的第g道工序在机床k上加工,则Xegk=1,否则Xegk=0;When the j-th process of workpiece i and the g-th process of workpiece e are executed on the same equipment, if process j is processed before process g, Q ijeg = 1, otherwise Q ijeg = 0; if the g-th process of workpiece e If the process is processed on machine tool k, then X egk = 1, otherwise X egk = 0;
若某FJSP共有S种可能的加工顺序,要求总的作业时间最短的加工排序,先求取每个加工顺序x(x∈{1,...,S})对应的作业时间;显然,顺序x中最后加工工序的完工时间即所有工件的最后完工时间:If there are S possible processing sequences for a certain FJSP, and the processing sequence with the shortest total operating time is required, first find the operating time corresponding to each processing sequence x (x∈{1,...,S}); obviously, the order The completion time of the last processing step in x is the final completion time of all workpieces:
MS=Ep (1)MS=E p (1)
步骤2.2、设目标函数F(x)为:Step 2.2. Let the objective function F(x) be:
F(x)=min(MSx )=min((Ep)x) (2)F(x)=min( MS x )=min((E p ) x ) (2)
其中,x=1,…,S;Qijeg=1;Among them, x=1,...,S; Qijeg =1;
S.T.Segk-Ee(g-1)n≥0 (3)STS egk -E e(g-1)n ≥0 (3)
e=1,…,N;g=1,…,Je;Xegk=1,Xe(g-1)n=1e=1,...,N; g=1,...,J e ;X egk =1,X e(g-1)n =1
Segk-Eijk≥0 (4)S egk -E ijk ≥0 (4)
e=1,…,N;g=1,…,Je;Xijk=1,Xegk=1,Qijeg=1。e=1,...,N; g=1,...,J e ;X ijk =1,X egk =1,Q ijeg =1.
步骤4具体按照以下步骤实施:Step 4 is specifically implemented according to the following steps:
步骤4.1、利用公式(5)进行迭代操作,具体如下Step 4.1, use formula (5) to perform iterative operations, as follows:
式中:和/>分别指X的第i个元素在t步与t+1步迭代的位置;In the formula: and/> Refers to the position of the i-th element of X in the t step and t+1 step iteration respectively;
指Y的第i个元素在t步迭代的位置; Refers to the position of the i-th element of Y in the t-step iteration;
dX,Y指X与Y之间的距离;d X,Y refers to the distance between X and Y;
表示0到/>之间产生的随机数,其中,衰减系数η的取值与目标函数的维数、定义域和峰值分布特征相关; Indicates 0 to/> Random numbers generated between them, where the value of the attenuation coefficient η is related to the dimension, domain and peak distribution characteristics of the objective function;
步骤4.2、利用转换机制将调度解转换为鲸鱼个体位置向量,并保留S*所对应的个体X*;Step 4.2: Use the conversion mechanism to convert the scheduling solution into a whale individual position vector, and retain the individual X * corresponding to S * ;
步骤4.3、利用公式(5)进行迭代操作,判断是否满足算法的终止条件,若不满足,则令t=t+1,重复执行步骤4.3.1~步骤4.3.7;如若满足则执行步骤5,具体如下:Step 4.3. Use formula (5) to perform an iterative operation to determine whether the termination condition of the algorithm is met. If not, set t=t+1 and repeat steps 4.3.1 to 4.3.7; if it is met, execute step 5. ,details as follows:
步骤4.3.1、定义两只鲸鱼之间的距离计算方法;Step 4.3.1. Define the distance calculation method between two whales;
步骤4.3.2、对每一个鲸鱼寻找较优且最近的个体;如果不存在则保持不动;Step 4.3.2, for each whale Find the better and closest individual; if it does not exist, keep it unchanged;
步骤4.3.3、找到所有适应度值大于的个体,如/> Step 4.3.3. Find all fitness values greater than individuals, such as/>
步骤4.3.4、计算每一个适应度值大于的个体/>与/>之间的距离D1,D2,D3;Step 4.3.4. Calculate each fitness value greater than individual/> with/> The distance between D 1 , D 2 , D 3 ;
步骤4.3.5、对D1,D2,D3排序,选择最小值所对应的个体即为/>的较优且最近的个体;Step 4.3.5. Sort D 1 , D 2 and D 3 and select the individual corresponding to the minimum value. That is/> the better and closest individual;
步骤4.3.6、将和/>的值以及初始化的参数带入迭代公式(5)更新每一个个体位置向量/> Step 4.3.6, will and/> The value of and initialization parameters are brought into the iteration formula (5) to update each individual position vector/>
步骤4.3.7、执行个体位置向量向调度方案的转换方式,生成更新之后所有个体对应的调度方案,返回步骤4.2。Step 4.3.7: Execute the conversion method of individual position vectors to scheduling plans, generate the scheduling plans corresponding to all individuals after the update, and return to step 4.2.
步骤4.1中ρ0取经验值2。In step 4.1, ρ 0 takes the empirical value 2.
步骤4.1中,衰减系数η的初始值按照如下方法确定:In step 4.1, the initial value of the attenuation coefficient η is determined as follows:
首先,令 First, let
即 Right now
dmax指在搜索区域内两只鲸鱼之间可能的最大距离,d max refers to the maximum possible distance between two whales in the search area,
其中,n为目标函数的维数,与/>分别表示第i个变量的下限与上限,因此,η=-20·ln(0.25)/dmax。Among them, n is the dimension of the objective function, with/> represent the lower limit and upper limit of the i-th variable respectively, therefore, η=-20·ln(0.25)/d max .
本发明的有益效果是,基于混合鲸鱼群算法求解柔性作业车间调度的方法,通过转换机制实现FJSP调度解与鲸鱼个体位置向量之间的相互转换,进而利用WSA较强的局部和全局搜索能力,以及在维持种群多样性方面的优势,来进行迭代求解,以提高FJSP的求解精度和速度。The beneficial effect of the present invention is that, based on the hybrid whale swarm algorithm to solve the flexible job shop scheduling method, the mutual conversion between the FJSP scheduling solution and the whale individual position vector is realized through the conversion mechanism, and then the strong local and global search capabilities of WSA are utilized. As well as the advantages in maintaining population diversity, iterative solution is performed to improve the solution accuracy and speed of FJSP.
附图说明Description of the drawings
图1是本发明一种基于混合鲸鱼群算法求解柔性作业车间调度的方法中鲸鱼群算法求解FJSP的流程图;Figure 1 is a flow chart of the whale swarm algorithm for solving FJSP in a method of solving flexible job shop scheduling based on the hybrid whale swarm algorithm of the present invention;
图2是本发明一种基于混合鲸鱼群算法求解柔性作业车间调度的方法中实施例1的WSA进化收敛曲线;Figure 2 is a WSA evolutionary convergence curve of Embodiment 1 of a method for solving flexible job shop scheduling based on the hybrid whale swarm algorithm of the present invention;
图3是本发明一种基于混合鲸鱼群算法求解柔性作业车间调度的方法中实施例1调度结果甘特图;Figure 3 is a Gantt chart of the scheduling results in Embodiment 1 of a method for solving flexible job shop scheduling based on the hybrid whale swarm algorithm of the present invention;
图4是本发明一种基于混合鲸鱼群算法求解柔性作业车间调度的方法中实施例2WSA进化收敛曲线;Figure 4 is a WSA evolutionary convergence curve in Embodiment 2 of a method for solving flexible job shop scheduling based on the hybrid whale swarm algorithm of the present invention;
图5是本发明一种基于混合鲸鱼群算法求解柔性作业车间调度的方法中实施例3WSA进化收敛曲线。Figure 5 is a WSA evolutionary convergence curve in Embodiment 3 of a method for solving flexible job shop scheduling based on the hybrid whale swarm algorithm of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施方式对本发明进行详细说明。The present invention will be described in detail below with reference to the drawings and specific embodiments.
本发明一种基于混合鲸鱼群算法求解柔性作业车间调度的方法,如图1所示,具体按照以下步骤实施:The present invention is a method for solving flexible job shop scheduling based on the hybrid whale swarm algorithm, as shown in Figure 1, which is specifically implemented in accordance with the following steps:
步骤1、定义柔性作业车间调度的编码方式为两段式随机键编码,然后采用转换机制进行映射转换,其中,转换机制具体按照以下步骤实施:Step 1. Define the coding method of flexible job shop scheduling as two-stage random key coding, and then use the conversion mechanism to perform mapping conversion. The conversion mechanism is specifically implemented according to the following steps:
a、调度方案向个体位置的转换:a. Conversion of scheduling plan to individual location:
i)机器选择:按照下式将工序可选机器集中序号转换成个体位置向量元素值:i) Machine selection: Convert the sequence number of the optional machine in the process into the element value of the individual position vector according to the following formula:
x(i)=[2m/(s(i)-1)](n(i)-1)-m,s(i)≠1x(i)=[2m/(s(i)-1)](n(i)-1)-m,s(i)≠1
其中:x(i)表示个体位置向量的第i个元素;s(i)表示元素i对应工序可以选择的机器个数;n(i)∈[1,s(i)]表示选定机器在可选机器集里面的序号。如果s(i)=1,则x(i)在[-m,m]内任意取值。Among them: x(i) represents the i-th element of the individual position vector; s(i) represents the number of machines that can be selected for the process corresponding to element i; n(i)∈[1,s(i)] represents the selected machine in The serial number in the optional machine set. If s(i)=1, then x(i) takes any value within [-m,m].
ii)工序排序:首先生成[-m,m]内的一组随机数,并按升序排列ROV规则为每个随机数赋予一个唯一的ROV值,使每个ROV值对应一个工序,然后根据工序的编码顺序对ROV值进行重排,重排后的ROV值所对应的随机数顺序即为个体位置向量中各元素的值。ii) Process sorting: First generate a set of random numbers within [-m, m], and arrange the ROV rules in ascending order to assign a unique ROV value to each random number so that each ROV value corresponds to a process, and then according to the process The ROV values are rearranged in the coding order, and the random number sequence corresponding to the rearranged ROV values is the value of each element in the individual position vector.
b、个体位置向量向调度方案的转换:b. Conversion of individual position vectors to scheduling plans:
i)机器选择:按照所述a中调度方案向个体位置的转换中的公式的逆操作执行,由此获得机器的编号:i) Machine selection: Perform the reverse operation of the formula in the conversion of the scheduling plan to individual positions in a, thereby obtaining the number of the machine:
ii)工序排序:首先使每一个元素编号对应一个唯一的编码中的工序顺序及位置元素,然后根据ROV规则对位置元素进行升序排列,此时的ROV值对应元素编号进而构造工序排序方案;ii) Process sorting: First, each element number corresponds to the process sequence and position element in a unique code, and then the position elements are arranged in ascending order according to the ROV rules. At this time, the ROV value corresponds to the element number to construct a process sequencing scheme;
步骤2、定义适应度函数,以求解总加工时间最短为优化目标,具体按照以下步骤实施:Step 2. Define the fitness function, with the optimization goal of minimizing the total processing time, and implement it according to the following steps:
步骤2.1、柔性作业车间调度的问题模型FJSP描述如下:Step 2.1. The problem model FJSP of flexible job shop scheduling is described as follows:
假设M为加工设备的数量,N为待加工工件数量,P为工序数,I为所有设备的集合;Ieg代表工件e的第g道工序的可用设备集合,Je为工件e的工序数,x为所有工件的加工次序,Segk表示工件e的第g道工序在设备k上加工的开始时间;Eegk为工件e的第g道工序在设备k上的加工结束时间;Tegk为工件e的第g道工序在设备k上的持续加工时间,且k∈Ieg则有Eegk=Segk+Tegk;Ep表示最后工序的完工时间;MS表示所有工件的最后完工时间;Suppose M is the number of processing equipment, N is the number of workpieces to be processed, P is the number of processes, and I is the set of all equipment; I eg represents the set of available equipment for the gth process of workpiece e, J e is the number of processes for workpiece e, x is the processing order of all workpieces, S egk represents the start time of the gth process of workpiece e on equipment k; E egk is the gth process of workpiece e on equipment k The processing end time of _ Indicates the final completion time of all workpieces;
当工件i的第j道工序和工件e的第g道工序在同一台设备上执行,若工序j先于工序g加工时,Qijeg=1,否则Qijeg=0;若工件e的第g道工序在机床k上加工,则Xegk=1,否则Xegk=0;When the j-th process of workpiece i and the g-th process of workpiece e are executed on the same equipment, if process j is processed before process g, Q ijeg = 1, otherwise Q ijeg = 0; if the g-th process of workpiece e If the process is processed on machine tool k, then X egk = 1, otherwise X egk = 0;
若某FJSP共有S种可能的加工顺序,要求总的作业时间最短的加工排序,先求取每个加工顺序x(x∈{1,...,S})对应的作业时间;显然,顺序x中最后加工工序的完工时间即所有工件的最后完工时间:If there are S possible processing sequences for a certain FJSP, and the processing sequence with the shortest total operating time is required, first find the operating time corresponding to each processing sequence x (x∈{1,...,S}); obviously, the order The completion time of the last processing step in x is the final completion time of all workpieces:
MS=Ep (1)MS=E p (1)
步骤2.2、设目标函数F(x)为:Step 2.2. Let the objective function F(x) be:
F(x)=min(MSx )=min((Ep)x) (2)F(x)=min( MS x )=min((E p ) x ) (2)
其中,x=1,…,S;Qijeg=1;Among them, x=1,...,S; Qijeg =1;
S.T.Segk-Ee(g-1)n≥0 (3)STS egk -E e(g-1)n ≥0 (3)
e=1,…,N;g=1,…,Je;Xegk=1,Xe(g-1)n=1e=1,...,N; g=1,...,J e ;X egk =1,X e(g-1)n =1
Segk-Eijk≥0 (4)S egk -E ijk ≥0 (4)
e=1,…,N;g=1,…,Je;Xijk=1,Xegk=1,Qijeg=1;e=1,...,N; g=1,...,J e ;X ijk =1,X egk =1,Q ijeg =1;
步骤3、采用鲸鱼群算法,对柔性作业车间调度问题中的参数以及鲸鱼种群初始化,首先对鲸鱼群算法中个体位置变量元素的上下界ε、声源强度ρ0、当前迭代次数t、最大迭代次数M参数进行设定;种群初始化分为两步进行,第一步随机生成工序的排序方案,第二步采用改进遗传算法的遗传变异方式生成与工序排序方案对应的较优的机器分配方案,进而产生较优的初始种群;Step 3. Use the whale swarm algorithm to initialize the parameters in the flexible job shop scheduling problem and the whale population. First, the upper and lower bounds ε of the individual position variable elements in the whale swarm algorithm, the sound source intensity ρ 0 , the current iteration number t, and the maximum iteration The number M parameter is set; the population initialization is divided into two steps. The first step is to randomly generate the sorting scheme of the process, and the second step is to use the genetic mutation method of the improved genetic algorithm to generate a better machine allocation scheme corresponding to the process sorting scheme. Then produce a better initial population;
步骤4、计算各调度方案的适应度值,寻找并保留最好的调度解S*,具体按照以下步骤实施:Step 4. Calculate the fitness value of each scheduling solution, find and retain the best scheduling solution S * , and implement it according to the following steps:
步骤4.1、利用公式(5)进行迭代操作,具体如下Step 4.1, use formula (5) to perform iterative operations, as follows:
式中:和/>分别指X的第i个元素在t步与t+1步迭代的位置;In the formula: and/> Refers to the position of the i-th element of X in the t step and t+1 step iteration respectively;
指Y的第i个元素在t步迭代的位置; Refers to the position of the i-th element of Y in the t-step iteration;
dX,Y指X与Y之间的距离;d X,Y refers to the distance between X and Y;
表示0到/>之间产生的随机数,其中,衰减系数η的取值与目标函数的维数、定义域和峰值分布特征相关; Indicates 0 to/> Random numbers generated between them, where the value of the attenuation coefficient η is related to the dimension, domain and peak distribution characteristics of the objective function;
步骤4.2、利用转换机制将调度解转换为鲸鱼个体位置向量,并保留S*所对应的个体X*;Step 4.2: Use the conversion mechanism to convert the scheduling solution into a whale individual position vector, and retain the individual X * corresponding to S * ;
步骤4.3、利用公式(5)进行迭代操作,判断是否满足算法的终止条件,若不满足,则令t=t+1,重复执行步骤4.3.1~步骤4.3.7;如若满足则执行步骤5,具体如下:Step 4.3. Use formula (5) to perform an iterative operation to determine whether the termination condition of the algorithm is met. If not, set t=t+1 and repeat steps 4.3.1 to 4.3.7; if it is met, execute step 5. ,details as follows:
步骤4.3.1、定义两只鲸鱼之间的距离计算方法;Step 4.3.1. Define the distance calculation method between two whales;
步骤4.3.2、对每一个鲸鱼寻找较优且最近的个体;如果不存在则保持不动;Step 4.3.2, for each whale Find the better and closest individual; if it does not exist, keep it unchanged;
步骤4.3.3、找到所有适应度值大于的个体,如/> Step 4.3.3. Find all fitness values greater than individuals, such as/>
步骤4.3.4、计算每一个适应度值大于的个体/>与/>之间的距离D1,D2,D3;Step 4.3.4. Calculate each fitness value greater than individual/> with/> The distance between D 1 , D 2 , D 3 ;
步骤4.3.5、对D1,D2,D3排序,选择最小值所对应的个体即为/>的较优且最近的个体;Step 4.3.5. Sort D 1 , D 2 and D 3 and select the individual corresponding to the minimum value. That is/> the better and closest individual;
步骤4.3.6、将和/>的值以及初始化的参数带入迭代公式(5)更新每一个个体位置向量/> Step 4.3.6, will and/> The value of and initialization parameters are brought into the iteration formula (5) to update each individual position vector/>
步骤4.3.7、执行个体位置向量向调度方案的转换方式,生成更新之后所有个体对应的调度方案,返回步骤4.2;Step 4.3.7. Execute the conversion method of individual position vectors to scheduling plans, generate the scheduling plans corresponding to all individuals after the update, and return to step 4.2;
步骤4.1中ρ0取经验值2;In step 4.1, ρ 0 takes the empirical value 2;
步骤4.1中,衰减系数η的初始值按照如下方法确定:In step 4.1, the initial value of the attenuation coefficient η is determined as follows:
首先,令 First, let
即 Right now
dmax指在搜索区域内两只鲸鱼之间可能的最大距离,d max refers to the maximum possible distance between two whales in the search area,
其中,n为目标函数的维数,与/>分别表示第i个变量的下限与上限,因此,η=-20·ln(0.25)/dmax;Among them, n is the dimension of the objective function, with/> represent the lower limit and upper limit of the i-th variable respectively, therefore, η=-20·ln(0.25)/d max ;
步骤5、输出最优的调度解S*及其对应的适应度函数值,S*即为所求最优调度方案。Step 5. Output the optimal scheduling solution S * and its corresponding fitness function value. S * is the optimal scheduling solution sought.
本发明一种基于混合鲸鱼群算法求解柔性作业车间调度的方法,为了验证WSA求解柔性作业车间调度问题的可行性,本文运用其分别对三个实施例进行了仿真实验,并与其他智能算法进行对比分析。仿真环境为:采用MATILAB2016a,在配置为CPU主频1.9GHz、AMD A10-7300 Radeon R6处理器、Windows 10操作系统的环境下进行。This invention is a method for solving flexible job shop scheduling based on the hybrid whale swarm algorithm. In order to verify the feasibility of WSA in solving flexible job shop scheduling problems, this paper uses it to conduct simulation experiments on three embodiments respectively, and conducts simulation experiments with other intelligent algorithms. Comparative analysis. The simulation environment is: using MATILAB2016a, configured with a CPU frequency of 1.9GHz, AMD A10-7300 Radeon R6 processor, and Windows 10 operating system.
实施例1Example 1
实例1为3×6的FJSP,其加工任务信息如表1所示,鲸鱼群算法的参数设置如下:种群规模为50,鲸鱼个体位置向量维度为30,ρ0设置为2,dmax=32.86,衰减系数η取0,最大迭代次数M为400:Example 1 is a 3×6 FJSP. Its processing task information is shown in Table 1. The parameters of the whale group algorithm are set as follows: the population size is 50, the dimension of the individual whale position vector is 30, ρ 0 is set to 2, and d max = 32.86 , the attenuation coefficient η is set to 0, and the maximum number of iterations M is 400:
表1实例1加工任务信息表Table 1 Example 1 processing task information table
利用基于随机键的两段式编码对机器分配和工序排序进行编码,则个体位置向量的长度为30,且各元素均在[-3,3]中任意取值,利用计算机生成30位的随机数,并按照一定的顺序存储,如表2所示,其中OPij表示工件i的第j道工序:Machine allocation and process sequencing are encoded using a two-stage encoding based on random keys. The length of the individual position vector is 30, and each element takes an arbitrary value in [-3,3]. A computer is used to generate a 30-bit random numbers and stored in a certain order, as shown in Table 2, where OP ij represents the jth process of workpiece i:
表2个体位置向量图Table 2 Individual position vector diagram
针对实施例1,对其求解得其WSA进化收敛曲线如图2所示,由图2可知此鲸鱼群算法能够在35代时,从144较快地收敛到134,其对应调度结果甘特图如图3所示。For Embodiment 1, the WSA evolutionary convergence curve obtained by solving it is shown in Figure 2. It can be seen from Figure 2 that this whale group algorithm can quickly converge from 144 to 134 in 35 generations, and its corresponding scheduling result Gantt chart As shown in Figure 3.
实施例2Example 2
为了进一步验证算法可行性以及优越性,选择文献[1](傅卫平,刘冬梅,来春为,王雯.基于多色集合的改进遗传算法求解多品种柔性调度问题[J].计算机集成制造系统,2011,17(05):1004-1010.)中的实例2来进行仿真,具体加工信息见文献[1],鲸鱼群算法的参数设置如下:种群规模为100,实例1中鲸鱼个体位置向量维度为108,ρ0设置为2,dmax=104.96,衰减系数η取0,最大迭代次数M为200。得其WSA进化收敛曲线如图4所示,得到最优解为121分钟,由图4的WSA进化收敛曲线和实例2的进化曲线对比可知,此鲸鱼群算法能在32代时,很快地从150收敛到121,相比之下,其求解的速度明显较快。In order to further verify the feasibility and superiority of the algorithm, the literature [1] (Fu Weiping, Liu Dongmei, Lai Chunwei, Wang Wen. An improved genetic algorithm based on multi-color sets to solve multi-variety flexible scheduling problems [J]. Computer Integrated Manufacturing System, 2011 ,17(05):1004-1010.) to conduct simulation. For specific processing information, please refer to the literature [1]. The parameters of the whale group algorithm are set as follows: the population size is 100, and the dimension of the individual whale position vector in Example 1 is 108, ρ 0 is set to 2, d max =104.96, the attenuation coefficient η is set to 0, and the maximum number of iterations M is 200. The WSA evolutionary convergence curve is shown in Figure 4, and the optimal solution is 121 minutes. From the comparison of the WSA evolutionary convergence curve in Figure 4 and the evolution curve of Example 2, it can be seen that this whale swarm algorithm can quickly achieve the goal in 32 generations. It converges from 150 to 121. In comparison, its solution speed is obviously faster.
实施例3Example 3
为更加全面地比较和验证算法效果,选取柔性作业调度的Kacem基准问题里面的8×8实施例进行求解,计算20次。鲸鱼群算法的参数设置如下:种群规模为100,鲸鱼个体位置向量维度为54,ρ0设置为2,dmax=117.57,衰减系数η取0,最大迭代次数M为200,实施例3的WSA进化收敛曲线如图5所示。表3为鲸鱼群算法将所得结果与进化算法、主-从遗传算法、多阶遗传算法、蚁群算法的求解结果对比:In order to compare and verify the effect of the algorithm more comprehensively, the 8×8 example in the Kacem benchmark problem of flexible job scheduling is selected for solution and calculated 20 times. The parameters of the whale group algorithm are set as follows: the population size is 100, the dimension of the individual whale position vector is 54, ρ 0 is set to 2, d max = 117.57, the attenuation coefficient η is 0, the maximum number of iterations M is 200, WSA of Embodiment 3 The evolutionary convergence curve is shown in Figure 5. Table 3 compares the results obtained by the whale swarm algorithm with those of the evolutionary algorithm, master-slave genetic algorithm, multi-order genetic algorithm, and ant colony algorithm:
表3 Kacem 8×8基准问题各算法求解结果对比Table 3 Comparison of the solution results of various algorithms for the Kacem 8×8 benchmark problem
针对传统算法在求解FJSP时表现出的求解精度和速度方面的不足,本发明运用新的元启发式算法WSA来对FJSP进行求解,通过采用两段式编码方式和引入转换机制建立了调度问题解与鲸鱼个体位置向量之间的相互映射,然后利用WSA对FJSP进行了求解,仿真实施例结果表明WSA在求解FJSP方面具有一定的优越性,该算法特殊的迭代公式,寻找较优且最近的迭代方式,在求解组合优化类问题时表现出了一定的优势。In view of the shortcomings in solving accuracy and speed of traditional algorithms when solving FJSP, the present invention uses a new meta-heuristic algorithm WSA to solve FJSP, and establishes a solution to the scheduling problem by using a two-stage encoding method and introducing a conversion mechanism. and the mutual mapping between the individual whale position vectors, and then use WSA to solve the FJSP. The results of the simulation example show that WSA has certain advantages in solving the FJSP. The special iteration formula of this algorithm finds the better and nearest iteration. This method has certain advantages in solving combinatorial optimization problems.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811359927.9A CN109784603B (en) | 2018-11-15 | 2018-11-15 | Method for solving flexible job shop scheduling based on mixed whale swarm algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811359927.9A CN109784603B (en) | 2018-11-15 | 2018-11-15 | Method for solving flexible job shop scheduling based on mixed whale swarm algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109784603A CN109784603A (en) | 2019-05-21 |
CN109784603B true CN109784603B (en) | 2024-02-02 |
Family
ID=66496457
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811359927.9A Active CN109784603B (en) | 2018-11-15 | 2018-11-15 | Method for solving flexible job shop scheduling based on mixed whale swarm algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109784603B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110490372B (en) * | 2019-07-26 | 2022-03-01 | 华中农业大学 | Mixed distributed evolution method for solving large-scale workshop operation scheduling problem |
CN110425084B (en) * | 2019-08-09 | 2020-09-22 | 湘电风能有限公司 | A whale swarm PID independent pitch control method for large wind turbines |
CN110543151B (en) * | 2019-08-12 | 2021-04-09 | 科大智能物联技术有限公司 | Method for solving workshop energy-saving scheduling problem based on improved NSGA-II |
CN110782085B (en) * | 2019-10-23 | 2022-03-29 | 武汉晨曦芸峰科技有限公司 | Casting production scheduling method and system |
CN110632907B (en) * | 2019-10-30 | 2020-11-20 | 山东师范大学 | A Distributed Assembly Displacement Flow Workshop Scheduling Optimization Method and System |
CN111598297B (en) * | 2020-04-15 | 2023-04-07 | 浙江工业大学 | Flexible job shop scheduling machine selection method based on residual process maximum value optimization |
CN111967654A (en) * | 2020-07-27 | 2020-11-20 | 西安工程大学 | Method for solving flexible job shop scheduling based on hybrid genetic algorithm |
CN112016746B (en) * | 2020-08-26 | 2021-12-17 | 广东电网有限责任公司广州供电局 | Dispatching method and device for power generation car, computer equipment and storage medium |
CN112783172B (en) * | 2020-12-31 | 2023-03-31 | 重庆大学 | AGV and machine integrated scheduling method based on discrete whale optimization algorithm |
CN113408951B (en) * | 2021-07-16 | 2022-08-12 | 山东大学 | An optimal flexible scheduling method and system for accumulating lions based on dynamic information |
CN114861971B (en) * | 2022-03-23 | 2024-12-03 | 合肥工业大学 | Hybrid vehicle routing optimization method and system with cost minimization as the goal |
CN114819370A (en) * | 2022-05-09 | 2022-07-29 | 国网浙江省电力有限公司 | Improved hybrid algorithm-based electric vehicle charging station location and volume selection method and device |
CN114692345A (en) * | 2022-06-02 | 2022-07-01 | 河南科技学院 | Intelligent scheduling method for crane boom production |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104880949A (en) * | 2015-05-27 | 2015-09-02 | 江南大学 | Method of acquiring workpiece-processing optimal scheduling based on improved chicken flock algorithm |
CN105096004A (en) * | 2015-08-18 | 2015-11-25 | 中水东北勘测设计研究有限责任公司 | Real-time scheduling method for reservoir group water supply and transfer system |
CN105929690A (en) * | 2016-04-29 | 2016-09-07 | 南京信息工程大学 | Flexible workshop robustness scheduling method based on decomposition multi-target evolution algorithm |
WO2016169286A1 (en) * | 2015-04-20 | 2016-10-27 | 海安县申菱电器制造有限公司 | Workshop layout method for discrete manufacturing system |
CN106610654A (en) * | 2015-12-29 | 2017-05-03 | 四川用联信息技术有限公司 | Improved genetic algorithm for flexible workshop scheduling |
CN108776461A (en) * | 2018-05-21 | 2018-11-09 | 北京石油化工学院 | A kind of flexible job shop scheduling method and system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070127527A1 (en) * | 2005-12-06 | 2007-06-07 | International Business Machines Corporation | Methods and apparatus for implementing a flexible multi-user advance reservation system where reservation requests are specified in terms of multiple options and where each option has an associated business value |
US10417614B2 (en) * | 2016-05-06 | 2019-09-17 | General Electric Company | Controlling aircraft operations and aircraft engine components assignment |
-
2018
- 2018-11-15 CN CN201811359927.9A patent/CN109784603B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016169286A1 (en) * | 2015-04-20 | 2016-10-27 | 海安县申菱电器制造有限公司 | Workshop layout method for discrete manufacturing system |
CN104880949A (en) * | 2015-05-27 | 2015-09-02 | 江南大学 | Method of acquiring workpiece-processing optimal scheduling based on improved chicken flock algorithm |
CN105096004A (en) * | 2015-08-18 | 2015-11-25 | 中水东北勘测设计研究有限责任公司 | Real-time scheduling method for reservoir group water supply and transfer system |
CN106610654A (en) * | 2015-12-29 | 2017-05-03 | 四川用联信息技术有限公司 | Improved genetic algorithm for flexible workshop scheduling |
CN105929690A (en) * | 2016-04-29 | 2016-09-07 | 南京信息工程大学 | Flexible workshop robustness scheduling method based on decomposition multi-target evolution algorithm |
CN108776461A (en) * | 2018-05-21 | 2018-11-09 | 北京石油化工学院 | A kind of flexible job shop scheduling method and system |
Non-Patent Citations (4)
Title |
---|
A hybrid harmony search algorithm for the flexible job shop scheduling problem;Yuan Yuan 等;《Applied Soft Computing》;20131231;第13卷(第07期);第3259-3272页 * |
具有行为效应的含AGV柔性车间调度研究;徐云琴 等;《计算机应用研究》;20180709;第1-11页 * |
改进鲸鱼群算法及其在炼钢连铸调度中的应用;曾冰 等;《郑州大学学报(工学版)》;20180814;第39卷(第06期);第14-22、35页 * |
混合灰狼优化算法求解柔性作业车间调度问题;姜天华;《控制与决策》;20170913;第1-7页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109784603A (en) | 2019-05-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109784603B (en) | Method for solving flexible job shop scheduling based on mixed whale swarm algorithm | |
CN112700060B (en) | Station terminal load prediction method and prediction device | |
CN109886589B (en) | Method for solving low-carbon workshop scheduling based on improved whale optimization algorithm | |
CN112659548B (en) | Surface exposure 3D printing process optimization method based on genetic algorithm and BP neural network | |
CN110543151A (en) | Method for Solving Workshop Energy Saving Scheduling Problem Based on Improved NSGA-Ⅱ | |
CN111967654A (en) | Method for solving flexible job shop scheduling based on hybrid genetic algorithm | |
CN110188785A (en) | A kind of data clusters analysis method based on genetic algorithm | |
CN105117326A (en) | Test case set generation method based on combination chaotic sequence | |
Zhang et al. | A convolutional neural network-based surrogate model for multi-objective optimization evolutionary algorithm based on decomposition | |
CN111369000A (en) | High-dimensional multi-target evolution method based on decomposition | |
CN109034479B (en) | Multi-target scheduling method and device based on differential evolution algorithm | |
Cai et al. | A hybrid of decomposition and domination based evolutionary algorithm for multi-objective software next release problem | |
CN108830292A (en) | Data classification model optimization method and classification method | |
CN112257922B (en) | A flexible job shop scheduling optimization method | |
CN107798413B (en) | Fast forward path optimization method for leather multi-contour processing | |
Ma et al. | A memetic algorithm based on immune multi-objective optimization for flexible job-shop scheduling problems | |
Büche et al. | Self-adaptation for multi-objective evolutionary algorithms | |
Zhang et al. | Using PSO algorithm to evolve an optimum input subset for a SVM in time series forecasting | |
Liu et al. | A new constrained multi-objective optimization problems algorithm based on group-sorting | |
CN114036069B (en) | Multi-objective test case ranking method based on adaptive weight vector decomposition | |
CN111144569A (en) | Yield improvement applicable model optimization method based on genetic algorithm | |
CN114089699B (en) | Method for solving mixed flow shop scheduling based on cell type membrane calculation model | |
CN114254710B (en) | A general ensemble method for multi-classification with adaptive weights | |
CN115310654A (en) | Job shop scheduling method based on reinforcement learning-non-dominated sorting genetic algorithm | |
CN114327859A (en) | Source model cluster selection method for cloud computing environment large-scale problem agent optimization |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20240514 Address after: 215500 Building 1, No. 2, Jianye Road, high tech Industrial Park, Changshu Economic and Technological Development Zone, Suzhou City, Jiangsu Province Patentee after: Suzhou Sailing Information Technology Co.,Ltd. Country or region after: China Address before: 710064 central section of south two ring road, Yanta District, Xi'an, Shaanxi Patentee before: CHANG'AN University Country or region before: China |