ant colony -tsp - optimization

37
1 Department of Biomedical, Industrial and Human Factors Engineering Ant Colony Systems and the Ant Algorithm

Upload: gridtester

Post on 12-Nov-2014

3.324 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Ant Colony -TSP - Optimization

1Department of Biomedical, Industrial and Human Factors Engineering

Ant Colony Systems

and the

Ant Algorithm

Page 2: Ant Colony -TSP - Optimization

2Department of Biomedical, Industrial and Human Factors Engineering

REAL ANT BEHAVIOR

Page 3: Ant Colony -TSP - Optimization

3Department of Biomedical, Industrial and Human Factors Engineering

Natural behavior of ants have inspired scientists to mimic insect

operational methods to solve real-life complex problems

By observing ant behavior, scientists have begun to understand

their means of communication

Ant-based behavioral patterns to address combinatorial

problems - first proposed by Marco Dorigo

REAL ANT BEHAVIOR

Ants secrete pheromone while

traveling from the nest to food,

and vice versa in order to

communicate with one another to

find the shortest path

Page 4: Ant Colony -TSP - Optimization

4Department of Biomedical, Industrial and Human Factors Engineering

EXPERIMENTAL STUDY OF ANTS

The more ants follow a trail, the more attractive that trail

becomes for being followed

NEST FOODNEST FOODNEST FOOD

Page 5: Ant Colony -TSP - Optimization

5Department of Biomedical, Industrial and Human Factors Engineering

ANT Behavior

The more ants follow a trail, the more attractive that trail

becomes for being followed

Page 6: Ant Colony -TSP - Optimization

6Department of Biomedical, Industrial and Human Factors Engineering

ANT Behavior

Even when the tracks are equal the behavior will encourage one

over the other--convergence (Deneubourg et al)

Page 7: Ant Colony -TSP - Optimization

7Department of Biomedical, Industrial and Human Factors Engineering

ROUTE SELECTION

Ants are forced to decide whether they should go left or right, and

the choice that is made is a random decision

Pheromone accumulation is faster on the shorter path

The difference in pheromone content between the two paths over

time makes the ants choose the shorter path

Positive feedback mechanism to arrive at the shortest route while

foraging

Stygmergy or stigmergetic model of communication

Different optimization problems have been explored using a

simulation of this real ant behavior

Page 8: Ant Colony -TSP - Optimization

8Department of Biomedical, Industrial and Human Factors Engineering

TRAVELING SALESMAN PROBLEM

Page 9: Ant Colony -TSP - Optimization

9Department of Biomedical, Industrial and Human Factors Engineering

PROBLEM DEFINITION

OBJECTIVE

Given a set of n cities, the Traveling

Salesman Problem requires a salesman

to find the shortest route between the

given cities and return to the starting

city, while keeping in mind that each city

can be visited only once

Page 10: Ant Colony -TSP - Optimization

10Department of Biomedical, Industrial and Human Factors Engineering

WHY IS TSP DIFFICULT TO SOLVE?

Finding the best solution may entail an exhaustive search for all

combinations of cities. This can be prohibitive as “n” gets very

large

Heuristics like a “greedy” route doesn’t guarantee optimal

solutions

d

e

gfb

c

h

a d

e

gfb

c

h

a

Page 11: Ant Colony -TSP - Optimization

11Department of Biomedical, Industrial and Human Factors Engineering

TSP Applications

• Lots of practical applications

• Routing such as in trucking, delivery, UAVs

• Manufacturing routing such as movement of parts along manufacturing floor or the amount of solder on circuit board

• Network design such as determining the amount of cabling required

• Two main types

– Symmetric

– Asymmetric

Page 12: Ant Colony -TSP - Optimization

12Department of Biomedical, Industrial and Human Factors Engineering

General Formulation - Symmetric

iji ij ijxd∑∑>min

ixxij ij jiij ∀≥+∑∑< > 2,,

32,, ≥∋∀≥+∑∑∑∑∈>∉ ∉>∈SSxxSi ijSj Si ijSj

jiji

+∈Bxji,

Page 13: Ant Colony -TSP - Optimization

13Department of Biomedical, Industrial and Human Factors Engineering

General Formulation - Asymmetric

iji ij ijxd∑∑≠min

ixjij ∀=∑1,

ixiji ∀=∑1,

21, ≥∋∀≥∑∑∈∉ SSxSi Sj ji

+∈Bxji,

Page 14: Ant Colony -TSP - Optimization

14Department of Biomedical, Industrial and Human Factors Engineering

TSP Heuristics

• Variety of heuristics used to solve the TSP

• The TSP is not only theoretically difficult it is also difficult in practical application since the tour breaking contraints get quite numerous

• As a result there have been a variety of methods proposed for the TSP

• Nearest Neighbor is a typical greedy approach

Page 15: Ant Colony -TSP - Optimization

15Department of Biomedical, Industrial and Human Factors Engineering

Simple Examples

2 3 4 5 6 7 8 9 10

1 Chicago 96 105 50 41 86 46 29 56 70

2 Dallas 78 49 94 21 64 63 41 37

3 Denver 60 84 61 54 86 76 51

4 KC 45 35 20 26 17 18

5 Minn 80 36 55 59 64

6 OK City 46 50 28 8

7 Omaha 45 37 30

8 St Louis 21 45

9 Sprngfld 25

10 Wichita

1

28

3

9

7

6

5

4

6

21 2

6

22 2

2 1

621

2

2

Page 16: Ant Colony -TSP - Optimization

16Department of Biomedical, Industrial and Human Factors Engineering

Nearest Neighbor Solution

Iteration Node Arc Cost Total

1 1

2 8 1,8 29

3 9 8,9 21 50

4 4 9,4 17 67

5 10 4,10 18 85

6 6 10,6 8 93

7 2 6,2 21 114

8 7 2,7 64 178

9 5 7,5 36 214

10 3 5,3 84 298

11 3,1 105 403

Page 17: Ant Colony -TSP - Optimization

17Department of Biomedical, Industrial and Human Factors Engineering

0

50

100

150

200

250

300

350

400

450

500

0 50 100 150 200 250 300 350 400 450 500

Way Point

Depot

Obj Fx: min d

Larger TSP Example

Page 18: Ant Colony -TSP - Optimization

18Department of Biomedical, Industrial and Human Factors Engineering

0

50

100

150

200

250

300

350

400

450

500

0 50 100 150 200 250 300 350 400 450 500

Way Point

Depot

d=3138

Initial Order Solution

Page 19: Ant Colony -TSP - Optimization

19Department of Biomedical, Industrial and Human Factors Engineering

0

50

100

150

200

250

300

350

400

450

500

0 50 100 150 200 250 300 350 400 450 500

Way Point

Depot

d=2108

Nearest Neighbor Solution

Page 20: Ant Colony -TSP - Optimization

20Department of Biomedical, Industrial and Human Factors Engineering

0

50

100

150

200

250

300

350

400

450

500

0 50 100 150 200 250 300 350 400 450 500

Way Point

Depot

d=1830

Tabu Search Solution

Page 21: Ant Colony -TSP - Optimization

21Department of Biomedical, Industrial and Human Factors Engineering

THE ANT COLONY OPTIMIZATION METAHEURISTIC

Page 22: Ant Colony -TSP - Optimization

22Department of Biomedical, Industrial and Human Factors Engineering

GOAL OF ACO HEURISTIC

Artificial ants form a multi-agent system performing the

functions as observed in the real ant system

Exploit stigmergistic communication

The ACO meta-heuristic relies on the co-operation of a

group of artificial ants to obtain a good solution to a

discrete optimization problem such as the TSP

Artificial ants are mutants of a real ant system

The resulting shortest route mapping determined by the agents

can be applied to the optimization problem

Page 23: Ant Colony -TSP - Optimization

23Department of Biomedical, Industrial and Human Factors Engineering

ACO CHARACTERISTICS

Exploit a positive feedback mechanism

Demonstrate a distributed computational architecture

Exploit a global data structure that changes dynamically as each ant transverses the route

Has an element of distributed computation to it involving the population of ants

Involves probabilistic transitions among states or rather between nodes

Page 24: Ant Colony -TSP - Optimization

24Department of Biomedical, Industrial and Human Factors Engineering

REAL vs. ARTIFICIAL ANTS

• Discrete time steps

• Memory Allocation

• Quality of Solution

• Time of Pheromone deposition

• Distance Estimation

REAL ANT ARTIFICIAL ANT

Page 25: Ant Colony -TSP - Optimization

25Department of Biomedical, Industrial and Human Factors Engineering

FLOWCHART OF ACO

Have all cities been

visited

Have the maximum

Iterations been performed

START ACO

Locate ants randomly in cities across the grid and store the

current city in a tabu list

Determine probabilistically as to which city to visit next

Move to next city and place this city in the

tabu list

Record the length of tour and clear tabu list

Determine the shortest tour till now and

update pheromone

NO

YES

STOPACO

YESNO

Page 26: Ant Colony -TSP - Optimization

26Department of Biomedical, Industrial and Human Factors Engineering

KEY PARAMETERS

Trail intensity is given by value of ij which indicates the intensity of the pheromone on the trail segment, (ij)

Trail visibility is ij = 1/dij

The importance of the intensity in the probabilistic transition is

The importance of the visibility of the trail segment is

The trail persistence or evaporation rate is given as

Q is a constant and the amount of peromone laid on a trail segment employed by an Ant; this amount may be modified

in various manners

Page 27: Ant Colony -TSP - Optimization

27Department of Biomedical, Industrial and Human Factors Engineering

PROBABILISTIC CITY SELECTION

Helps determine the city to visit next while the ant is in a tour

Determined by variables such as the pheromone content in an

edge (i,j) at time instant t, heuristic function of the desirability of

adding edge, and their control parameters

[ ] [ ][ ] [ ]

)(

)(

0

)(

)(

)()(

iJjf

iJjift

t

tp

k

kilil

ijij

kij

ikJl

⎪⎪⎩

⎪⎪⎨

= ∑∈

βα

βα

ητ

ητ

Page 28: Ant Colony -TSP - Optimization

28Department of Biomedical, Industrial and Human Factors Engineering

PHEROMONE UPDATING

Using the tour length for the k-th Ant, Lk, the quantity of

pheromone added to each edge belonging to the completed tour is

given by

( ) ( )( )tTjiedgeif

tTjiedgewhereL

Qt

k

k

k

kij ∉

⎪⎩

⎪⎨⎧

=Δ),(

),(

)()()1()1( ttt ijijij Δ+−=+

The pheromone decay in each edge of a tour is given by

Page 29: Ant Colony -TSP - Optimization

29Department of Biomedical, Industrial and Human Factors Engineering

ACTUALLY 3 ALGORITHMS

The ant-cycle is the approach discussed so far

Information is updated at the end of each tour as such function of tour length

The ant-density is an approach wherein the pheromone quantity Q is deposited once the segment is transversed

Pretty much a greedy approach (local information) and not really providing relative information

The ant-quantity is an approach wherein the pheromone quantity Q/dij is deposited once the segment is transversed

Also a greedy approach but providing some relative information by scaling Q by the length of the segment

Page 30: Ant Colony -TSP - Optimization

30Department of Biomedical, Industrial and Human Factors Engineering

Consider the Case Studies in Papers

Page 31: Ant Colony -TSP - Optimization

31Department of Biomedical, Industrial and Human Factors Engineering

EXTENSIONS

Found that communication among the ants via the intensity factor is important; makes sense

since it provides some global insight

Found that a good number of ants is about equal to the number of cities

Found that the initial distribution of the ants among the cities does not really matter

Found that an elitist strategy in which the segments on the best solution(s) is(are) continually

reinforced work well so long as there were not too few or too many elitist solutions

Page 32: Ant Colony -TSP - Optimization

32Department of Biomedical, Industrial and Human Factors Engineering

APPLICATIONS

Page 33: Ant Colony -TSP - Optimization

33Department of Biomedical, Industrial and Human Factors Engineering

APPLICATIONS

Page 34: Ant Colony -TSP - Optimization

34Department of Biomedical, Industrial and Human Factors Engineering

Population-Based Incremental Learning

Lots of similarities to the ACO

Actually inspired by genetic algorithms

Generate members of a population randomly based on probability of selection functions that are

increased or decreased based on the quality of past solutions involving the member variables

Once a population is generated, evaluate and then increase or lower the probability used by the

generating vector to encourage better solutions.

Page 35: Ant Colony -TSP - Optimization

35Department of Biomedical, Industrial and Human Factors Engineering

Population-Based Incremental Learning

Benefits

Will converge to solutions under correct circumstances

Efficient in terms of storage

Computationally pretty cheap

Involves learning

Disadvantages

Keeps primarily a local focus

Cannot handle interdependence among parameters very well

Will need to involve penalty functions for constraints

Page 36: Ant Colony -TSP - Optimization

36Department of Biomedical, Industrial and Human Factors Engineering

Population-Based Incremental Learning

A solution to overcome disadvantages proposed by Miagkiky

and Punch

Combine reinforcement with population generation

Page 37: Ant Colony -TSP - Optimization

37Department of Biomedical, Industrial and Human Factors Engineering

QUESTIONS??