• Nem Talált Eredményt

2.2 Theoretical background and algorithm de- de-velopment

2.2.2 Introduction to traveling salesman specic GAs

Since the main novelties of the research are the new genetic operators and the novel genetic algorithm using these operators, a short introduction of GAs and an overview of the most related approaches to solve TSP and mTSP problem using GAs are presented here.

GA starts with an initial solution set, which contains individuals created randomly. This is called initial population. The initial step can mightily improve the eciency of the algorithm, thus a good starting strategy can be momentous. The new population is always generated from the actual population's participants by the genetic operators. The generation of new populations is continued until a predened stop criteria is satised.

Figure 2.1 shows the general case of GA's life cycle. Obviously in a spe-cic problem, this process can be much more complicated, almost in every step specic realization can be required. The rst important task is to choose the encoding of the chromosomes, considering crossover and mutation oper-ators. A very important problem is the determination of parents. Several opportunities exist, but most often the algorithm selects the participants with a better attribute with bigger probability (or with better tness value).

The reason of this consideration is that individuals with better tness could produce descendants with better properties.

If the new population was composed from the newly created descendants only, the old population's best individual could lost. To eliminate this de-ciency, a new approach, the so-called elitism was introduced. This method ensures that the previous population's best individual will get into the new population without any modication, thus the best found solution will sur-vive during the whole evolutionary process.

Figure 2.1. The life cycle of genetic algorithms.

Encoding

The encoding of the problem is the mapping of the phenotype to the geno-type, while decoding is the inverse operator, calculating the parameters of phenotype from the genotype. Genotype codes the genetic information of the individual, which is the representation of the problem. The crossover and mutation operators operates on the genotype. The related encoding techniques to mTSP is reviewed below.

Permutation encoding Permutation encoding is only used in ordering problems, such as Traveling Salesman Problem or task ordering problem.

Every chromosome is a string of numbers, which represents number in a se-quence. This technique can be useful for ordering problems, however, special operators are needed to keep the new individuals consistent after crossover and mutation (see Fig. 2.2).

Encoding related to mTSP Every previous representation for mTSP uses permutation encoding. A simple example route-system is represented on Fig. 2.3. The following representations will encode this problem into the genes of the chromosomes.

The rst approach was the so-called one chromosome technique [173],

which is illustrated on Fig. 2.4. It uses a single chromosome of length (n+m−1) (n is the number of locations and m is the number of sales-men). The cities are represented by a permutation of integers from 1 to n. This permutation is divided intom subtours by the insertion of m−1 nega-tive integer values, which represents the turn from one salesmen to the next.

The cities in a subtour is in the order of the visitation of the salesman. Using this chromosome representation, there are (n+m−1)! possible solutions of the problem.

Fig. 2.5 illustrates another approach for chromosome representation of solutions in mTSP (with n = 15 and m = 4), the so-called two chromosome technique. This method requires 2 chromosomes, each of length n. The rst chromosome contains a permutation of the n cities, and the second one assigns a salesperson to each locations in the same position of the rst chromosome. Using this representation, the search space (i.e. the number of possible solutions) is n!·mn.

A quite new approach of chromosome representation, the so-called two-part chromosome technique can be found in [49] which reduces the size of the search space by the elimination of redundant solutions. As Fig. 2.6 shows this approach represents a solution by a single chromosome. The rst part is a permutation of integers from 1 to n (number of locations), representing the n cities, and the second part of the chromosome represents the number of cities assigned to each of the m salesperson.

Evaluation of population

The evaluation of population is done by calculating the tness value for each individual, which is a real number. Each individual has an objective-score which is calculated by the algorithm. The tness is calculated from the objective score with a possibility of taking the other individuals into account.

The objective score is an intrinsic parameter to the optimization problem, thus it could not be modied to enhance the evolution process. However, the mapping of objective score to tness value makes it available to adjust the goodness of an individual for selection.

Figure 2.2. Permutation encoded chromosomes.

Figure 2.3. Example route-system with 15 cities and with 4 salesmen.

Figure 2.4. Example of one chromosome representation for a 15 city mTSP with 4 salesperson ([49]).

The type of objective-score to tness mapping is either scaling or ranking.

In case of scaling, the tness is a function of the objective-score, while in the case of ranking, the population are sorted according to the objective-score, and the tness value of the individuals depend on the position in the ranking. Note that in many cases, objective-score and tness value are identical (f(x) =x).

In case of mTSP usually the objective-score and equivalently the tness value of an individual is the sum of distances (durations) travelled by each salesman. The additional constraints like maximal overall travelling distance refers to this value. If a solution exceeds this constraints, some punishment will be applied, like a proportionately huge tness value, or the application of a special penal operator.

Figure 2.5. Example of two chromosome representation for a 15 city mTSP with four salesperson ([49]).

Figure 2.6. Example of two-part chromosome representation for a 15 city mTSP with 4 salesmen ([49]).

Operators

A big number of genetic operators can be found in the literature, general ideas are presented in [40, 63, 68], operators for sequencing problems are in [61]. Expressly multi-chromosomal approach can be found in [127], and operators refer to TSP is presented in [109]. In the following sections only a theoretical overview will be given.

Selection During GA, two kind of selection exist: selection for reproduc-tion and selecreproduc-tion for survival. The former selects the individuals form the population for reproduction (parents), and the latter selects the individuals of the new population. This section presents a widely used selection tech-niques for reproduction, which is used by the novel algorithm presented in later sections. A detailed description of selection schemes is presented in [40].

Using tournament selection, individuals are chosen from the popula-tion randomly for the so-called tournament, in which the individual with best tness is selected as the winner. The number of chosen members for

Figure 2.7. One-, and two-point crossover of binary encoded individuals.

Figure 2.8. Mutation of binary encoded individuals.

the tournament is determined by the tournament size(t), which is between 2 and µ, where µ is the size of the population. The winner can either be removed from, or kept in the population, if it is allow or disallow to select an individual multiple times. Tournament selection has a time complexity of O(N). The selection pressure is adjustable by the size of the tournament.

Crossover Crossover or recombination creates new individuals from the genes of the parents. The easiest way is the one-point crossover, which is shown on the left hand side of gure 2.7. One crossover point is randomly selected (the 3th gene in the example), and the two descendants are created by interchanging the parents' genes after the crossover point. Similarly, dur-ing two-point crossover (right hand side of gure 2.7) two crossover point is randomly selected, and the genes of the parents are interchanged before and after the crossover points.

Mutation After crossover happened, during the mutation randomly chosen genes are selected and the operator changes their value into an other possible value. An example can be seen on gure 2.8. Mutation can prevent the algorithm from the convergence to a local extrema. Mutation as same as crossover largely depends on the encoding of the problem.

Genetic algorithms have further parameters, which could eects the e-ciency of the GA. Crossover probability determines how often the crossover occurs. If no crossover happens, descendants will be equivalent with their parents, otherwise the descendant will consist of the copy of the parents' ge-netic parts. If the crossover probability is 100%, every ospring will created by crossover, however if it is 0%, the new individuals will be the exact copy of the old population's members (note that it doesn't mean that the two population is equal). It is advisable to transmit the best individuals into the new population without any modication.

Mutation probability determines how often the mutation is used on the osprings. If no mutation happens, the ospring will be the result of the crossover, or of the copy. If mutation happens, some part of the chromosome will change, in case of 100%, every descendant will change, otherwise (0%) no modication will occur.

The population size denes the number of individuals in the population.

If it is too small, the algorithm couldn't cover the whole search space. When population size is too big, the GA will slow down.