0% found this document useful (0 votes)
108 views

Ant Colony Optimization

Ant colony optimization is a metaheuristic algorithm inspired by the behavior of ants. Ants communicate information about paths between their colony and food sources via pheromone trails. In ACO algorithms, artificial "ants" probabilistically construct solutions to optimization problems and update pheromone trails, favoring shorter paths. The pheromone trails guide future ants towards the best solutions. ACO has been successfully applied to many NP-hard combinatorial optimization problems, including routing, scheduling, and assignment problems. It has also been used for applications in telecommunications networks and industrial scheduling.

Uploaded by

freidyfriends
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Ant Colony Optimization

Ant colony optimization is a metaheuristic algorithm inspired by the behavior of ants. Ants communicate information about paths between their colony and food sources via pheromone trails. In ACO algorithms, artificial "ants" probabilistically construct solutions to optimization problems and update pheromone trails, favoring shorter paths. The pheromone trails guide future ants towards the best solutions. ACO has been successfully applied to many NP-hard combinatorial optimization problems, including routing, scheduling, and assignment problems. It has also been used for applications in telecommunications networks and industrial scheduling.

Uploaded by

freidyfriends
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

ANT COLONY

OPTIMIZATION

1/27/15

Basic
Definitions

1/27/15

Pheromone

Apheromoneis
a
secreted
or
excretedchemicalfactor that triggers a social
response in members of the samespecies.
Pheromones are chemicals capable of acting
outside the body of the secreting individual to
impact the behavior of the receiving individual.
Type
s
I.

Aggregation
function in defense against predators, mate selection,
and overcoming host resistance by mass attack.

ii.

Alarm
Some species release a volatile substance when
attacked by a predator that can trigger aggression
(inants,bees, termites)in members of the same
species.

1/27/15

iii.

Signal
cause short-term changes, such as the neurotransmitter
release that activates a response.

iv.

Territorial
Laid down in the environment, territorial pheromones
mark the boundaries of an organism's territory.

v.

Trail
Trail pheromones are common in social insects. For
example,antsmark their paths with these
pheromones, which are volatile hydrocarbons.

vi.

Information
There is two kind of information:
a) Heuristic Information
b) Pheromone trail information

1/27/15

1/27/15

Heuristic Information
It related to general strategies or methods for solving
problems.
That solve a problem more quickly but is not certain to arrive
at an optimal solution.
Aheuristicis a word from the Greek meaning "to discover." It
is an approach to problem solving that takes one's personal
experience into account.
Heuristictechniquesinvolving or serving as an aid to learning,
discovery,

or

problem-solving

by

experimental

and

especiallytrial and error methods.


refers to experience-based techniques for problem solving,
learning, and discovery. Where the exhaustive search is
impractical, heuristic methods are used to speed up the
1/27/15

process of finding a satisfactory solution.

Metaheuristics
Ametaheuristicis a set of concepts that can be
used to define heuristic methods that can be
applied to a wide set of different problems.
A metaheuristics refers to a master strategy that
guides and modifies other heuristics to produce
solutions beyond those that are normally
generated in a quest for local optimality Fred
Glover and Manuel Laguna
A metaheuristic can be seen as a general
algorithmic framework which can be applied to
different optimization problems with relatively
few modifications to make them adapted to a
specific problem.
Examples of metaheuristics include ant colony
1/27/15
optimization (ACO), tabu search (TS), iterated7

There are properties that characterize most


metaheuristics:
a. Metaheuristics are strategies that guide the
search process.
b. The goal is to efficiently explore the search
space in order to find near optimal solutions.
c. Techniques which constitute metaheuristic
algorithms range from simple local search
procedures to complex learning processes.
d. Metaheuristic algorithms are approximate and
usually non deterministic.
e. Metaheuristics are not problem-specific.
1/27/15

Introduction

1/27/15

Swarm Intelligence
Swarm intelligence takes
inspiration from the social
behaviors of insects and of
other animals.
In particular, ants have
inspired a number of
methods and techniques
among which the most
studied and the most
successful is the general
purpose
optimization
technique known as ant
colony optimization.
1/27/15

10

Ant colony optimization


The ACO is the probability
algorithm
used
for
searching
optimization
paths. It was proposed by
Marco
Dorigo
in
his
doctoral
dissertation
in
1992, and the idea was
from the activities that ants
explore ways when they
are looking for food.

1/27/15

11

Ant colony optimization (ACO) takes inspiration


from the foraging behavior of some ant species.
These ants deposit pheromone on the ground in
order to mark some favorable path that should
be followed by other members of the colony.
In ACO, a number of artificial ants build solutions
to an optimization problem and exchange
information on their quality via a communication
scheme that is reminiscent of the one adopted
by real ants.
The first ant colony optimization algorithm is
known as Ant System and was proposed in the
early nineties. Since then, several other ACO
algorithms have been proposed.
1/27/15

12

The original idea comes from observing the exploitation of


food resources among ants
The first ant finds the food source (F), via any way (a), then
returns to the nest (N), leaving behind a trail pheromone
(b).
Ants indiscriminately follow four possible ways, but the
strengthening of the runway makes it more attractive as
the shortest route.
Ants take the shortest route; long portions of other ways
lose their trail pheromones.

1/27/15

13

(A)Real ants follow a path between nest and food source.


(B)An obstacle appears on the path: Ants choose whether to turn
left or right with equal probability.
(C)Pheromone is deposited more quickly on the shorter path.
(D)All ants have chosen the shorter path.

1/27/15

14

assuming that at a given moment in time m1 ants


have used the first path and m2 the second one,
the probability p1 for an ant to choose the first
path is:

where parameters k and h are to be fitted to the


experimental dataobviously, p2 = 1 p1 .
Monte Carlo simulations showed a very good fit
for k 20 and h 2.

1/27/15

15

1/27/15

16

Main ACO Algorithms


Ant System (AS)
Its main characteristic is that, at each iteration,
the pheromone values are updated by all the m
ants that have built a solution in the iteration
itself. The pheromone ij, associated with the
edge joining cities i and j, is updated as follows:

where is the evaporation rate, m is the


number of ants, and kij is the quantity of
pheromone laid on edge (i, j) by ant k:
1/27/15

17

where Q is a constant, and L k is the length of


the tour constructed by ant k.

D
C

1/27/15

18

MAX MIN Ant System (MMAS)


This algorithm is an improvement over the
original Ant System. Its characterizing elements
are that only the best ant updates the
pheromone trails and that the value of the
pheromone is bound. The pheromone update is
implemented as follows:

where max and min are respectively the upper


and lower bounds imposed on the pheromone;
the operator [x]ab is defined as:

1/27/15

19

and ijbest is:

where Lbest is the length of the tour of the best


ant. This may be (subject to the algorithm
designer decision) either the best tour found in
the current iterationiteration-best, Libor the
best solution found since the start of the
algorithmbest-so-far, Lbsor a combination of
both.

1/27/15

20

Ant Colony System (ACS)


The most interesting contribution of ACS is the
introduction of a local pheromone update in
addition to the pheromone update performed at
the end of the construction process (called
pheromone
update).
offline
The local
pheromone
update is performed by all
the ants after each construction step. Each ant
applies it only to the last edge traversed:

where (0, 1] is the pheromone decay


coefficient, and 0 is the initial value of the
pheromone.
1/27/15

21

The offline pheromone update, similarly to


MMAS, is applied at the end of each iteration by
only one ant, which can be either the iterationbest or the best-so-far. However, the update
formula is slightly different:

As in MMAS, ij = 1/Lbest , where Lbest can be either


Libor Lbs .

1/27/15

22

Applications
1. ACO for the Traveling Salesman Problem
In the traveling salesman
problem, a set of cities is
given and the distance
between each of them is
known. The goal is to find
the shortest tour that
allows each city to be
visited once and only
once. In more formal
terms, the goal is to find
a Hamiltonian tour of
minimal length on a fully
connected graph.
1/27/15

23

2. The Ant Colony Optimization


Metaheuristic
Ant colony optimization has been formalized
into
a
metaheuristic
for
combinatorial
optimization problems by Dorigo and coworkers .
A metaheuristic is a set of algorithmic concepts
that can be used to define heuristic methods
applicable to a wide set of different problems.
In other words, a metaheuristic is a generalpurpose algorithmic framework that can be
applied to different optimization problems with
relatively few modifications.
Examples of metaheuristics include simulated
annealing, Tabu search, iterated local search,
evolutionary computation, and ant colony 24
1/27/15

3. Applications to NP-Hard Problems


So far, ACO has been tested on probably more than one
hundred different NP-hard problems.
Many of the tackled problems can be considered as falling
into one of the following categories: routing problems as
they arise, for example, in the distribution of goods;
assignment problems, where a set of items (objects,
activities, etc.) has to be assigned to a given number of
resources (locations, agents, etc.) subject to some
constraints; scheduling problems, whichin the widest
senseare

concerned

with

the

allocation

of

scarce

resources to tasks over time; and subset problems, where


a solution to a problem is considered to be a selection of

1/27/15

25

4. Applications to Telecommunication
Networks
ACO algorithms have shown to be a very effective
approach for routing problems in telecommunication
networks where the properties of the system, such as
the cost of using links or the availability of nodes, vary
over time. ACO algorithms were first applied to routing
problems in circuit switched networks (such as telephone
networks) and then in packet-switched networks (such
as local area networks or the Internet).

1/27/15

26

5. Applications to Industrial Problems


The problems modeled included various realworld constraints such as setup times,
capacity restrictions, resource compatibilities
and maintenance calendars.
Other interesting real-world applications are
those by Gravel, Price and Gagne , who have
applied ACO to an industrial scheduling
problem in an aluminum casting center, and
by Bautista and Pereira , who successfully
applied ACO to solve an assembly line
balancing problem with multiple objectives
and constraints between tasks.
1/27/15

27

Implementation of ACO in
Travelling
Salesman Problem (TSP)

1/27/15

28

A Hamiltonian path (or traceable


path) is a path in an undirected
graph which visits each vertex
exactly once. A Hamiltonian
cycle is a cycle in an undirected
graph which visits each vertex
exactly once and also returns to
the starting vertex. Determining
whether such paths and cycles
exist in graphs is the
Hamiltonian path problem
which is NP-complete.

A graph representing the


vertices, edges, and faces with a
Hamiltonian cycle shown by red
color edges.

NP problem can not be solved in polynomial time.


1/27/15

29

Problem
Formulation
Travelling salesman
problem (TSP) consists of finding the
shortest route in complete weighted graph G with n nodes
and n(n-1) edges, so that the start node and the end node
are identical and all other nodes in this tour are visited

exactly
Let C beonce.
the matrix of shortest distances (dimension nxn),
where n is the number of nodes of graph G. The elements
of matrix C represents the shortest distances between all
pairs of nodes (i, j), i, j=1, 2, ,n. The travelling salesman
problem can be formulated in the category programming
binary, where variables are equal to 0 or 1, depending on
the fact whether the route from node I to node j is
realized (xij= 1) or not (xit= 0).

1/27/15

30

1/27/15

31

The Travelling Salesman Problem is one of the best known


NP-hard problems, which means that there is no exact
algorithm to solve it in polynomial time. The minimal
expected time to obtain optimal solution is exponential.
So, for that reason, we usually use heuristics to help us to
obtain a good solution.
The best known exact methods for solving TSP are:
explicit enumeration, implicit enumeration, branch and
bound method, cutting plane method and dynamic
programming. These methods work well only for solving
the problems with no more than 40-80 nodes (we suppose
the use of one computer). For the practical relevance, it is
necessary to solve the larger-scale problems with the help
of heuristics.

1/27/15

32

Ant Colony Optimization for Solving


the Travelling Salesman Problem
Moving of

virtual ant depends on the

amount of

pheromone on the graph edges. The probability pik of


transition of a virtual ant from the node i to the node k is
given by formula

where
i - indicates the attractiveness of transition in the past
i - adds to transition attractiveness for ants,
Ni - set of nodes connected to point i, without the last visited
point before i,
, - parameters found by simulation.
1/27/15

33

Rever
Virtual ant is using the same
se reverse path as the path to
the food resource based on his internal memory, but in
opposite order and without cycles, which are eliminated.
After

elimination of the

cycles,

the ant puts the

pheromone on the edges of reverse path according to


formula

where
ijt- value of pheromone in step t,
- value by ants saved pheromones in step t.
Values can be constant or they can be changed
depends of solution quality.
1/27/15

34

At last, the

Evaporation of
Pheromones
pheromones on the edges are

evaporated.

The evaporation helps to find the shortest path and


provide that no other path will be assessed as the
shortest. This evaporation of pheromones has an intensity

1/27/15

35

we can describe the ACO algorithm as system


of steps:

1. Ants scan graph G. The aim of this scan is to find an


optimal solution.
2. Every ant has its own memory, which is used for saving
information about travelled path. This memory can also serve
to ensure constraints or to evaluate of the solution.
3. The process begins in state xsk and has one or more
ending constraints ek. Let the actual state of an ant be the
state xr = (xr1, i) and no ending constraint is complied, so
the ant moves to node j in neighborhood of the state Nk(xr)
1/27/15

36

4. The next ant motion depends on the probability, which is


calculated on the base of pheromone quantity on edges of
graph, and it also takes into consideration its local memory
and the acceptance of this step.
5. If the ant can to add new component of graph GC, it can
update the value of corresponding pheromone information
(information is bound with corresponding edge, or aim node).
6. The ant can update pheromone values after reverse path
construction by editing associate pheromone values.

1/27/15

37

Ant Systems Algorithm for TSP


Initialize

Place each ant in a randomly chosen city

For Each Ant


Choose Next City(For Each Ant)
yes

more cities
to visit
No

Return to the initial cities


Update pheromone level using the tour cost for each ant
No

Stopping
criteria
yes

1/27/15

Print Best tour

38

Computational
Experiments
The moving of ants
provides the parallel and independent
search of the route with the help of dynamical change of
pheromone trail. For experiment, we used the problem of
32 cities in Slovakia. We were able to get an optimal
solution to that problem with the help of MATLAB.

1/27/15

39

Conclusio
n

Based on the experiments, it can be concluded that the


quality of solutions depends on the number of ants. The
lower number of ants allows the individual to change the
path much faster. The higher number of ants in population
causes the higher accumulation of pheromone on edges,
and thus an individual keeps the path with higher
concentration of pheromone with a high probability.

1/27/15

40

Recent Trends in ACO


continued interest in applications
new applications
multi-objective optimization
dynamic optimization problems
stochastic optimization problems

increasing interest in theoretical issues


methodology for applying ACO

1/27/15

41

1)

Referenc
es The Ant Colony Optimization
M. Dorigo and G. Di Caro,
meta-heuristic, in NewIdeas in Optimization, D. Corne et
al., Eds., McGraw Hill, London, UK, pp. 1132, 1999.

2) L. Bianchi, L.M. Gambardella, and M. Dorigo, An ant


colony optimization approach to the probabilistic traveling
salesman problem, in Proc. PPSN-VII, ser. LNCS, J. J.
Merelo et al.,Eds., Springer Verlag, vol. 2439, pp. 883
892, 2002
3) M. Dorigo and T. Stutzle, Ant Colony Optimization, MIT
Press, Cambridge, MA, 2004.

1/27/15

42

Thank
you !!!

You might also like