Selective disassembly sequence planning method based on improved sparrow algorithm
The improved sparrow algorithm-based method optimizes selective disassembly by modeling equipment with a priority constraint matrix, identifying necessary parts, and using enhanced sparrow algorithm operators to achieve efficient and stable disassembly sequence planning.
Patent Information
- Application Number
- CN202410952081.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-12-31
AI Technical Summary
Existing selective disassembly sequence planning methods are inefficient and require complex initial inputs, making them unsuitable for maintenance scenarios where timely and cost-effective disassembly of target parts is critical, and they lack automation and versatility.
A selective disassembly sequence planning method using an improved sparrow algorithm that models equipment products with a priority constraint matrix, employs a target reverse search to identify necessary parts, and utilizes a sparrow algorithm enhanced with chaotic mapping and sequence repair modules to optimize the disassembly sequence, incorporating a concentration mechanism to improve search space and stability.
The method efficiently identifies necessary disassembly parts, reduces unnecessary disassembly, and enhances automation and stability, resulting in a cost-effective and optimized disassembly sequence planning.
Smart Images

Figure CN119227312A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of equipment disassembly sequence planning, and in particular to a selective disassembly sequence planning method of an improved sparrow algorithm. Background Art
[0002] Equipment maintenance is an indispensable part of equipment operation. During the maintenance process, fault repairs usually occur. The timely replacement or repair of faulty parts determines the completion and efficiency of production operations. Selective disassembly of target parts is particularly critical. Selective disassembly sequence refers to the disassembly sequence generated by disassembling other parts in a certain order in order to disassemble a target part while satisfying the disassembly constraints. How to achieve the lowest cost disassembly of the target part has gradually become a hot topic of research at home and abroad. The previous disassembly methods were mainly aimed at complete or multi-objective disassembly for the purpose of recycling, with the optimization goal of maximizing recycling profit. Enumeration and random methods were mostly used, but this method is not suitable for selective disassembly with maintenance time and maintenance cost as the goal; in addition, most mainstream optimization algorithms have complex initial inputs, and a large amount of initial input is required to obtain stable and high-quality solutions.
[0003] Therefore, it is necessary to provide a selective disassembly sequence planning method based on an improved sparrow algorithm to solve the above technical problems.
[0004] After searching, the application publication number CN103235862B, a method and device for selective disassembly sequence planning, is used to solve the problems of low automation and poor versatility in the selective disassembly sequence planning method in the prior art. The planning method includes: judging the disassembly of all parts in the first assembly through a motion planning algorithm, and obtaining a first judgment result; hierarchically processing the first assembly according to the first judgment result to obtain the hierarchical information of all the parts; analyzing the constraint relationship of the hierarchical information to obtain the mutual disassembly constraint relationship of all the parts; and obtaining the selective disassembly sequence of the specified target disassembly parts in the first assembly according to the disassembly constraint relationship. The technical solution of the present invention is adopted, so that the implementation of the motion planning algorithm only needs to obtain the three-dimensional geometric model information of the assembly, and can automatically generate a feasible disassembly sequence for the specified target parts, which greatly improves the versatility and automation of the algorithm.
[0005] The above-mentioned search invention aims to use motion algorithms to complete the establishment and stratification of constraints between equipment parts, and use constraint relationships to generate feasible selective disassembly sequences, while the present invention considers the factors that affect the cost of the disassembly process, uses an optimization operator combined with a sequence concentration mechanism, and solves a feasible and lowest-cost selective disassembly sequence. The two inventions solve different problems. The constraint relationship between parts of the above-mentioned invention is expressed by assembly hierarchical expression, while the present invention uses a priority constraint matrix to express it, which is more concise and the solution process is easy to operate. Summary of the invention
[0006] The present invention aims to solve the above problems of the prior art. A selective disassembly sequence planning method based on an improved sparrow algorithm is proposed. The technical solution of the present invention is as follows:
[0007] A selective disassembly sequence planning method based on an improved sparrow algorithm comprises the following steps:
[0008] S1: Based on the disassembly priority constraint matrix G p Carry out modeling of equipment products;
[0009] S2: Searching for necessary disassembly parts using the target reverse method;
[0010] S3: Create an initial disassembly sequence population and use the selective sequence fitness function F to calculate the sequence fitness;
[0011] S4: Improve the sparrow algorithm and make it discretized. Use chaotic mapping and design operators to guide sequence updates and changes. Use the sequence repair module to repair sequences that do not comply with the disassembly rules. Add a concentration mechanism to improve the algorithm search space and find the optimal solution.
[0012] Furthermore, step S1 is based on the disassembly priority constraint matrix G p Carry out modeling of equipment products; including:
[0013] The product model is based on the priority constraint matrix, which is represented by G p Indicates that:
[0014]
[0015] Where: p i,j represents the disassembly priority relationship of part j to part i; p ij =1 means that part i can only be disassembled after part j is disassembled, and part j is the necessary disassembly part of part i; if; p ij =0 means that the disassembly of part i is not constrained by part j, part j is a non-essential disassembly part of part i, and n is the total number of parts of the equipment.
[0016] Furthermore, the step S2 uses a target reverse method to search for necessary disassembled parts, including the following steps:
[0017] S201: Determine the target disassembly parts;
[0018] S202: Initialize the parts collection List and the necessary disassembly parts collection doneList, and put the target disassembly parts into the List;
[0019] S203: traverse the part element i in List, according to G p , query the necessary disassembly parts of part i, record them, delete part element i from List, and put it into doneList;
[0020] S204: Put the necessary disassembly parts recorded in step S203 into List, and check whether the List is empty. If it is not empty, return to step S203. If it is empty, directly output doneList.
[0021] Furthermore, the step S3 includes the following steps:
[0022] S301: Based on doneList in step S204, randomly select one of the part elements i;
[0023] S302: According to G p ,like Then part element i can be disassembled, remove it from doneList, put it into the disassembly sequence, and update G p , the update method is G p The elements in the i-th column are all 0; if If the component element i cannot be disassembled, the process returns to step S301 and randomly selects another component element;
[0024] S303: If The disassembly sequence establishment is completed; if the number of elements is not 0, return to step S301;
[0025] S304: If the specified sequence population number N is reached, the complete sequence population is output; if the population number is not reached, the doneList sequence is restored and the process returns to step S301.
[0026] Furthermore, in step S3, the fitness function F of the selective sequence is used to evaluate the quality of the sequence. The smaller the fitness value, the smaller the cost required to disassemble the sequence, and the better the sequence. The update formula of the sequence is:
[0027]
[0028] Where N represents the total number of parts, w b , wd , w t are the corresponding weight coefficients respectively, Tb is the time cost for disassembly of basic parts, Td is the time cost for change of disassembly direction, and Tt is the time cost for change of disassembly tools.
[0029] Furthermore, the step S4 improves the sparrow algorithm to discretize it, uses chaotic mapping and designs operators to guide sequence updates, uses sequence repair modules to repair sequences that do not conform to disassembly rules, adds a concentration mechanism to improve the algorithm search space, and solves the optimal solution, including the following steps:
[0030] S401: Identify the sequences according to their fitness values. The identity authentication rule is: sort the sequences from small to large fitness values, set the top 20% of the sequences as searchers, and the remaining sequences as trackers. Select 10% of the entire group as sentinels.
[0031] S402: The searcher conducts peripheral exploration around its own sequence, selects a segment according to a set ratio to intercept the sequence segment with the smallest fitness value, and randomly selects a suitable position for displacement or exchange according to the selection ratio. The two operation modes of displacement and exchange are divided into two exploration modes: small displacement and large displacement;
[0032] S403: The tracker will learn from the searcher's fragments, which is divided into two modes: aggregation and discrete. In the aggregation mode, the tracker will select the searcher's excellent sequence fragments for learning according to the selection ratio. In the discrete mode, the tracker selects the lowest ranked value in the chaotic sequence according to the ratio, and conducts decentralized learning on the part elements at the corresponding position in the disassembly sequence.
[0033] S404: The guard further increases the search space of the sequence to prevent the population from falling into a local solution too early; using the generated chaotic sequence, extract the elements with the highest and lowest values in the chaotic sequence according to the proportion, find the part elements at the corresponding position in the disassembly sequence, exchange elements between the part elements, and generate a new solution;
[0034] S405: Calculate the similarity of sequence elements, establish a concentration matrix, calculate the concentration of each sequence, and update the sequence with a higher concentration and a larger fitness value until the sequence meets the concentration threshold requirement and is then put into the sequence population;
[0035] S406: Re-identify the sequence population according to the identification rules of step S401. If the number of algorithm iterations is met, output the sequence with the smallest fitness value in the current population as the final solution, otherwise continue to execute step S402.
[0036] Furthermore, the steps S403 and S404 include using chaotic mapping to generate a chaotic sequence, guiding the sequence change, and the chaotic sequence is updated using the Logistic equation, and the update formula is as follows:
[0037] Z n+1 =μ·Z n ·(1-Z n ),n=0,1,2...,m
[0038] Where: Z n ∈[0,1(n=0,1,2…,m)] represents the set of chaotic variables of the nth generation, and it is proved that the mapping is completely chaotic when μ=4;
[0039] Z0 is the initial condition for generating chaotic sequence, which is generated by random variables, Z 0(i) represents the i-th element in Z0, Z 0(i) The generation rules are as follows:
[0040]
[0041] Where N is the total number of disassembled parts, generating Z 0(i) When , the initial variables that cannot be generated and cause the logical mapping failure include (0, 0.25, 0.5, 0.75, 1);
[0042] The steps S402, S403, S404, and S405 include a sequence repair module, which repairs the sequence that does not meet the disassembly constraints while maintaining the constraints as much as possible and maintaining the original sequence rules. The rules of the sequence repair module are:
[0043] According to the constraint priority matrix G p , determine whether the part elements in the to-be-repaired sequence (TS) can be disassembled, move the disassembled parts to the repaired sequence (RS), and update G p , the parts that cannot be disassembled at present are moved to the cached sequence (CS), and in the subsequent loop traversal, priority is given to whether the part elements in CS meet the disassembly rules, and finally RS is output to complete the sequence repair.
[0044] Furthermore, the sparrow algorithm is specifically as follows: initialize a certain number of sparrow populations, use the fitness function to calculate and sort the advantages and disadvantages of the position of each sparrow in the space, use sparrows with high fitness values as searchers, and the rest as trackers, and select a certain proportion of the population as guards to play a detection and early warning role;
[0045] The formula for updating the discoverer's position is as follows:
[0046]
[0047] In the formula, It represents the position of the i-th sparrow in the j-th dimension when the algorithm iterates to the t-th time. T represents the maximum number of iterations, is a constant, and is a random number between (0,1]. Q is a random number that follows a normal distribution. L is a d-dimensional row vector in which each element is 1. The tracker sparrow is responsible for following the direction of the searcher sparrow and searching near it. Its position update formula is as follows:
[0048]
[0049] In the formula, It means the worst position of the sparrow in the j dimension when the population iterates to the tth time. represents the optimal position of the sparrow in the jth dimension when the population is iterated to the t+1th time. A represents a 1×n matrix, and the elements in the matrix are randomly assigned 1 or -1, and A + = AT(AAT)-1;
[0050] The alert sparrow is randomly selected from the entire population of searchers and trackers and is responsible for observing the surrounding environment. Its position update formula is as follows:
[0051]
[0052] In the formula, β represents the step size control parameter, which is a random number that obeys the standard normal distribution, K is a random number in the interval [-1,1], and ε is a very small constant, which is used to avoid the situation where the denominator is zero.
[0053] Furthermore, the step S405 includes calculating the sequence concentration value, and the concentration value calculation steps are as follows:
[0054] S4051: Calculate the similarity of sequence elements. The similarity is defined as:
[0055]
[0056] Where Seq(g, i) represents the i-th element of sequence g, Sim(g, h, i) represents the similarity of the element, if the i-th element of Seq(g) in the tracker is the same as the i-th element of another sequence Seq(h) whose identity is the tracker, then the element similarity Sim(g, h, i) is 1, otherwise it is 0, g, h = 1, 2, ..., S, S represents the number of sequences, i = 1, 2, ..., N, N represents the number of parts that need to be disassembled;
[0057] S4052: Solve the concentration matrix CM, which is defined as follows:
[0058]
[0059] Where:
[0060]
[0061] In the formula, co gi represents the sum of similarities of Seq(g, i), and Follow represents the set of sequences whose sequence identity is the follower;
[0062] S4053: Solve the sequence concentration value C g , concentration value C g The calculation formula is as follows:
[0063]
[0064] Where: NUM(Follow) represents the number of follower sequences in the sequence population;
[0065] Sequences with high concentration values and poor fitness values need to be updated so that the updated sequences meet the specified concentration threshold before they can enter the population for the next search optimization.
[0066] The advantages and beneficial effects of the present invention are as follows:
[0067] In step S2 of the present invention, a target reverse method is used to search for necessary disassembly parts, and all necessary disassembly parts can be searched out, thereby solving the problem that unnecessary disassembly parts may be introduced in previous methods and reducing the disassembly time of basic parts to a minimum. In step S4, the idea of the sparrow algorithm is used to design three search operators, namely, a searcher, a tracker and a sentinel, to improve the search space of the optimization algorithm and improve the solution quality of the algorithm compared with previous algorithms. In step S4, a concentration mechanism is added to update sequences with high sequence similarity and poor fitness in the sequence population, thereby further improving the solution stability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 The present invention provides a preferred embodiment of a selective disassembly sequence planning method based on an improved sparrow algorithm.
[0069] Figure 2 A flowchart of a target reverse search method of a selective disassembly sequence planning method based on an improved sparrow algorithm provided by the present invention;
[0070] Figure 3 A flowchart of establishing an initial disassembly sequence population for a selective disassembly sequence planning method based on an improved sparrow algorithm provided by the present invention;
[0071] Figure 4A diagram of a disassembly sequence updating method for a searcher operator in a small displacement mode and a large displacement mode of a selective disassembly sequence planning method based on an improved sparrow algorithm provided by the present invention;
[0072] Figure 5 A diagram of a method for updating a disassembly sequence in an aggregation mode in a tracker operator of a selective disassembly sequence planning method based on an improved sparrow algorithm provided by the present invention;
[0073] Figure 6 A diagram of a method for updating a disassembly sequence of discrete modes in a tracker operator of a selective disassembly sequence planning method based on an improved sparrow algorithm provided by the present invention;
[0074] Figure 7 A diagram of a disassembly sequence updating method of a sentinel operator of a selective disassembly sequence planning method based on an improved sparrow algorithm provided by the present invention;
[0075] Figure 8 A method diagram of a sequence repair module of a selective disassembly sequence planning method based on an improved sparrow algorithm provided by the present invention. DETAILED DESCRIPTION
[0076] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.
[0077] The technical solution of the present invention to solve the above technical problems is:
[0078] See also Figure 1 As shown, the selective disassembly sequence planning method based on the improved sparrow algorithm includes:
[0079] S1: Modeling of equipment products based on priority constraint matrix;
[0080] Specifically, the priority matrix G p Express the disassembly priority constraint relationship of equipment products to model equipment products, G p The expression is as follows:
[0081]
[0082] Matrix G p Medium ij =1, it means that the j element has a priority constraint relationship with the i element. The j element must be disassembled before the i element can be disassembled. If the matrix G p The element p in ij =0, it means that there is no priority constraint relationship between element j and element i for disassembly, and whether element j is disassembled or not does not affect the disassembly of element i.
[0083] S2: Searching for necessary disassembly parts using a target reverse search method;
[0084] The step 2 includes necessary disassembly parts, which are parts that must be disassembled during the process of disassembling the target part. The target part cannot be obtained without disassembling the necessary disassembly parts;
[0085] Correspondingly, non-essential disassembly parts are parts that do not need to be disassembled during the disassembly process, and retaining non-essential disassembly parts will not affect the acquisition of target parts;
[0086] According to the matrix G in step S1 p , determine whether the part element is a necessary disassembly part, the determination method is as follows:
[0087] If the j element does not have a priority constraint relationship for disassembly on the i element, that is, p ij = 0, which means that part j is a non-essential disassembly part of part i. If element j has a priority constraint relationship for disassembly on element i, that is, p ij =1, which means that part j is a necessary disassembly part of part i.
[0088] The necessary disassembly attribute is transitive. If part j is a necessary disassembly part of part i, and if element k is a necessary disassembly part of j, then part k is also a necessary disassembly part of part i.
[0089] The step S2 includes a target reverse search method, which directly searches for all necessary disassembly parts of the target disassembly part and excludes unnecessary disassembly parts. For details, see Figure 2 As shown, the target reverse search method specifically includes the following steps:
[0090] S201: Determine the target disassembly parts;
[0091] S202: Initialize the parts collection List and the necessary disassembly parts collection doneList, and put the target disassembly parts into the List;
[0092] S203: traverse the part element i in the List, query the necessary disassembly parts of the part i according to the priority constraint matrix, record them, delete the part element i from the List, and put it into the doneList;
[0093] The step S203 includes the following specific operations:
[0094] Check whether the parts collection List is empty. If it is empty, directly output doneList as the result;
[0095] If the List is not empty, loop through the parts in the List. The rules for traversal are:
[0096] Select the unqueried part i if Then p ij =1, and then move part i into doneList. If the condition is not met, move part i into doneList directly.
[0097] S204: Put the necessary disassembly parts recorded in step S203 into List, and check whether the List is empty. If it is not empty, return to step S203. If it is empty, directly output doneList.
[0098] S3: Create an initial disassembled sequence population and use the selective sequence fitness function F to calculate the sequence fitness;
[0099] The step S3 includes creating an initial disassembly sequence population. For details, see Figure 3 As shown, the following steps are included:
[0100] S301: Determine the sequence population number pop;
[0101] S302: Based on doneList in step S204, randomly select one of the part elements i, and calculate the result according to the priority constraint matrix G. p ,like Then element i can be disassembled, remove it from doneList, put it in the disassembly sequence, and do the same to G p Update, the update method is G p The elements in the i-th column are all 0; if If element i cannot be disassembled, then return to S301 and randomly select another element.
[0102] S303: If Then output the disassembly sequence; if the number of elements is not empty, return to step S302.
[0103] S304: If the specified sequence population number N is reached, output the complete sequence population; if the population number is not reached, restore the doneList sequence and return to step S302
[0104] The step S3 needs to evaluate the quality of the disassembly sequence, define all parts in advance, and all components are in an independent state. Disassembly is performed from a specific single direction without considering the difference in human or mechanical operation. The disassembly time of each single part is fixed. The selective sequence fitness function F is used to evaluate the quality of the sequence. The smaller the fitness value, the smaller the cost of the disassembly sequence, and the better the sequence. The calculation formula of the fitness function E is:
[0105]
[0106] Where N represents the total number of parts, w b , w d , w t are the corresponding weight coefficients, Tb is the time cost of basic parts disassembly, Td is the time cost of disassembly direction change, and Tt is the time cost of disassembly tool change.
[0107] The parameter Tb is the basic disassembly time required to disassemble part i. In the actual process, the disassembly time values between parts vary greatly, and the error of directly using the disassembly time as an evaluation index is large. Therefore, the basic disassembly time is standardized.
[0108] The standardization method is: take the part with the longest basic disassembly time as the standard, and the ratio of the basic disassembly time of the remaining parts to it as the standardized basic disassembly time parameter. The standardized formula Tb is expressed as follows:
[0109]
[0110] Tb i represents the basic disassembly time of part i, Tb max Represents the longest disassembly time of all disassembled parts
[0111] The Td parameter indicates the time required for the direction change from part i to part j. The six directions are ±X, ±Y, and ±Z. Each component needs to be disassembled from a specific direction. The change in disassembly direction means the change in disassembly posture, which affects the disassembly time. The magnitude of the change in disassembly direction affects the size of the disassembly cost. When the disassembly direction changes to 180°, the disassembly cost is the largest.
[0112] The expression formula of Td is as follows:
[0113]
[0114] The parameter Tt represents the time consumed by changing the disassembly tool from part i to part j. During the process, the change of disassembly tools affects the overall disassembly efficiency. The cost of exchanging different disassembly tools varies. The disassembly operation without tool exchange during the disassembly process brings the lowest cost; the conversion between manual disassembly operation and selection and use of tools for disassembly will cause a certain amount of time loss; the time cost brought by the exchange of different tools is the largest;
[0115] The expression of Tt is as follows:
[0116]
[0117] S4: Improve the sparrow algorithm and make it discretized. Design three operators: searcher, follower, and guard. Combine the chaotic mapping method to generate a chaotic sequence to guide the sequence update. Use the sequence repair module to repair the sequence that does not comply with the disassembly rule during the update. Add a concentration mechanism to filter sequences with poor fitness and high concentration, and update the sequence to improve the algorithm search space and find the optimal solution.
[0118] The S4 comprises the following steps:
[0119] S401: Identify the identities of the sequences in the population according to their fitness values. The identity authentication rules are as follows: the sequences are sorted from small to large in fitness value, the top 20% of the sequences are set as searchers, the remaining sequences are set as trackers, and 10% of the entire population are selected as sentinels.
[0120] The step S401 includes sequence fitness calculation. The present invention uses a target reverse search method to directly solve the necessary disassembly parts. The fitness calculation does not consider the influence of the basic disassembly time. The fitness function F is adjusted. The new F is:
[0121]
[0122] Where N represents the total number of parts, w d , w t are the corresponding weight coefficients, Td is the time cost of disassembly direction change, Tt is the time cost of disassembly tool change
[0123] S402: The searcher operator performs peripheral exploration around its own sequence, selects segments to intercept excellent sequence segments according to a set ratio, and randomly selects appropriate positions for displacement or exchange, which is divided into two exploration modes: small displacement and large displacement;
[0124] The searcher operator intercepts the fragments according to the set ratio, selects the excellent sequence fragment with the lowest fitness value as the final operation fragment, and after the interception is completed, randomly selects the appropriate position for displacement or two sequence fragments for position exchange. According to the sequence change mode, it is divided into two exploration modes: small displacement and large displacement. The two search modes have the same probability of being selected;
[0125] For details, see Figure 4 , the large displacement exploration mode intercepts two sequence fragments of the same length according to a certain ratio, one of which is the calculated optimal sequence module, and the other sequence fragment is randomly selected, but it cannot have repeated parts and elements with the excellent sequence fragment that has been intercepted. The positions of the two sequence fragments are exchanged, and the positions of the other parts and elements remain unchanged; the rule of the small displacement exploration mode is: intercept the optimal sequence fragment in the sequence according to the ratio, randomly select another position of the sequence for insertion, and the positions of the other parts and elements remain unchanged;
[0126] The step S402 includes intercepting excellent sequence fragments. The specific method is: according to the sequence from left to right, sequentially extract sequence fragments containing m parts from sequence ranking i (i≤N-m+1) to sequence i+m-1, and calculate according to the modified fitness function F in step S401, where the sequence fragment with the lowest fitness value is used as the final operation fragment. If there are multiple optimal sequence fragments with the same fitness value at the same time, one is randomly selected from them, i represents the sequence ranking number in the sequence, m represents the number of parts to be intercepted, and N represents the total number of parts in the sequence
[0127] S403: The tracker will learn from the elements in the searcher sequence with excellent fitness values, and is divided into two modes: aggregation and discrete according to the learning method;
[0128] For details, see Figure 5 The rule of the aggregation mode is: the tracker will intercept continuous excellent sequence segments in the searcher sequence according to the proportion, and use the segment to replace the sequence segment corresponding to the same position of the tracker, and the remaining component elements will be reordered according to the sequence sorting rule before the tracker is changed; the method of intercepting excellent sequence segments is the same as the sequence interception segment method in step S402.
[0129] For details, see Figure 6 ,The rule of the discrete mode is as follows: the position corresponding to the lowest value in the chaotic sequence is selected as a reference according to the proportion, the searcher sequence is used as the replacement object, and the part elements in the same position in the tracker are replaced, and the remaining part elements are re-ordered according to the sequence order before the tracker is changed;
[0130] The step S403 includes using a chaotic sequence as a reference sequence to guide sequence update changes. The chaotic sequence is generated by a chaotic map and the sequence is updated using the Logistic equation. The chaotic sequence update formula is as follows:
[0131] Z n+1 =μ·Z n ·(1-Z n ),n=0,1,2...,m
[0132] Where: Z n ∈[0,1(n=0,1,2…,m)] represents the nth generation chaotic sequence, and it is proved that the mapping is completely chaotic when μ=4.
[0133] Z0 is the initial condition for generating chaotic sequence, which is generated by random variables, Z 0(i) represents the i-th element in Z0, Z 0(i) The generation rules are as follows:
[0134]
[0135] Where N is the total number of disassembled parts, generating Z 0(i) When , the initial variables that cannot be generated and cause the logical mapping to fail include (0, 0.25, 0.5, 0.75, 1)
[0136] S404: The alerter decides whether to update the sequence population based on probability. The alerter further increases the search space of the sequence to prevent the population from falling into a local solution too early. Whether to run the alerter operator is determined by the randomly generated alert number. The conditions for the alerter to update are as follows:
[0137] ω≤warning rate
[0138] Where ω is the warning number, which is a random number from 0 to 1, and warning rate is the set warning rate
[0139] For details, see Figure 7 ,When the update condition of the alerter is met, the alerter selects the elements with higher and lower values in the chaotic sequence according to the set proportion, and selects the part numbers at the corresponding positions in the sequence according to the positions of the selected elements, exchanges the elements, and generates a new solution;
[0140] The above steps S402, 403, and 404 include a sequence repair module. The sequence newly generated by the operator that does not meet the disassembly constraint cannot enter the sequence population for update optimization. The sequence repair module is used to repair the sequence, retaining the initial sequence rule as much as possible and meeting the disassembly priority constraint;
[0141] The overall rule of the sequence repair module is: use the constraint priority matrix to traverse and determine whether the elements at each corresponding position in the to-be-repaired sequence (TS) can be disassembled, and those that meet the disassembly rules are moved to the repaired sequence (RS), and the elements that do not meet the current requirements are placed in the cached sequence (CS). In the subsequent traversal, give priority to whether the elements in CS meet the disassembly rules, and finally output RS to complete the sequence repair;
[0142] For details, see Figure 8 The new sequences generated by the three operators are repaired by the sequence repair module. The sequence repair module consists of three sequences: TS, CS, and RS, and includes the following key steps:
[0143] (1) The repair module obtains TS, extracts the first element part i in TS, and calculates the first element part i according to the priority constraint matrix G. p And make a judgment operation, the basis for judgment is: If the condition is met, move part i to RS and update G p ; If the condition is not met, move part i to CS;
[0144] (2)
[0145] If the condition in step (2) is true, then traverse the part element m in CS according to the rule: according to the priority constraint matrix G p And make a judgment operation, the basis for judgment is: If the condition is met, move part m to RS and update G p ; If the condition is not met, part m is not operated and remains in CS;
[0146] (3)
[0147] (3.1) If the condition in step (3) is true, return to step (1)
[0148] (3.2) If the condition in step (3) is not true, then traverse the part element m in CS according to the rule: according to the priority constraint matrix G p And make a judgment operation, the basis for judgment is: If the condition is met, move part m to RS and update G p ; If the condition is not met, part m is not operated and remains in CS;
[0149] (4)
[0150] (4.1) If step (4) is true, then RS is directly output as the final repaired sequence
[0151] (4.2) If step (4) is false, return to step (3.2)
[0152] S405: Calculate sequence similarity, establish a concentration matrix, calculate the concentration of each sequence, and update the sequence with a higher concentration and a poorer fitness value until the sequence meets the concentration threshold requirement and is then put into the sequence population;
[0153] The step S405 includes sequence concentration value calculation, and the concentration value calculation steps are as follows:
[0154] S4051: Calculate sequence element similarity
[0155] Similarity is a parameter for the sequence whose identity is follower. If a part element of this sequence is the same as the element at the same position of another sequence whose identity is also follower, the similarity corresponding to the part element of this sequence is 1, otherwise it is 0. The formula for sequence element similarity is defined as:
[0156]
[0157] Where Seq(g, i) represents the i-th element of sequence g, Sim(g, h, i) represents the similarity of the element, if the i-th element of Seq(g) in the tracker is the same as the i-th element of another sequence Seq(h) whose identity is the tracker, then the element similarity Sim(g, h, i) is 1, otherwise it is 0, g, h = 1, 2, …, S, S represents the number of sequences, i = 1, 2, …, N, N represents the number of parts that need to be disassembled.
[0158] S4052: Solving the concentration matrix CM
[0159] The concentration matrix CM contains the sum of the similarities between each sequence element and the elements at the same position in other sequences. The concentration matrix CM formula is defined as follows:
[0160]
[0161] Where:
[0162]
[0163] In the formula, co gi represents the sum of similarities of Seq(g, i), and Follow represents the set of sequences whose sequence identity is the follower.
[0164] S4053: Solve the sequence concentration value C g ;
[0165] The concentration value of a sequence reflects the repetition of the elements in the sequence population. The concentration value of a sequence is calculated by the sum of the similarities of all elements in the sequence and the sum of the similarities of the elements of all sequences. The sequence concentration value C g The formula is:
[0166]
[0167] Where: NUM(Follow) is the number of follower sequences in the sequence population
[0168] The sequence with the highest concentration and the worst fitness value is updated so that the updated sequence meets the specified concentration threshold c before entering the population for the next search optimization.
[0169] The above invention is verified by using an embodiment below. A certain type of hydraulic wrench is selected in the embodiment. The specific part names and disassembly elements are shown in Table 1:
[0170]
[0171] Priority disassembly constraint matrix G of the instance model p as follows:
[0172]
[0173] In all verifications, the fitness function F uses the adjusted formula, which is as follows:
[0174]
[0175] In the formula, w d The value is 0.4, w t The value is 0.6
[0176] In order to verify the optimization of the concentration mechanism for the solution, this application sets the concentration threshold c = [0.15, 0.3, 0.5, 0.8, 1] respectively. To ensure the fairness of the calculation, the sequence population of all algorithms is pop = 20, the warning rate is warningrate = 0.1, and the maximum number of iterations is iter = 100. All results are based on 20 independent runs of the algorithm.
[0177] The solution of the improved sparrow algorithm under different concentration thresholds is shown in Table 2
[0178]
[0179]
[0180] In Table 2, as the concentration threshold decreases, although the Sparrow algorithm with a low concentration threshold requires more operations, its solution is more stable and excellent, and there is no significant difference in the operation time;
[0181] In order to verify the effectiveness of the present invention, a comparison and verification is carried out with GA (genetic algorithm), ABC (bee algorithm), and TLBO (teaching optimization algorithm);
[0182] In the experimental verification, the concentration threshold c = 0.15, the warning rate warning rate = 0.1, to ensure the fairness of the calculation, the sequence population of all algorithms pop = 20, the maximum number of iterations iter = 100, and all results are based on 20 independent runs of the algorithm.
[0183] The experimental results of the improved sparrow search algorithm (ASSA) and GA, ABC, and TLBO are shown in Table 3.
[0184]
[0185] As can be seen from Table 3, ASSA has the best optimal fitness value and average fitness value compared with other algorithms, and is superior to other algorithms in global search capability and solution stability.
[0186] In order to verify the optimization ability of the present invention, the sequence population size pop = [20, 30, 40] was set in the verification, and the SSA, ABC, TLBO, and GA algorithms were tested respectively. The ASSA concentration threshold c = 0.15 and the warning rate warning rate = 0.1 were used. To ensure the fairness of the calculation, all the results were obtained based on 20 independent runs of the algorithm.
[0187] The solution results of ASSA, GA, ABC, and TLBO at different pops are shown in Table 4:
[0188]
[0189] It can be seen from Table 4 that all algorithms can obtain relatively good solutions when optimizing a large number of initial populations. As the population size pop decreases, ASSA can still maintain a relatively stable solution. Under low population conditions, the solution stability of the other algorithms is poor.
[0190] The present invention proposes an improved sparrow algorithm for selective disassembly sequence generation. Based on the priority disassembly matrix, the necessary disassembly parts of the target parts are reversely searched, and unnecessary disassembly parts are excluded. After the initial sequence population is established, the sequence search is performed using chaotic sequences and different identity operators. On this basis, a concentration mechanism is introduced to calculate the sequence similarity and convert it into a concentration matrix. A concentration threshold is set to find out the sequences that do not meet the threshold and have poor quality for replacement, and finally complete the sequence optimization solution. According to the experimental results, the solution stability and convergence of this method are stronger, and it has certain guiding significance in solving selective disassembly.
[0191] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions.
[0192] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0193] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.
Claims
1. A selective disassembly sequence planning method based on an improved sparrow algorithm, characterized in that: The following steps are involved: S1: Based on the disassembly priority constraint matrix G p Carry out modeling of equipment products; S2: Searching for necessary disassembly parts using the target reverse method; S3: Create an initial disassembly sequence population and use the selective sequence fitness function F to calculate the sequence fitness; S4: Improve the sparrow algorithm and make it discretized. Use chaotic mapping and design operators to guide sequence updates and changes. Use the sequence repair module to repair sequences that do not comply with the disassembly rules. Add a concentration mechanism to improve the algorithm search space and find the optimal solution.
2. A selective disassembly sequence planning method based on an improved sparrow algorithm according to claim 1, characterized in that: The step S1 is based on the disassembly priority constraint matrix G p Carry out modeling of equipment products; including: The product model is based on the priority constraint matrix, which is represented by G p Indicates that: Where: p i,j represents the disassembly priority relationship of part j to part i; p uj =1 means that part Q can only be disassembled after part j is disassembled, and part j is a necessary disassembly part of part i; if; p ij =0 means that the disassembly of part i is not constrained by part j, part j is a non-essential disassembly part of part i, and n is the total number of parts of the equipment.
3. A selective disassembly sequence planning method based on an improved sparrow algorithm according to claim 2, characterized in that: The step S2 uses the target reverse method to search for necessary disassembly parts, including the following steps: S201: Determine the target disassembly parts; S202: Initialize the parts collection List and the necessary disassembly parts collection doneList, and put the target disassembly parts into the List; S203: traverse the part element i in List, according to G p , query the necessary disassembly parts of part i, record them, then delete part element i from List and put it into doneList; S204: Put the necessary disassembly parts recorded in step S203 into List, and check whether the List is empty. If it is not empty, return to step S203. If it is empty, directly output doneList.
4. The selective disassembly sequence planning method based on the improved sparrow algorithm according to claim 3 is characterized in that: The step S3 comprises the following steps: S301: Based on doneList in step S204, randomly select a part element i; S302: According to G p ,like Then part element i can be disassembled, remove it from doneList, put it into the disassembly sequence, and update G p , the update method is G p The elements in the i-th column are all 0; if If the component element i cannot be disassembled, the process returns to step S301 and randomly selects another component element; S303: If The disassembly sequence establishment is completed; if the number of elements is not 0, return to step S301; S304: If the specified sequence population number N is reached, output the complete sequence population; if the population number is not reached, restore the doneList sequence and return to step S301.
5. The selective disassembly sequence planning method based on the improved sparrow algorithm according to claim 4 is characterized in that: Step S3 The fitness function F of the selective sequence is used to evaluate the quality of the sequence. The smaller the fitness value, the smaller the cost required to disassemble the sequence, and the better the sequence. The update formula of the sequence is: Where N represents the total number of parts, w b , w d , w t are the corresponding weight coefficients respectively, Tb is the time cost for disassembly of basic parts, Td is the time cost for change of disassembly direction, and Tt is the time cost for change of disassembly tools.
6. A selective disassembly sequence planning method based on improved sparrow algorithm according to claim 5, characterized in that: The step S4 improves the sparrow algorithm to discretize it, uses chaotic mapping and designs operators to guide sequence updates and changes, uses a sequence repair module to repair sequences that do not conform to disassembly rules, adds a concentration mechanism to improve the algorithm search space, and solves the optimal solution, including the following steps: S401: Identify the sequences according to their fitness values. The identity authentication rule is: sort the sequences from small to large fitness values, set the top 20% of the sequences as searchers, and the remaining sequences as trackers. Select 10% of the entire group as sentinels. S402: The searcher conducts peripheral exploration around its own sequence, selects a segment according to a set ratio to intercept the sequence segment with the smallest fitness value, and randomly selects a suitable position for displacement or exchange according to the selection ratio. The two operation modes of displacement and exchange are divided into two exploration modes: small displacement and large displacement; S403: The tracker will learn from the searcher's fragments, which is divided into two modes: aggregation and discrete. In the aggregation mode, the tracker will select the searcher's excellent sequence fragments for learning according to the selection ratio, and the discrete mode / new solution; S405: Calculate the similarity of sequence elements, establish a concentration matrix, calculate the concentration of each sequence, and update the sequence with a higher concentration and a larger fitness value until the sequence meets the concentration threshold requirement and is then put into the sequence population; S406: Re-identify the sequence population according to the identification rules of step S401. If the number of algorithm iterations is met, output the sequence with the smallest fitness value in the current population as the final solution, otherwise continue to execute step S402.
7. The selective disassembly sequence planning method based on the improved sparrow algorithm according to claim 6 is characterized in that: The steps S403 and S404 include using chaotic mapping to generate a chaotic sequence, guiding the sequence change, and updating the chaotic sequence using the Logistic equation. The update formula is as follows: WITH n+1 =μ·Z n (1-Z n ),n=0,1,2...,m Where: Z n ∈[0,1(n=0,1,2…,m)] represents the set of chaotic variables of the nth generation, and it is proved that the mapping is completely chaotic when μ=4; Z0 is the initial condition for generating chaotic sequence, which is generated by random variables, Z 0(i) represents the i-th element in Z0, Z 0(i) The generation rules are as follows: Where N is the total number of disassembled parts, generating Z 0(i) When , the initial variables that cannot be generated and cause the logical mapping failure include (0, 0.25, 0.5, 0.75, 1); The steps S402, S403, S404, and S405 include a sequence repair module, which repairs the sequence that does not meet the disassembly constraints while maintaining the constraints as much as possible and maintaining the original sequence rules. The rules of the sequence repair module are: According to the constraint priority matrix G p , determine whether the part elements in the to-be-repaired sequence (TS) can be disassembled, move the disassembled parts to the repaired sequence (RS), and update G p , the parts that cannot be disassembled at present are moved to the cached sequence (CS), and in the subsequent loop traversal, priority is given to whether the part elements in CS meet the disassembly rules, and finally RS is output to complete the sequence repair.
8. The selective disassembly sequence planning method based on the improved sparrow algorithm according to claim 6 is characterized in that: The sparrow algorithm is specifically as follows: initialize a certain number of sparrow populations, use the fitness function to calculate and sort the advantages and disadvantages of the position of each sparrow in the space, use sparrows with high fitness values as searchers, and the rest as trackers, and select a certain proportion of the population as vigilants to play a detection and early warning role; The formula for updating the discoverer's position is as follows: In the formula, It represents the position of the i-th sparrow in the j-th dimension when the algorithm iterates to the t-th time. T represents the maximum number of iterations, is a constant, and is a random number between (0,1]. Q is a random number that follows a normal distribution. L is a d-dimensional row vector in which each element is 1. The tracker sparrow is responsible for following the direction of the searcher sparrow and searching near it. Its position update formula is as follows: In the formula, It means the worst position of the sparrow in the j dimension when the population iterates to the tth time. represents the optimal position of the sparrow in the jth dimension when the population is iterated to the t+1th time. A represents a 1×n matrix, and the elements in the matrix are randomly assigned 1 or -1, and A + = AT(AAT)-1; The alert sparrow is randomly selected from the entire population of searchers and trackers and is responsible for observing the surrounding environment. Its position update formula is as follows: In the formula, β represents the step size control parameter, which is a random number that obeys the standard normal distribution, K is a random number in the interval [-1,1], and ε is a very small constant, which is used to avoid the situation where the denominator is zero.
9. The selective disassembly sequence planning method based on the improved sparrow algorithm according to claim 6 is characterized in that: The step S405 includes sequence concentration value calculation, and the concentration value calculation steps are as follows: S4051: Calculate the similarity of sequence elements. The similarity is defined as: Where Seq(g, i) represents the i-th element of sequence g, Sim(g, h, i) represents the similarity of the element, if the i-th element of Seq(g) in the tracker is the same as the i-th element of another sequence Seq(h) whose identity is the tracker, then the element similarity Sim(g, h, i) is 1, otherwise it is 0, g, h = 1, 2, ..., S, S represents the number of sequences, i = 1, 2, ..., N, N represents the number of parts that need to be disassembled; S4052: Solve the concentration matrix CM, which is defined as follows: Where: In the formula, co gi represents the sum of similarities of Seq(g, i), and Follow represents the set of sequences whose sequence identity is the follower; S4053: Solve the sequence concentration value C g , concentration value C g The calculation formula is as follows: Where: NUM(Follow) represents the number of follower sequences in the sequence population; Sequences with high concentration values and poor fitness values need to be updated so that the updated sequences meet the specified concentration threshold before they can enter the population for the next search optimization.
