Post on 08-Aug-2018
8/22/2019 Ant Colony Optimization-2
1/27
Ant Colony Optimization
Optimisation Methods
8/22/2019 Ant Colony Optimization-2
2/27
Overview
8/22/2019 Ant Colony Optimization-2
3/27
ACO Concept
Ants (blind) navigate from nest tofood source
Shortest path is discovered viapheromone trails
each ant moves at random
pheromone is deposited on path
ants detect lead ants path, inclined to
follow more pheromone on path increases
probability of path being followed
8/22/2019 Ant Colony Optimization-2
4/27
ACO System
Virtual trail accumulated on pathsegments
Starting node selected at random
Path selected at random
based on amount of trail present on possiblepaths from starting node
higher probability for paths with more trail
Ant reaches next node, selects next path
Continues until reaches starting node
Finished tour is a solution
8/22/2019 Ant Colony Optimization-2
5/27
ACO System, cont.
A completed tour is analyzed for optimality Trail amount adjusted to favor better
solutions better solutions receive more trail
worse solutions receive less trail
higher probability of ant selecting path that ispart of a better-performing tour
New cycle is performed
Repeated until most ants select the same
tour on every cycle (convergence tosolution)
8/22/2019 Ant Colony Optimization-2
6/27
ACO System, cont.
Often applied to TSP (Travelling SalesmanProblem): shortest path betweenn nodes
Algorithm in Pseudocode: InitializeTrail
Do While(Stopping Criteria Not Satisfied) Cycle
Loop Do Until(Each Ant Completes a Tour) Tour
Loop
Local Trail Update
End Do
Analyze Tours
Global Trail Update
End Do
8/22/2019 Ant Colony Optimization-2
7/27
Background
Discrete optimization problemsdifficult to solve
Soft computing techniquesdeveloped in past ten years:
Genetic algorithms (GAs)
based on natural selection and genetics
Ant Colony Optimization (ACO)
modeling ant colony behavior
8/22/2019 Ant Colony Optimization-2
8/27
Background, cont.
Developed by Marco Dorigo (Milan,Italy), and others in early 1990s
Some common applications: Quadratic assignment problems
Scheduling problems Dynamic routing problems in networks
Theoretical analysis difficult algorithm is based on a series of random
decisions (by artificial ants) probability of decisions changes on each
iteration
8/22/2019 Ant Colony Optimization-2
9/27
Implementation
8/22/2019 Ant Colony Optimization-2
10/27
Ant Algorithms
8/22/2019 Ant Colony Optimization-2
11/27
Ant Algorithms
8/22/2019 Ant Colony Optimization-2
12/27
Implementation
Can be used for both Static andDynamic Combinatorial optimizationproblems
Convergence is guaranteed, althoughthe speed is unknown
Value
Solution
8/22/2019 Ant Colony Optimization-2
13/27
The Algorithm
Ant Colony Algorithms are typicallyuse to solve minimum cost problems.
We may usually have N nodes andAundirected arcs
There are two working modes for theants: either forwards or backwards.
Pheromones are only deposited in
backward mode.
8/22/2019 Ant Colony Optimization-2
14/27
The Algorithm
The ants memory allows them toretrace the path it has followed whilesearching for the destination node
Before moving backward on theirmemorized path, they eliminate anyloops from it. While movingbackwards, the ants leave
pheromones on the arcs theytraversed.
8/22/2019 Ant Colony Optimization-2
15/27
The Algorithm
The ants evaluate the cost of thepaths they have traversed.
The shorter paths will receive agreater deposit of pheromones. Anevaporation rule will be tied with thepheromones, which will reduce thechance for poor quality solutions.
8/22/2019 Ant Colony Optimization-2
16/27
The Algorithm
At the beginning of the searchprocess, a constant amount ofpheromone is assigned to all arcs.When located at a node i an ant k
uses the pheromone trail to computethe probability of choosingjas thenext node:
where is the neighborhood of ant kwhen in node i.
0
ki
ij k
ikilij l N
k
i
if j N p
if j N
k
iN
8/22/2019 Ant Colony Optimization-2
17/27
The Algorithm
When the arc (i,j) is traversed , thepheromone value changes as follows:
By using this rule, the probabilityincreases that forthcoming ants willuse this arc.
k
ij ij
8/22/2019 Ant Colony Optimization-2
18/27
The Algorithm
After each ant khas moved to thenext node, the pheromonesevaporate by the following equationto all the arcs:
where is a parameter. Aniteration is a completer cycleinvolving ants movement,pheromone evaporation, andpheromone deposit.
(1 ) , ( , )ij ijp i j A
(0,1]p
8/22/2019 Ant Colony Optimization-2
19/27
Steps for Solving a Problem by ACO
1. Represent the problem in the form of sets ofcomponents and transitions, or by a set of weightedgraphs, on which ants can build solutions
2. Define the meaning of the pheromone trails3. Define the heuristic preference for the ant while
constructing a solution4. If possible implement a efficient local searchalgorithm for the problem to be solved.
5. Choose a specific ACO algorithm and apply toproblem being solved
6. Tune the parameter of the ACO algorithm.
8/22/2019 Ant Colony Optimization-2
20/27
Applications
Efficiently Solves NP hard Problems Routing
TSP (Traveling Salesman Problem)
Vehicle Routing
Sequential Ordering Assignment
QAP (Quadratic Assignment Problem)
Graph Coloring
Generalized Assignment Frequency Assignment
University Course Time Scheduling
43
52
1
8/22/2019 Ant Colony Optimization-2
21/27
Applications
Scheduling
Job Shop Open Shop Flow Shop Total tardiness (weighted/non-weighted) Project Scheduling
Group Shop Subset
Multi-Knapsack Max Independent Set Redundancy Allocation
Set Covering Weight Constrained Graph Tree partition Arc-weighted L cardinality tree Maximum Clique
8/22/2019 Ant Colony Optimization-2
22/27
Applications
Other
Shortest Common Sequence
Constraint Satisfaction
2D-HP protein folding
Bin Packing
Machine Learning Classification Rules
Bayesian networks
Fuzzy systems
Network Routing
Connection oriented network routing
Connection network routing
Optical network routing
8/22/2019 Ant Colony Optimization-2
23/27
Advantages andDisadvantages
8/22/2019 Ant Colony Optimization-2
24/27
Advantages and Disadvantages
For TSPs (Traveling Salesman Problem), relatively efficient
for a small number of nodes, TSPs can be solved byexhaustive search
for a large number of nodes, TSPs are verycomputationally difficult to solve (NP-hard) exponential time to convergence
Performs better against other global optimizationtechniques 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 colonymemory)
8/22/2019 Ant Colony Optimization-2
25/27
Advantages and Disadvantages, cont.
Can be used in dynamic applications(adapts to changes such as new distances,etc.)
Has been applied to a wide variety ofapplications
As with GAs, good choice for constrained
discrete problems (not a gradient-basedalgorithm)
8/22/2019 Ant Colony Optimization-2
26/27
Advantages and Disadvantages, cont.
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 toconvergence uncertain
8/22/2019 Ant Colony Optimization-2
27/27
Advantages and Disadvantages, cont.
Tradeoffs in evaluating convergence: In NP-hard problems, need high-quality
solutions quickly focus is on quality ofsolutions
In dynamic network routing problems, needsolutions for changing conditions focus is
on effective evaluation of alternative paths
Coding is somewhat complicated, notstraightforward
Pheromone trail additions/deletions, globalupdates and local updates Large number of different ACO algorithms to
exploit different problem characteristics