A New Effective Algorithm for Mechanical Assembly Sequence Planning

This paper presents a new approach for searching the most favourable mechanical assembly sequence. The proposed method is described and its basic modules are presented. The concept is based on the assumption that the method should help the engineer in specifying the best assembly sequence with the short possible time calculation, taking into account the principles of design for assembly at an early stage of development of the product design. The algorithm for generating an accurate assembly sequence was described in detail and its application on real-life example was presented.


INTRODUCTION
Machines and mechanical devices assembly process, consisting in combining of their individual components in the assembly units of a higher order, up to the complete assembly, is one of the most important step in the process of product implementation.According to literature, the assembly process constitutes about 30-50% of the cost of the product manufacturing [1, 12,15].Labour intensity of the assembly process grows along with the number of product parts, and the proper conduct of this process depends on the order and the correct connection of the parts [5, 17,19].Hence, it is important to determine the best sequence of connecting the components (assembly sequence) of the product [10,19,30].With a large number of components, the issue of determining the best assembly sequence is complex [9,24].Determining the optimal (in accordance with the assumed requirements) assembly sequence without computer help is much more difficult with complex products.
Determining the optimal assembly sequence with simultaneous construction evaluation including the assembly requirements is significant, as noted above, especially at an early stage of the product design development, in its design conceptual phase [7,13,21].It is then possible to design the product concurrently with its assembly process, which greatly speeds up the product final implementation.Moreover, such an approach allows early identification of flaws in the construction (or its components) and necessary (from the assembly viewpoint) corrections at the design stage.
In the literature one can find a lot of views on the assembly sequence generating [2,31] formulated an algorithm for generating all the permissible assembly sequences, which was based on a list of questions.These questions resulted in obtaining relations for the analysed constituents of a product.A similar algorithm is the one by De Fazio and Whitney [8], however it is based on determining relations for assembly operations, which characterise pairs of combined parts.Sanderson and Homem de Mello [22] developed an algorithm allowing to build a relational model, on the basis of which, using graph operations (graph cuts of and/or type), a set of all the possible assembly sequences was gained.Other studies related to determining the assembly sequences use for instance exploded views of the products, artificial intelligence methods.Recently, you can see a different approach to generating sequences for assembly, such as the use of artificial intelligence [16], augmented reality [18], harmony search algorithm [14], Taguchi method [29], ant colony [28] and other algorithms [20].All the above approaches are applicable in the case of a previously developed product structure.Similarly, other approaches make the analysis of the assembly process possible, but only after the manufacturing stage, when the product components are ready and their assembly process is planned [3,11,23].In this case any construction changes are really expensive and involve redesign of the product and repeated production of components which have undergone construction changes.

CHARACTERISTICS OF THE METHOD OF ASSEMBLY SEQUENCE PLANNING
The implemented method is proposed to determine the best assembly sequence of the product components.The assumption is that the method should be applied at the early stage of design (preliminary design) once the structure of the product has been determined.At this stage, after the proposed method had been applied, the combinations for joining parts of the product can be generated.Also, it is possible to evaluate designated sequences and every combination in them due to efficiency of its assembly.As a result, after an analysis of the output (best) sequences, it is possible to change some of the design features of the product components (or even its structure) to streamline the process of assembly.In this case, any changes to the initial solution will be implemented before the detailed design phase, without the involvement of unnecessarily large amount of time, and, above all, without the excessive cost [25,26,27].
The method is based on the Easyassembly algorithm, described in earlier publications [26,27].The distinguishing feature of the Easyassembly algorithm is the analysis of all relations between the product's components and, based on the restrictions defined, a determination and evaluation of all permissible assembly sequences.Only on this basis can the best solution -or equivalent solutions -be determined.Proposed method is aimed at determining the optimal assembly sequence, without having to search through all potential solutions.
It is assumed that application of the proposed method could contribute to: high product quality, reduction of time and cost of launching the product to the market, simplification of the process of connecting the product components, minimization of positioning, adjustment of the structure components for ease of handling, selection (or change) of the connection type to shorten the process, reduced complexity of the parts shape, reduction of the force necessary to set the elements in relation to each other, etc. [4, 6,9].

Problem of determining the assembly sequence
Determination of the feasible (possible) sequence assemblies is a complex issue, and as the complexity of an assembly (machine) increases it leads to the phenomenon of the so-called 'combinatorial explosion'.The number of possible combinations for increasing number of components grows according to the factorial function (permutations of n-element set, where n is the number of the product components).Hence, when the parts number is greater, a systematic analysis of all variants is virtually impossible without a proper instrument.Such an analysis is not necessary after all, as there are plenty of unfeasible and not recommended variants in this theoretical set.Effective assembly sequence generation algorithm should be characterised primarily by elimination of all the solutions from the result set, which in terms of actual implementation are unfeasible or incorrect.It can be accomplished by defining the appropriate constraint requirements.

General characteristics of the method
The proposed method for determining the set of feasible assembly sequences and their evaluation and selection belongs to the category of classic formal methods.In this method four basic and implemented sequentially modules can be distinguished.In the first module the product design is mapped in the form of design structure matrix P. In the second module, all relations stored in the P matrix are evaluated.The result of the implementation of the first two modules is a record of the product design structure in theform of P matrix and assigning an evaluation indicator to each relation stored in this matrix.In the thirdmodule precedence constraints for the assembly connections are defined (generated on the basis of the P matrix).They are taken into consideration to determine the feasible assembly process.The last module ofthe method is the algorithm for generating the optimal of feasible assembly sequence.The next sectionsdescribes the method's modules.
Explanations of the basic modules of the method and the accompanying notation of entries, as well as the operation of the algorithm for generating the most advantageous assembly sequence, will be presented in the well-known example from the literature [22,30] of a 6-element, ball-point pen, as shown in Figure 1.It was assumed that all the components of the pen are solid.They are marked, respectively: X 1 -Cap, X 2 -Head, X 3 -Body, X 4 -Ink, X 5 -Tube, X 6 -Button.

Notation in the product structure design
All contact relations between the components of the product are identified on the basis of product designstructure.Contact relation is understood as the possibility of combining two parts.Established relations(connections) are stored in the form of a graph (connection diagram) and the corresponding matrix P, calledfurther the relationship matrix or structure design matrix, given in the following form: It is assumed the notation X i → X j to record connection between the components X i and X j .This matrix has a size of n × n, where n is the number of the product components.If there is no relationship between the elements (or if it is not possible connect two elements) no type of relation is assigned and the corresponding entry of matrix P stays empty.The suitable form of the relationship matrix P with all the possible connections between the components for the six-parts ball-point pen mentioned earlier (Fig. 1) we can read as: In order to evaluate an optimal assembly sequence we apply the weights matrix Q with positive components: The finite indicator q ij describes the weight of connection X i → X j and it is usually designated in the literature [4].It was developed on the basis of experts' knowledge and multiple analysis conducted in actual companies, and described in publications [1,4,25].Thus the weight matrix for the ball-point pen example has the following form:

Defining the constraints
Determination of the correct assembly sequences requires appropriate precedence constraints.They are related to the set of connections recorded in the P matrix and defined in the list L. This type of constraints are called blocking connections and prevent or limit of getting a complete assembly in the later course of the assembly process.They have a direct influence on generating correct order of combining the parts, in terms of the selection completeness.The list of blocking connections L is characteristic of those preceding connections, which prevent the realisation of the connection for which they are defined.This way the possibility of incorrect sequence when combining the parts is eliminated.It is assumed the blocking connections need to be defined with the operator 'AND' (∧) and 'OR' (∨).In the first case, assigning the 'AND' operator to the blocking connections (l 1 ∧ l 2 ∧ ...∧ l n ) means that connection l n , for which the blocking connections are defined, can be executed before every blocking connection is made.Thus, it is possible to make n − 1 blocking connections before the connection l n , for which blocking connections were defined.If all the blocking connections are executed, it is impossible to achieve complete assembly of the whole product because realisation of the connection ln is blocked.In the second case, assigning the 'OR' operator to the blocking connections (l 1 ∨ l 2 ∨ ...∨ l n ) means that connection l n , for which the blocking connections are defined, has to be executed before any of them.Even if one of the blocking connections is made, it is impossible to achieve complete assembly of the whole product because realisation of the connection ln is blocked.Moreover, it is possible to define blocking connection sequences (with the 'AND' operator) separating them by the use of the 'OR' operator.The suitable constraints for our example model are presented in the Table 1 and 2.

The new algorithm for mechanical assembly sequence planning
In order to realize computer aided analysis for mechanical assembly sequence planning, the following algorithm was developed.On the basis of the relationship matrix P, the weights matrix Q and the list L of blocking connections AND/OR, it allows us to determine complete and correct assembly sequence.The executed sequence of connections of parts and the minimum value of cost function W* are given as an output of algorithm (Fig. 2).
Table 1.The list L of defined OR type restrictions for the six components ball-point pen assembly

Assembly connection
Blocking connections of OR type The list L of AND type restrictions for the six components ball-point pen assembly Assembly connection Blocking connections of AND type

Fig. 2. Algorithm flowchart
The main steps of Algorithm: 1. Defining a set S of possible initial components.If only there exists in the column i of matrix Q element with finite value, the component X i could be initial in the assembly process.2. For each X S ∈ S find the best assembly sequence and calculate the corresponding value of cost function W S : i. Find as a sorted vector Q min of Q S (I,J) from minimum to maximum value, where I and J denote sets of indices of components which are not yet and are already used in the current assembly sequence.Take n = 1.ii.Take the assembly connection X i → X j with the value of weight matrix Q min = Q S (i,j).
If Q S (i,j) is not finite, take W S = ∞ and break the construction process of the assembly sequence for given X S .iii.If according to the list L execution of connection X i → X j does not lock feasibility of another one, execute X i → X j .iv.If according to the list L exist connections of components which will be blocked by execution X i → X j , force those with minimum weight X k → X l .If it is not feasible, i.e. component X l is not yet in the current assembly sequence (l ∉ J) or execution of connection X k → X l block feasibility of another one, take n = n + 1 and go to Step 2 (ii).v.After joining component X m to the current assembly sequence delete all blockages from the list L for assembly connections X m → X r , r ∈ {1, ..., m − 1, m + 1, ..., n}.Update sets I and J, value W S and matrix Q S .3. Find the best assembly sequence with minimum value of cost function W* = {W S , X S ∈ S}.

Case study
A formal description of assembly detection algorithm of mechanical assembly sequence planning can be illustrated with the help of the six components ball-point pen assembly from Fig. 1.Then, as depicted in the section 2, the relationship and the weights matrices have the following forms: and the list of blocking connections is given in the Table 1 and 2.
STEP (1): We start our algorithm by determining the set of possible initial components: STEP (2): Let us take as an initial part X 1 (base component).Then we define: Minimum value of submatrix Q 1 (I,J) is equal Q 1 (3,1) = 1.0 (step 2(ii)).According to the list L (Table 1) we notice that execution of connection X 3 → X 1 will block feasibility of connections X 2 → X 3 and X 3 → X 2 .Then the algorithm try to force those with minimum weight (step 2(iv)).Since elements X 2 and X 3 are not yet in the current assembly sequence, the algorithm is not able to force neither of these connections.Hence we take the second minimum element of Q 1 (I,J) (step 2(ii)).However it is not finite and the process of assembly sequence generation is incomplete and broken.
Let us take as an initial part X 2 (base component).This time we begin with: (8) We get minQ 2 (I,J) = Q 2 (3,2) = 1.4,which implies assembly connection X 3 → X 2 .On the basis of the list L we notice that execution of this connection will block feasibility of connections X 4 → X 2 or X 5 → X 2 .Therefore, the algorithm forces X 5 → X 2 (step 2(iv)) and updates Further, minQ 2 (I,J) = Q 2 (3,2) = 1.4 gives X 3 → X 2 with minimum weight.Since the list L shows again that execution of this connection will block feasibility of connections X 4 → X 2 , the algorithm returns X 4 → X 2 with values Proceeding next lines of the algorithm we have the following results: Firstly, on the basis of minQ 2 (I,J) = Q 2 (3,2) = 1.4 we force assembly connection X 3 → X 2 (step 2(iii)) and get J = {2, 3, 4, 5}, I = {1, 6}, W 2 = 4.8 and Secondly, the minimum value of submatrix Q 2 (I,J) is equal Q 2 (1,3) = 1.0, which implies connection X 1 → X 3 and modifies the following values Finally, from minQ 2 (I,J) = Q 2 (6,3) = 1.4 (X 6 → X 3 ) we finish step 2 of the algorithm having get J = {1, 2, 3, 4, 5, 6}, I = ∅ with the final value of cost function W 2 = 7.2.Thus, the complete assembly sequence of the product with base component X 2 is given by Following the same procedure, we continue our algorithm choosing as an initial parts X 4 and X 5 .Then we will get the following result: Base component X 4 : the final value of cost function W 4 = 7.2, the complete assembly sequence of the product Base component X 5 : the final value of cost function W 5 = 7.2, the complete assembly sequence of the product On the other hand, if we choose as base component X 3 or X 6 , the process of assembly sequence generation will be incomplete.In the first case we begin with ).According to the list L execution of X 1 → X 3 will block feasibility of connection X 2 → X 3 (step 2(iv)).Next, the algorithm is not able to force it because execution of X 2 → X 3 blocks feasibility of another connections (Table 1).Since components X 2 , X 4 and X 5 are not in the current assembly sequence, we take second minimum value of submatrix Q 3 (I,J).Then, on the basis of minQ 3 (I,J) = Q 2 (6,3) = 1.4 we execute X 6 → X 3 receiving However, sorting Q 3 (I,J) in ascending order by finite weight we notice again, that execution each of two assembly connections X 1 → X 3 or X 2 → X 3 will not be successful.Therefore, the algorithm will break the process of assembly sequence generation assigning values W 3 = ∞.If we choose as base component X 6 the process of assembly sequence generation will be also incomplete.Despite the algorithm executes the first connection X 3 → X 6 with weight Q 6 (3,6) = 1.4, it try to force again either of connections X 1 → X 3 or X 2 → X 3 in the next step.Hence the algorithm breaks the process of assembly sequence generation updating values W 6 = ∞.STEP (3): Finally, on the basis of the above results we find out the minimum value of cost function W* = min{W 1 ,W 2 ,W 3 ,W 4 ,W 5 ,W 6 } = 7.2 (18) with the choice as an initial part one of the parts X 2 , X 4 or X 5 .In this case, the algorithm returns three possible assembly sequence of the product represented by

Real life example
In this subsection we apply our algorithm to larger and real-life example.To this end, we consider the gas burner (Fig. 3) which has more complex structure.
The programming software Matlab was used to implement the algorithm into a computer program.Specifying input data we define the relationship matrix P and the weight matrix Q in the following form  It must be also emphasized that for the remaining parts from the set S, the algorithm display the incomplete assembly sequences.

CONCLUSIONS
The effective algorithm for determining the most advantageous assembly sequence, presented in the article, was tested on many examples, including those taken directly from industry.This algorithm has been improved in relation to the Easyassembly algorithm, previously developed.By design, the Easyassembly algorithm generates a set of all acceptable solutions and, based on an appropriate evaluation of the sequence, determines the best solution, i.e. a sequence with minimal weight.An important disadvantage of this is the high computational complexity of the algorithm.To avoid this problem, a new, effective algorithm has been proposed, as described in this article.Instead of searching the entire set of solutions, it determines the most favourable assembly sequence in each case.Taking into account the construction and the ordering conditions of individual elements of the products analysed and the relationships and/or restrictions between them, the algorithm significantly reduces the time taken to determine an effective solution, without having to generate a set for all solutions.
The model example of a six-element pen, often used for cognitive purposes in publications, presents the basic steps of the algorithm and its effectiveness.The results, that is, the assembly sequences obtained, coincide with those obtained with the Easyassembly algorithm.It is worth mentioning that the time needed to determine the most favourable sequence, is definitely much less in the algorithm proposed.
In the subsection 3.2 of this paper selection of the best assembly sequence is presented on a real-life example of the gas burner.There has been obtained one assembly sequence of thirteen constituent parts of the considered gas burner, which is characterised by the minimum value of the cost function W* = 52.44.This result was verified and compared to the results obtained with the use of the Easyassembly method.Making a comparison between the algorithm for selection of the most favourable assembly sequence proposed in this article and the solution obtained by the Easyassembly method shows the same optimal sequence.This result is obtained in relatively short calculation time without the necessity of searching through the complete set of possible solutions.
The distinguishing feature of the algorithm, presented in this article, is the inclusion of the difficulties experienced when implementing it, due to aspects within the assembly process -in accordance with the DfA methodology (Design for Assembly) -and the use of this assessment to evaluate the assembly sequence when assessing individual assembly pairs.In addition, this algorithm allows the most advantageous solution to be quickly determined, with a simultaneous, initial indication of the base element.From a practical point of view, the algorithm developed integrally facilitates planning of the sequence of the assembly of the product, so that it is contemporaneous with its structural and technological development.This gives designers and technologists, as well as process engineers, the possibility to plan a product's development and, ultimately, to introduce it onto the market quickly, thus ensuring competitiveness for this product.
Table 3.The list L of defined restrictions for the gas burner (Fig. 6)

Assembly connection
Blocking connetions of OR type Blocking connetions of AND type