• No results found

Optimisation methods characteristics and selection

6.3 Improving constructed solutions through local search

wherem axis the maximal pheromone trail and sopt is the estimated optimal inspection plan that has the lowest cost.

wheremin is the minimal pheromone trail and pbest is the probability; the best values for pbest are 0.05 (Ridge, 2007 and Stützle and Hoos, 2000). avg is the average number of options available the ant has to choose from at any decision point (an ant has to choose among

2 n

workstations (n= number of workstations)). The best solution found is constructed with a probability pbest which is significantly higher than 0.

6.2.7 Termination condition

Algorithms require a termination condition to control the computational time, similar to other metaheuristics such as genetic algorithms, Tabu search, simulated annealing. This can be done in a number of ways, e.g. repeating the algorithm for a maximum number of iterations, running for a stipulated time and the maximum CPU time has been spent. In this research, it was decided to run the algorithm until the maximum number of algorithm iterations had been reached. This type of termination was used by many of studies (e.g. Liang and Smith, 2004, Ning, 2010, Thepsonthi and Özel, 2012).

6.3 Improving constructed solutions through local search

As described in chapter 5 that none of the previous metaheuristics methods in the literature review used local search to improve their performance. It has been shown that in other area

141

metaheuristics with local search perform better than metaheuristics without local search optimisation (Duda, 2006). Particularly, in ACO, it has been shown that local search applied to the solutions that the ants have constructed can improve the performance of an ACO algorithm, and to yield high quality solutions (Merkle et al., 2002). In addition, the local search is part of the DaemonActions of the ACO algorithm as described in chapter 5.

The local search mechanism known as iterative improvement is used to improve the performance of the MMAS algorithm. It replaces the current solution with a better one and stops as soon as no improved neighbouring solutions can be found. In the AOIS problem, while running the MMAS algorithm when all inspection stations have been allocated to workstations, a complete solution has been constructed by an ant. The constructed solution is represented in the inspection plan with its total cost. Because of the metaheuristics methods which were used to solve the AOIS problem none of them used local search. Therefore, many local search methods in other problems such as vehicle routing problems, quadratic assignment problems, travelling sales man problems and job scheduling problems are investigated. In this research, six neighbourhood structures which are well-known in these problems are used to improve the performance of the MMAS algorithm (Goksal et al., 2012;

Deroussi et al., 2006). Consider a serial multistage manufacturing process consisting of six workstations. Figures 6.3-6.8 show the inspection plan which is constructed by an ant (old inspection plan) for the six workstations where 0: no inspection and 1: an inspection is located after a workstation k. The constructed inspection plan is improved by applying six neighbourhood structures. These neighbourhood structures are explained as follows:

Crossover: a two-point crossover sets two crossover points at random, and takes a section between the points from the inspection plan. In the following example, the two crossover points are set after the second and fourth inspection stations respectively. The symbol | indicates a crossover point. The resulting two-point crossover has the effect of dividing the

142

inspection plan into three parts. Recombining the three parts result in the creation of a new inspection plan, as shown in Figure 6.8.

Interchange: randomly interchange two inspection stations that may not be adjacent in the created inspection plan, as shown in Figure 6.9.

Swap: two neighbourhood inspection stations are swapped randomly in the created inspection plan, as shown in Figure 6.10.

0 0 1

0 1 0 1 1 0 old inspection plan

new inspection plan

1 1 0

Figure 6.8: Two-point crossover

0 0 0

0 0 1 1 1 0 old inspection plan

new inspection plan

1 1 1

Figure 6.9: Interchange two inspection stations

0 1 0

1 0 0 1 1 0 old inspection plan

new inspection plan

1 0 1

Figure 6.10: Swap two neighbourhood inspection stations

143

Single insertion: one inspection station is picked randomly and then inserted into all the positions of the created inspection plan, as shown in Figure 6.11.

Delete and add: delete one inspection station randomly in the created inspection plan, and then add it randomly in a new position in the inspection plan, as shown in Figure 6.12.

Block insertion: two inspection stations are picked randomly and then inserted into all the positions of the created inspection plan, as shown in Figure 6.13.

Figure 6.12: Delete and add one inspection station

0 1 0 1 1 0 old inspection plan

0 0

0 1 1 1 new inspection plan

old inspection plan with deleted inspection station

0 1 1 1 0

0 0 1 1 1 0

0 1 0 1 1 0 old inspection plan

new inspection plan

Figure 6.13: Insert two inspection stations through the inspection plan

1 0 0 1 1 0

0 1 0 1 1 0 old inspection plan

new inspection plan

Figure 6.11: Insert one inspection station through the inspection plan

144

To yield a further reduction in run-time and to focus the local search around the part where potentially improvement can be found don’t look bits are used. Don‟t look bits were first used in the context of local search for the TSP in Bentley (1992). More recently, it was used by Ferreira et al. (2012). This technique is extended in a straightforward way to the AOIS problem. For the AOIS problem, every inspection station is associated with a don‟t look bit.

When first applying local search, all the don‟t look bits are turned off (set to 0). If for an inspection station no improving move is found, the don‟t look bit is turned on (set to 1) and the inspection station is not considered as a starting inspection station in the next local search iteration. If an inspection station is involved in a move and changes its location, the don‟t look bit is turned off. It should be noted that by applying the local search method to the created inspection plan (old inspection plan), the total cost of the new inspection plan is changed. This research focuses on minimising the total manufacturing cost of a product. The objective function (total cost) is calculated for each new inspection plan created by applying local search. Whenever an improvement of the objective function is detected, the new solution replaces the old one, and the process continues until no further improvement is seen.

The improved solutions are then used to update the pheromone trails. All these neighbourhood structures are applied to the MMAS algorithm and then compared in terms of the solution quality and processing time needed by each of these local searches.

There exist a large number of possible choices when combining local search with ACO algorithms. Some of these possibilities relate to the fundamental question of how effective and how efficient the local search should be. In fact, in most local search procedures, the better the solution quality returned, the higher the computation time required. This translates into the question whether for a given computation time it is better to frequently apply a quick local search algorithm that only slightly improves the solution quality of the initial solutions,

145

or whether a slow but more effective local search should be used less frequently. These issues will be considered in the conducted experiments in chapter 8.