• No results found

The improved genetic algorithm includes five local search algorithms. This section elaborates in more detail on the different algorithms. Three of the five algorithms are "smart" mutations that mutate the genomes based on the fitness properties of the chromosome. The other two are random mutations to make sure every solution can be reached by the genetic algorithm.

NXP Graduation thesis Heuristic method: Genetic algorithm with local search algorithms

Randomly switches lots from one tester to another tester

The first local search algorithm switches the lots from one tester to another tester. The function picks a lot randomly and switches the lot with the same lot on another tester.

Figure 6.2: An example of the a random lot mutation

Figure 6.2 shows an example of the function. The function picks lot four that is scheduled to be tested on tester two. The function picks the same lot on another tester and switches the scheduled lots.

Randomly switches the lots within the same tester

This local search algorithm is very similar to the one discussed in the section above. This function picks a tester and switches different lots on that tester.

Figure 6.3: An example of a mutation on the same tester

Figure 6.3 shows an example of the local search algorithm that switches on the same tester. The example picks lot four that is scheduled on tester two and switches the lot with lot number two on the same tester.

Switches lots from testers with the most changeovers to another tester

This local search algorithm is the first of the three "smart" algorithms. The fitness function collects performance parameters from each of the chromosomes. One of these parameters is the changeover information of each of the testers. The fitness function collects the number of changeovers between different test programs because these are the most time consuming due

to hardware changes. The local search algorithm picks the tester with the most changeovers between different test programs and switches a lot on that tester with a different tester. This results in a total decrease of changeovers between different test programs, which decreases the total makespan and increases the tester efficiency. Figure 6.4 shows how the changeovers are being counted. The figure shows that when the next lot scheduled on the tester is not the same test program, the changeover is being counted.

Figure 6.4: A schedule with the changeovers outlined, tester four has the most changeover between different test programs

Switches the lots with the highest lead time/net process time fraction to another tester or within the same tester

This local search algorithm looks at the fraction between the lead time and the net process time of the individual lots. The lead time is defined as the time from the beginning of the first time a lot is tested until the time the lot is finished at its last test program. The net process time is defined as the sum of all the individual test program times of a lot. Reducing this fraction has several benefits. The most obvious benefit is that it would reduce the lead time which results in a decrease of WIP. The fitness function stores the lot number with the highest lead/net process time fraction. The local search algorithm uses this lot number to determine the last test job of that lot. This test job will find the lot with the highest fraction and places the lot earlier in the test schedule on the same tester at random.

Figure 6.5 shows a simple example of this function. The test schedule consists of four lots with two test programs each. The fractions are being tracked in the fitness assessment and the lot with the highest fraction is used as an input value for the local search algorithm. In Figure 6.5 the lot with the highest fraction is lot number one, the last test job of this lot is picked from the schedule and placed to be tested earlier on that tester.

NXP Graduation thesis Heuristic method: Genetic algorithm with local search algorithms

Figure 6.5: Caption

The effect on the chromosome from the example case is shown in Figure 6.6. The genome picked from its original place in the chromosome and moved to a location earlier in the chromosome.

The genome itself does not change, only the location of the genome in the chromosome.

Figure 6.6: The chromosome mutation of the algorithm example

Switches the lot that is most "out of place"

The last local search algorithm mutates lots that are "out of place". The function looks at the test programs that are being tested on each of the testers and calculates the percentage of each test program relative to all the tested programs on that tester. A lot will be picked that is being tested on the test program with the lowest percentage, this lot will be randomly moved to another tester.

Figure 6.7 shows an example of this local search algorithm. The red test program has the lowest percentage of tests relative to all the tests on testers one. This means that a lot will be picked that is doing a red test program test on tester one and that lot will be switched to another tester.

In this case, there is only one test job that is being tested on that test program and that is lot number one. That test job will be moved to another tester.

Figure 6.7: The figure shows which test job is picked by the local search algorithm

NXP Graduation thesis Heuristic method: Genetic algorithm with local search algorithms

6.4 Model implementation

The algorithm is implemented in a python model. The model is simplified in the pseudo-code and shown below.

Algorithm 2: Genetic algorithm with local search

Result: Best test schedule based on the objective function

1 Generate initial population

2 for all chromosomes in initial generation do

3 Fitness assessment

4 end

5 while Fittest chromosome not improved for "x" amount of generations do

6 Keep the fittest chromosome of the current generation for the next generation

7 if Generation number is below the switch point then

8 for Size of a generation -1 do

9 Pick 2 chromosomes randomly from the current generation

10 if Chromosome 1 has a higher fitness value than chromosome 2 then

11 Pick chromosome 1 for mutation

12 else

13 pick chromosome 2 for mutation

14 end

15 Mutate the picked chromosome with mutation rate "r"

16 Fitness assessment of mutated chromosome

17 Add mutated chromosome to next generation

18 end

19 else

20 Rank current generation on fitness value

21 for Size of a generation -1 do

22 Pick chromosome from the current generation

23 for Local search iterations do

24 Randomly pick one of the local search mutations

25 Fitness assessment

26 if Chromosome fitness is improved then

27 Replace picked chromosome with improved chromosome

28 else

29 Keep the picked chromosome for next local search iteration

30 end

The algorithm has several parameters that can be tuned in order to improve the performance of the algorithm. The individual parameters influence the result of the algorithm. So to find the influence of the parameter and to find an indication of its optimal value a factorial design analysis can be done. With the implantation of the local search algorithms come extra algorithm parameters. Table 6.1 shows the parameters and the values that are being assessed in the factorial design analysis.