parallel implementation of ant colony optimization on traveling salesman problem

26
PARALLEL IMPLEMENTATION OF ANT COLONY OPTIMIZATION ON TRAVELING SALESMAN PROBLEM Yogesh sharma IIT2009175 Ankur mangal IIT2009176 Under the supervision of Dr.K.P.Singh

Upload: kaoru

Post on 19-Jan-2016

35 views

Category:

Documents


0 download

DESCRIPTION

Parallel Implementation of Ant Colony Optimization on Traveling Salesman problem. Under the supervision of Dr.K.P.Singh. Yogesh sharma IIT2009175 Ankur mangal IIT2009176. Traveling Salesman Problem (TSP). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

PARALLEL IMPLEMENTATION OF ANT COLONY OPTIMIZATION ON TRAVELING SALESMAN PROBLEM

Yogesh sharma IIT2009175

Ankur mangal IIT2009176

Under the supervision of Dr.K.P.Singh

Page 2: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

TRAVELING SALESMAN PROBLEM (TSP)

Traveling salesman problem :- A salesman must visit n cities, passing through each city only once, beginning from one of them which is considered as his base,and returning to it.

The cost of the transportation among the cities is given.

The program of the journey is requested , that is the order of visiting the cities in such a way that the cost is the minimum.

Page 3: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

TRAVELING SALESMAN PROBLEM

Traveling salesman problem is NP-complete. This means that to obtain optimal route we have to through all possible routes and Number of routes increase exponentially.

Page 4: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

TRAVELING SALESMAN PROBLEM

Number of possible routes with 50 cities is (50-2)! , which is

12,413,915,592,536,072,670,862,289,047,373,375,038,521,486,354,677,760,000,000,000.

So for large instance compute optimal solution is impossible.

Instead of finding exact solution optimization tachniques compute solution that is close to the optimal solution.

Ant colony optimization is a metaheuristic to compute a solution close to optimal solution.

Page 5: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

Ant colony optimization algorithm is a metaheuristic that can be used to define heuristic function applicable to wide set of different problems.

ACO is inspired by behaviour of real ants. Key concept of ACO based on communication

among ants based on the use of chemical produce by ants called as pheromone.

Ants use pheromone trail to making path on ground.

Page 6: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

Page 7: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

Algorithm:- Procedure ACOMetaheuristic

Set parameters, initialize pheromone trails

While( termination condition not met ) Do

Construct SolutionUpdate pheromone daemon Action

endend

Page 8: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

Construct solution :- Construct solution manage a colony of ants that visit adjacent states of consider problem (i.e. Traveling salesman problem ) construction graph Gc( v , e ).

They move by a local decision policy make use of pheromone trail and heuristic information.

Initially , ant are out on randimely chosen paths.

At each construction step , ant k apply problalistic choice to decide which state to visit next.

Page 9: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY ALGORITHM ( ACO ) Probability for kth ant to move from state i to state j is

given by

xy is amount of pheromone for transition from x to y.

xy is heuristic information. is parameter to control influence of pheromone.

is parameter to control influence of heuristic value.

Page 10: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

2 5

3 4

1

P12P15

P54P23

P24P35

P34

Page 11: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

2 5

3 4

1

P12P15

P54

P24P35

Page 12: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

2 5

3 4

1

P12P15

P54

P24P35

Page 13: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

2 5

3 4

1

P12P15

P54

P24P35

Page 14: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

2 5

3 4

1

P12P15

P54

P24P35

Page 15: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

2 5

3 4

1

P12P15

P54

P24P35

Page 16: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ACO CONCEPT

UpdatePheromones:- When all ants comleted a solution

pheromones updated by Is amount phermones deposited for a

state transion xy.  ρ is evaporation coefficient and is the

amount of pheromone deposited. DaemonActions:- DaemonAction is

procedure to implement centralized action which cannot be performed by single ant.example –decide whether deposit additional pheromone to bias the search process.

Page 17: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

ANT COLONY OPTIMIZATION ( ACO )

2 5

3 4

1

P12P15

P54

P24P35

Page 18: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

PARRALLEL IMPLEMENTATION OF ACO

Our target is to parrallize the sequential algorithm.

On large instances sequential algorithm does not use full resources.Ex:- if we have 6-processors sequential algorithm works as one process.

To make better use of available resources parrallel process work concurrently on system.

Ant speed up process of finding solution.

Page 19: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

PARRALLEL IMPLEMENTATION OF ACO

start

Fork

Join

End

Parrallel threads

Page 20: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

PARRALLEL IMPLEMENTATION OF ACO

start

Fork

Join

End

Parrallel threads

Page 21: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

SHARED MEMORY MODEL FOR CONCURREMT ACCESS TO DATA

Memory

Reead only access

Reead only access

Reead only access

For update of data by ant. Lock data and uadate by single ant

Page 22: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

PARRALLEL ALGORITHM OF ACO

Algorithm:- Procedure ACOMetaheuristic

Set parameters, initialize pheromone trails

While( termination condition not met ) Do

Parrallel DoConstruct Solution

Update pheromone daemon Action

endend

Page 23: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

RESULT OF PARRELLEL ALGORITHM

Instances:- Intance :- eli51

51 citiesBest known solution:- 426Best known solution by Our implementat:- 426

Intance :- eli76 76 citiesBest known solution:- 540Best known solution by Our implementat:- 538

Page 24: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

PERFOMANCE GRAPH BETWEEN THREAD AND TIME

2 4 6 8 10 120

0.5

1

1.5

2

2.5

3

3.5

4

4.5

time

Number of Thread

Page 25: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

GRAPH BETWEEN PARRALLEL IMPLEMENTATION AND SEQUENTIAL IMPLEMENTATION

itera

tion

50

itera

tion1

00

itera

tion

300

itera

tion

500

itera

tion

100

itera

tion

2000

02468

10121416

sequentialparrallel

Time

Page 26: Parallel Implementation of Ant Colony Optimization  on   Traveling Salesman problem

THANK YOU