A cutting path optimization method for special-shaped sponge based on fireworks algorithm

Through the special-shaped sponge cutting path optimization method based on the fireworks algorithm, using feature point numbering and algorithm optimization technology, the problem of low manual optimization efficiency is solved, the sponge cutting path is optimized, the tool idle stroke length is reduced, and the production efficiency is improved. .

CN115145225BInactive Publication Date: 2024-08-30FUZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210727934.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2024-08-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing sponge cutting path optimization methods mainly rely on manual experience, making it difficult to select the optimal path, resulting in low cutting efficiency and inability to effectively reduce the length of the tool's empty stroke.

Method used

The special-shaped sponge cutting path optimization method based on the fireworks algorithm is used to generate an initial population through the feature point numbers of the parts to be cut and initialization of the parameters of the fireworks algorithm, and through explosion operations, Gaussian mutation operations and selection operations, the cutting path is optimized to reduce tool idle travel length.

Benefits of technology

It realizes the optimal cutting plan quickly and effectively, improves the sponge cutting efficiency and ensures the optimal cutting path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145225B
    Figure CN115145225B
Patent Text Reader

Abstract

The present invention relates to a method for optimizing the cutting path of a special-shaped sponge based on a fireworks algorithm. First, the parts to be cut on the layout diagram are numbered, the characteristic points of the parts to be cut are extracted and numbered in clockwise order, and then the numbers and characteristic points of the parts to be cut are used to initialize the relevant parameters of the fireworks algorithm to generate an initial population. Next, the fireworks algorithm is used to optimize the cutting path, thereby obtaining a cutting path, that is, a tool path. The present invention can efficiently obtain an optimized special-shaped sponge cutting path, providing a method for enterprises to improve production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of intelligent manufacturing technology, and in particular to a method for optimizing a cutting path of a special-shaped sponge based on a fireworks algorithm. Background Art

[0002] With the continuous development of human society and the improvement of human living standards, light industry manufacturing is not only one of the important symbols of a country's modernization level, but also closely related to people's lives. Sponges appear in various fields of national economic construction and people's lives, including the automotive industry, battery industry, cosmetics industry and furniture manufacturing industry. As the demand for sponges is rising, how to improve the processing efficiency of sponges has become a vital issue to meet the growing consumer demand for sponges. The key to improving sponge processing efficiency lies in reducing the length of the tool's idle stroke in the cutting path during sponge production.

[0003] At present, most of the sponge cutting path optimization methods adopted by enterprises rely on the workers' experience to optimize the tool cutting path. This manual method has limitations. It is difficult to select the optimal cutting path by manual method, and the optimization effect is highly causal with the workers' experience. The effect of cutting path optimization cannot be guaranteed, which ultimately affects production efficiency. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a method for optimizing the cutting path of a special-shaped sponge based on a fireworks algorithm, so as to obtain an optimal cutting path, reduce the length of the idle stroke, and improve the cutting efficiency of the special-shaped sponge.

[0005] To achieve the above purpose, the present invention adopts the following technical solution: a method for optimizing the cutting path of special-shaped sponge based on a fireworks algorithm, comprising the following steps:

[0006] Step S1, numbering the parts to be cut on the layout diagram, extracting the characteristic points of the parts to be cut and numbering them in clockwise order;

[0007] Step S2, using the numbers and feature points of the parts to be cut to initialize the parameters of the fireworks algorithm to generate an initial population;

[0008] Step S3, using the fireworks algorithm to optimize the cutting path;

[0009] Step S4, obtaining the optimal cutting path.

[0010] In a preferred embodiment, in step S1, the method for extracting feature points is: for polygons, their vertices are used as their feature points; for circles and arcs, a discretization method is used to discretize the arcs into polygons composed of k line segments, and the vertices of the polygons are used as their feature points, where k varies according to the circumference or side length of the circle and the arc; for ellipses, the intersection of the major semi-axis, minor semi-axis and the ellipse is used as its feature point.

[0011] In a preferred embodiment, in step S1, the specific implementation process of numbering the parts to be cut and the feature points is as follows:

[0012] Assume there are n parts to be cut, and each part is assigned a number C1,…,C i ,…,C n ; If the part to be cut is C i The number of feature points is L i , i∈{1,n}, then the part to be cut C i The feature points are numbered in clockwise order.

[0013] In a preferred embodiment, in step S2, the specific implementation process of generating the initial population is as follows:

[0014] 1) Sort the numbers of the parts to be cut in any order to form a set of codes [C1,…,C i ,…,C n ];

[0015] 2) Select any feature point from C1 Then select a feature point from the next part to be cut Select feature points from the next part to be cut according to the coding order until all parts to be cut have a feature point selected. After the operation is completed, a feature point code will be formed. in Refers to part number C i The kth part to be cut i feature points, Refers to the number C i The number of feature points of the part to be cut; the above two codes are combined to form the following code

[0016] 3) Repeat step 2) N times to form N groups of codes, which are described as Each set of codes is regarded as an individual in the initial population of the algorithm, in which the code composed of the part numbers to be cut is called the first half code, and the code composed of the feature point numbers is called the second half code; at this time, the current iteration number of the algorithm is set to t=1.

[0017] In a preferred embodiment, in step S3, the optimization process of the algorithm is described as follows:

[0018] The fireworks algorithm includes the following operations: initialization operation, explosion operation, Gaussian mutation operation and selection operation; the final optimization goal of the algorithm is to reduce the length of the tool's empty stroke in the cutting path, that is, the smaller the fitness value of the individual in the population, the better;

[0019] The explosion operation refers to: randomly selecting a part number to be cut in the individual, and then randomly inserting it into another position in the first half of the individual code, and the position of the feature point corresponding to the part number to be cut will also change accordingly; the Gaussian mutation operation refers to: randomly selecting two different part numbers to be cut in the individual, and reversing the sequence of part numbers to be cut between the two part numbers to be cut, and the sequence of feature points corresponding to this sequence of part numbers to be cut will also change accordingly.

[0020] In a preferred embodiment, in step S3, the specific implementation process of the algorithm is:

[0021] 1) Calculate the fitness value of each individual in the tth generation, where the fitness function is:

[0022]

[0023] Among them, f(X a ) represents individual X a The fitness value of Representative feature points and feature points The length of the path between them; the individual with the smallest fitness is the optimal individual;

[0024] 2) Calculate the number of explosion sparks and explosion radius of each individual in the tth generation. The formula is as follows:

[0025]

[0026]

[0027] Where R a Represents individual X a The number of explosion sparks, D a represents individual X a The explosion radius refers to the number of explosions required for an individual to generate an explosion spark; R and D are the preset number of explosion sparks and explosion radius; f max is the maximum fitness value in the population, f min is the minimum fitness value in the population; ε is an arbitrarily small value;

[0028] 3) Each individual performs an explosion operation to generate explosion sparks. The specific process is as follows: Individual X a Explosion D a Produce an explosion spark, then repeat R a times, total explosion (D a ×R a ) times, generating R a explosion sparks; each individual needs to perform this step, generating An explosion spark;

[0029] 4) Calculate the Gaussian variance of each individual in the tth generation using the following formula:

[0030] g a =min(1,[|e|])

[0031] Among them, g a Is individual X a The Gaussian variation number refers to the number of Gaussian variations of an individual to generate a Gaussian variation spark, e~N(1,1), N(1,1) is a Gaussian distribution with a mean and variance of 1;

[0032] 5) Each individual undergoes Gaussian mutation to generate Gaussian sparks. The specific process is as follows: Individual X a Gaussian mutation g a A Gaussian spark is generated, and then repeated GM times, a total of explosions (g a ×GM) times, generating GM Gaussian sparks; each individual needs to perform this step, generating a total of (GM×N) Gaussian sparks, where GM is the preset number of Gaussian sparks;

[0033] 6) Select the population. The specific operation method is as follows: select one best individual from the t-th generation fireworks population, explosion sparks, and Gaussian sparks as an individual in the t+1-th generation fireworks population, and the remaining N-1 fireworks individuals are selected according to the roulette method; the current number of iterations is increased by 1, that is, t=t+1;

[0034] 7) The population is continuously updated in the above manner until the current number of iterations reaches the maximum number of iterations, and the optimal individual is output.

[0035] In a preferred embodiment, in step S4, the method of obtaining the optimal cutting path is as follows:

[0036] The code of each individual is an arrangement consisting of the part cutting order and the part entry point, so the way to obtain the optimal cutting path is to decode the optimal individual in the population; the decoding process is to decompose the individual code, the first half of the code represents the numbering order of the tool cutting the parts, and the second half of the code represents the entry point when the tool cuts into the part. By connecting these entry points, the optimal cutting path can be obtained.

[0037] Compared with the prior art, the present invention has the following beneficial effects: a better cutting scheme can be obtained quickly and effectively. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 The algorithm flow chart of the preferred embodiment of the present invention;

[0039] Figure 2 It is a diagram of explosion operation in the algorithm of the preferred embodiment of the present invention;

[0040] Figure 3 This is a diagram of the variation operation in the algorithm of the preferred embodiment of the present invention. DETAILED DESCRIPTION

[0041] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0042] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0043] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.

[0044] A method for optimizing the cutting path of special-shaped sponge based on fireworks algorithm, reference Figure 1 , the specific installation steps are as follows:

[0045] Step S1, numbering the parts to be cut on the layout diagram, extracting the characteristic points of the parts to be cut and numbering them in clockwise order;

[0046] Step S2, using the numbers and feature points of the parts to be cut to initialize the parameters of the fireworks algorithm to generate an initial population;

[0047] Step S3, using the fireworks algorithm to optimize the cutting path;

[0048] Step S4, obtaining the optimal cutting path.

[0049] In step S1, the method for extracting feature points is as follows: for polygons, their vertices are used as their feature points; for circles and arcs, a discretization method is used to discretize the arcs into k line segments, and the vertices of the polygons are used as their feature points, where k varies according to the size of the circumference or side length of the circle and the arc; for ellipses, the intersection of the major semi-axis, the minor semi-axis and the ellipse is used as its feature point.

[0050] The specific implementation process of numbering the parts to be cut and the feature points is as follows:

[0051] Assume there are n parts to be cut, and each part is assigned a number C1,…,C i ,…,C n If the part to be cut is C i The number of feature points is L i , then the part to be cut C i The feature points are numbered in clockwise order.

[0052] The specific implementation process of generating the initial population is as follows:

[0053] 1) Sort the numbers of the parts to be cut in any order to form a set of codes [C1,…,C i ,…,C n ].

[0054] 2) Select any feature point from C1 Then select a feature point from the next part to be cut Select feature points from the next part to be cut according to the coding order until all parts to be cut have a feature point selected. After the operation is completed, a feature point code will be formed. in Refers to part number C i The kth part to be cut i feature points, Refers to the number C i The number of feature points of the part to be cut. The above two codes are combined to form the following code

[0055] 3) Repeat step 2) N times to form N groups of codes, which are described as Each group of codes is regarded as an individual in the initial population of the algorithm. The individual codes of the population are shown in Table 1, where the code composed of the part numbers to be cut is called the first half code, and the code composed of the feature point numbers is called the second half code. At this time, the current iteration number of the algorithm is set to t=1.

[0056] Table 1:

[0057]

[0058]

[0059] In Table 1:

[0060] N represents the population size,

[0061] C ai : refers to the number of the i-th part to be cut in the a-th individual,

[0062] Refers to part number C ai The kth part to be cut i feature points, Refers to number C ai The number of feature points of the part to be cut.

[0063] The optimization process of the algorithm is described as:

[0064] The fireworks algorithm includes the following operations: initialization operation, explosion operation, Gaussian mutation operation and selection operation; the final optimization goal of the algorithm is to reduce the length of the tool's idle stroke in the cutting path, that is, the smaller the fitness value of the individual in the population, the better.

[0065] The explosion operation refers to: randomly selecting a part number to be cut from the individual, and then randomly inserting it into another position in the first half of the individual code, and the position of the feature point corresponding to the part number to be cut will also change accordingly. The Gaussian mutation operation refers to: randomly selecting two different part numbers to be cut from the individual, and reversing the sequence of the part numbers to be cut between these two part numbers to be cut (including these two part numbers to be cut), and the sequence of the feature points corresponding to this part number sequence to be cut will also change accordingly.

[0066] 1) Calculate the fitness value of each individual in the tth generation, where the fitness function is:

[0067]

[0068] Among them, f(X a ) represents individual X a The fitness value of Representative feature points and feature points The length of the path between them; the individual with the smallest fitness is the optimal individual.

[0069] 2) Calculate the number of explosion sparks and explosion radius of each individual in the tth generation. The formula is as follows:

[0070]

[0071]

[0072] Where R a Represents individual X a The number of explosion sparks, D a represents individual X a The explosion radius refers to the number of explosions required for an individual to generate an explosion spark; R and D are the preset number of explosion sparks and explosion radius; f max is the maximum fitness value in the population, f min is the minimum fitness value in the population; ε is an arbitrarily small value.

[0073] 3) Each individual performs an explosion operation to generate explosion sparks. The specific process is as follows: Individual X a Explosion D a Produce an explosion spark, then repeat R a times, total explosion (D a ×R a ) times, generating R a explosion sparks; each individual needs to perform this step, generating An explosion of sparks.

[0074] 4) Calculate the Gaussian variance of each individual in the tth generation using the following formula:

[0075] g a =min (1,[|e|])

[0076] Among them, g a Is individual X a The Gaussian variation number refers to the number of Gaussian variations required for an individual to generate a Gaussian variation spark, e~N(1,1), N(1,1) is a Gaussian distribution with a mean and variance of 1.

[0077] 5) Each individual undergoes Gaussian mutation to generate Gaussian sparks. The specific process is as follows: Individual X a Gaussian mutation g a A Gaussian spark is generated, and then repeated GM times, a total of explosions (g a ×GM) times, GM Gaussian sparks are generated. Each individual needs to perform this step, and a total of (GM×N) Gaussian sparks are generated, where GM is the preset number of Gaussian sparks.

[0078] 6) Select the population. The specific operation is as follows: select the best individual from the t-th generation fireworks population, explosion sparks, and Gaussian sparks as an individual in the t+1-th generation fireworks population, and the remaining N-1 fireworks individuals are selected according to the roulette method. The current iteration number is increased by 1, that is, t=t+1.

[0079] 7) The population is continuously updated in the above manner until the current number of iterations reaches the maximum number of iterations, and the optimal individual is output.

[0080] The method to obtain the optimal cutting path is as follows:

[0081] The code of each individual is an arrangement of the parts cutting order and the parts entry point, so the way to obtain the optimal cutting path is to decode the best individual in the population. The decoding process is to decompose the individual code. The first half of the code represents the numbering order of the tool cutting the parts, and the second half of the code represents the entry point when the tool cuts into the part. Connecting these entry points can obtain the optimal cutting path.

[0082] Example

[0083] There are three parts to be cut on the layout diagram. Feature points are extracted and numbered. The specific details of the parts to be cut are shown in Table 2.

[0084] Table 2:

[0085]

[0086] First, an initial population with an initial population size of N = 50 is established, the number of iterations is set to 100, and the number of Gaussian mutation sparks GM = 1. The individual codes of the initial population are shown in Table 3

[0087] Table 3:

[0088]

[0089]

[0090] Secondly, the fitness value of each individual is calculated, and the number of explosion sparks, explosion radius and Gaussian mutation of each individual are calculated again. Then each individual performs explosion operation and Gaussian mutation operation to obtain explosion sparks and Gaussian sparks. The specific operation of individual X1 is as follows: Figure 2 and 3 shown.

[0091] The steps for individual X1 to generate explosion sparks are: individual X1 inserts the first digit of the part number to be cut between the second and third digits, and the fourth digit of the feature point number is also inserted between the fifth and sixth digits. At this time, the first explosion is completed and the second explosion begins; in the second explosion, individual X1 inserts the second digit of the part number to be cut after the third digit, and the fifth digit of the feature point number is also inserted after the sixth digit. At this time, the second explosion is completed. The code at this time is an explosion spark of individual X1. Since the number of explosion sparks of X1 is 1, the explosion operation of X1 is completed.

[0092] The steps for individual X1 to generate a Gaussian mutation spark are as follows: individual X1 reverses the sequence of part numbers to be cut between the first and third digits, and also reverses the sequence of part numbers to be cut between the fourth and sixth digits. At this time, the first Gaussian mutation is completed and the second Gaussian mutation begins; in the second Gaussian mutation, individual X1 reverses the sequence of part numbers to be cut between the first and second digits, and also reverses the sequence of part numbers to be cut between the fourth and fifth digits. At this time, the second Gaussian mutation is completed, and the encoding at this time is a Gaussian mutation spark of individual X1. Since the number of Gaussian sparks of X1 is 1, the Gaussian mutation operation of X1 is completed.

[0093] After the explosion and Gaussian mutation of all individuals are completed, the next generation of population is selected. The population is continuously updated through the above method until the iteration termination condition is met and the optimal individual is output.

[0094] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions do not exceed the scope of the technical solution of the present invention, belong to the protection scope of the present invention.

Claims

1. A method for optimizing the cutting path of special-shaped sponges based on a fireworks algorithm, characterized in that: The steps include: Step S1, numbering the parts to be cut on the layout diagram, extracting the characteristic points of the parts to be cut and numbering them in clockwise order; Step S2, using the numbers and feature points of the parts to be cut to initialize the parameters of the fireworks algorithm to generate an initial population; Step S3, using the fireworks algorithm to optimize the cutting path; Step S4, obtaining the optimal cutting path; In step S1, the specific implementation process of numbering the parts to be cut and the feature points is as follows: Assume there are n parts to be cut, and each part is assigned a number C1,…,C i ,…,C n ; Parts to be cut C i The number of feature points is L i , i∈{1,n}; In step S2, the specific implementation process of generating the initial population is as follows: 1) Sort the numbers of the parts to be cut in any order to form a set of codes [C1,…,C i ,…,C n ]; 2) Select any feature point from C1 Then select a feature point from the next part to be cut Select feature points from the next part to be cut according to the coding order until all parts to be cut have a feature point selected. After the operation is completed, a feature point code will be formed. in Refers to part number C i The kth part to be cut i feature points, Refers to the number C i The number of feature points of the part to be cut; the above two codes are combined to form the following code 3) Repeat step 2) N times to form N groups of codes, which are described as Each group of codes is regarded as an individual in the initial population of the algorithm, in which the code composed of the part numbers to be cut is called the first half code, and the code composed of the feature point numbers is called the second half code; at this time, the current iteration number of the algorithm is set to t = 1; In step S3, the optimization process of the algorithm is described as follows: The fireworks algorithm includes the following operations: initialization operation, explosion operation, Gaussian mutation operation and selection operation; the final optimization goal of the algorithm is to reduce the length of the tool's empty stroke in the cutting path, that is, the smaller the fitness value of the individual in the population, the better; The explosion operation refers to: randomly selecting a part number to be cut from the individual, and then randomly inserting it into another position in the first half of the individual code, and the position of the feature point corresponding to the part number to be cut will also change accordingly; the Gaussian mutation operation refers to: randomly selecting two different part numbers to be cut from the individual, and reversing the sequence of part numbers to be cut between the two part numbers to be cut, and the sequence of feature points corresponding to this part number sequence to be cut will also change accordingly; In step S3, the specific implementation process of the algorithm is: 1) Calculate the fitness value of each individual in the tth generation, where the fitness function is: Among them, f(X a ) represents individual X a The fitness value of Representative feature points and feature points The length of the path between them; the individual with the smallest fitness is the optimal individual; 2) Calculate the number of explosion sparks and explosion radius of each individual in the tth generation. The formula is as follows: Where R a Represents individual X a The number of explosion sparks, D a represents individual X a The explosion radius refers to the number of explosions required for an individual to generate an explosion spark; R and D are the preset number of explosion sparks and explosion radius; f max is the maximum fitness value in the population, f min is the minimum fitness value in the population; ε is an arbitrarily small value; 3) Each individual performs an explosion operation to generate explosion sparks. The specific process is as follows: Individual X a Explosion D a Produce an explosion spark, then repeat R a times, total explosion (D a ×R a ) times, generating R a explosion sparks; each individual needs to perform this step, generating An explosion spark; 4) Calculate the Gaussian variance of each individual in the tth generation using the following formula: g a =min(1,[|e|]) Among them, g a Is individual X a The Gaussian variation number refers to the number of Gaussian variations of an individual to generate a Gaussian variation spark, e~N(1,1), N(1,1) is a Gaussian distribution with a mean and variance of 1; 5) Each individual undergoes Gaussian mutation to generate Gaussian sparks. The specific process is as follows: Individual X a Gaussian mutation g a A Gaussian spark is generated, and then repeated GM times, a total of explosions (g a ×GM) times, generating GM Gaussian sparks; each individual needs to perform this step, generating a total of (GM×N) Gaussian sparks, where GM is the preset number of Gaussian sparks; 6) Select the population. The specific operation method is as follows: select one best individual from the t-th generation fireworks population, explosion sparks, and Gaussian sparks as an individual in the t+1-th generation fireworks population, and the remaining N-1 fireworks individuals are selected according to the roulette method; the current number of iterations is increased by 1, that is, t=t+1; 7) The population is continuously updated through the above method until the current number of iterations reaches the maximum number of iterations, and the optimal individual is output; In step S4, the method of obtaining the optimal cutting path is as follows: The code of each individual is an arrangement of the parts cutting order and the parts entry point, so the way to obtain the optimal cutting path is to decode the best individual in the population; the decoding process is to decompose the individual code, the first half of the code represents the numbering order of the tool cutting the parts, and the second half of the code represents the entry point when the tool cuts into the part. Connecting these entry points can obtain the optimal cutting path; N represents the population size; C ai : refers to the number of the i-th part to be cut in the a-th individual, Refers to part number C ai The kth part to be cut i feature points, Refers to number C ai The number of feature points of the part to be cut.

2. The method for optimizing the cutting path of special-shaped sponges based on the fireworks algorithm according to claim 1, characterized in that: In step S1, the method of extracting feature points is: for a polygon, its vertices are used as its feature points; For circles and arcs, a discretization method is used to discretize the arcs into polygons composed of k line segments, and the vertices of the polygons are used as their feature points, where k varies according to the circumference or side length of the circle and arc. For ellipses, the intersection points of the major semi-axis, minor semi-axis and the ellipse are used as their feature points.

Citation Information

Patent Citations

  • Method, device, storage medium and computer device for planning laser cutting path

    CN108857092A

  • Robot welding path planning method based on firework particle swarm optimization algorithm

    CN109542103A