CN111985012A - Two-dimensional irregular part layout method based on optimal foraging algorithm - Google Patents

Two-dimensional irregular part layout method based on optimal foraging algorithm Download PDF

Info

Publication number
CN111985012A
CN111985012A CN202010933312.3A CN202010933312A CN111985012A CN 111985012 A CN111985012 A CN 111985012A CN 202010933312 A CN202010933312 A CN 202010933312A CN 111985012 A CN111985012 A CN 111985012A
Authority
CN
China
Prior art keywords
layout
optimal
population
parts
dimensional irregular
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010933312.3A
Other languages
Chinese (zh)
Inventor
朱光宇
蔡明�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou University
Original Assignee
Fuzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuzhou University filed Critical Fuzhou University
Priority to CN202010933312.3A priority Critical patent/CN111985012A/en
Publication of CN111985012A publication Critical patent/CN111985012A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computer Hardware Design (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明涉及一种基于最优觅食算法的二维不规则零件排样方法。该方法包括以下步骤:步骤S1:二维不规则零件排样问题进行数学描述;步骤S2:建立排样优化过程中所要满足的约束条件;步骤S3:确定所要优化的目标,建立相应的二维不规则零件排样目标优化函数;步骤S4:基于最优觅食算法对零件排放顺序与旋转角度进行全局优化搜索,确定零件的最优排放顺序和旋转角度,输出最佳的排样结果。本发明提出基于最优觅食算法的二维不规则零件排样方法,适用于凸、凹多边形零件和带孔洞复杂零件的排样;相比基于传统启发式算法的二维不规则排样问题解决方法,排样效率高,鲁棒性好,材料利用率高。

Figure 202010933312

The invention relates to a two-dimensional irregular parts layout method based on an optimal foraging algorithm. The method includes the following steps: step S1: mathematical description of the two-dimensional irregular parts layout problem; step S2: establishing constraints to be satisfied in the layout optimization process; step S3: determining the target to be optimized, and establishing the corresponding two-dimensional Irregular parts layout objective optimization function; Step S4: Based on the optimal foraging algorithm, perform a global optimization search on the parts layout order and rotation angle, determine the optimal layout order and rotation angle of the parts, and output the best layout result. The invention proposes a two-dimensional irregular parts layout method based on an optimal foraging algorithm, which is suitable for the layout of convex and concave polygonal parts and complex parts with holes; compared with the two-dimensional irregular layout problem based on traditional heuristic algorithms The solution has the advantages of high layout efficiency, good robustness and high material utilization rate.

Figure 202010933312

Description

基于最优觅食算法的二维不规则零件排样方法2D Irregular Parts Layout Method Based on Optimal Foraging Algorithm

技术领域technical field

本发明涉及计算机辅助排料技术领域,特别一种基于最优觅食算法的二维不规则零件排样方法。The invention relates to the technical field of computer-aided layout, in particular to a layout method for two-dimensional irregular parts based on an optimal foraging algorithm.

背景技术Background technique

1、排样问题指在给定的原材料板材空间上,根据加工要求对要参与排样的零件进行合理布局,在保证产品生产需求的同时,使原材料的利用率最大化。目前,排样问题在许多加工制造行业中都有涉及。且随着社会的飞速发展,人类对资源的需求量也在不断增加,节约资源、尽可能减少资源浪费,已成为当今社会可持续发展的重要支柱。1. The layout problem refers to the reasonable layout of the parts to be involved in the layout according to the processing requirements on the given raw material plate space, so as to maximize the utilization rate of raw materials while ensuring the production demand of the product. At present, layout problems are involved in many processing and manufacturing industries. With the rapid development of society, human demand for resources is also increasing, saving resources and minimizing waste of resources have become an important pillar of sustainable development in today's society.

2、对于二维不规则零件排样问题,早期主要通过人工的方法,这种方法不但无法节约原材料,而且时间成本高。后来,随着信息技术的不断发展,计算机辅助排样技术开始应用。相比人工排样方法,排样效率高,且排样效果好,逐渐成为工业生产的主流。在二维不规则零件排样问题的启发式算法应用方面,目前应用比较广泛的智能算法包括基因遗传算法、粒子群算法和模拟退火算法等,但基本应用于小规模排样。在实际生产中,由于生产规模较大,这些方法即使花费很长的搜索时间,也容易产生不好的排样结果,鲁棒性差,难以得到广泛使用。2. For the layout of two-dimensional irregular parts, the manual method was mainly used in the early stage. This method not only fails to save raw materials, but also has high time cost. Later, with the continuous development of information technology, computer-aided layout technology began to be applied. Compared with the manual layout method, the layout efficiency is high and the layout effect is good, and it has gradually become the mainstream of industrial production. In the application of heuristic algorithm for the layout of two-dimensional irregular parts, the currently widely used intelligent algorithms include genetic genetic algorithm, particle swarm algorithm and simulated annealing algorithm, but they are basically used in small-scale layout. In actual production, due to the large scale of production, these methods are prone to produce bad layout results even if they take a long search time, and have poor robustness, making it difficult to be widely used.

3、最优觅食算法是一种基于现代最优觅食理论而提出的元启发式算法。该算法具有整体上较好的全局搜索能力,细节上较优的局部搜索能力,且所需参数较少,不需要过多调节参数来平衡算法的全局搜索和局部搜索能力。这一优势确保其应用于包含凸、凹零件与带孔洞复杂零件等二维不规则零件排样问题时仍具有较强的适用性,且排样效率高,鲁棒性好,排样结果优。3. The optimal foraging algorithm is a meta-heuristic algorithm based on the modern optimal foraging theory. The algorithm has better global search ability as a whole and better local search ability in detail, and requires less parameters, so it does not need to adjust the parameters too much to balance the global search and local search ability of the algorithm. This advantage ensures that it still has strong applicability when applied to the layout of two-dimensional irregular parts including convex, concave parts and complex parts with holes, and has high layout efficiency, good robustness and excellent layout results. .

发明内容SUMMARY OF THE INVENTION

本发明的目的在于解决现有启发式排样算法应用于二维不规则零件排样问题时出现的排样效率低,鲁棒性差的缺点,从而提出一种基于最优觅食算法的二维不规则零件排样方法。The purpose of the invention is to solve the shortcomings of low layout efficiency and poor robustness when the existing heuristic layout algorithm is applied to the layout problem of two-dimensional irregular parts, so as to propose a two-dimensional algorithm based on the optimal foraging algorithm. Irregular parts layout method.

为实现上述目的,本发明的技术方案是:一种基于最优觅食算法的二维不规则零件排样方法,包括如下步骤:In order to achieve the above purpose, the technical scheme of the present invention is: a two-dimensional irregular parts layout method based on an optimal foraging algorithm, comprising the following steps:

步骤S1、对二维不规则零件排样问题进行数学描述;Step S1, mathematically describe the two-dimensional irregular parts layout problem;

步骤S2:建立排样优化过程中所需满足的约束条件;Step S2: establishing the constraints that need to be satisfied in the layout optimization process;

步骤S3:确定所要优化的目标,建立相应的二维不规则零件排样目标优化函数;Step S3: determine the target to be optimized, and establish a corresponding two-dimensional irregular part layout target optimization function;

步骤S4:基于最优觅食算法对零件排放顺序与旋转角度进行全局优化搜索,确定零件的最优排放顺序和旋转角度,输出最佳的排样结果。Step S4: Based on the optimal foraging algorithm, perform a global optimization search on the arrangement order and rotation angle of the parts, determine the optimal arrangement order and rotation angle of the parts, and output the best arrangement result.

在本发明一实施例中,步骤S1中,对二维不规则零件排样问题进行数学描述的具体方式如下:In an embodiment of the present invention, in step S1, the specific method of mathematically describing the two-dimensional irregular parts layout problem is as follows:

首先,定义变量:给定参与排样的零件个数为n,每个零件允许旋转角度个数为m,随机生成一种零件的排放顺序{x1,…,xi,…,xn},xi∈{1,2,…,n},每个零件的旋转角度编号{y1,y2,…,yn},yi∈{1,2,…,m},yi对应的旋转角度为

Figure BDA0002670639460000021
对应的排样方案为{(x1,y1),…,(xi,yi),…,(xn,yn)};First, define variables: given that the number of parts participating in the layout is n, and the number of allowed rotation angles of each part is m, a layout order of parts is randomly generated {x 1 ,…,x i ,…,x n } , x i ∈{1,2,…,n}, the rotation angle number of each part {y 1 ,y 2 ,…,y n },y i ∈{1,2,…,m}, y i corresponds to The rotation angle of is
Figure BDA0002670639460000021
The corresponding layout plan is {(x 1 ,y 1 ),…,(x i ,y i ),…,(x n ,y n )};

而后,对二维不规则零件排样问题进行定义:在给定的原材料板材上,根据加工要求,对零件进行合理排放,在满足生产需求的同时,使原材料利用率最大化。Then, the problem of two-dimensional irregular parts layout is defined: on a given raw material sheet, according to the processing requirements, the parts are reasonably discharged, and the utilization rate of raw materials is maximized while meeting the production demand.

在本发明一实施例中,步骤S2中,排样优化过程中所需满足的约束条件为:(1)参与排样的零件之间排放位置互不重叠;(2)参与排样零件均放置于原材料板材内部。In an embodiment of the present invention, in step S2, the constraints that need to be satisfied in the layout optimization process are: (1) the layout positions of the parts participating in the layout do not overlap each other; (2) the parts participating in the layout are placed inside the raw material sheet.

在本发明一实施例中,步骤S3中,所要优化的目标即原材料利用率最大化;定义参与排样的第i个零件的面积为s(i),i∈{1,2,…,n},则原材料利用率δ如下:In an embodiment of the present invention, in step S3, the target to be optimized is to maximize the utilization rate of raw materials; the area of the i-th part participating in the layout is defined as s(i), i∈{1,2,...,n }, then the raw material utilization δ is as follows:

Figure BDA0002670639460000022
Figure BDA0002670639460000022

式中,w为板材在水平方向上的宽度,h为板材在垂直方向上的高度;In the formula, w is the width of the plate in the horizontal direction, and h is the height of the plate in the vertical direction;

则所述的二维不规则零件排样目标优化函数描述如下:Then the two-dimensional irregular parts layout objective optimization function is described as follows:

Figure BDA0002670639460000023
Figure BDA0002670639460000023

在本发明一实施例中,步骤S4中,最优觅食算法包括如下步骤:In an embodiment of the present invention, in step S4, the optimal foraging algorithm includes the following steps:

步骤S41、初始化算法参数和种群;Step S41, initialize algorithm parameters and population;

步骤S42、种群适应度评价;计算初始种群中所有个体的适应度值,按降序排列,保存最优个体作为全局最优个体;Step S42, population fitness evaluation; calculate the fitness values of all individuals in the initial population, arrange them in descending order, and save the optimal individual as the global optimal individual;

步骤S43、更新种群,计算新种群中所有个体的适应度值,按降序排列,保存最优个体;Step S43, update the population, calculate the fitness values of all individuals in the new population, arrange in descending order, and save the optimal individual;

步骤S44、更新全局最优个体;Step S44, update the global optimal individual;

步骤S45、迭代更新,若满足终止条件,输出最优排样结果,反之,转步骤S43。Step S45, iterative update, if the termination condition is satisfied, output the optimal layout result, otherwise, go to step S43.

在本发明一实施例中,所述步骤S41具体为:In an embodiment of the present invention, the step S41 is specifically:

初始化算法参数:种群规模popsize,最大迭代次数maxIter,当前迭代次数t;Initialization algorithm parameters: population size popsize, maximum iteration number maxIter, current iteration number t;

初始化种群方式为:根据初始化的种群规模popsize,采用整数编码形式,其中

Figure BDA0002670639460000024
的种群个体采用随机生成方式生成,剩余
Figure BDA0002670639460000025
的种群个体则采用按面积大小降序排列的方式生成。The method of initializing the population is as follows: according to the initialized population size popsize, the integer encoding is used, where
Figure BDA0002670639460000024
The population of individuals is generated by random generation, and the remaining
Figure BDA0002670639460000025
The populations of individuals are generated in descending order of area size.

在本发明一实施例中,所述步骤S42中种群适应度评价函数为:In an embodiment of the present invention, the population fitness evaluation function in step S42 is:

Figure BDA0002670639460000026
Figure BDA0002670639460000026

F(x)的值越小,即材料利用率越高,表示种群中个体的排样结果越优。The smaller the value of F(x), that is, the higher the material utilization rate, the better the results of the arrangement of individuals in the population.

在本发明一实施例中,所述步骤S43中更新种群的方式为:In an embodiment of the present invention, the method of updating the population in the step S43 is:

定义范围因子k,且

Figure BDA0002670639460000031
Figure BDA0002670639460000032
为迭代次数为t时的全局最优个体,
Figure BDA0002670639460000033
为种群中的第j的个体,j∈{1,2,…,n};种群个体位置更新方式如下所示:defines the range factor k, and
Figure BDA0002670639460000031
Figure BDA0002670639460000032
is the global optimal individual when the number of iterations is t,
Figure BDA0002670639460000033
is the jth individual in the population, j∈{1,2,…,n}; the update method of the individual position of the population is as follows:

Figure BDA0002670639460000034
Figure BDA0002670639460000034

式中,

Figure BDA0002670639460000035
为个体
Figure BDA0002670639460000036
的第i维元素,r1ji、r2ji是0~1之间服从均匀分布的随机数,b∈{1,2,…,n};
Figure BDA0002670639460000037
为种群中最差个体
Figure BDA0002670639460000038
的第i维元素,N=n;In the formula,
Figure BDA0002670639460000035
for the individual
Figure BDA0002670639460000036
The i-th dimension element of , r 1ji and r 2ji are random numbers between 0 and 1 subject to uniform distribution, b∈{1,2,…,n};
Figure BDA0002670639460000037
the worst individual in the population
Figure BDA0002670639460000038
The i-th dimension element of , N=n;

最优觅食算法在迭代过程中有较小概率会接受一些较差的个体,从而帮助算法跳出局部最优解的束缚;对于最小化问题,判断下一代个体

Figure BDA0002670639460000039
是否被接受的模型为:The optimal foraging algorithm has a small probability of accepting some poor individuals in the iterative process, thus helping the algorithm to escape the constraints of the local optimal solution; for the minimization problem, judge the next generation of individuals
Figure BDA0002670639460000039
The accepted models are:

Figure BDA00026706394600000310
Figure BDA00026706394600000310

式中,

Figure BDA00026706394600000311
为0~1之间服从均匀分布的随机数,
Figure BDA00026706394600000312
Figure BDA00026706394600000313
分别表示迭代次数为t和t櫸1时,种群中个体j的适应度值。In the formula,
Figure BDA00026706394600000311
is a random number between 0 and 1 that obeys a uniform distribution,
Figure BDA00026706394600000312
and
Figure BDA00026706394600000313
Represents the fitness value of individual j in the population when the number of iterations is t and t and 1, respectively.

在本发明一实施例中,所述步骤S44中更新全局最优个体的方式为精英保留策略。In an embodiment of the present invention, the method of updating the global optimal individual in the step S44 is an elite retention strategy.

在本发明一实施例中,所述步骤S45中终止条件为预设的最大迭代次数maxIter。In an embodiment of the present invention, the termination condition in step S45 is a preset maximum number of iterations maxIter.

相较于传统启发式二维不规则零件排样技术,本发明具有以下有益效果:Compared with the traditional heuristic two-dimensional irregular parts layout technology, the present invention has the following beneficial effects:

1、本发明对零件的排放顺序和对应的旋转角度均采用整数编码方式,降低了求解复杂度,结合随机生成和按面积大小将序排列生成两种方式构造初始种群,种群多样性好,且保证了初始种群中个体的质量,收敛速度较快,算法的求解效率高。1. The present invention adopts an integer coding method for the arrangement order of the parts and the corresponding rotation angle, which reduces the complexity of the solution. The initial population is constructed in two ways: random generation and orderly arranging according to the size of the area. The population diversity is good, and The quality of the individuals in the initial population is guaranteed, the convergence speed is fast, and the solution efficiency of the algorithm is high.

2、相比基于传统智能启发式算法的二维不规则问题排样方法,所述排样方法需调整参数较少,适用范围广,对于包含凸、凹多边形零件与孔洞的复杂零件等二维不规则零件的排样问题,本方法均具有较好的适用性。且排样效果好,板材利用率高,鲁棒性好。2. Compared with the two-dimensional irregular problem layout method based on the traditional intelligent heuristic algorithm, the layout method requires less adjustment parameters and has a wide range of applications. For the layout of irregular parts, this method has good applicability. And the layout effect is good, the plate utilization rate is high, and the robustness is good.

附图说明Description of drawings

图1为本发明方法流程示意图。Fig. 1 is the schematic flow chart of the method of the present invention.

图2为本发明一实例零件基于本发明方法的排样效果图。FIG. 2 is a layout effect diagram of an example part of the present invention based on the method of the present invention.

具体实施方式Detailed ways

下面结合附图,对本发明的技术方案进行具体说明。The technical solutions of the present invention will be described in detail below with reference to the accompanying drawings.

如图1所示,本发明提供了一种基于最优觅食算法的二维不规则零件排样方法,包括如下步骤:As shown in Figure 1, the present invention provides a two-dimensional irregular parts layout method based on an optimal foraging algorithm, comprising the following steps:

步骤S1、对二维不规则零件排样问题进行数学描述;Step S1, mathematically describe the two-dimensional irregular parts layout problem;

步骤S2:建立排样优化过程中所需满足的约束条件;Step S2: establishing the constraints that need to be satisfied in the layout optimization process;

步骤S3:确定所要优化的目标,建立相应的二维不规则零件排样目标优化函数;Step S3: determine the target to be optimized, and establish a corresponding two-dimensional irregular part layout target optimization function;

步骤S4:基于最优觅食算法对零件排放顺序与旋转角度进行全局优化搜索,确定零件的最优排放顺序和旋转角度,输出最佳的排样结果。Step S4: Based on the optimal foraging algorithm, perform a global optimization search on the arrangement order and rotation angle of the parts, determine the optimal arrangement order and rotation angle of the parts, and output the best arrangement result.

进一步地,步骤S1中,对二维不规则零件排样问题进行数学描述的具体方式如下:Further, in step S1, the specific method of mathematically describing the two-dimensional irregular parts layout problem is as follows:

首先,定义变量:给定参与排样的零件个数为n,每个零件允许旋转角度个数为m,随机生成一种零件的排放顺序{x1,…,xi,…,xn},xi∈{1,2,…,n},每个零件的旋转角度编号{y1,y2,…,yn},yi∈{1,2,…,m},yi对应的旋转角度为

Figure BDA0002670639460000041
对应的排样方案为{(x1,y1),…,(xi,yi),…,(xn,yn)};First, define variables: given that the number of parts participating in the layout is n, and the number of allowed rotation angles of each part is m, a layout order of parts is randomly generated {x 1 ,…,x i ,…,x n } , x i ∈{1,2,…,n}, the rotation angle number of each part {y 1 ,y 2 ,…,y n },y i ∈{1,2,…,m}, y i corresponds to The rotation angle of is
Figure BDA0002670639460000041
The corresponding layout plan is {(x 1 ,y 1 ),…,(x i ,y i ),…,(x n ,y n )};

而后,对二维不规则零件排样问题进行定义:在给定的原材料板材上,根据加工要求,对零件进行合理排放,在满足生产需求的同时,使原材料利用率最大化。Then, the problem of two-dimensional irregular parts layout is defined: on a given raw material sheet, according to the processing requirements, the parts are reasonably discharged, and the utilization rate of raw materials is maximized while meeting the production demand.

进一步地,步骤S2中,排样优化过程中所需满足的约束条件为:(1)参与排样的零件之间排放位置互不重叠;(2)参与排样零件均放置于原材料板材内部。Further, in step S2, the constraints that need to be satisfied in the layout optimization process are: (1) the layout positions of the parts participating in the layout do not overlap each other; (2) the parts participating in the layout are placed inside the raw material sheet.

进一步地,步骤S3中,所要优化的目标即原材料利用率最大化;定义参与排样的第i个零件的面积为s(i),i∈{1,2,…,n},则原材料利用率δ如下:Further, in step S3, the goal to be optimized is to maximize the utilization rate of raw materials; define the area of the i-th part participating in the layout as s(i), i∈{1,2,...,n}, then the utilization of raw materials The rate δ is as follows:

Figure BDA0002670639460000042
Figure BDA0002670639460000042

式中,w为板材在水平方向上的宽度,h为板材在垂直方向上的高度;In the formula, w is the width of the plate in the horizontal direction, and h is the height of the plate in the vertical direction;

则所述的二维不规则零件排样目标优化函数描述如下:Then the two-dimensional irregular parts layout objective optimization function is described as follows:

Figure BDA0002670639460000043
Figure BDA0002670639460000043

进一步地,步骤S4中,最优觅食算法包括如下步骤:Further, in step S4, the optimal foraging algorithm includes the following steps:

步骤S41、初始化算法参数和种群;Step S41, initialize algorithm parameters and population;

步骤S42、种群适应度评价;计算初始种群中所有个体的适应度值,按降序排列,保存最优个体作为全局最优个体;Step S42, population fitness evaluation; calculate the fitness values of all individuals in the initial population, arrange them in descending order, and save the optimal individual as the global optimal individual;

步骤S43、更新种群,计算新种群中所有个体的适应度值,按降序排列,保存最优个体;Step S43, update the population, calculate the fitness values of all individuals in the new population, arrange in descending order, and save the optimal individual;

步骤S44、更新全局最优个体;Step S44, update the global optimal individual;

步骤S45、迭代更新,若满足终止条件,输出最优排样结果,反之,转步骤S43。Step S45, iterative update, if the termination condition is satisfied, output the optimal layout result, otherwise, go to step S43.

进一步地,所述步骤S41具体为:Further, the step S41 is specifically:

初始化算法参数:种群规模popsize,最大迭代次数maxIter,当前迭代次数t;Initialization algorithm parameters: population size popsize, maximum iteration number maxIter, current iteration number t;

种群初始化方法一般为:(1)随机生成;(2)按面积大小降序排列生成;排样规模较大时,随机生成的初始种群多样性好,但种群的质量不高,算法的收敛速度慢,排样效率低;通常,面积较大的零件排放后会产生较多的空隙,能被面积较小的零件利用而不占用更多的空间,因此,按照面积大小降序排列生成的初始种群质量较好,算法的收敛速度快,排样效率高。The population initialization method is generally: (1) randomly generated; (2) generated in descending order of area size; when the size of the layout is large, the randomly generated initial population has good diversity, but the quality of the population is not high, and the convergence speed of the algorithm is slow. , the layout efficiency is low; usually, parts with a larger area will generate more voids after they are discharged, which can be used by parts with a smaller area without occupying more space. Therefore, the initial population quality generated is arranged in descending order of area size. Better, the algorithm has fast convergence speed and high nesting efficiency.

因此,本发明的初始化种群方式为:根据初始化的种群规模popsize,采用整数编码形式,其中

Figure BDA0002670639460000051
的种群个体采用随机生成方式生成,剩余
Figure BDA0002670639460000052
的种群个体则采用按面积大小降序排列的方式生成。Therefore, the method for initializing the population of the present invention is: according to the initialized population size popsize, an integer encoding form is adopted, wherein
Figure BDA0002670639460000051
The population of individuals is generated by random generation, and the remaining
Figure BDA0002670639460000052
The populations of individuals are generated in descending order of area size.

进一步地,所述步骤S42中种群适应度评价函数为:Further, the population fitness evaluation function in the step S42 is:

Figure BDA0002670639460000053
Figure BDA0002670639460000053

F(x)的值越小,即材料利用率越高,表示种群中个体的排样结果越优。基于左下重心临界多边形定位策略排放零件,待所有零件排放完毕,计算种群中所有个体的F(x)值,按降序排列,个体越优,其位置越靠前;所述左下重心临界多边形定位策略即待排零件在选取可行排样位置时,总是选取重心位置最低的可行点,若存在多个可行最低重心排样位置,则选取最左的可行最低重心排样位置。The smaller the value of F(x), that is, the higher the material utilization rate, the better the results of the arrangement of individuals in the population. Parts are placed based on the critical polygon positioning strategy of the lower left center of gravity. After all the parts have been placed, the F(x) values of all individuals in the population are calculated and arranged in descending order. The better the individual is, the higher its position is. That is, when selecting the feasible nesting position of the parts to be arranged, always select the feasible point with the lowest center of gravity position. If there are multiple nesting positions with the lowest feasible center of gravity, the leftmost feasible minimum center of gravity nesting position is selected.

进一步地,所述步骤S43中更新种群的方式为:Further, the method of updating the population in the step S43 is:

定义范围因子k,且

Figure BDA0002670639460000054
Figure BDA0002670639460000055
为迭代次数为t时的全局最优个体,
Figure BDA0002670639460000056
为种群中的第j的个体,j∈{1,2,…,n};种群个体位置更新方式如下所示:defines the range factor k, and
Figure BDA0002670639460000054
Figure BDA0002670639460000055
is the global optimal individual when the number of iterations is t,
Figure BDA0002670639460000056
is the jth individual in the population, j∈{1,2,…,n}; the update method of the individual position of the population is as follows:

Figure BDA0002670639460000057
Figure BDA0002670639460000057

式中,

Figure BDA0002670639460000058
为个体
Figure BDA0002670639460000059
的第i维元素,r1ji、r2ji是0~1之间服从均匀分布的随机数,b∈{1,2,…,n};
Figure BDA00026706394600000510
为种群中最差个体
Figure BDA00026706394600000511
的第i维元素,N=n;In the formula,
Figure BDA0002670639460000058
for the individual
Figure BDA0002670639460000059
The i-th dimension element of , r 1ji and r 2ji are random numbers between 0 and 1 subject to uniform distribution, b∈{1,2,…,n};
Figure BDA00026706394600000510
the worst individual in the population
Figure BDA00026706394600000511
The i-th dimension element of , N=n;

最优觅食算法在迭代过程中有较小概率会接受一些较差的个体,从而帮助算法跳出局部最优解的束缚;对于最小化问题,判断下一代个体

Figure BDA00026706394600000512
是否被接受的模型为:The optimal foraging algorithm has a small probability of accepting some poor individuals in the iterative process, thus helping the algorithm to escape the constraints of the local optimal solution; for the minimization problem, judge the next generation of individuals
Figure BDA00026706394600000512
The accepted models are:

Figure BDA00026706394600000513
Figure BDA00026706394600000513

式中,

Figure BDA00026706394600000514
为0~1之间服从均匀分布的随机数,
Figure BDA00026706394600000515
Figure BDA00026706394600000516
分别表示迭代次数为t和t櫸1时,种群中个体j的适应度值。In the formula,
Figure BDA00026706394600000514
is a random number between 0 and 1 that obeys a uniform distribution,
Figure BDA00026706394600000515
and
Figure BDA00026706394600000516
Represents the fitness value of individual j in the population when the number of iterations is t and t and 1, respectively.

进一步地,所述步骤S44中更新全局最优个体的方式为精英保留策略。Further, the method of updating the global optimal individual in the step S44 is an elite retention strategy.

进一步地,所述步骤S45中终止条件为预设的最大迭代次数maxIter,判断进化迭代次数t是否达到最大迭代次数;若是,则输出最优解,反之,则转步骤S43。Further, the termination condition in the step S45 is the preset maximum number of iterations maxIter, and it is judged whether the number of evolution iterations t reaches the maximum number of iterations; if so, output the optimal solution, otherwise, go to step S43.

参考图2,本发明的对一些不规则零件的排样效果图(材料高度:1000mm,样片数:28,排样宽度H:5200mm,材料利用率:78.6%),初始算法参数设置为:种群规模popsize=20,最大迭代次数maxIter=500。Referring to Fig. 2, the layout effect diagram of some irregular parts of the present invention (material height: 1000mm, number of samples: 28, layout width H: 5200mm, material utilization rate: 78.6%), the initial algorithm parameters are set as: population Scale popsize=20, maximum number of iterations maxIter=500.

以上是本发明的较佳实施例,凡依本发明技术方案所作的改变,所产生的功能作用未超出本发明技术方案的范围时,均属于本发明的保护范围。The above are the preferred embodiments of the present invention, all changes made according to the technical solutions of the present invention, when the resulting functional effects do not exceed the scope of the technical solutions of the present invention, belong to the protection scope of the present invention.

Claims (10)

1.一种基于最优觅食算法的二维不规则零件排样方法,其特征在于,包括如下步骤:1. a two-dimensional irregular parts layout method based on optimal foraging algorithm, is characterized in that, comprises the steps: 步骤S1、对二维不规则零件排样问题进行数学描述;Step S1, mathematically describe the two-dimensional irregular parts layout problem; 步骤S2:建立排样优化过程中所需满足的约束条件;Step S2: establishing the constraints that need to be satisfied in the layout optimization process; 步骤S3:确定所要优化的目标,建立相应的二维不规则零件排样目标优化函数;Step S3: determine the target to be optimized, and establish a corresponding two-dimensional irregular part layout target optimization function; 步骤S4:基于最优觅食算法对零件排放顺序与旋转角度进行全局优化搜索,确定零件的最优排放顺序和旋转角度,输出最佳的排样结果。Step S4: Based on the optimal foraging algorithm, perform a global optimization search on the arrangement order and rotation angle of the parts, determine the optimal arrangement order and rotation angle of the parts, and output the best arrangement result. 2.根据权利要求1所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,步骤S1中,对二维不规则零件排样问题进行数学描述的具体方式如下:2. the two-dimensional irregular parts layout method based on optimal foraging algorithm according to claim 1, is characterized in that, in step S1, the concrete way that two-dimensional irregular parts layout problem is mathematically described is as follows: 首先,定义变量:给定参与排样的零件个数为n,每个零件允许旋转角度个数为m,随机生成一种零件的排放顺序{x1,…,xi,…,xn},xi∈{1,2,…,n},每个零件的旋转角度编号{y1,y2,…,yn},yi∈{1,2,…,m},yi对应的旋转角度为
Figure FDA0002670639450000011
对应的排样方案为{(x1,y1),…,(xi,yi),…,(xn,yn)};
First, define variables: given that the number of parts participating in the layout is n, and the number of allowed rotation angles of each part is m, a layout order of parts is randomly generated {x 1 ,…,x i ,…,x n } , x i ∈{1,2,…,n}, the rotation angle number of each part {y 1 ,y 2 ,…,y n },y i ∈{1,2,…,m}, y i corresponds to The rotation angle of is
Figure FDA0002670639450000011
The corresponding layout plan is {(x 1 ,y 1 ),…,(x i ,y i ),…,(x n ,y n )};
而后,对二维不规则零件排样问题进行定义:在给定的原材料板材上,根据加工要求,对零件进行合理排放,在满足生产需求的同时,使原材料利用率最大化。Then, the problem of two-dimensional irregular parts layout is defined: on a given raw material sheet, according to the processing requirements, the parts are reasonably discharged, and the utilization rate of raw materials is maximized while meeting the production demand.
3.根据权利要求1所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,步骤S2中,排样优化过程中所需满足的约束条件为:(1)参与排样的零件之间排放位置互不重叠;(2)参与排样零件均放置于原材料板材内部。3. the two-dimensional irregular parts layout method based on optimal foraging algorithm according to claim 1, is characterized in that, in step S2, the constraint condition that needs to be satisfied in the layout optimization process is: (1) participate in The placement positions of the parts to be laid out do not overlap each other; (2) the parts involved in the layout are placed inside the raw material sheet. 4.根据权利要求1所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,步骤S3中,所要优化的目标即原材料利用率最大化;定义参与排样的第i个零件的面积为s(i),i∈{1,2,…,n},则原材料利用率δ如下:4. The two-dimensional irregular parts layout method based on the optimal foraging algorithm according to claim 1, is characterized in that, in step S3, the target to be optimized is that the utilization rate of raw materials is maximized; The area of i parts is s(i), i∈{1,2,…,n}, then the raw material utilization δ is as follows:
Figure FDA0002670639450000012
Figure FDA0002670639450000012
式中,w为板材在水平方向上的宽度,h为板材在垂直方向上的高度;In the formula, w is the width of the plate in the horizontal direction, and h is the height of the plate in the vertical direction; 则所述的二维不规则零件排样目标优化函数描述如下:Then the two-dimensional irregular parts layout objective optimization function is described as follows:
Figure FDA0002670639450000013
Figure FDA0002670639450000013
5.根据权利要求1所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,步骤S4中,最优觅食算法包括如下步骤:5. The two-dimensional irregular parts layout method based on the optimal foraging algorithm according to claim 1, is characterized in that, in step S4, the optimal foraging algorithm comprises the following steps: 步骤S41、初始化算法参数和种群;Step S41, initialize algorithm parameters and population; 步骤S42、种群适应度评价;计算初始种群中所有个体的适应度值,按降序排列,保存最优个体作为全局最优个体;Step S42, population fitness evaluation; calculate the fitness values of all individuals in the initial population, arrange them in descending order, and save the optimal individual as the global optimal individual; 步骤S43、更新种群,计算新种群中所有个体的适应度值,按降序排列,保存最优个体;Step S43, update the population, calculate the fitness values of all individuals in the new population, arrange in descending order, and save the optimal individual; 步骤S44、更新全局最优个体;Step S44, update the global optimal individual; 步骤S45、迭代更新,若满足终止条件,输出最优排样结果,反之,转步骤S43。Step S45, iterative update, if the termination condition is satisfied, output the optimal layout result, otherwise, go to step S43. 6.根据权利要求4所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,所述步骤S41具体为:6. the two-dimensional irregular parts layout method based on optimal foraging algorithm according to claim 4, is characterized in that, described step S41 is specifically: 初始化算法参数:种群规模popsize,最大迭代次数maxIter,当前迭代次数t;Initialization algorithm parameters: population size popsize, maximum iteration number maxIter, current iteration number t; 初始化种群方式为:根据初始化的种群规模popsize,采用整数编码形式,其中
Figure FDA0002670639450000021
的种群个体采用随机生成方式生成,剩余
Figure FDA0002670639450000022
的种群个体则采用按面积大小降序排列的方式生成。
The method of initializing the population is as follows: according to the initialized population size popsize, the integer encoding is used, where
Figure FDA0002670639450000021
The population of individuals is generated by random generation, and the remaining
Figure FDA0002670639450000022
The populations of individuals are generated in descending order of area size.
7.根据权利要求4所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,所述步骤S42中种群适应度评价函数为:7. The two-dimensional irregular parts layout method based on optimal foraging algorithm according to claim 4, is characterized in that, in described step S42, population fitness evaluation function is:
Figure FDA0002670639450000023
Figure FDA0002670639450000023
F(x)的值越小,即材料利用率越高,表示种群中个体的排样结果越优。The smaller the value of F(x), that is, the higher the material utilization rate, the better the results of the arrangement of individuals in the population.
8.根据权利要求4所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,所述步骤S43中更新种群的方式为:8. the two-dimensional irregular parts layout method based on optimal foraging algorithm according to claim 4, is characterized in that, the mode of updating population in described step S43 is: 定义范围因子k,且
Figure FDA0002670639450000024
Figure FDA0002670639450000025
为迭代次数为t时的全局最优个体,
Figure FDA0002670639450000026
为种群中的第j的个体,j∈{1,2,…,n};种群个体位置更新方式如下所示:
defines the range factor k, and
Figure FDA0002670639450000024
Figure FDA0002670639450000025
is the global optimal individual when the number of iterations is t,
Figure FDA0002670639450000026
is the jth individual in the population, j∈{1,2,…,n}; the update method of the individual position of the population is as follows:
Figure FDA0002670639450000027
Figure FDA0002670639450000027
式中,
Figure FDA0002670639450000028
为个体
Figure FDA0002670639450000029
的第i维元素,r1ji、r2ji是0~1之间服从均匀分布的随机数,b∈{1,2,…,n};
Figure FDA00026706394500000210
为种群中最差个体
Figure FDA00026706394500000211
的第i维元素,N=n;
In the formula,
Figure FDA0002670639450000028
for the individual
Figure FDA0002670639450000029
The i-th dimension element of , r 1ji and r 2ji are random numbers between 0 and 1 subject to uniform distribution, b∈{1,2,…,n};
Figure FDA00026706394500000210
the worst individual in the population
Figure FDA00026706394500000211
The i-th dimension element of , N=n;
最优觅食算法在迭代过程中有较小概率会接受一些较差的个体,从而帮助算法跳出局部最优解的束缚;对于最小化问题,判断下一代个体
Figure FDA00026706394500000212
是否被接受的模型为:
The optimal foraging algorithm has a small probability of accepting some poor individuals in the iterative process, thus helping the algorithm to escape the constraints of the local optimal solution; for the minimization problem, judge the next generation of individuals
Figure FDA00026706394500000212
The accepted models are:
Figure FDA00026706394500000213
Figure FDA00026706394500000213
式中,
Figure FDA00026706394500000214
为0~1之间服从均匀分布的随机数,
Figure FDA00026706394500000215
Figure FDA00026706394500000216
分别表示迭代次数为t和t+1时,种群中个体j的适应度值。
In the formula,
Figure FDA00026706394500000214
is a random number between 0 and 1 that obeys a uniform distribution,
Figure FDA00026706394500000215
and
Figure FDA00026706394500000216
Represents the fitness value of individual j in the population when the number of iterations is t and t+1, respectively.
9.根据权利要求4所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,所述步骤S44中更新全局最优个体的方式为精英保留策略。9 . The two-dimensional irregular parts layout method based on the optimal foraging algorithm according to claim 4 , wherein the method of updating the global optimal individual in the step S44 is an elite retention strategy. 10 . 10.根据权利要求4所述的基于最优觅食算法的二维不规则零件排样方法,其特征在于,所述步骤S45中终止条件为预设的最大迭代次数maxIter。10 . The two-dimensional irregular parts layout method based on the optimal foraging algorithm according to claim 4 , wherein the termination condition in the step S45 is the preset maximum number of iterations maxIter . 11 .
CN202010933312.3A 2020-09-08 2020-09-08 Two-dimensional irregular part layout method based on optimal foraging algorithm Pending CN111985012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010933312.3A CN111985012A (en) 2020-09-08 2020-09-08 Two-dimensional irregular part layout method based on optimal foraging algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010933312.3A CN111985012A (en) 2020-09-08 2020-09-08 Two-dimensional irregular part layout method based on optimal foraging algorithm

Publications (1)

Publication Number Publication Date
CN111985012A true CN111985012A (en) 2020-11-24

Family

ID=73448666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010933312.3A Pending CN111985012A (en) 2020-09-08 2020-09-08 Two-dimensional irregular part layout method based on optimal foraging algorithm

Country Status (1)

Country Link
CN (1) CN111985012A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112873855A (en) * 2021-04-13 2021-06-01 河北工业大学 STL model center layout method in 3DP process
CN113435094A (en) * 2021-05-27 2021-09-24 中国地质大学(武汉) Two-dimensional irregular part layout method based on genetic algorithm
CN113762380A (en) * 2021-09-07 2021-12-07 成都理工大学 An optimization method for parts layout based on adaptive grouping
CN114066099A (en) * 2021-11-30 2022-02-18 郑州轻工业大学 Round piece coiled material layout optimization method based on improved chicken flock algorithm
CN114611413A (en) * 2022-05-09 2022-06-10 广东三维家信息科技有限公司 Raw material stock layout method, device, electronic equipment and storage medium
CN114996781A (en) * 2022-05-27 2022-09-02 华中科技大学 Two-dimensional irregular part layout method and system based on actors-critics
CN115759634A (en) * 2022-11-18 2023-03-07 中南大学 An efficient and collaborative method for batch layout of rectangular plates
CN117131989A (en) * 2023-09-04 2023-11-28 晞德求索(北京)科技有限公司 Two-dimensional blanking method and system based on dynamic allocation
CN117556955A (en) * 2023-11-24 2024-02-13 南京工业大学 A two-dimensional arrangement method of irregular parts based on mutation-driven genetic algorithm

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140333615A1 (en) * 2013-05-11 2014-11-13 Mitsubishi Electric Research Laboratories, Inc. Method For Reconstructing 3D Scenes From 2D Images
CN109214557A (en) * 2018-08-15 2019-01-15 浙江优尼家装饰科技有限公司 A kind of irregular plate Nesting of two dimension

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140333615A1 (en) * 2013-05-11 2014-11-13 Mitsubishi Electric Research Laboratories, Inc. Method For Reconstructing 3D Scenes From 2D Images
CN109214557A (en) * 2018-08-15 2019-01-15 浙江优尼家装饰科技有限公司 A kind of irregular plate Nesting of two dimension

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杜士卿 等: "最佳觅食算法求解多目标混合流水车间调度问题", 《福州大学学报(自然科学版)》 *
王静静 等: "一种基于并行交叉遗传算法的二维不规则排样问题求解", 《计算机应用与软件》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112873855A (en) * 2021-04-13 2021-06-01 河北工业大学 STL model center layout method in 3DP process
CN113435094A (en) * 2021-05-27 2021-09-24 中国地质大学(武汉) Two-dimensional irregular part layout method based on genetic algorithm
CN113435094B (en) * 2021-05-27 2022-07-05 中国地质大学(武汉) Two-dimensional irregular part layout method based on genetic algorithm
CN113762380A (en) * 2021-09-07 2021-12-07 成都理工大学 An optimization method for parts layout based on adaptive grouping
CN114066099A (en) * 2021-11-30 2022-02-18 郑州轻工业大学 Round piece coiled material layout optimization method based on improved chicken flock algorithm
CN114611413A (en) * 2022-05-09 2022-06-10 广东三维家信息科技有限公司 Raw material stock layout method, device, electronic equipment and storage medium
CN114996781A (en) * 2022-05-27 2022-09-02 华中科技大学 Two-dimensional irregular part layout method and system based on actors-critics
CN115759634A (en) * 2022-11-18 2023-03-07 中南大学 An efficient and collaborative method for batch layout of rectangular plates
CN115759634B (en) * 2022-11-18 2024-04-26 中南大学 An efficient collaborative method for batch layout of rectangular plates
CN117131989A (en) * 2023-09-04 2023-11-28 晞德求索(北京)科技有限公司 Two-dimensional blanking method and system based on dynamic allocation
CN117556955A (en) * 2023-11-24 2024-02-13 南京工业大学 A two-dimensional arrangement method of irregular parts based on mutation-driven genetic algorithm

Similar Documents

Publication Publication Date Title
CN111985012A (en) Two-dimensional irregular part layout method based on optimal foraging algorithm
CN105809279B (en) A kind of water resources optimal operation method based on multi-target quantum shuffled frog leaping algorithm
WO2018210010A1 (en) Array element arrangement method for l-type array antenna based on inheritance of acquired characteristics
CN110389819B (en) Method and system for scheduling calculation intensive batch processing tasks
CN107862411A (en) A kind of extensive flexible job shop scheduling optimization method
CN108415425A (en) It is a kind of that swarm algorithm is cooperateed with based on the Distributed Cluster robot for improving gene regulatory network
CN112749776B (en) A Job Shop Scheduling Method Based on Improved Hybrid Genetic Algorithm
CN105243458A (en) Reservoir dispatching method based on multi-target shuffled frog leaping and differential algorithms
CN111353605B (en) Synthetic Arrangement Method of New Planar Molecular Array Antenna Array Based on Improved Genetic Algorithm
CN108090650A (en) A kind of row's case optimization method based on genetic algorithm
CN112947480B (en) Mobile robot path planning method, storage medium and system
CN103105774A (en) Fractional order proportion integration differentiation (PID) controller setting method based on improved quantum evolutionary algorithm
CN106408031A (en) Super parameter optimization method of least squares support vector machine
Shang et al. Production scheduling optimization method based on hybrid particle swarm optimization algorithm
CN107341564A (en) A kind of cutting based on adaptive accelerated factor particle swarm optimization algorithm divides bed process
CN111046559A (en) Multi-objective optimization method based on double-layer elite co-evolution
CN110321995A (en) A kind of difference Particle Swarm Mixed Algorithm based on Stochastic inertia weight
CN110136782A (en) A Construction Method of Metal Oxide Cluster Structure Model
CN109255484A (en) The discrete manufacturing recourses cooperative optimization method and system of data-driven
CN110932297A (en) Distributed energy storage device scheduling method and device based on centerless particle swarm algorithm
CN114997261A (en) A kind of residential power data clustering method and system
CN113780651B (en) Two-dimensional Irregular Nesting Method Based on Improved Hybrid BL Strategy
CN107180286A (en) Manufacturing service supply chain optimization method and system based on modified pollen algorithm
CN117609316A (en) A two-dimensional irregular layout method and projection marking system based on genetic algorithm and linear programming
CN117726119A (en) A graph bionic learning method to solve distributed hybrid flow workshop group scheduling

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201124

RJ01 Rejection of invention patent application after publication