You are on page 1of 38

GuidanceK Ratnakumar Asst.

Professor MED

INTRODUCTION
Optimization is the act of obtaining the best result under given circumstances.
The ultimate goal always is to either minimize the

effort to maximize the benefits. Since, the effort required or the benefit can be represented as a function of some decision variables, optimization can be defined as the process of finding conditions that give the maximum or minimum value of a function.

What is ACO
ACO is inspired by a colony of artificial ants cooperating in

foraging behaviour. This behaviour enables ants to find the shortest paths between food sources and their nest. Ant Colony Algorithms is proposed as a new metaheuristic approach for solving NP-hard combinatorial optimization problems, which were first introduced by Dorigo et al. (1991). Their fundamental idea is based on the behaviour of natural ants who succeed in finding the shortest paths from their nests to food sources by communicating via a collective memory by taking the proximity of the nest and of the food source respectively into account. This allows discovery of new and potentially shorter paths

Fundamentals of ACO algorithm


A moving ant lays some pheromone (in varying quantities)

on the ground, thus making the path it followed by a trail of the substance. Ants can smell the pheromone substance and hence they choose the way with higher probability paths, which are marked by stronger pheromone concentrations, thus reinforcing the trail with its own pheromone. This behaviour is the basis for cooperative interaction. Ants coming back to the nest first are those who took the shortest path twice, so due to less evaporation there will be more pheromone on those paths, which simulates nest mates to follow the path

Thus, the probability with which an ant chooses a path increases with the number of ants that chose the same path previously, forming a positive feedback loop.

Flow chart for Ant Colony Optimization Algorithm

Case Studies
1.

MULTI-OBJECTIVE FLOW SHOP SCHEDULING PROBLEM The flow shop scheduling problem consists of many machines and jobs. Hence, it is classified as combinatorial optimization problem. Majority of studies for the flow shop scheduling problem focus to minimize makespan. However, there are several other important objectives like total flow time, total machine idle which are very useful is minimizing total scheduling cost. Flow shop scheduling problem consists of scheduling given jobs with same order at all machines.

The constraint associated is:-

The job can be performed on at most one machine and one machine can process at most one job. The flow shop scheduling problem with multiobjectives of makespan, total flow time and total machine idle time is considered . OBJECTIVE FUNCTION
t(i,j) n m {1, 2,...., n} processing time for job i on machine j (i =1,2.....,n), (j =1,2,....,m). total number of jobs to be scheduled. total number of machines in the process. permutation job set

The makespan, total flow time and total machine idle time

objectives considered can be formulated as follows: Completion times C(i,j):

C(1,1) = t(1,1) C(i,1) = C(i-1,1) + t(i,1) i = 2,........,n C(1,j) = C(1,j-1) + t (1,j) j = 2,........,m C(i,j) = max{ C(i-1,j), C(i,j-1)} + t (i,j) i = 2,.........,n; j = 2,.........,m

Makespan, f1:

f1 = C(n,m) Total flow time, f2:


Total machine idle time, f3:

THE ALGORITHM

For proposed algorithm, the exact position of jobs is important. Here pheromone trail ij is sequence desire of job j to follow job i. While finding an optimal solution to the problem, an ant k chooses the next job to move to by applying the state transition rule, selected job is added to tabuk. Procedure is repeated until the last job is selected.

State transition ruleThe state transition rule applied to select next job j by ant k in job i is as follows:

(i,u) - the amount of pheromone trail on edge (i,u) (i,u) = 1/(i,u)- the inverse of the distance((i,u)) between job i and job u Sk(i) -the set of feasible jobs not contained in tabuk to be selected by ant k in job i. is the parameter that controls the relative importance of pheromone trail ( > 0); and determines that of heuristic information ( > 0) q is a value chosen randomly with uniform probability in [0,1] and q0 is the parameter that determines the relative importance of exploitation versus exploration (0 q0 1).

J is a random variable selected according to the following random-proportional rule probability distribution, which is the probability of that ant k chooses job j with larger pk(i, j) to move from job i:

Local updating rule


While constructing a schedule, an ant decreases the pheromone trail level between selected jobs by applying the following local updating rule: (i,j) = (1 l) (i,j) + l 0 where, 0 is the initial pheromone level and l (0 < l < 1) is the local pheromone evaporating parameter.

Global updating rule


After all ants complete their schedules global updating rule is applied. Global updating provides a greater amount of pheromone trail between adjacent jobs of the best schedule. The pheromone trail level is updated as follows: (i,j) = (1 g) (i,j) + g (i,j) where,

In Eq., g (0 < g < 1) is the pheromone evaporating parameter of global updating and Lb is the objective function value of the best schedule until the current iteration.

Candidate list
When an ant tries to schedule a job with a big-sized neighbourhood, it

faces a large number of alternatives to choose. This causes that the schedule construction is slowed down.

Candidate list forms a data structure providing additional local

heuristic information. Local search This procedure is obtained by removing the job at position i and by inserting it at position j. Let (i,j) be a pair of positions and = (1,..., i-1, i, i+1,..., n) the current permutation. The new permutation * is obtained by removing the job (i) at a position i and inserting it at position j. If i < j a right insert is performed and we get * = (1,..., i-1, i+1,..., j, i, j+1,..., n) and if i > j a left insert is performed and we get * = (1,..., j-1, i, j,..., i-1, i+1,...,n).

RESULTS AND DISCUSSIONS Experiments were conducted on test problems with number of jobs varying from 20 to 75 and the number of machines varying from 5 to 20 given by Reeves (1995). Performance of test problems was compare with NEH heuristic and the Ho and Chang (1991) (HC) heuristic that is the first algorithm developed for this problem. Test problems were made of 20 machines and five jobs. Initially, parameters were set as = 1, = 2, l = 0.1, g = 0.1, q0 = 0.9. Other parameters were taken as kmax = 20 (number of ants in the colony) and tmax = 1000 (maximum number of iterations). In each step, only one of the parameters was tested. Each test was repeated five times. The candidate values were found as {0, 0.5, 1, 2, 5}, {0, 0.5, 1, 2, 5}, l {0, 0.1,0.2, 0.3, 0.5}, g {0, 0.1, 0.2, 0.3, 0.5} and q0 {0, 0.25, 0.5, 0.75, 0.9}.

The best values of computational experiments for flow shop

scheduling problem with only makespan objective were obtained for = 2, = 0.5, l = 0.2, g = 0.2, q0 = 0.9, kmax = 20, tmax = 1000 and cl = 15. These values were set for the default value of parameters. Every test was repeated with 10 runs and the best solution was selected. The relative percentage increase () in any objective value for schedule T generated by any algorithm is given by: (f i) = [ f i min(f i,f i, f i)]/ [min(f i,f i, f i)] * 100 Where f i, f i and f i are any objective values yielded by HC heuristic, NEH heuristic and ACO algorithm, respectively. Equal weighting is given to the three multi-objectives, i.e. a1 = a2 = a3 =0.333. The relative percentage increase in total objective value for schedule T is given as: = a1 (f1) + a2 (f2) + a3 (f3)

The relative percentage increase in makespan, total flow time,

total machine idle time and total of all objectives based on problem size are presented in following tables

best is the relative percentage error of the best solution out of 10


runs

avg is the relative percentage error of average solution out of 10


runs

worst is the relative percentage error of the worst solution out of


10 runs.

Performance for makespan

Performance for total flow time

Performance for total idle time

Performance for multiple objectives

Proposed ACO algorithm has the best performance for

total flow time, total machine idle time and multiple objectives. On average, an improvement of 2640.38%, 962.72% and 404.42% respectively for, the best, average and the worst ACO solution according to the best of HC and NEH heuristics was achieved. The proposed algorithm is very usable since it has acceptable computational time. However, its computation time is longer than HC and NEH heuristics.

2. KEYBOARD ASSIGNMENT PROBLEM

Introduced by Sholes brothers in 1873, the keyboards using this arrangement are now known as Sholes or QWERTY keyboards . The ergonomic research in the field of computer keyboards has so far not been able to supply a satisfying set of rules for the ergonomic evaluation of a keyboard arrangement. Here the application of a standard Ant Colony optimization (ACO) algorithm to the problem of the arrangement of letters on a computer keyboard (KAP, for keyboard arrangement problem), using an evaluation function based on a complex set of ergonomic criteria is being described. For defining the KAP problem, the following approach is used. First, an abstract model of a keyboard is proposed to represent different types of keyboards. Second, an evaluation function for the ergonomic factors of a particular keyboard is defined which is described later..

CONSTRAINTS AND OBJECTIVE FUNCTIONThe calculation of the objective function for the KAP requires a significant amount of time. A keyboard design should attain to seek four main objectives based on ergonomics: allow typing a text without fatigue, maximize typing speed, reduce number of typing errors, allow rapid mastery of the touch
Since typing requires movements of fingers, arms and shoulders which are produced by actions of muscles, joints and tendons it is difficult to quantify fatigue. This justifies the need of heuristic criteria, introduced below.

The evaluation functionIn order to evaluate the quality of arrangement of a keyboard, a set of six heuristic criteria first established by Marsan (1976, 1987), but modified in Kehl and Wagner (2000) is used. 1. Accessibility and load: The combination character sets should be distributed on the keys in a way that the total load is shared adequately by all the fingers. The fact that some keys are less accessible than others has to be taken into account. 2. Key number: In order to minimize total hit load, the number of keys necessary for a given text needs to be minimized. 3. Hand alternation: The fastest and most comfortable typing is ensured when consecutive keys are not hit by the same hand. In order to quantify this rule, the sum of the frequency of the digraphs which are typed by fingers of same hand is obtained.

4.

5.

6.

Consecutive usage of the same finger: The above alternation rule is also true for fingers. The criterion is calculated by summing the frequencies of the corresponding digraphs and multiplying each of them with a distance coefficient. Avoiding big steps: When one hand is used for two consecutive hits, great distances which require awkward hand postures should be avoided. This is the case for keys whose vertical distance is greater or equal to one. Hit direction: For digraphs typed by one hand only, the preferred hit direction is from the little finger towards the thumb. This is the natural finger movement for most people, which may easily be verified by tapping on the table according to the two possible directions.

Ideal Load distribution for right hand


The third row represents the home row and the height of the bars the normalized ideal hit load.

THE ALGORITHM
For applying to the KAP the algorithm is defined asInitialization It creates the necessary data structure and sets all parameters to their initial value. 1. An ant colony of N agents is created. 2. A text source is defined. 3. An empty character string of fixed length l is assigned to each ant. 4. An empty keyboard is assigned to each ant. 5. A pheromone matrix is created and its elements are set to values that take a priori knowledge of the solution in the form of high quality keyboard arrangements into account. 6. The algorithm parameters are initialized.

Iteration Repeated until a stopping criteria is satisfied which is a predefined number of cycles. 1. The keyboards assigned to the ants are emptied. 2. The strings assigned to the ants are initialized using the text source. 3. Each ant reads its string and produces a sequence of combination character sets that it places on its keyboard until the end of the string is reached. 4. The remaining combination character sets are randomly assigned to the remaining keys 5. Each ant evaluates the solution it has found. 6. The pheromone matrix tau evaporates with a coefficient all: all

7. A number p of the best solutions are selected and pheromone is updated according to their rank: The Kth best ant, with 1<k<p, deposits a quantity .q(k) of pheromone oneach elementary assignment that it has chosen, where represents a quantity of pheromone and the vector q is a measure of importance of the best ants. 8. The pheromone matrix is modified to fit the allowed range [min, max]

Character placement The subsequent steps allow an ant to choose most adequate key to place the combination character set i under consideration:

1. The ant verifies if the combination character set has already


been placed on the keyboard. If so, the ant skips the following steps and continues with next combination character set 2. For all free keys j, the ant calculates a probability according to the random-proportional Decision rule given by:

where is the set of still empty keys and ij the global score calculated according to the formula given earlier when only the present and the previously assigned keys are considered. It is worthwhile to note that the score ij only requires a few calculations to be computed. a and b are two coefficients describing the relative importance of experience and locally good elementary assignment. The ant uses the calculated probabilities to establish a random variable, according to which it determines a key among those that are still free 3. The ant places the combination character set on the chosen key. 4. The ant evaporates pheromone on the elementary assignment found according to the following equation: ij .ij being the coefficient of evaporation.

RESULTS AND DISCUSSIONS


The experimental work consisted of two major phases. First, an efficient and effective parameter setting was determined. Then the algorithm was run several times using that setting and results were examined. Parameters setting It is known that the convergence depends strongly on the values of the parameters. In the case of this algorithm, N, , , , all, , max, min, p, l and q had to be determined. As a starting point for the values of the parameters, those used in Dorigo et al.(1991) were chosen. The parameter settings were then adjusted experimentally observing the development of the pheromone matrix. The best parameters found are summarized in following table -

Weight coefficients i

Choice of optimization parameters

Optimized keyboard arrangement The best arrangement found by the algorithm for French language is presented in Figure. It requires about 2000 iterations which corresponds to about 14 hours on a 400 MHz PC. The source for the text was taken from newspaper Le Monde . It leads to the satisfactory global score of 0.487, with the AZERTY keyboard as reference. It also leads to great improvement relative to Marsan keyboard outperforming it for all proposed evaluation criteria.

The optimized arrangement for the French language.

Conclusions
The algorithm uses many simple interacting agents and a fast search

algorithm based on positive feedback Ant Colony Optimization has been and continues to be a fruitful paradigm for designing effective combinatorial optimization solution algorithms. Results show that the ACO algorithm performs better than HC and NEH heuristics for the multi-objective flow shop scheduling problem. A new optimization problem called KAP is also presented. It consists of finding the best possible arrangement of letters on a keyboard. The computational results show that the algorithm is effective in finding very good solutions. Though the results obtained are more optimized ,ACO is more time consuming and laborious than many other optimization techniques

Furthermore, it is possible that presented ACO is also able to solve wide range of problems in all the fields like scheduling problems in various production systems such as job shop, cellular manufacturing, flexible manufacturing, assembly lines Network optimizations problems like vehicle routing, transportation network of seaports, sequential ordering

References
1.

2.

3.

Alberto Colorni, Marco Dorigo, Vittorio Maniezzo, Dipartimento di Elettronica, Politecnico di Milano,1991, Distributed optimization by Ant colonies, Proceedings of ECAL91 European Conference on Artificial Life, Paris, France, Elsevier Publishing. Betul Yagmahan, Mehmet Mutlu Yenisey, 2008, Ant colony optimization for multi-objective flow shop scheduling problem,J. Computers and Industrial Engineering. Jan Eggers, Dominique Feillet , Steffen Kehl, Marc Oliver Wagner, Bernard Yannou, 2003, Optimization of the keyboard arrangement problem using an Ant Colony algorithm, J. European Journal of Operational Research

Thank you