Ant Colony Optimization Algoritham and Application
Ant Colony Optimization Algoritham and Application
=
e
k
allowed k
ik ik
ij ij
k
ij
] [ )] t ( [
] [ )] t ( [
) t ( p
| o
| o
q t
q t
32
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
4.1.7 ADVANTAGES
Positive Feedback accounts for rapid discovery of good solutions
Distributed computation avoids premature convergence
The greedy heuristic helps find acceptable solution in the early solution in the early stages of
the search process.
The collective interaction of a population of agents.
4.2 QUADRATIC ASSIGNMENT PROBLEM
Fig :4.3
The quadratic assignment problem (QAP) is one of fundamental combinatorial
optimization problems in the branch of optimization or operations research in mathematics, from
the category of the facilities location problems.
There are a set of n facilities and a set of n locations. For each pair of locations, a distance is
specified and for each pair of facilities aweigh or flow is specified (e.g., the amount of supplies
transported between the two facilities). The problem is to assign all facilities to different
locations with the goal of minimizing the sum of the distances multiplied by the corresponding
flows
The formal definition of the quadratic assignment problem is
Given two sets, P ("facilities") and L ("locations"), of equal size, together with a weight
function w : P P R and a distance function d : L L R. Find
the bijection f : P L ("assignment") such that the cost function:
33
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
| |
n n
j i
d
,
,
is minimized.
Usually weight and distance functions are viewed as square real-valued matrices, so that
the cost function is written down as:
Problem is:
Assign n activities to n locations (campus and mall layout).
D= , , distance from location i to location j
F= , ,flow from activity h to activity k
Assignment is permutation
Minimize:
Its NP hard
QAP Example Fig:4.4
j i
d
,
| |
n n
k h
f
,
,
j i
f
,
H
=
=
n
j i
j i ij
f d C
1 ,
) ( ) (
) (
t t
t
34
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
4.2.1 ALGORITHMS
1) Ant System for the QAP: Ant System (AS) uses ants in order to construct a solution from
scratch. The algorithm uses a heuristic information on the potential quality of a local assignment
that is determined as follows: two vectors d and f whose components are the sum of the
distances, resp. flows from location, resp. facility i to all other locations, resp. facilities are
computed. This leads to a coupling matrix E = f dT where eij = fi dj . Thus, _ = 1/eij denotes
the heuristic desirability of assigning facility i to location j. A solution is constructed by using
both this heuristic information and information provided by previous ants using
pheromones. At each step an ant k assigns the next still unassigned facility i to a location j
belonging to the feasible neighbourhood of the node i, i.e. the locations that are still free, with a
probability pk ij given by
After their run, the ants update the pheromone information Tij :
This algorithm uses an evaporation rate of (1 p) in order to forget previous bad choices at the
cost of loosing useful information too. is the amount of pheromone ant k deposits on the
edge (i, j):
The algorithm parameters are the number of ants n, the weight given to either heuristic or
pheromone informations _, _ and the maximal amount of laid pheromone Q.
35
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
2) The MAX MIN Ant System: MAX MIN Ant System (MMAS) is an improvement over
AS that allows only one ant to add pheromone. The pheromone trails are initialized to the upper
trail limit, which cause a higher exploration at the start of algorithm.
Finally, methods to increase the diversification of the search can be used, for example by
reinitialising the pheromone trails to _max if the algorithm makes no progress. In MMAS, the
ant k assigns the facility i to the location j with a probability pk ij. MMAS does not use any
heuristic information but is coupled with a local search for every ant.
4.2.2 SIMPLIFIED CRAFT (QAP)
Simplification Assume all departments have equal size Notation distance between locations i
and j travel frequency between departments k and h
1 if department k is assigned to location i
0 otherwise
Example
Fig:4.5
36
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
Fig: 4.6a
Fig: 4.6b
4.2.3 ANT SYSTEM (AS-QAP)
Constructive method:
step 1: choose a facility j
step 2: assign it to a location i
Characteristics:
each ant leaves trace (pheromone) on the chosen couplings (i,j)
assignment depends on the probability (function of pheromone trail and a heuristic
information)
1 2 3 4
1
2
- 1 1 2
2
1 - 2 1
3 1 2 - 1
4 2 1 1 -
37
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
already coupled locations and facilities are inhibited (Tabu list)
Heuristic information
The coupling Matrix:
Ants choose the location according to the heuristic desirability Potential goodness
4.2.4 AS-QAP CONSTRUCTING THE SOLUTION.
AS-QAP Constructing the Solution facilities are ranked in decreasing order of the flow
potentials, Ant k assigns the facility i to location j with the probability given by
where is the feasible Neighborhood of node i
When Ant k choose to assign facility j to location i it leave a substance, called trace
pheromone on the coupling (i,j)
Repeated until the entire assignment is found
(
(
(
(
=
(
(
(
(
=
(
(
(
(
=
(
(
(
(
=
80
130
110
120
0 50 20 10
50 0 30 50
20 30 0 60
10 50 60 0
14
12
10
6
0 6 5 3
6 0 4 2
5 4 0 1
3 2 1 0
i ij i ij
F F D D
960 s
720 s
1120 960 800 480
1820 1560 1300 780
1540 1320 1100 660
1680 1440 1200 720
4 3 34
1 1 11
= - =
= - =
(
(
(
(
=
d f
d f
S
ij
ij
s
1
= ,
k
i
N l
ij ij
ij ij k
ij
N j if
t
t
t p
k
i
e
e
] [ )] ( [
] [ )] ( [
) (
| o
| o
q t
q t
k
i
N
38
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
4.2.5 AS-QAP PHEROMONE UPDATE.
Pheromone trail update to all couplings:
is the amount of pheromone ant k puts on the coupling (i,j)
Q...the amount of pheromone deposited by ant k.
4.2.6 NETWORK MODEL
Routing (or routeing) is the process of selecting paths in a network along which to send
network traffic. Routing is performed for many kinds of networks, including the telephone
network, electronic data networks (such as the Internet), and transportation networks. This article
is concerned primarily with routing in electronic data networks using packet
switching technology.
In packet switching networks, routing directs packet forwarding, the transit of logically
addressed packets from their source toward their ultimate destination through
intermediate nodes; typically hardware devices called routers, bridges, gateways, firewalls,
or switches. General-purpose computers with multiple network cards can also forward packets
and perform routing, though they are not specialized hardware and may suffer from limited
performance. The routing process usually directs forwarding on the basis of routing tables which
maintain a record of the routes to various network destinations. Thus, constructing routing tables,
which are held in the routers' memory, is very important for efficient routing. Most routing
algorithms use only one network path at a time, but multipath routing techniques enable the use
of multiple alternative paths.
Routing task is performed by Routers.
Routers use Routing Tables to direct the data.
=
A + = +
m
k
k
ij ij ij
t t
1
) ( . ) 1 ( t t t
k
ij
t A
otherwise 0
k ant of solution in the j location to assigned is i facility
= A
if
J
Q
k k
ij
alue function v objective the .
k
J
39
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
Fig: 4.7
4.2.7 PROBLEM STATEMENT.
- Dynamic Routing
At any moment the pathway of a message must be as small as possible. (Traffic
conditions and the structure of the network are constantly changing)
- Load balancing
Distribute the changing load over the system and minimize lost calls
4.2.8 ALGORITHM
Increase the probability of the visited link by:
Decrease the probability of the others by :
Where
Fig: 4.8a
A +
A +
=
1
old
A +
=
1
old
|
|
.
|
\
|
= A
age
f
1
Node1
Node3
Node4
Node7
Node8
40
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
Fig: 4.8b
4.3 VEHICLE ROUTING PROBLEM WITH TIME WINDOWS (VRPTW).
The vehicle routing problem(VRP) is a combinatorial and integer programming problem seeking
to service a number of customers with a fleet of vehicles. Proposed by Dantzig and Ramser in
1959, VRP is an important problem in the fields of transportation, distribution and
logistics. Often the context is that of delivering goods located at a central depot to customers
who have placed orders for such goods. Implicit is the goal of minimizing the cost of distributing
the goods. Many methods have been developed for searching for good solutions to the problem,
but for all but the smallest problems, finding global minimum for the cost function
is computationally complex.
Objective Functions to Minimize
Total travel distance
Total travel time
Number of vehicles
Subject to:
Vehicles ( # ,Capacity, time on road, trip length)
Depots (Numbers)
Customers (Demands, time windows)
41
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
Vehicle Routing Problem with Time Windows (VRPTW):
Fig: 4.9
4.3.1 SIMPLE ALGORITHM
Place ants on depots (Depots # = Vehicle #).
Probabilistic choice
~ (1/distance, d
i
, Q)
~ amount of pheromone
If all unvisited customer lead to a unfeasible solution:
Select depot as your next customer.
Improve by local search.
Only best ants update pheromone trial.
42
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
4.3.2 MULTIPLE ACS FOR VRPTW.
Fig: 4.10
4.3.3 SINGLE MACHINE TOTAL WEIGHTED TARDINESS SHEDULING
PROBLEM (SMTWTP).
In the SMTWTP n jobs have to be processed sequentially without interruption on
a single machine. Each job has a processing time pj, a weight wj, and a due date dj associated
and all jobs are available for processing at time zero. The tardiness of job j is defined as Tj =
max{0, Cj dj}, where Cj is its completion time in the current job sequence. The goal in the
SMTWTP is to find a job sequence which minimizes the sum of the weighted tardiness given
by(summation from i=1 to n of (wi Ti)). For the ACO application to the SMTWTP, the set of
components C is the set of all jobs. As in the TSP case, the states of the problem are all possible
partial sequences. In the SMTWTP case we do not have explicit costs associated with the
connections because the objective function contribution of each job depends on the partial
solution constructed so far.
43
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
The SMTWTP was attacked in using ACS (ACS-SMTWTP). In ACSSMTWTP, each ant
starts with an empty sequence and then iteratively appends an unscheduled job to the partial
sequence constructed so far.
Each ant chooses the next job using the pseudo-random-proportional action choice rule, where
the at each step the feasible neighborhood Ni^k of ant k is formed by the still unscheduled jobs.
Pheromone trails are defined as follows: ij refers to the desirability of scheduling job j at
position i. This definition of the pheromone trails is, in fact, used in most ACO application to
scheduling problems.
Concerning the heuristic information, in the use of three priority rules allowed to define
three different types of heuristic information for the SMTWTP. The investigated priority rules
were: (i) the earliest due date rule (EDD), which puts the jobs in non-decreasing order of the due
dates dj , (ii) the modified due date rule (MDD) which puts the jobs in non-decreasing order of
the modified due dates given by mddj = max{C + pj, dj} [2], where C is the sum of the
processing times of the already sequenced jobs, and (iii) the apparent urgency rule (AU) which
puts the jobs in non-decreasing order of the apparent urgency, given by auj = (wj/pj)
exp((max{dj Cj , 0})/kp), where k is a parameter of the priority rule. In each case, the
heuristic information was defined as ij = 1/hj, where hj is either dj, mddj, or auj , depending on
the priority rule used. The global and the local pheromone update is done as in the standard ACS,
where in the global pheromone update Tgb is the total weighted tardiness of the global best
solution.
In ACS-SMTWTP was combined with a powerful local search algorithm. The final ACS
algorithm was tested on a benchmark set available from ORLIB. Within the computation time
limits ACS reached a very good performance and could find in each single run the optimal or
best known solutions on all instances of the benchmark set.
44
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
CHAPTER 5
CONCLUSION.
5.1 ADVANTAGES.
- For TSPs (Traveling Salesman Problem), relatively efficient
for a small number of nodes, TSPs can be solved by exhaustive search
for a large number of nodes, TSPs are very computationally difficult to solve
(NP-hard) exponential time to convergence
Performs better against other global optimization techniques for TSP (neural
net, genetic algorithms, simulated annealing)
- Compared to GAs (Genetic Algorithms):
Retains memory of entire colony instead of previous generation only
Less affected by poor initial solutions (due to combination of random path
selection and colony memory).
- Can be used in dynamic applications (adapts to changes such as new distances, etc.)
Has been applied to a wide variety of applications
As with GAs, good choice for constrained discrete problems (not a gradient-
based algorithm)
5.2 DISADVANTAGES.
- Theoretical analysis is difficult:
Due to sequences of random decisions (not independent)
Probability distribution changes by iteration
Research is experimental rather than theoretical
- Convergence is guaranteed, but time to convergence uncertain
- Tradeoffs in evaluating convergence:
In NP-hard problems, need high-quality solutions quickly
focus is on quality of solutions
In dynamic network routing problems, need solutions for
changing conditions focus is on effective evaluation of
alternative paths
- Coding is somewhat complicated, not straightforward
45
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
Pheromone trail additions/deletions, global updates and local
updates
Large number of different ACO algorithms to exploit different
problem characteristics
5.3 SCOPE OF SEMINAR.
In this paper we have given a formal description of the Ant Colony Optimization meta
heuristic, as well as of the class of problems to which it can be applied. We have then described
two paradigmatic applications of ACO algorithms to the traveling salesman problem and to
routing in packet-switched networks, and concluded with a short overview on the currently
available applications. Ongoing work follows three main directions: the study of the formal
properties of a simplified version of ant system, the development of Ant Net for Quality of
Service applications, and the development of further applications to combinatorial optimization
problems. Since Ant colony algorithm may produce redundant states in the graph, its better to
minimize such graphs to enhance the behavior of the inducted system. A colony of ants moves
through system states X, by applying Genetic Operations. By moving, each ant incrementally
constructs a solution to the problem. When an ant complete solution, or during the construction
phase, the ant evaluates the solution and modifies the trail value on the components used in its
solution. Ants deposit a certain amount of pheromone on the components; that is, either on the
vertices or on the edges that they traverse. The amount of pheromone deposited may depend on
the quality of the solution found. Subsequent ants use the pheromone information as a guide
toward promising regions of the search space. Ants adaptively modify the way the problem is
represented and perceived by other ants, but they are not adaptive themselves. The genetic
programming paradigm permits the evolution of computer programs which can perform
alternative computations conditioned on the outcome of intermediate calculations, which can
perform computations on variables of many different types, which can perform iterations and
recursions to achieve the desired result, which can define and subsequently use computed values
and sub-programs, and whose size, shape, and complexity is not specified in advance.
ACO is a recently proposed metaheuristic approach for solving hard combinatorial optimization
problems. Artificial ants implement a randomized construction heuristic which makes
probabilistic decisions. The cumulated search experience is taken into account by the adaptation
of the pheromone trail. ACO Shows great performance with the ill structured problems like
network routing. In ACO Local search is extremely important to obtain good results.
The field of ACO algorithms is very lively, as testified for example by the successful
biannual workshop (ANTS From Ant Colonies to Artificial Ants: A Series of International
Workshops on Ant Algorithms) where researchers meet to discuss the properties of ACO and
other ant algorithms, both theoretically and experimentally.
46
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
From the theory side, researchers are trying either to extend the scope of existing theoretical
results, or to find principled ways to set parameters values. From the experimental side, most of
the current research is in the direction of increasing the number of problems that are successfully
solved by ACO algorithms, including real-word, industrial applications.
Currently, the great majority of problems attacked by ACO are static and well-defined
combinatorial optimization problems, that is, problems for which all the
necessary information is available and does not change during problem solution. For this kind of
problems ACO algorithms must compete with very well established algorithms, often specialized
for the given problem. Also, very often the role played by local search is extremely important to
obtain good results.
Although rather successful on these problems, we believe that ACO algorithms will really
evidentiate their strength when they will be systematically applied to ill-structured problems
for which it is not clear how to apply local search, or to highly dynamic domains with only local
information available. A first step in this direction has already been done with the application to
telecommunications networks routing, but more research is necessary.
47
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.
BIBILIOGRAPHY
Dorigo M. and G. Di Caro (1999). The Ant Colony Optimization Meta-Heuristic. In D.
Corne, M. Dorigo and F. Glover, editors, New Ideas in Optimization, McGraw-Hill, 11-
32.
M. Dorigo and L. M. Gambardella. Ant colonies for the travelling salesman problem. Bio
Systems, 43:7381, 1997.
M. Dorigo and L. M. Gambardella. Ant Colony System: A cooperative learning approach
to the travelling salesman problem. IEEE Transactions on Evolutionary Computation,
1(1):5366, 1997.
G. Di Caro and M. Dorigo. Mobile agents for adaptive routing. In H. El-Rewini, editor,
Proceedings of the 31st International Conference on System Sciences (HICSS-31), pages
7483. IEEE Computer Society Press, Los Alamitos, CA, 1998.
M. Dorigo, V. Maniezzo, and A. Colorni. The Ant System: An autocatalytic optimizing
process. Technical Report 91-016, Revised, Dipartimento di Elettronica,Politecnico di
Milano, Italy, 1991.
L. M. Gambardella, ` E. D. Taillard, and G. Agazzi. MACS-VRPTW: A multiple ant
colony system for vehicle routing problems with time windows. In D. Corne, M. Dorigo,
and F. Glover, editors, New Ideas in Optimization, pages 6376. McGraw Hill, London,
UK, 1999.
L. M. Gambardella, ` E. D. Taillard, and M. Dorigo. Ant colonies for the quadratic
assignment problem. Journal of the Operational Research Society,50(2):167176, 1999.
V. Maniezzo and A. Colorni. The Ant System applied to the quadratic assignment
problem. IEEE Transactions on Data and Knowledge Engineering, 11(5):769778, 1999.
Gambardella L. M., E. Taillard and M. Dorigo (1999). Ant Colonies for the Quadratic
Assignment Problem. Journal of the Operational Research Society, 50:167-176.
Dorigo M., Gambardella L.M. [1997], Ant colonies for the traveling salesman problem,
Bio Systems, 43, 73-81
48
ANT COLONY OPTIMIZATION ALGORITHM AND APPLICATIONS.
DEPARTMENT OF ECE.