Raw material cutting method, system, and storage medium
By optimizing the raw material cutting process using an improved artificial bee colony algorithm, the problems of material waste and low material discharge efficiency in raw material cutting are solved, thereby improving resource utilization and production efficiency and reducing production costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENYANG JIANZHU UNIVERSITY
- Filing Date
- 2026-06-24
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies suffer from material waste, low material routing efficiency, and high production costs during raw material cutting. Especially when faced with complex and ever-changing order demands, optimizing the material routing process and improving resource utilization have become the core issues for improving production efficiency and reducing costs.
An improved artificial bee colony algorithm is used to optimize the material layout of the raw materials to be cut. By acquiring the information of the raw materials to be cut, the sequence of target parts, and the remaining material threshold, the algorithm utilizes the stages of hired bees, follower bees, and scout bees in the artificial bee colony algorithm to iteratively optimize the optimal continuous encoding vector, determine the optimal material layout order, and instruct the feeding and cutting equipment to perform cutting through the processor.
It improved the utilization rate of raw materials, reduced surplus and waste, enhanced the material utilization rate of the material scheduling scheme, achieved consistency between the material scheduling results and the existing process flow, and simplified the execution of the production scheduling system.
Smart Images

Figure CN122431257A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of material cutting, and more specifically to a raw material cutting method, system, and storage medium. Background Technology
[0002] Industries such as pipe manufacturing and boiler manufacturing all involve raw material cutting during the production process. Taking pipe fittings as an example, raw material cutting involves cutting the raw material into pipe fittings of the target length. Typically, the raw material to be cut has multiple initial lengths, and the target length after cutting also has multiple values. To reduce waste during the raw material cutting process, the order of pipe fittings of different target lengths is usually determined before cutting, and the raw materials of multiple initial lengths are arranged accordingly.
[0003] The raw material layout process directly impacts resource utilization, production efficiency, and cost control. Currently, layout relies heavily on manual labor, leading to material waste and low efficiency, resulting in long production cycles and high costs. Especially when facing complex and ever-changing order demands, optimizing the layout process, achieving efficient cutting, and improving resource utilization have become core issues for enhancing production efficiency and reducing costs. Summary of the Invention
[0004] This application provides a raw material cutting method, system, and storage medium, which can reduce waste during the raw material cutting process and improve the utilization rate of raw materials.
[0005] In a first aspect, embodiments of this application provide a raw material cutting method, the method comprising: acquiring a set of raw material information to be cut, a target part sequence, and a residual material threshold, wherein the number of elements in the raw material information set is M, and M is a positive integer; and iteratively optimizing the optimal continuous coding vector using an artificial bee colony algorithm based on the raw material information set, the target part sequence, and the residual material threshold to obtain the raw material arrangement order, wherein the optimal continuous coding vector is derived from the first continuous coding vector. Up to the fourth consecutive encoding vector As determined in, where 1≤ ≤W, W is a positive integer; the raw materials to be cut are cut according to the material arrangement order; wherein, the artificial bee colony algorithm includes: using the first continuous encoding vector and the first continuous encoding vector The neighborhood of the bee is used to obtain the second continuous encoding vector for the bee-employing stage. According to the second continuous encoding vector and each of the second consecutive encoded vectors The fitness and selection probability are used to obtain the third continuous encoding vector of the following bee stage. ; wherein, the second continuous encoding vector The fitness is determined based on the material utilization rate of the corresponding candidate material layout scheme, and the fitness is positively correlated with the material utilization rate; second continuous encoding vector The selection probability is determined based on the corresponding fitness, and the selection probability is positively correlated with the fitness; the third continuous encoding vector As the first continuous encoding vector in the next iteration ; Calculate the fourth consecutive encoding vector for the scout bee phase when the trial-and-error count exceeds the counting threshold. And the fourth continuous encoding vector As the first continuous encoding vector in the next iteration Output the material arrangement order of the raw materials to be cut corresponding to the current optimal continuous encoding vector.
[0006] In some implementations, the second continuous coding vector The value of Through the first continuous encoding vector The first continuous encoding vector The first consecutive encoded vector among multiple neighborhood vectors The value of the first continuous encoding vector The optimal first continuous encoding vector among the plurality of neighborhood vectors The value of , excluding the first continuous encoding vector Two random first consecutive encoding vectors outside , The value of is determined, where i、 i、1≤ ≤W、1≤ ≤W、E1 E2 i.
[0007] In some implementations, the value of the second continuous coding vector is... It is determined by the following formula:
[0008] Where 1≤j≤S, S≥M, and j and S are positive integers. Represents the i-th first continuous encoding vector The value of the first consecutive encoded vector among multiple neighborhood vectors. Represents the i-th first continuous encoding vector The neighborhood index, , express The size of the neighborhood, This represents the minimum size of the neighborhood. This represents the maximum value of the neighborhood size. It is a positive integer. , ∈ [-1,1], ∈ [0, C], where C is a constant. Represents the i-th first continuous encoding vector Among the neighborhood vectors, the optimal value of the first continuous encoding vector is... and This indicates that the first consecutive encoded vector excluding the i-th one The values of two random first consecutive encoding vectors outside.
[0009] In some implementations, the second continuous encoding vector of the acquired bee stage is obtained. Previously included: The current state is determined by whether improvements were achieved in the previous iteration; Based on the current state and the Q-table, the updated neighborhood size is obtained; The second continuous encoding vector of the acquired bee stage is obtained. This also includes: According to the second continuous coding vector And the second continuous encoding vector obtained in the previous round Update the reward value and determine the new current state; Determine the second continuous encoding vector based on the Q-learning formula. The corresponding Q table.
[0010] In some implementations, the Q-learning formula is:
[0011] in, , Represents the Q-learning parameters. Indicates the learning rate. Indicates the discount factor. Represents the first in table Q Next state. This represents the action to be performed in the t-th state of table Q. This represents the Q-value corresponding to the t-th state-action sequence, where t is a positive integer. This represents the reward value. To compare the second consecutive encoded vector The objective function value and the first continuous encoding vector The state after the objective function value, corresponding to the maximum Q value. Represents the first in table Q Sub-state.
[0012] In some implementations, the follower bee phase includes: converting the second consecutive encoded vector... The raw material layout sequence is decoded according to a preset interval mapping rule; the total length of the raw materials and the total length of the parts in the raw material layout sequence are calculated; the material utilization rate, objective function, and fitness of the raw material layout sequence are obtained based on the total length of the raw materials and the total length of the parts; and the second continuous encoding vector corresponding to the raw material layout sequence is determined based on the fitness. The selection probability; based on the selection probability, determine the selected second continuous encoding vector. According to the selected second continuous encoding vector Determine the third continuous encoding vector obtained during the bee-following phase. .
[0013] In some implementations, the preset interval mapping rule is implemented as follows: when the value of the second continuous coding vector falls into the Fth sub-interval, the material discharge position of the value of the second continuous coding vector is determined to correspond to the Fth type of raw material; wherein, the interval in which the value of the second continuous coding vector is located is divided into F sub-intervals, and F is the number of types of raw materials to be cut.
[0014] In some embodiments, the step of cutting the raw materials according to the feeding sequence includes: the processor instructing the feeding device to feed the materials to be cut according to the feeding sequence; and the processor instructing the cutting device to cut the raw materials after feeding.
[0015] In a second aspect, a raw material cutting system is provided, comprising a processor, a feeding device, and a cutting device. The processor is configured to execute the method described in any one of the first aspects above, the feeding device is configured to feed the material to be cut according to the instructions of the processor, and the cutting device is configured to cut the material to be cut according to the instructions of the processor.
[0016] Thirdly, a computer-readable storage medium includes instructions that, when executed on a computer, cause the computer to perform the method described in any of the first aspects above.
[0017] Fourthly, embodiments of this application provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.
[0018] Fifthly, embodiments of this application provide a chip including a processor coupled to a transceiver for executing the technical solution provided in the first aspect of this application. In one possible design, the chip can also be a dedicated hardware structure for implementing the technical solution provided in the first aspect above; for example, processing involving neural network models can be implemented by a dedicated neural network processor or a graphics processor.
[0019] In a sixth aspect, embodiments of this application provide a chip system including a processor for implementing the functions involved in the first aspect above, such as generating or processing information involved in the method provided in the first aspect above.
[0020] In one possible design, the aforementioned chip system further includes a memory connected to the processor via a circuit structure. This memory stores program instructions and data necessary for the terminal. The chip system can be composed of a single chip or may include chips and other discrete devices. Further optionally, the chip also includes a communication interface to which the processor connects. The communication interface receives data and / or information that needs to be processed. The processor obtains the data and / or information from the communication interface, processes the data and / or information, and outputs the processing result through the communication interface. This communication interface can be an input / output interface.
[0021] In a seventh aspect, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the method provided in the first aspect described above.
[0022] Compared to existing technologies, this application employs an improved artificial bee colony algorithm for material routing. Compared to existing technologies, this application, under the condition of a fixed part processing sequence, optimizes the material routing sequence to achieve consistency between the routing result and the existing process flow, thus improving the feasibility of the solution. The output of this application is a directly executable material start-up sequence scheme, which is easy to embed into existing cutting and scheduling systems. Furthermore, by optimizing the execution process of the artificial bee colony algorithm based on material utilization, the material utilization rate of the routing scheme is improved, and excess material and waste are reduced, demonstrating strong engineering application value. Attached Figure Description
[0023] The objectives, features, and advantages of the embodiments of this application will become readily understood by referring to the accompanying drawings and the detailed description of the embodiments. Wherein: Figure 1 This is a flowchart illustrating the existing artificial bee colony algorithm. Figure 2 This is a schematic diagram of the raw material cutting system according to an embodiment of this application; Figure 3This is a schematic flowchart of the raw material cutting method according to an embodiment of this application; Reference numerals: processor 100, feeding device 200, cutting device 300, raw material to be cut 400.
[0024] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation
[0025] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects (e.g., the first and second consecutive encoding vectors are represented as different consecutive encoding vectors, and so on), and are not necessarily used to describe a specific order or sequence. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed steps or modules, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The module divisions appearing in the embodiments of this application are merely logical divisions; in actual applications, there may be other division methods. For example, multiple modules may be combined into or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings between modules; and communication connections may be electrical or other similar forms, none of which are limited in the embodiments of this application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed among multiple circuit modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of this application.
[0026] The solution provided in this application relates to an artificial bee colony algorithm. This embodiment uses an improved artificial bee colony algorithm for material handling, which is an improvement upon the basic artificial bee colony algorithm. The basic artificial bee colony algorithm can be used to find the optimal solution to complex mathematical functions, but it has the following drawbacks: it is prone to getting trapped in local optima and the accuracy of the solution is insufficient. The basic artificial bee colony algorithm is described below: Reference Figure 1 The basic artificial bee colony algorithm mainly includes the following steps S1 to S4, and S2 to S4 are executed repeatedly until the termination condition is met. At the end of the run, the optimal solution (i.e., the optimal continuous encoding vector) is output.
[0027] S1. Initialization Phase: Randomly generate candidate solution values. ,in, The values are for the continuous encoding vector. Refer to Formula 1. This means generating a random number between 0 and 1. This represents the upper bound of the values of a continuous coding vector. The lower bound of the values of the continuous encoding vector is represented by SN. The total number of candidate solutions is represented by SN, which can be manually given, such as 50, 100, etc., and 1≤i≤SN.
[0028] Formula 1 S2, Hired Bee Phase: Search for intermediate solutions according to Formula 2. , This represents the value of the newly generated continuous encoding vector during the bee-employing phase. , This represents the value of the k-th consecutive encoded vector (excluding the current consecutive encoded vector) in an existing set of consecutive encoded vectors, where 1 ≤ k ≤ SN, k .
[0029] Formula 2 The values of the continuous encoded vectors generated during the bee-employment stage Then, a new continuous encoding vector is obtained. and the continuous encoding vector obtained during the initialization phase If a comparison is made, The objective function value is better than The objective function value will then be As a continuous encoded vector of the output of the mercenary bee stage Continue with the follow-the-bee phase; if The objective function value is not better than The objective function value will then be The values of the continuous encoded vector output as a worker bee phase Continue with the follow-the-bee phase.
[0030] S3, Follower Bee Phase: Continuous encoding vectors output by all mercenary bee phases in the current round are generated using formulas 3 and 4. Calculate fitness and selection probability, then based on all The probability distribution selects a continuous encoding vector obtained in the hired bee stage. , the vector The value of for Substitute into Formula 2 and continue calculating the results obtained during the following bee stage. And thus obtain new .in, This represents the fitness value under the current solution, used to evaluate the current solution. Representing the solution The corresponding objective function value, This indicates the probability that the current option will be selected.
[0031] Formula 3 Formula 4 During the bee-following phase, a new continuous encoding vector is obtained. Afterwards, the continuous encoded vectors output by the hired bee stage. Comparison, if the new The objective function value is better than The objective function value will then be the new As a continuous encoded vector of the follower bee phase output Continue with the next steps, namely, determining whether the trial count of any consecutive encoded vectors exceeds the counting threshold; if a new... The objective function value is not better than The objective function value will then be As a continuous encoded vector output during the follower bee phase, and the value of this vector is... Continue with the next steps.
[0032] Each execution of the hired bee phase involves counting the trial and error attempts. If the value of the continuous encoded vector output in that phase is... No updates, meaning that this phase generated... The objective function value is not better than the value obtained during the initialization phase. If the objective function value is positive, the trial count is incremented by one; if the value of the continuous encoding vector output in this stage is negative... Update, that is, the generation in this stage The value of the objective function is better than that obtained during the initialization phase. If the objective function value is zero, the trial count is reset to zero. Similarly, if the trial count is counted each time the follower bee phase is executed, and the value of the continuous encoding vector output in that phase is zero, then the trial count is reset to zero. No updates, meaning that new data generated during this phase... The objective function value is not better than the output of the hired bee phase. If the objective function value is positive, the trial count is incremented by one; if the value of the continuous encoding vector output in this stage is negative... Update, that is, the generation in this stage The objective function value is better than that obtained in the hired bee phase. If the objective function value is zeroed, the trial count is reset to zero.
[0033] For a continuous encoded vector obtained in the initialization phase The trial counts during the follower bee phase and the hired bee phase are accumulated. If the trial count exceeds the counting threshold, the scout bee phase is executed; otherwise, if the trial count does not exceed the threshold, the current optimal solution is updated and recorded, and then the next round of iteration is executed or the optimal solution is output according to the termination condition.
[0034] In each new iteration, if the previous iteration did not include a scout bee phase, the hired bee phase searches for intermediate solutions according to Formula 2. At that time, it will follow the output of the bee. As If the previous round included a scout bee phase, then the mercenary bee phase searches for intermediate solutions according to Formula 2. At that time, the output of the reconnaissance bee phase will be... As .
[0035] S4, Scout Bee Phase: When the solution remains unchanged for a long time, the scout bee is triggered to regenerate a new continuous encoding vector according to Formula 1. This vector is used as the continuous encoding vector output by the reconnaissance bee phase. The value is ; This application provides a raw material cutting method, system, and storage medium. The raw material cutting method can be applied to a raw material cutting system for cutting raw materials. (Refer to...) Figure 2 The raw material cutting system may include a processor 100, a feeding device 200, and a cutting device 300. The processor can execute the raw material cutting method, discharge materials using an artificial bee colony algorithm, instruct the feeding device to feed the materials, and instruct the cutting device to cut the discharged raw material 400. The feeding device can feed the material to be cut according to the processor's instructions, and the cutting device can cut the material according to the processor's instructions.
[0036] The processor in this application embodiment may include multiple storage units for calling computer programs or computer instructions stored in the memory to cause the processor to execute the methods of any of the above embodiments. For example, in this application embodiment, the processor is an integrated circuit chip with signal processing capabilities. For instance, the processor may be an FPGA, a general-purpose processor, a DSP, an ASIC, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, a SoC, a CPU, a network processor (NP), a microcontroller unit (MCU), a PLD, or other integrated chips, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0037] Reference Figure 3 ,Figure 3 This is a flowchart illustrating a raw material cutting method provided in an embodiment of this application. The method can be executed by a processor in a raw material cutting system. It can use the improved artificial bee colony algorithm described below to sort the cutting order of raw materials of various lengths and then cut the sorted materials.
[0038] The raw material cutting method in this application includes steps 101 to 103: Step 101: Obtain the set of raw material information R to be cut, the target part sequence Q, and the residual material threshold T.
[0039] Where R can be represented as R = { , , ..., , ..., }, 1≤k≤M, where M represents the number of raw materials to be cut in the set of raw material information. Let Q represent the k-th raw material to be cut, where k and M are positive integers. Q can be expressed as Q = ( , , ..., , ..., ), 1≤u≤N, where N represents the number of target parts, This represents the u-th target part, where u and N are positive integers. The leftover material threshold is used to compare with the length of the remaining material after cutting the raw material to determine whether the remaining material is leftover material. If the length of the remaining material is greater than the leftover material threshold, then the remaining material is leftover material; otherwise, the remaining material is scrap and not leftover material.
[0040] In some embodiments, the length of each target part is different.
[0041] Step 102: Based on the set of raw material information R to be cut, the target part sequence Q, and the remaining material threshold T, the optimal continuous encoding vector is iteratively optimized using the artificial bee colony algorithm to obtain the material arrangement order of the raw materials to be cut.
[0042] Among them, the optimal continuous coding vector From the first continuous encoding vector Up to the fourth consecutive encoding vector As determined in the equation, 1≤i≤W. = ( , , ..., ), It can be represented as = ( , ,..., ), 1≤ ≤5, W equals the candidate solution (i.e., the candidate continuous encoding vector) in the artificial bee colony algorithm. The total number of ), such as 50, 100, etc., where i and W are positive integers, 0 ≤ ≤1, 1≤j≤M, 1≤M≤S. No. Wei indicates the order in which raw materials are cut. There are several schemes, where the j-th dimension represents the sequence number of the j-th raw material to be cut. Indicates the first The j-th value of the i-th consecutive encoded vector in a consecutive encoded vector, M represents exist Dimension of direction M are positive integers.
[0043] The optimal continuous coding vector can be determined by the objective function of each continuous coding vector; the smaller the objective function value, the better the continuous coding vector. For example, if the continuous coding vector... The objective function is less than the continuous encoding vector The objective function is then Compare excellent.
[0044] In some embodiments, after obtaining the objective function value of the continuous coding vector at each stage, it is compared with the existing optimal continuous coding vector objective function value. If the new continuous coding vector is better than the existing optimal continuous coding vector objective function value, then the new continuous coding vector is taken as the optimal continuous coding vector; otherwise, the optimal continuous coding vector remains unchanged. A smaller objective function value indicates a better continuous coding vector.
[0045] It is understood that, in the embodiments of this application, the optimal continuous coding vector can be any of the continuous coding vectors obtained at the current time (after one or more rounds of computation). The continuous encoding vector with the minimum objective function value Alternatively, it can be the G consecutive encoded vectors with the smallest objective function value. In the given information, one is randomly selected, where G is a positive integer.
[0046] The improved artificial bee colony algorithm of this application includes steps 201 to 205, iteratively executing steps 202 to 204 until a preset condition is met, at which point step 205 is executed. In this application embodiment, each execution of steps 202 to 204 can be referred to as a round, as the previous round (or previous iteration) mentioned below indicates the previous execution of steps 202 to 204.
[0047] It is understandable that step 204 is a step with additional execution conditions. If the execution conditions of step 204 are not met after executing step 203, then step 204 will not be executed, and the next round of execution will continue.
[0048] For example, if the maximum number of iterations or the maximum number of times the objective function is used is reached, then the preset condition is met.
[0049] For example, reaching the maximum number of iterations means that the number of times the hired bee phase is executed is greater than or equal to a preset number. Even more exemplarily, reaching the maximum number of iterations means that the number of times the scout bee phase is executed is greater than or equal to a preset number.
[0050] Step 201, Initialization Phase: Randomly generate the fifth consecutive encoding vector. .
[0051] Refer to Formula 5 to randomly generate the values of continuous encoding vectors. .
[0052] Formula 5 in, = ( , , ..., ), This means generating a random number between 0 and 1. This represents the upper bound of the values of a continuous coding vector. It represents the lower bound of the values of a continuous encoding vector.
[0053] For example, if M=4, then , , , The four values are the continuous encoding vectors corresponding to the sequence scheme of raw materials to be cut.
[0054] Obtained during the initialization phase After that, you can The optimal continuous encoding vector is determined in the process, for example, =3 means This is the optimal continuous encoding vector.
[0055] Step 202: Obtain the second continuous encoding vector of the hired bee stage through the hired bee stage. .
[0056] Step 202 can be implemented as step 2021.
[0057] Step 2021, using the first continuous encoding vector and the first continuous encoding vector The neighborhood of the second continuous encoding vector is obtained. .
[0058] For example, the second continuous encoding vector Through the first continuous encoding vector The first continuous encoding vector The first consecutive encoded vector among multiple neighborhood vectors The value of the first continuous encoding vector The optimal first continuous encoding vector among multiple neighborhood vectors The value of , excluding the first continuous encoding vector Two random first continuous encoding vectors outside , The value of is determined, where i、 i、1≤ ≤W、1≤ ≤W、E1 E2 i.
[0059] The value of the second continuous encoding vector generated during the hired bee stage is obtained by referring to Formula 6. , in the formula As Thus obtain .
[0060] Formula 6 Where 1≤j=M, S≥M, and j and S are positive integers. This represents the value of a random first consecutive encoded vector among multiple neighboring vectors of the i-th first consecutive encoded vector. This represents the neighborhood index of the i-th first consecutive encoded vector. , express The size of the neighborhood, This represents the minimum size of the neighborhood. This represents the maximum value of the neighborhood size. It is a positive integer. , ∈ [-1,1], ∈ [0, C], where C is a constant. Let represent the value of the optimal first consecutive encoded vector among the i-th first consecutive encoded vector and its neighborhood vectors. and This represents the values of two random first consecutive encoded vectors other than the i-th first consecutive encoded vector.
[0061] During the first execution of step 2021, the first continuous encoding vector The implementation is a continuous encoding vector generated during the initialization phase. ; in each subsequent execution of step 2021, the first continuous encoded vector The implementation is the third consecutive encoding vector obtained from the previous round of bee following. Or the fourth consecutive encoded vector obtained from the previous round of reconnaissance bees. .
[0062] It is understandable that continuous encoding vectors The continuous encoding vector in the neighborhood is Neighborhood vector, The number of neighborhood vectors is called the neighborhood size. The number of neighborhood vectors is related to the neighborhood size. Within the range. For example, As At that time, the neighborhood vector is W generated during the initialization phase. In addition to In addition to the multiple fifth consecutive encoded vectors.
[0063] In some embodiments, The neighborhood vector is in W. In the process, the i-th consecutive coding vector is randomly selected from the consecutive coding vectors other than the i-th consecutive coding vector.
[0064] It is understandable that during the first execution of step 202, the first continuous encoded vector The neighborhood size is a randomly determined value. For example, the neighborhood size... It is limited to the range of 4 to 12.
[0065] In some embodiments, step 202 further includes determining the neighborhood size based on Q-learning. For example, determining the neighborhood size based on Q-learning can be implemented as steps 301 to 304. Steps 301 and 302 are included before step 2021, and steps 303 and 304 are included after step 2022.
[0066] Step 301: Determine the current state by checking whether the previous iteration yielded an improvement. .
[0067] When the previous iteration yielded an improvement (or the new solution is superior to the old solution), the current state is defined as the first state. When the previous iteration did not yield improvement (or the new solution was not better than the old solution), the current state is defined as the second state. In other words, if the objective function of the second consecutive encoded vector obtained in the previous round of the hired bee phase corresponds to the raw material feeding sequence scheme, then... f ( The value is less than the objective function of the cutting material arrangement scheme corresponding to the first continuous encoding vector in the previous round. f ( If the value is ) then the state is If the objective function value of the raw material arrangement scheme corresponding to the second consecutive encoded vector obtained in the previous round of the bee-hiring phase is not less than the objective function value of the raw material arrangement scheme corresponding to the original first consecutive encoded vector in the previous round, then the state is... .
[0068] For example, suppose there are 30 iterations and 20 consecutive encoded vectors (W=20). Each iteration includes hired bees, follower bees, or scout bees, and each iteration completely traverses these 20 consecutive encoded vectors.
[0069] For example, the value of the 6th consecutive encoded vector After the fifth iteration produces a new solution, it should be compared with the final solution left over from the fourth iteration (this solution is then regarded as the old solution).
[0070] It is understandable that when executing the artificial bee colony algorithm in step 102, if step 202 is executed for the first time, the current state is randomly generated. .
[0071] Step 302, based on the current state Combine the Q-table to obtain the updated neighborhood size.
[0072] Based on the current state Determine the Q value corresponding to the action in the current state. This Q value can be used as the formula in Formula 7 below. The action corresponding to the largest Q value is used as the action to adjust the neighborhood, resulting in the updated neighborhood size. The neighborhood adjustment actions include decreasing the neighborhood by 1, increasing the neighborhood by 1, and keeping the neighborhood unchanged.
[0073] Taking Table 1 as an example, which corresponds to the Q-table of the second consecutive encoded vector obtained in the current bee-hiding stage, when executing step 202, if the value of the objective function of the obtained second consecutive encoded vector is less than that of the objective function of the first consecutive encoded vector, then the state is... In state If the maximum value is determined to be 0.6, then the corresponding action is ns-1, which means reducing the number of neighbors by 1.
[0074] Table 1
[0075] For example, neighborhood size The neighborhood size is limited to a range of 4 to 12. This means that if the current neighborhood size is 4, and the Q-table determines that the adjustment to the neighborhood size is to decrease by 1, then in this case, the decrease in neighborhood size is not performed, and the neighborhood size remains at 4. Similarly, if the current neighborhood size is 12, and the Q-table determines that the adjustment to the neighborhood size is to increase by 1, then in this case, the increase in neighborhood size is not performed, and the neighborhood size remains at 12. Limiting the neighborhood size to a range of 4 to 12 helps prevent premature convergence of the search due to an excessively small neighborhood, and also helps prevent search divergence due to an excessively large neighborhood. This ensures that the Q-learning's adjustment of the neighborhood size always stays within the effective search range, improving the stability and search efficiency of the material layout optimization process.
[0076] Step 303, based on the value of the second continuous coding vector The value of the first continuous encoding vector Update reward values and determine the new current state. .
[0077] When the current iteration yields an improvement, the new current state is designated as the first state. If no improvement is achieved in the current iteration, the new current state is determined as the second state. According to the new current state The maximum Q value in the new current state can be determined, and this Q value can be used as the value in Formula 7 below. .
[0078] For example, if the second continuous encoding vector The corresponding objective function is less than the first continuous encoding vector. The corresponding objective function has a reward value of 1; if the second continuous encoding vector The corresponding objective function is not less than the first continuous encoding vector. The corresponding objective function would then have a reward value of 0.
[0079] Step 304: Determine the second continuous encoding vector according to the Q-learning formula. The corresponding Q table.
[0080] The Q-table has W elements, and it is used for the W second consecutive encoding vectors. to Each second consecutive encoded vector Each one is assigned a corresponding Q table.
[0081] Formula 7 is the Q-learning formula. Based on Formula 7, the new Q-learning value assessment result (or Q-value) is obtained, i.e., the state is... The action is time .
[0082] Formula 7 in, , express Learning parameters, Indicates the learning rate. Indicates the discount factor. express The t-th state in the table represents the state read from the previous round. express The action to be performed in the t-th state in the table is... This represents the state-action sequence corresponding to the t-th time. value, It is a positive integer. This represents the reward value. To compare the second consecutive encoded vector The objective function value and the first continuous encoding vector The state after the objective function value, corresponding to the maximum value, This is the current state. After a new solution is generated in this round, the action... No longer permitted.
[0083] For example, =0.6、 =0.2.
[0084] For example, Table 2 is the Q-table corresponding to Q-learning, where, to This represents the current second consecutive encoding vector. In state At that time, perform the action , , The corresponding value assessment results. to This represents the current second consecutive encoding vector. In state At that time, perform the action , , The corresponding value assessment result. ns represents the current neighborhood size.
[0085] Table 2
[0086] In some embodiments, each execution of step 304 may update the largest Q value in the current state corresponding to step 301 in the Q table.
[0087] In other embodiments, the updated neighborhood size in step 302 can be used as the known neighborhood size in the next round of employing bees. This allows the Q-table to progressively learn neighborhood adjustment actions that are more conducive to improving the material dispensing results under different states.
[0088] During the follower bee phase, the value of the second continuous encoding vector obtained during the hired bee phase is... This will be used as input.
[0089] Step 203, Follow-the-bee stage, based on the second continuous encoding vector obtained in the hired bee stage. and each second consecutive encoding vector The corresponding fitness and selection probability yield the third continuous encoding vector for the follower bee stage. .
[0090] Step 203 can be implemented as steps 2031 to 2036 below. The material utilization rate, objective function, and fitness can be determined through steps 2031 to 2033 below. The selection probability can be determined through step 2034 below.
[0091] Step 2031, the second continuous encoding vector The raw materials are decoded into the order of cutting according to the preset interval mapping rules.
[0092] For example, suppose the raw materials to be cut include F types of raw materials, each type of raw material corresponding to a certain length. The preset interval mapping rule can be implemented as follows: The interval [0, 1] is divided into F subintervals. For example, if F=3, the value ranges of the 1st to 3rd subintervals are [0, 0.2], (0.2, 0.6], and (0.6, 1], respectively. When the material falls into the Fth sub-interval, the j-th discharge position is determined to correspond to the F-th type of raw material. Therefore, the second continuous encoding vector is... This transforms the sequence into a discrete arrangement of raw materials to be cut. Similarly, the continuous encoding vectors obtained in other stages can also be transformed into a discrete arrangement of raw materials to be cut using this method.
[0093] Step 2032: Calculate the total length of the raw materials and the total length of the parts in the order of material arrangement to be cut.
[0094] It is understandable that the total length of the raw material can be determined based on the set of information about the raw material to be cut, and the total length of the parts can be determined based on the sequence of target parts.
[0095] The total length of raw materials refers to the total length of the raw materials in the set of raw material information to be cut. For example, if there are 3 types of raw materials to be cut, and M=3, and the lengths of the 3 types of raw materials are 10m, 6m and 4m respectively, and one piece of each type of raw material is used, then the total length of raw materials is 20m.
[0096] The total length of the part is the total length of the part obtained after cutting the raw material. For example, In the plan, after cutting raw materials of 10m, 6m and 4m each time, parts of 7m, 5m and 3m are obtained respectively, and the total length of the parts is (7+5+3)=15.
[0097] Step 2033: Calculate the material utilization rate, objective function, and fitness of the material to be cut according to the total length of the raw material and the total length of the parts.
[0098] Among them, continuous coding vector The fitness is determined based on the material utilization rate of the corresponding candidate nesting scheme, and the fitness is positively correlated with the material utilization rate. Continuous encoding vector The selection probability is determined based on the corresponding fitness, and the selection probability is positively correlated with the fitness.
[0099] Referring to formula 8, where, Indicates material utilization rate, Indicates the total length of the part. Indicates the total length of the raw material. =15, For example, if the value is 20, then... =0.75.
[0100] = / Formula 8 In some embodiments, the second continuous coding vector can be obtained by referring to Formula 9. Corresponding objective function value ,in use This indicates that, referring to Formula 10, the fitness corresponding to the arrangement sequence of the raw materials to be cut can be obtained. .by Taking 0.75 as an example, then 0.25, 1 / 1.25 = 0.8.
[0101] Formula 9 Formula 10 Steps 2032 and 2033 can statistically analyze the total length of raw material consumed in cutting and the total length of the part to obtain the material utilization rate. A scheme with a higher material utilization rate has greater adaptability, making it more suitable for follower bees. When selecting the continuous encoding vector corresponding to the material cutting sequence, it is easier to be selected, resulting in a higher material utilization rate for the material cutting sequence obtained through artificial bee colony.
[0102] Step 2034: Determine the second continuous encoding vector corresponding to the raw material feeding sequence based on the fitness of the feeding sequence. Selection probability .
[0103] Referring to Formula 11, the second continuous encoding vector corresponding to the order of material arrangement to be cut can be obtained. Selection probability .
[0104] Formula 11 It is understandable that the material utilization rate, objective function, fitness, and selection probability are related to the order of material arrangement for cutting. That is, the order in which the raw materials to be cut are arranged. Material utilization rate, objective function, fitness, and selection probability .
[0105] It is understandable that for each stage, the continuous encoding vector ( The material utilization rate, objective function, and fitness can all be determined through steps 2031 to 2033.
[0106] Step 2035: Based on the second continuous encoding vector corresponding to the material feeding sequence to be cut obtained in the bee-hiring stage. Selection probability Determine the selected second consecutive encoding vector .
[0107] For a certain second continuous encoding vector Generate a random decimal, such as 0.5, and compare this decimal with... to Selection probability Compare sequentially until the... If the selection probability of the second consecutive coding vector is greater than 0.5, such as 0.6, then the i-th second consecutive coding vector is selected as the second consecutive coding vector by the following bee.
[0108] For example, for each second consecutive encoding vector Step 2035 is executed to determine the second consecutive encoding vector. The corresponding second consecutive encoding vector selected by the following bee .
[0109] Step 2036, based on the selected second consecutive encoding vector Determine the third consecutive encoding vector obtained during the follower bee phase. .
[0110] Referring to Formula 12, substitute the values of the relevant vectors of the selected second consecutive coding vector into Formula 12 to obtain the values of the third consecutive coding vector in the follower bee stage. This leads to the third continuous encoding vector. . In the formula, use express.
[0111] Formula 12 in, ∈ [-1, 1], and Indicates in to Except The values of two randomly selected consecutive encoded vectors, This indicates the value of the selected continuous encoding vector. , which is the value of the current optimal second consecutive coding vector (or the value of the consecutive coding vector with the highest utilization rate and the consecutive coding vector with the smallest objective function).
[0112] In some embodiments, step 2036 is followed by step 2037.
[0113] Step 2037: Record the order of raw materials to be cut with the highest current material utilization rate.
[0114] For example, W=5, to The material utilization rates are 0.8, 0.4, 0.65, 0.7, and 0.7 respectively. The material utilization rate is the highest, and records are kept. The cutting and material arrangement sequence of the plan.
[0115] In some embodiments, during the follower bee phase, step 2036 is executed iteratively for each selected second consecutive encoded vector until the value of the objective function obtained from the third consecutive encoded vector obtained from the second consecutive encoded vector is not less than the value of the objective function of the previously obtained third consecutive encoded vector. Then, the previously obtained third consecutive encoded vector is taken as the final third consecutive encoded vector obtained by the follower bee. .
[0116] Understandably, the second consecutive encoding vector used to iteratively execute step 2036 can be obtained through probabilistic selection.
[0117] During the scout bee phase, based on the trial count updated in the follower bee phase, if there is a third consecutive encoded vector that exceeds the counting threshold, then step 204 is executed on the third consecutive encoded vector.
[0118] Step 204, during the reconnaissance bee phase, when the trial-and-error count exceeds the counting threshold, the fourth consecutive encoding vector is calculated. .
[0119] The W fifth consecutive encoding vectors obtained during the initialization phase Each fifth consecutive encoding vector Each corresponds to a trial-and-error count. Trial and error counting This is used to record the number of times the fifth consecutive encoded vector was not improved during the hired bee and follower bee stages. When a certain fifth consecutive encoded vector... When no improvement is achieved in multiple consecutive rounds (i.e., trapped in a local optimum), the trial-error count is... Continues to increase. If... If the counting threshold is exceeded, the scout bee is triggered to calculate the fourth consecutive encoded vector.
[0120] Unlike traditional random restarts, referring to Formula 13, this embodiment employs an optimal solution-based restart mechanism to regenerate the current continuous encoding vector. Wherein, The value of the fourth continuous encoding vector .
[0121] = + ( - )+ ( - ) Formula 13 in, ∈ [-1, 1], and Indicates in to Except The values of two random consecutive encoded vectors, The value of the fifth consecutive encoding vector that has not been improved over multiple rounds. This represents the value of one of the multiple neighboring vectors of a fifth consecutive coding vector that has not improved over multiple rounds. This represents the value of the current optimal continuous encoding vector.
[0122] After the scout bee calculates the fourth continuous encoding vector, it sets the trial value corresponding to the fourth continuous encoding vector to zero and randomly resets the neighborhood range and state record, so that the search can quickly jump away from the stagnant local area.
[0123] Step 205: Output the material arrangement order to be cut corresponding to the current optimal continuous encoding vector.
[0124] For example, referring to step 2031, the material arrangement order corresponding to the current optimal continuous encoding vector can be obtained and output. It is understood that the output can point to a connected memory output, or it can point to the next step in the execution of the step that outputs the material arrangement order.
[0125] Step 103: Cut the raw materials to be cut according to the order of material arrangement.
[0126] In some embodiments, step 103 may be implemented as steps 1031 to 1032.
[0127] Step 1031: Arrange the materials to be cut in the order of material arrangement.
[0128] Step 1031 can be implemented as step 10311.
[0129] Step 10311: The processor instructs the feeding device to feed the materials to be cut in the order of material discharge.
[0130] The feeding equipment is used to sort the raw materials to be cut according to the instructions of the processor, so that the cutting equipment can cut the sorted raw materials.
[0131] Step 1032: Cut the materials to be cut one by one in sequence after the material is laid out.
[0132] Specifically, if the remaining length of the current material to be cut after cutting is greater than or equal to the length of the next target part, then the current material to be cut continues to be cut according to the length of the next target part; if the remaining length of the current material to be cut after cutting is less than the length of the next target part, then the next material to be cut is cut according to the length of the next target part. The next two target parts refer to the part after the next part of the current part.
[0133] Step 1032 can be implemented as step 10312.
[0134] Step 10312: The processor instructs the cutting device to cut the raw material to be cut after it has been loaded.
[0135] For example, the cutting equipment is a cutting machine.
[0136] In this embodiment, the raw materials to be cut are arranged using an artificial bee colony algorithm. In the hired bee stage, a new arrangement order is generated by adjusting the neighborhood size based on Q-learning. In the follower bee stage, further optimization is performed based on the current optimal solution. In the scout bee stage, a restart is performed, which realizes the rapid arrangement of the raw materials to be cut and makes the arrangement order have a higher material utilization rate.
[0137] In this embodiment, an improved artificial bee colony algorithm is used to schedule the raw materials to be cut. Compared with the prior art, this application achieves consistency between the scheduling result and the existing process flow by optimizing the raw material sequence under the condition that the part processing sequence is fixed, thus improving the feasibility of the solution. The output result of this application is a directly executable raw material start sequence scheme, which is easy to embed into the existing cutting and scheduling system, improves material utilization and reduces surplus and waste, and has strong engineering application value.
[0138] Furthermore, this application reduces the sensitivity of fixed neighborhood parameters to different working conditions by adjusting the neighborhood size through Q-learning in the employed bee stage, which is beneficial to improving search efficiency and stability.
[0139] Furthermore, this application improves the ability to escape local optima while preserving information about high-quality material discharge structures by conducting deep searches around high-quality solutions (e.g., through probabilistic selection) during the follower bee phase and employing a restart mechanism during the scout bee phase.
[0140] The following is an example of a hired bee implementation of this application. Referring to Tables 3 to 8, this example illustrates the hired bee phase and implements the update of the Q table. Table 3 shows the known conditions and algorithm parameters, and Table 4 indicates the participants in this iteration of the hired bee phase. Related contiguous coding vectors of the neighborhood, Table 5 indicates The status and action choices in this round of the hired bee phase. Table 4 only lists the construction for this round. The neighborhood involved actually comprises 6 schemes; although other continuous encoding vectors exist, they were not extracted in this round. The neighborhood of the raw material to be cut is not discussed further. The number of elements in the set of raw material information is not a fixed value and is set according to the actual situation. In this example, the number is 4.
[0141] Table 3
[0142] Table 4
[0143] Table 5
[0144] As shown in Tables 3 to 5, assuming that before entering the current round of the hired bee phase... There was no improvement in the previous round, therefore its current state is... Simultaneously, set an initial value for the current neighborhood size. = 4. Let's assume the state is... Down, The Q values for the three actions are as follows: Q =0.18, Q ( =0.66, Q , ) = 0.31, where This indicates that the neighborhood is reduced by 1. Indicates incrementing the neighborhood by 1. This indicates that the neighborhood remains unchanged. Since the current maximum Q value corresponds to... Therefore, this round of actions was carried out. That is, ns + 1. Therefore, the neighborhood size is adjusted from 4 to 5.
[0145] After the neighborhood size is updated to 5, from the exception Randomly select 5 neighbors from the food sources other than those mentioned above. Let the neighborhood obtained in this round be { , , , , Therefore, the set that truly participates in this round of search is { , , , , , }
[0146] Table 6
[0147] Table 6 indicates The results of the comparison between the neighborhood members and the local data are shown in Table 6. Table 6 shows that the highest utilization rate is... Therefore, the locally optimal solution in this round is determined to be = In other words, this round of hired bees is updating... At that time, the local optimal guiding term comes from .
[0148] Table 7
[0149] Table 7 indicates the correspondence of each role in this round of updates. As shown in Table 7, suppose only one dimension is modified in this round, and the second dimension is randomly selected, i.e., j = 2. The current relevant values are as follows: =0.18、 = =0.81、 = =0.61、 = =0.85、 = =0.49. According to the employed bee update formula, then: = + ( - )+ ( - Let the parameters for this round be... =-0.4, =0.2, then the update result of the second dimension is: =0.81+(-0.4) (0.81-0.61)+0.2 (0.85-0.49) =0.81-0.08+0.072=0.802.
[0150] Therefore, a new solution is obtained. = (0.45, 0.802, 0.90, 0.22).
[0151] Table 8 indicates the stage of hired bees. Key comparisons before and after the update. Decoding yields a new raw material scheme. =(7500, 9000, 9000, 6000). When laying out materials according to a fixed parts sequence: the first 7500 material is cut into 3100 and 2800, leaving 1600; the second 9000 material is cut into 2600, 2200, 1700, and 1600, leaving 900. It can be seen that the original 6000 material selected for the second batch was changed to 9000, allowing the subsequent four parts to be concentrated in the second material, thus directly reducing the number of materials that need to be opened. = 7500 + 9000 = 16500 = 14000 / 16500 = 0.8485.
[0152] Table 8
[0153] Comparison of results before and after the update: Original solution The new scheme is 0.6222. =0.8485. Since 0.8485 is greater than 0.6222, this update was successful. replace .
[0154] Since the new solution is superior to the old one, the reward is 1, and the next state is denoted as... At the same time Reset to zero. Set the learning rate. =0.6, Discount Factor =0.2, and in the next state , Q ( , =0.52, Q ( )=0.44, Q ( , If ) = 0.40, then maxQ ( , Q = 0.52. The original Q value was... Q ( , ) = 0.66, therefore after the update: Q ( , = 0.66 + 0.6 [1+0.2×0.52-0.66]=0.9264.
[0155] The following is an example of a follower bee implementation of this application. After the bee hiring phase is completed, the follower bee first calculates the selection probability based on the fitness of all consecutive coding vectors, and then selects a certain consecutive coding vector according to the probability. If a certain consecutive coding vector meets the selection condition, a deep search is performed around that consecutive coding vector (scheme).
[0156] For example, suppose the following bee selected in this round = (0.34, 0.81, 0.14, 0.70), its decoding scheme is as follows: = (7500, 9000, 6000, 9000), current utilization rate = 0.8485. At this point, the bee continues to perform a deeper search around the current solution. Let's assume the first dimension is selected in this round, i.e., j=1. Let the relevant parameters for this round be... =0.1, = =0.2, = =0.77, = =0.28. According to the follower bee update formula, ,but =0.2+"0.1" (0.77-0.28)=0.249, then we get = (0.249, 0.81, 0.14, 0.70), after decoding becomes = (6000, 9000, 6000, 9000).
[0157] After rearranging the material, the first 6000mm piece was cut into 3100mm, 2800mm pieces, and then 100mm pieces remained; the second 9000mm piece was cut into 2600mm, 2200mm, 1700mm, and 1600mm pieces, and then 900mm pieces remained. Therefore... = 15000, = 14000 / 15000 = 0.9333. Since 0.9333 is greater than 0.8485, the follower bee retains the new solution and continues to perform a deeper search in this direction; if further improvements are made in the next iteration, the search continues; if no further improvements are made, the current iteration search stops.
[0158] The following is an embodiment of the reconnaissance bee in this application. Let the current continuous encoding vector be... = (0.50, 0.58, 0.47, 0.72), =0.622. Its decoding scheme is as follows: = (7500, 7500, 7500, 9000). When laying out the parts in a fixed order: the first 7500 piece is cut into 3100 and 2800, leaving 1600; the second 7500 piece is cut into 2600, 2200, and 1700, leaving 1000; the third 7500 piece is cut into its last 1600, leaving 5900. Therefore... = 22500, = 14000 / 22500 = 0.6222. If its = 5 and limit = 4, then the reconnaissance bee should be restarted. The restart formula is Formula 13. Assuming the first dimension is selected in this round, the relevant parameters are: =0.50, =0.1, = =0.77, = =0.55, = =0.20, = =0.28. The calculation formula for scout bees is: = + ( - )+ ( - ), =0.77+0.1 (0.55-0.50)+0.1 (0.20-0.28)=0.767, therefore we get = (0.767, 0.58, 0.47, 0.72), after decoding becomes = (9000,7500, 7500, 9000).
[0159] After rearranging the material, the first 9000mm piece was cut into 3100mm, 2800mm, and 2600mm pieces, leaving 50mm; the second 7500mm piece was cut into 2200mm, 1700mm, and 1600mm pieces, leaving 2000mm. Therefore... = 16500, = 14000 / 16500 = 0.8484. Since 0.8484 is greater than 0.6222, the reconnaissance bee phase successfully updated the plan. After restarting... Set to zero.
[0160] After searching, let the final optimal solution be... = = (0.45, 0.802, 0.90, 0.22), this utilization rate is =0.8485, then the final output scheme = (7500, 9000, 9000, 6000).
[0161] In one possible implementation, this application also provides a computer-readable storage medium storing program code that, when executed on a computer, causes the computer to perform the above-described method embodiments.
[0162] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0163] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0164] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, apparatuses, or modules, and may be electrical, mechanical, or other forms.
[0165] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0166] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0167] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0168] The technical solutions provided in the embodiments of this application have been described in detail above. Specific examples have been used in the embodiments of this application to illustrate the principles and implementation methods of the embodiments of this application. The description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of the embodiments of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the embodiments of this application. Therefore, the content of this specification should not be construed as a limitation on the embodiments of this application.
Claims
1. A method for cutting raw materials, characterized in that, The method includes: Obtain the set of raw material information to be cut, the sequence of target parts, and the residual material threshold, wherein the number of elements in the set of raw material information to be cut is M, and M is a positive integer; Based on the set of raw material information to be cut, the target part sequence, and the remaining material threshold, the optimal continuous coding vector is iteratively optimized using an artificial bee colony algorithm to obtain the material arrangement order of the raw materials to be cut. The optimal continuous coding vector is derived from the first continuous coding vector. Up to the fourth consecutive encoding vector As determined in, where 1≤ ≤W, W is a positive integer; The raw materials to be cut are cut according to the order in which they are arranged. The artificial bee colony algorithm includes: Through the first continuous encoding vector and the first continuous encoding vector The neighborhood of the bee is used to obtain the second continuous encoding vector for the bee-employing stage. ; According to the second continuous encoding vector and each of the second consecutive encoded vectors The fitness and selection probability are used to obtain the third continuous encoding vector of the following bee stage. ; wherein, the second continuous encoding vector The fitness is determined based on the material utilization rate of the corresponding candidate material layout scheme, and the fitness is positively correlated with the material utilization rate; second continuous encoding vector The selection probability is determined based on the corresponding fitness, and the selection probability is positively correlated with the fitness; the third continuous encoding vector As the first continuous encoding vector in the next iteration ; The fourth consecutive encoding vector of the reconnaissance bee phase is calculated when the trial count exceeds the counting threshold. And the fourth continuous encoding vector As the first continuous encoding vector in the next iteration ; Output the material arrangement order of the raw materials to be cut corresponding to the current optimal continuous encoding vector.
2. The method according to claim 1, characterized in that, Second continuous encoding vector The value of Through the first continuous encoding vector The first continuous encoding vector The first consecutive encoded vector among multiple neighborhood vectors The value of the first continuous encoding vector The optimal first continuous encoding vector among the plurality of neighborhood vectors The value of , excluding the first continuous encoding vector Two random first consecutive encoding vectors outside , The value of is determined, where i、 i、1≤ ≤W、1≤ ≤W、E1 E2 i.
3. The method according to claim 1, characterized in that, The value of the second continuous encoding vector It is determined by the following formula: Where 1≤j≤S, S≥M, and j and S are positive integers. Represents the i-th first continuous encoding vector The value of the first consecutive encoded vector among multiple neighborhood vectors. Represents the i-th first continuous encoding vector The neighborhood index, , express The size of the neighborhood, This represents the minimum size of the neighborhood. This represents the maximum value of the neighborhood size. It is a positive integer. , ∈ [-1, 1], ∈ [0, C], where C is a constant. Represents the i-th first continuous encoding vector Among the neighborhood vectors, the optimal value of the first continuous encoding vector is... and This indicates that the first consecutive encoded vector excluding the i-th one The values of two random first consecutive encoding vectors outside.
4. The method according to any one of claims 1 to 3, characterized in that, The second continuous encoding vector of the acquired bee stage is obtained. Previously included: The current state is determined by whether improvements were achieved in the previous iteration; Based on the current state and the Q-table, the updated neighborhood size is obtained; The second continuous encoding vector of the acquired bee stage is obtained. This also includes: According to the second continuous coding vector And the second continuous encoding vector obtained in the previous round Update the reward value and determine the new current state; Determine the second continuous encoding vector based on the Q-learning formula. The corresponding Q table.
5. The method according to claim 4, characterized in that, The Q-learning formula is: in, , Represents the Q-learning parameters. Indicates the learning rate. Indicates the discount factor. Represents the first in table Q Next state. This represents the action to be performed in the t-th state of table Q. This represents the Q-value corresponding to the t-th state-action sequence, where t is a positive integer. Indicates the reward value. To compare the second consecutive encoded vector The objective function value and the first continuous encoding vector The state after the objective function value, corresponding to the maximum Q value. Represents the first in table Q Sub-state.
6. The method according to claim 1 or 5, characterized in that, The follower bee phase includes: The second continuous encoding vector Decode the raw materials to be cut into the order of arrangement according to the preset interval mapping rules; The total length of the raw materials and the total length of the parts are calculated according to the arrangement sequence of the raw materials to be cut; Based on the total length of the raw material and the total length of the part, the material utilization rate, objective function and fitness of the material arrangement sequence to be cut are obtained; Based on the fitness, determine the second continuous encoding vector corresponding to the material feeding sequence to be cut. The probability of choosing; The selected second continuous encoding vector is determined based on the selection probability. ; Based on the selected second continuous encoding vector Determine the third continuous encoding vector obtained during the bee-following phase. .
7. The method according to claim 6, characterized in that, The preset interval mapping rule is implemented as follows: When the value of the second continuous coding vector falls into the Fth sub-interval, the material discharge position corresponding to the value of the second continuous coding vector is determined to be the Fth type of raw material; wherein, the interval in which the value of the second continuous coding vector is located is divided into F sub-intervals, and F is the number of types of raw materials to be cut.
8. The method according to claim 1, characterized in that, The step of cutting the raw materials according to the order of their arrangement includes: The processor instructs the feeding device to feed the materials to be cut in the order of their discharge sequence; The processor instructs the cutting device to cut the raw material to be cut after it has been loaded.
9. A raw material cutting system, characterized in that, The device includes a processor, a feeding device, and a cutting device. The processor is used to execute the method described in any one of claims 1-8. The feeding device is used to feed the material to be cut according to the instructions of the processor. The cutting device is used to cut the material to be cut according to the instructions of the processor.
10. A computer-readable storage medium, characterized in that, It includes instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1-8.