Keywords

1 Introduction

Assembly sequence planning (ASP) aims to find a proper sequence of assembly operations under some operational constraints and precedence constraints. ASP is an important manufacturing process in that the quality of assembly has a direct effect on the performance of product. According to a statistical report, a good assembly sequence can reduce costs of manufacturing about 20 %–40 %, and can increase the productivity about 100 %–200 %.

Traditional methods of assembly sequence planning are based on cut-sets [1] or assembly knowledge representation [2]. A shortcoming of these methods is that they have to face the combinatorial state explosion problem caused by the increasing of the number of parts [3]. During the past 20 years, many researchers tried to apply intelligent algorithms to solve the ASP problem [4–9] and got many good results.

Artificial bee colony (ABC) algorithm is an artificial intelligence algorithm that was proposed for the multi-variable and multi-modal optimization of continuous functions. It simulates the emergent intelligent behaviour of foraging bees in three phases. At the initial phase, the scout bees start to explore the environment randomly in order to find a nectar source. After finding a nectar source, a bee becomes an employed bee and starts to exploit the discovered source; it returns to the hive with the nectar and share information about the source site by performing a dance on the dance area. Onlooker bees waiting in the hive watch the dances and choose a nectar source through the information shared by employed bees by using a wheel selection. If a source is exhausted, then the employed bees that are working in that source become scouts again and start to randomly search for new sources. Compared with the genetic algorithm [4], the firely algorithm [6] and the particle swarm optimization algorithm [7], the ABC algorithm is more competitive in the ability of global searching and the speed of convergence. It has been used to solve the global optimization problem [10], global numerical optimization [11], real-parameter optimization [12], shop scheduling problem [13] and disassembly planning problem [14].

In this paper, we apply the ABC algorithm to solve the assembly sequence planning problem. In order to improve the ability of searching optimal solution; we embed the simulated annealing algorithm and a local searching algorithm into the ABC algorithm. At the same time, we use a tournament selection mechanism to replace the wheel selection mechanism for escaping from local optimum. Furthermore, we apply a cooperative learning mechanism in the scout bee phase to improve the convergence speed, and propose a suitable fitness function to evaluate and filter nectar sources. In the rest of this paper, we call the improved algorithm as hybrid artificial bee colony algorithm (HABC).

2 Optimization Model of Assembly Sequences

In this paper, we use the following assumptions to simplify the optimization model of assembly sequences. (1) All the parts are rigid. In another word, no part is deformable in the assembly process. (2) The assembly directions are restricted to \( \pm {\text{X}}, \pm {\text{Y}}, \pm {\text{Z }} \) direction in the three orthogonal coordinate axes. (3) Along each direction only one part is assembled, and in each assembly operation process only one tool is used.

An evaluation index for the fitness function is proposed to evaluate and filter the nectar sources: geometric feasibility, assembly stability, the number of parts violating local assembly precedence, and changes of assembly directions, tools and connections. The fitness function is applied to find the optimal nectar sources which are the optimal or near-optimal assembly sequences.

2.1 Geometric Feasibility

An assembly sequence satisfying geometric feasibility can ensure that the movement path of part is collision-free. In this paper, we use Cartesian 6 coordinate to represent the assembly directions \( d_{k} = \left\{ { \pm x , \pm y, \pm z} \right\} \). The values of 0 and 1 represent the interference between the parts. The \( I_{{ijd_{k} }} \) represents the interference in the \( d_{k } \) direction between \( p_{i} \) and \( p_{j} \), which is shown in formula (1);

$$ I_{{ijd_{k} }} = \left\{ {\begin{array}{*{20}c} {0,\,{\text{there}}\,{\text{is}}\,{\text{no}}\,{\text{interference}}\,{\text{in}}\,{\text{the}}\,d_{k} \,{\text{direction}}\,{\text{between}}\,\,p_{i} \,{\text{and}}\,\,p_{j} } \\ {1,\,{\text{there}}\,{\text{is}}\,{\text{an}}\,{\text{interference}}\,{\text{in}}\,{\text{the}}\,d_{k} \,{\text{direction}}\,{\text{between}}\,\,p_{i} \,{\text{and}}\,\,p_{j} } \\ \end{array} } \right. $$
(1)

We assume an assembly sequence \( {\text{AS = }}\left\{ {p_{1} } \right., p_{2} , \ldots , \left. {p_{n} } \right\}, \) when the subsequence \( AS_{1} = \left\{ {p_{1} } \right., p_{2} , \ldots , \left. {p_{m} } \right\} \) was assembled and \( p_{i} \) will be assembled, we represent the sum total of interference between \( p_{i} \) and all parts of \( AS_{1} \) in the \( d_{k} \) direction with \( S_{k} (p_{i} )({\text{k }} = 1, 2, \ldots , 6) \) which is shown in formula (2):

$$ S_{k} \left( {p_{i} } \right) = \sum\nolimits_{j = 1}^{m} {I_{{p_{i} p_{j} d_{k} }} } $$
(2)

\( S_{k} \left( {p_{i} } \right) = 0 \) indicates that the part \( p_{i} \) can be assembled in the \( d_{k} \) direction; otherwise it cannot. Then we can get a set of assembly directions of the part \( p_{i} \): \( {\text{DC}}\left( {p_{i} } \right) = \left\{ {d_{k} | S_{k} \left( {p_{i} } \right) = 0} \right\} \). For any part \( p_{i} \), if \( {\text{DC}}\left( {p_{i} } \right) \ne {\emptyset } \), \( {\text{AS }} \) is a geometric feasible assembly sequence, infeasible otherwise. We represent the number of interference of \( {\text{AS }} \) with \( n_{f} \), that is the number of \( {\text{DC}}\left( {p_{i} } \right) = {\emptyset } \).

2.2 Assembly Stability

Parts or subassembly may be unstable, for its own gravity in the actual assembly process. Auxiliary devices are needed to maintain the stability of parts in the assembly process once some parts are unstable. For this reason, we consider the assembly stability as an evaluation index.

The tight fit, interference fit, screw, rivet and welding are the strong assembly connections which are the stable connections. The clearance fit, sticking and attachment are the weak connections; the surface mating and other fits without force are the unstable connections [15]. The values of \( s_{ij } \) represent the assembly connections between the \( p_{i} \) and \( p_{j} \): \( s_{ij} = 2 \) indicates that they are joined by strong connections; \( s_{ij} = 1 \) indicates that they are joined by weak connections; \( s_{ij} = 0 \) indicates that they are joined by surface mating without force. Then the assembly stability can be represented with the stability matrix which is shown in formula (3):

$$ {\text{SM}} = \left[ {s_{ij} } \right]_{n \times n} $$
(3)

It is a stable connection if \( s_{ij} = 2 \), otherwise not.

Given that the temporary stable subassembly is represented as \( AS_{1} = \left\{ {p_{1} } \right.,\,p_{2} , \ldots , \left. {p_{m} } \right\} \) (m is the number of parts which have been assembled), the part \( p_{i} \) is to be assembled in the next step. The assembly stability of the part \( p_{i} \) with \( AS_{1} \) can be concluded depending on the stability matrix \( {\text{SM}} \). The correlative stability value \( s_{ij } \left( {1 \le {\text{j }} \le {\text{m}}} \right) \) can be inferred as \( \left\{ {s_{i1} , s_{i2} , \ldots , s_{im} } \right\} \). If \( s_{ij} = 2 (1 \le {\text{j }} \le {\text{m}}) \), the part \( p_{i} \) and \( AS_{1} \) will be stable after they are assembled. Otherwise, the part \( p_{i} \) needs auxiliary devices in the assembly process. The assembly stability of each part will be checked and the number of parts \( n_{s} \) that make the subassembly self-stable in the assembly sequence can be computed.

2.3 The Number of Parts Violating Local Assembly Precedence

The reasonable assembly sequences not only satisfy the geometrical feasibility, but also the constraint relationships between parts. Therefore, the assembly precedence relationships of parts must be taken into consideration. For the complex assemblies, there will be too many possible assembly sequences, but most of them are actually not ensured to be correct. Even if the assembly sequences satisfy the geometrical feasibility, some parts maybe violate the local assembly precedence still. So the violating assembly precedence is another considerable index to evaluate assembly sequences. To an assembly sequence \( {\text{AS}} = \left\{ {p_{1} } \right.,\,p_{2} , \ldots , \left. {p_{n} } \right\} \), the number of parts violating local assembly precedence \( n_{p} \) can be obtained easily by assembly precedence matrix (APM) described in Sect. 3.2.

2.4 Changes of Assembly Directions, Tools And connections

The changes of the assembly directions, the assembly tools and the assembly connection types in the assembly process have a great effect on the assembly efficiency and cost. To improve the assembly efficiency and reduce the assembly cost, the parts assembled in the assembly direction, and the assembly connection types and assembly tools are suggested to be assembled in groups. The assembly directions of parts can be derived from the assembly interference matrix. Once the assembly sequence is confirmed, the number of change \( n_{d} \) of the assembly directions of all parts can be counted.

The assembly tools used to assemble one part may be multiple. The selected tools to assemble the current part should be the same as those used to assemble the former part so that the time for changing the tools can be shortened. All the assembly tools can be represented by a tool matrix \( {\text{TM = }}\left[ {t_{ij} } \right]_{n \times m} , \) here n is the number of parts and m is the number of practicable tools to assemble the corresponding part. After the optimal or near-optimal assembly sequences have been generated, the corresponding tools are also confirmed at the same time and the number of change \( n_{t} \) of the assembly tools can be obtained.

It is assumed that the connection type for assembling each part is unique and the connection types of parts are determined in the design process. The assembly connections to assemble the parts can be represented as a vector of connection \( {\text{CM = }}\left[ {c_{ij} } \right]_{n \times 1} . \) When the assembly sequences have been ascertained, the number of change \( n_{t} \) of the assembly connection types can also be acquired.

2.5 Fitness Function

Each evaluation index has different effects in the assembly process, so it is reasonable to put different weights on each index. Then the fitness function can be defined as the formula (4) and (5) by using the different weights:

$$ f_{1} = c_{s} n_{s} + c_{p} n_{p} + c_{d} n_{d} + c_{t} n_{t} + c_{c} n_{c} $$
(4)
$$ f_{2} = c_{f} n_{f} $$
(5)

\( c_{f} ,\, c_{s} ,\,c_{p} ,\,c_{d} ,\,c_{t} \), and \( c_{c} \) are the weights of the evaluation indices respectively.

Fitness function is the metric of evaluating assembly sequences. Similarly, it is the metric of evaluating nectar sources in the search process. The smaller the value, the better the nectar source quality, and the assembly sequence is better correspondingly. If an assembly sequence satisfies the geometrical feasibility, formula (4) will be used to calculate the assembly cost; otherwise formula (4) and (5) will be used.

3 Assembly Sequences of HABC

The basic ABC algorithm was first used to solve optimization problems of continuous functions. A hybrid ABC algorithm is proposed to solve multi-objective optimization problems in the assembly sequence planning. HABC algorithm makes full use of swarm intelligence sharing information to accelerate search efficiency.

3.1 Nectar Source Code

In HABC algorithm, nectar position can be represented with the decimal sequence. Each nectar source is an assembly sequence. Profitability of nectar sources is used to measure the quality of assembly sequences. Each number and its location in the sequence represent the number and the assembly order of parts respectively. Suppose that a product is made up of 9 parts, the coding scheme can be described in Fig. 1:

Fig. 1.
figure 1

Nectar source code

If the assembly sequence of Fig. 1 is a feasible sequence, the parts are assembled orderly from 3 to 7. Its quality is evaluated by the fitness function.

3.2 Initial Nectar Source

If the initial nectar sources are produced random completely, it will generate large amount of infeasible sequences which can affect the efficiency of algorithm. If all initial nectar sources are feasible sequences, it will affect the diversity of nectar sources. To guarantee an initial population with certain quality and diversity, a portion of nectar sources are generated by using some priority rules whereas the rest are produced randomly.

The assembly precedence matrix (APM) is used to generate partial sequences as the initialization nectar sources in a generator (Fig. 5) assembly [16]. A value of \( {\text{b}}_{\text{ij }} = 1 \) represents that part \( {\text{c}}_{\text{i}} \) must be assembled before part \( {\text{c}}_{\text{j}} \); a value of \( {\text{b}}_{\text{ij }} = 0 \) represents that there is no precedence between the two parts \( {\text{c}}_{\text{i}} \) and \( {\text{c}}_{\text{j}} \). If \( {\text{i}} = {\text{j}} \), we set \( {\text{b}}_{\text{ij }} = 0 \). APM for a generator is shown as follows (Fig. 2):

Fig. 2.
figure 2

Assembly precedence matrix for a generator

3.3 Employed Bee Phase

In the basic ABC algorithm, for each nectar source, there is only one employed bee. Employed bees use a greedy selection through its observed information to search for a better nectar source in the neighborhood of the present nectar source. To enrich the neighborhood structure and diversify of the population, simulated annealing algorithm are utilized to generate neighboring nectar sources for the employed bees [17].

The above method for generating new nectar sources follows the assembly precedence relations, thus it can improve the quality of nectar sources continually in the evolution process. ABC algorithm has strong exploration ability and weak exploitation ability. Therefore, a local search algorithm is presented in Sect. 3.6 in order to balance the global exploration and local exploitation of HABC. The selection of nectar sources carries out a greedy selection which is the same as in the basic ABC algorithm: if new nectar source is superior to its current nectar source in terms of profitability, the employed bee memorizes the new position and forgets the old one; otherwise, the previous position will be kept in memory.

3.4 Onlooker Bee Phase

Onlooker bees wait in the hive and select a nectar source to exploit with a certain probability based on the information shared by the employed bees. This selection is called the wheel selection which is easy to fall into local optimum. It maybe causes all the onlooker bees fly to the same nectar source, while the others cannot recruit onlooker bees. Instead of the wheel selection, we use the tournament selection due to its simplicity and ability to escape from local optimum.

In the tournament selection, an onlooker bee selects a nectar source in such a way that two nectar sources are picked randomly from the population and the better one is chosen. It means that half of the nectar sources will be exploited by onlooker bees and there is a greater probability to find the optimal nectar sources (the optimal or near-optimal assembly sequences). In addition, the onlooker utilizes the greedy selection as used by the employed bee. Then all the local nectar sources approach the local optimum, and this could help find better nectar sources. There are three options for the employed bee which has not recruited onlooker bees:

  1. (a)

    It can return to the nectar source and continue to exploiting it.

  2. (b)

    It can be an onlooker, waiting to be recruited by other employed bees in the hive.

  3. (c)

    It can be a scout and starts searching around the hive for a new nectar source.

To guarantee the diversity of nectar sources and keep the nectar sources quantity constant at each iteration of the algorithm, we just consider the first and the third behaviors for such a bee.

3.5 Scout Bee Phase

In the basic ABC algorithm, if a nectar source cannot be further improved through a predetermined number of trials limit, then the nectar source is assumed to be abandoned, and the corresponding employed bee becomes a scout bee. To make full use of the swarm coordination of information sharing, we suppose that the scout bees learn from the current optimal (minimum fitness value) nectar sources when generating a new one. Since the search space around the best nectar source could be the most promising region, the new nectar source approaches the local optimum after every iteration of algorithm. This will increase the search efficiency and accelerate the converging speed in later convergence phase.

To avoid the algorithm trap into a local optimum, the scout bee first generates a nectar source randomly; then it learns from the current optimal nectar source with the probability P; finally, it can get a new nectar source. Next, the scout performs the function of the employed bee. The process of a scout generating a nectar source is that the new nectar source inherit the parts of the optimal nectar source with a random probability r < P, the rest inherit random sequences in order (Fig. 3).

Fig. 3.
figure 3

The process of scout bee generate nectar source \( (P = 0.7) \)

3.6 A Local Search Algorithm

In order to enhance the exploitation capability of the algorithm, a simple local search is embedded in the proposed HABC algorithm. The local search is based on the insert and swap operator.

3.7 Computational Procedure of the HABC Algorithm

The complete computational procedure is described in Fig. 4. Some parameters are need to set first: population size SN; learning rate P; local search probability \( P_{L} \); the threshold value \( l_{max} \) of local search; round \( T_{max} \) of iteration. Then initial the population \( {\text{Q}} = \left\{ {AS_{1} , \,AS_{2} , \ldots , \,AS_{SN} } \right\} \), and half of Q are generated with the constraint APM and the rest are generated randomly. The employed bee search, onlooker bee search and scout bee phase which is also called local search and depend on the local search condition \( l_{max} \) are then executed, and Q is updated by previous steps and the current best solution is recorded. The algorithm is stopped based on the termination condition, that is, the round \( T_{max} \) of iteration. Finally, report the best solution.

Fig. 4.
figure 4

The flow chart of HABC

4 Experimental Results and Analysis

The HABC algorithm for assembly sequence planning and optimization has been programmed with Visual C++ 6.0 language on a PC with 64-bit system of Windows 7 and 8 G memory. By comparing the HABC algorithm with the CPSO algorithm, firefly algorithm and improved firefly algorithm [18], the validity of this method is confirmed with actual assembly example.

4.1 Simulation Example

The exploded solid model of a generator assembly is shown in Fig. 5. The generator comprises 15 parts which are marked with numbers orderly. The assembly directions of all the parts are along the X and Y axes. Part 7 is viewed as the base part which has the most assembly relations with the other parts. Suppose that the assembly tool and assembly connector to assemble the base part 7 are T1 and C1 respectively. The assembly interference matrix, local preference matrix, stability matrix, connection matrix and tool matrix are given based on the assembly structure and assembly process. In this case, the proper tools and the connections for assembling each part are illustrated in Table 1, the assembly interference matrix are presented in Sect. 3.2 and the other assembly process constraints are omitted.

Fig. 5.
figure 5

The assembly of a generator

Table 1. Assembly tools and the connections for the parts

4.2 The Comparison Between Algorithms

By comparing the HABC algorithm with the CPSO algorithm, firefly algorithm and improved firefly algorithm, the validity of this method is confirmed. Under the same constraints, the results are shown in Tables 2 and 3 with the same indices and weights respectively. The other parameters of CPSO algorithm are assigned as literature [7], and the other parameters of firefly algorithm and improved firefly algorithm are as literature [6]. Since CPSO algorithm can obtain sub-optimal sequences only in larger cycles, we present results with 500 cycles. All the parameters of the assembly cost function and the HPSO algorithm are assigned as: \( c_{f} = 50,\,c_{s} = 0.15,\,c_{p} = 0.15,\,c_{d} = 0.40,\,c_{t} = 0.15,\,c_{c} = 0.15,\,{\text{P}} = 0.7,\,P_{L} = 0.8,\,l_{max} = 5. \)

Table 2. Comparison of the generated sequences of the four algorithms
Table 3. Comparison on running time (s)

As shown in Table 3, the HABC algorithm, firefly algorithm and improved firefly algorithm can all find two sequences with assembly cost of 2.40. The CPSO algorithm can only find the near-optimal assembly sequences with assembly cost of 2.50. HABC algorithm has certain advantages compared with CPSO algorithm and firefly algorithm and the advantages are obvious compared with the improved firefly algorithm in the running time. Although the improved firefly algorithm has made improvements on firefly algorithm, the results of experiment in literature [15] showed that improved firefly algorithm is less efficient than firefly algorithm. This is also confirmed in this experiment.

Literature [6] concentrates on the convergence of firefly algorithm and improved firefly algorithm. Convergence reflects the approximation of the resulting solutions and the optimal solution at each iteration. In order to study the convergence of the HABC algorithm, we used the optimal solutions (the assembly cost of the example is 2.40) that the algorithm has found at the same iterations. In the same environment, the running results of the program are shown in Table 4. From the experimental results, convergence of the HABC algorithm has been relatively close to improved firefly algorithm and HABC algorithm only spent. A few one-tenth of the time of improved firefly algorithm.

Table 4. Comparison on convergence. (\( n_{s} \) is the number of optimal solutions)

To sum up, the HABC algorithm that we proposed not only has outstanding search capability (in finding the optimal sequence) and efficiency (in time), but also improves the convergence rate while solving the assembly sequence planning problems. Therefore, we have confirmed that HABC algorithm can solve the assembly sequence planning very well.

5 Conclusions and Future Work

The HABC algorithm presented in this paper inherits the advantages of both the ABC algorithm and the simulated annealing algorithm. We encode the assembly sequences and discrete the nectar sources to make HABC algorithm suitable for the assembly sequence planning problems. Then, based on the strong exploration ability and weak exploitation ability of ABC algorithm, we use a local searching algorithm and a simulated annealing algorithm to enhance the ability of local exploitation. In the employed bee phase, we use the tournament selection instead of the wheel selection to escape from local optimum. In the scout bee phase, we design the scout bees to learn from the current optimal (minimum fitness value) nectar sources rather than randomly generated and this can overcome the defect of the slow convergence speed. According to the experiment, it is shown that the HABC algorithm is powerful for solving the assembly sequence planning problem.

In the HABC algorithm, there are some subjective operations in setting the weights of indexes that are closely related to the optimal solution. If some expert knowledge can be introduced and the interaction process can be analyzed by some professional method before setting the weights, then the results of ASP may have more guiding significance in practice. Therefore, the method of setting weights is one of our future works. Another future work is to extend the HABC algorithm from the assembly in orthogonal coordinate direction to the assembly in spherical coordinate.