SlideShare a Scribd company logo
Ant Colony Optimization
Numerical Example
By :- Harish Kant Soni
Roll No:- 12CE31004
IIT Kharagpur
Problem
• min (x1
2 + x1x2 + x2)
• x1 = [1,2,3,4]
• x2= [3,4,5]
It’s better to assume same of no
ants as no of values.
So we take 4 ants for x1
and 3 ants for x2
• Each ant is assigned a
discrete value.
• x1j , j = 1,2,3,4
• x2k , k = 1,2,3
Ants for x1 Ants for x2
x11 1 x21 3
x12 2 x22 4
x13 3 x23 5
x14 4
• Assume equal
pheromone for
each path = 1
Iteration=1
• for any ant k the probability
of selecting it’s path is given
by
• P1j = τ1j
τ1 𝑚
4
𝑚=1
= ¼,
where j = [1,2,3,4]
• P2k = τ2k
τ1 𝑚
3
𝑚=1
= 1/3
where k = [3,4,5]
• set roulette wheel
using cdf for each
ant.
Ants for r1 Ants for r2
x11 (0,0.25) x21 (0,0.33)
x12 (0.25, 0.50) x22 (0.33,0.67)
x13 (0.50, 0.75) x23 (0.67, 1)
x14 (0.75,1)
• generate random
numbers for each ant
and find out which ant
is selected using
cdf(roulette wheel ).
Ants for x1 Ants for x2
r11 0.609684 x13 r21 0.689113 x23
r12 0.999736 x14 r22 0.706781 x23
r13 0.586537 x13 r23 0.416401 x22
r14 0.177464 x11
• find out
value of
objective
fn for each
selected
set of ants.
possible
set = 4 x 3
=12
Possible sets Ant values
Value of objective fn
(x1
2 + x1x2 + x2)
X13, x23 3,5 49 (worst)
X13, x23 3,5 49 (worst)
X13, x22 3,4 37
X14, x23 4,5 61
X14, x23 4,5 61
X14, x22 4,4 48
X13, x23 3,5 49 (worst)
X13, x23 3,5 49 (worst)
X13, x22 3,4 37
x11, x23 1,5 31
x11, x23 1,5 31
X11, x22 1,4 21 (best)
Ants for x1 Ants for x2
x11 1 x21 3
x12 2 x22 4
x13 3 x23 5
x14 4
Iteration 2
Local pheromone update is an
extension of what we are doing so we
will not consider local updatation.
Q/Lk
Q= constant
Iteration 2
• assume ρ = 0.4 and Q = 2
• Update pheromone for each ant
• Increase pheromone for x11 and x22 as
they are giving best solution.
• Evaporate pheromone for other paths
• Δτ =Q best/worst
• best = 21 (only 1 time so z = 1)
Updated Pheromone
Ants for x1 Ants for x2
x11 1 (1-0.4)x1 + 2x21/49 = 1.457 x21 3 (1-0.4)x1 = 0.6
x12 2 (1-0.4)x1 = 0.6 x22 4 (1-0.4)x1 + 2x21/49 = 1.457
x13 3 (1-0.4)x1 = 0.6 x23 5 (1-0.4)x1 = 0.6
x14 4 (1-0.4)x1 = 0.6
Iteration 2
• Update probability
• P1j = τ1j
τ1 𝑚
4
𝑚=1
= ?,
where j = [1,2,3,4]
• P2k = τ2k
τ1 𝑚
3
𝑚=1
= ?
where k = [3,4,5]
Ants for x1 Ants for x2
x11 0.447 x21 0.226
x12 0.184 x22 0.548
x13 0.184 x23 0.226
x14 0.184
Updated Probability
Iteration 2
• set roulette wheel
using cdf for each
ant.
Ants for r1 Ants for r2
x11 (0,0.447) x21 (0,0.226)
x12 (0.447, 0.631) x22 (0.226, 0.774)
x13 (0.631, 0.815) x23 (0.774, 1)
x14 (0.815,1)
Iteration 2
• generate random
numbers for each ant
and find out which ant
is selected using
cdf(roulette wheel ).
Ants for x1 Ants for x2
r11 0.2356 x11 r21 0.386493 x22
r12 0.42656 x11 r22 0.526781 x22
r13 0.58687 x12 r23 0.795401 x23
r14 0.7864 x13
x11 and x22 were
having higher
probability as they
were best solutions
so they are selected
twice
Iteration 2
• Evaluate objective
function value and
repeat the procedure
till convergence
Ant colony opitimization numerical example

More Related Content

What's hot

Cuckoo search algorithm
Cuckoo search algorithmCuckoo search algorithm
Cuckoo search algorithm
Ahmed Fouad Ali
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
Joy Dutta
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimizationMeenakshi Devi
 
Metaheuristics
MetaheuristicsMetaheuristics
Metaheuristics
ossein jain
 
Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)
Mahmoud El-tayeb
 
Simulated annealing
Simulated annealingSimulated annealing
Simulated annealing
Daniel Suria
 
Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)
khashayar Danesh Narooei
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
Xin-She Yang
 
ant colony optimization
ant colony optimizationant colony optimization
ant colony optimization
Shankha Goswami
 
Firefly algorithm
Firefly algorithmFirefly algorithm
Firefly algorithm
Hasan Gök
 
Particle Swarm optimization
Particle Swarm optimizationParticle Swarm optimization
Particle Swarm optimization
midhulavijayan
 
Bio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptxBio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptx
pawansher2002
 
Ant colony Optimization
Ant colony OptimizationAnt colony Optimization
Ant colony Optimization
Swetanshmani Shrivastava
 
Particle Swarm Optimization
Particle Swarm OptimizationParticle Swarm Optimization
Particle Swarm OptimizationStelios Petrakis
 
Grey wolf optimizer
Grey wolf optimizerGrey wolf optimizer
Grey wolf optimizer
Ahmed Fouad Ali
 
Markov decision process
Markov decision processMarkov decision process
Markov decision process
Hamed Abdi
 
Firefly algorithm
Firefly algorithmFirefly algorithm
Firefly algorithm
supriya shilwant
 
Travelling salesman problem using genetic algorithms
Travelling salesman problem using genetic algorithms Travelling salesman problem using genetic algorithms
Travelling salesman problem using genetic algorithms
Shivank Shah
 
Neural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) AlgorithmNeural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) Algorithm
Mostafa G. M. Mostafa
 

What's hot (20)

Cuckoo search algorithm
Cuckoo search algorithmCuckoo search algorithm
Cuckoo search algorithm
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Metaheuristics
MetaheuristicsMetaheuristics
Metaheuristics
 
Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)
 
Evolutionary Computing
Evolutionary ComputingEvolutionary Computing
Evolutionary Computing
 
Simulated annealing
Simulated annealingSimulated annealing
Simulated annealing
 
Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
 
ant colony optimization
ant colony optimizationant colony optimization
ant colony optimization
 
Firefly algorithm
Firefly algorithmFirefly algorithm
Firefly algorithm
 
Particle Swarm optimization
Particle Swarm optimizationParticle Swarm optimization
Particle Swarm optimization
 
Bio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptxBio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptx
 
Ant colony Optimization
Ant colony OptimizationAnt colony Optimization
Ant colony Optimization
 
Particle Swarm Optimization
Particle Swarm OptimizationParticle Swarm Optimization
Particle Swarm Optimization
 
Grey wolf optimizer
Grey wolf optimizerGrey wolf optimizer
Grey wolf optimizer
 
Markov decision process
Markov decision processMarkov decision process
Markov decision process
 
Firefly algorithm
Firefly algorithmFirefly algorithm
Firefly algorithm
 
Travelling salesman problem using genetic algorithms
Travelling salesman problem using genetic algorithms Travelling salesman problem using genetic algorithms
Travelling salesman problem using genetic algorithms
 
Neural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) AlgorithmNeural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) Algorithm
 

Similar to Ant colony opitimization numerical example

Probability Distributions
Probability DistributionsProbability Distributions
Probability Distributions
Munir Ahmad
 
Chapter-1-04032021-111422pm (2).pptx
Chapter-1-04032021-111422pm (2).pptxChapter-1-04032021-111422pm (2).pptx
Chapter-1-04032021-111422pm (2).pptx
abdulhannan992458
 
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Nish Kala Devi
 
PROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTIONPROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTION
shahzadebaujiti
 
Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14shumwayc
 
Factors of po lynomials + solving equations
Factors of po lynomials + solving equationsFactors of po lynomials + solving equations
Factors of po lynomials + solving equations
Shaun Wilson
 
Quantum factorization.pdf
Quantum factorization.pdfQuantum factorization.pdf
Quantum factorization.pdf
ssuser8b461f
 
Introduction to neural networks
Introduction to neural networks Introduction to neural networks
Introduction to neural networks
Ahmad Hammoudeh
 
Probability and Statistics - Week 2
Probability and Statistics - Week 2Probability and Statistics - Week 2
Probability and Statistics - Week 2
Ferdin Joe John Joseph PhD
 
Gr 11 equations
Gr 11   equationsGr 11   equations
Gr 11 equations
Renate Rohrs
 
random variable and distribution
random variable and distributionrandom variable and distribution
random variable and distribution
lovemucheca
 
Closed intervals
Closed intervalsClosed intervals
Closed intervals
Shaun Wilson
 
Probability theory poison probability distribution.pptx
Probability theory poison probability distribution.pptxProbability theory poison probability distribution.pptx
Probability theory poison probability distribution.pptx
uomi269
 
Lecture 7.1 to 7.2 bt
Lecture 7.1 to 7.2 btLecture 7.1 to 7.2 bt
Lecture 7.1 to 7.2 bt
btmathematics
 
Probability-1.pptx
Probability-1.pptxProbability-1.pptx
Probability-1.pptx
MuskanKhan320706
 
ゲーム理論BASIC 演習41 -2人ゼロ和ゲームにおけるマックスミニ値-
ゲーム理論BASIC 演習41 -2人ゼロ和ゲームにおけるマックスミニ値-ゲーム理論BASIC 演習41 -2人ゼロ和ゲームにおけるマックスミニ値-
ゲーム理論BASIC 演習41 -2人ゼロ和ゲームにおけるマックスミニ値-
ssusere0a682
 
Chapter 4.1 and 4.2
Chapter 4.1 and 4.2Chapter 4.1 and 4.2
Chapter 4.1 and 4.2
Kathy Favazza
 

Similar to Ant colony opitimization numerical example (17)

Probability Distributions
Probability DistributionsProbability Distributions
Probability Distributions
 
Chapter-1-04032021-111422pm (2).pptx
Chapter-1-04032021-111422pm (2).pptxChapter-1-04032021-111422pm (2).pptx
Chapter-1-04032021-111422pm (2).pptx
 
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
Dirty quant-shortcut-workshop-handout-inequalities-functions-graphs-coordinat...
 
PROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTIONPROBABILITY DISTRIBUTION
PROBABILITY DISTRIBUTION
 
Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14Intro to exponents edmodo 2013 14
Intro to exponents edmodo 2013 14
 
Factors of po lynomials + solving equations
Factors of po lynomials + solving equationsFactors of po lynomials + solving equations
Factors of po lynomials + solving equations
 
Quantum factorization.pdf
Quantum factorization.pdfQuantum factorization.pdf
Quantum factorization.pdf
 
Introduction to neural networks
Introduction to neural networks Introduction to neural networks
Introduction to neural networks
 
Probability and Statistics - Week 2
Probability and Statistics - Week 2Probability and Statistics - Week 2
Probability and Statistics - Week 2
 
Gr 11 equations
Gr 11   equationsGr 11   equations
Gr 11 equations
 
random variable and distribution
random variable and distributionrandom variable and distribution
random variable and distribution
 
Closed intervals
Closed intervalsClosed intervals
Closed intervals
 
Probability theory poison probability distribution.pptx
Probability theory poison probability distribution.pptxProbability theory poison probability distribution.pptx
Probability theory poison probability distribution.pptx
 
Lecture 7.1 to 7.2 bt
Lecture 7.1 to 7.2 btLecture 7.1 to 7.2 bt
Lecture 7.1 to 7.2 bt
 
Probability-1.pptx
Probability-1.pptxProbability-1.pptx
Probability-1.pptx
 
ゲーム理論BASIC 演習41 -2人ゼロ和ゲームにおけるマックスミニ値-
ゲーム理論BASIC 演習41 -2人ゼロ和ゲームにおけるマックスミニ値-ゲーム理論BASIC 演習41 -2人ゼロ和ゲームにおけるマックスミニ値-
ゲーム理論BASIC 演習41 -2人ゼロ和ゲームにおけるマックスミニ値-
 
Chapter 4.1 and 4.2
Chapter 4.1 and 4.2Chapter 4.1 and 4.2
Chapter 4.1 and 4.2
 

More from Harish Kant Soni

Bracing VS shear wall
Bracing VS shear wallBracing VS shear wall
Bracing VS shear wall
Harish Kant Soni
 
Numerical modelling of concrete for fem softwares
Numerical modelling of concrete for fem softwaresNumerical modelling of concrete for fem softwares
Numerical modelling of concrete for fem softwares
Harish Kant Soni
 
Numerical modeling of concrete in Abaqus
Numerical modeling of concrete in Abaqus Numerical modeling of concrete in Abaqus
Numerical modeling of concrete in Abaqus
Harish Kant Soni
 
Concrete Mix design calculations Indian code
Concrete Mix design calculations Indian codeConcrete Mix design calculations Indian code
Concrete Mix design calculations Indian code
Harish Kant Soni
 
Human gait simulation using python
Human gait simulation using pythonHuman gait simulation using python
Human gait simulation using python
Harish Kant Soni
 
Pratt truss optimization using
Pratt truss optimization usingPratt truss optimization using
Pratt truss optimization using
Harish Kant Soni
 

More from Harish Kant Soni (6)

Bracing VS shear wall
Bracing VS shear wallBracing VS shear wall
Bracing VS shear wall
 
Numerical modelling of concrete for fem softwares
Numerical modelling of concrete for fem softwaresNumerical modelling of concrete for fem softwares
Numerical modelling of concrete for fem softwares
 
Numerical modeling of concrete in Abaqus
Numerical modeling of concrete in Abaqus Numerical modeling of concrete in Abaqus
Numerical modeling of concrete in Abaqus
 
Concrete Mix design calculations Indian code
Concrete Mix design calculations Indian codeConcrete Mix design calculations Indian code
Concrete Mix design calculations Indian code
 
Human gait simulation using python
Human gait simulation using pythonHuman gait simulation using python
Human gait simulation using python
 
Pratt truss optimization using
Pratt truss optimization usingPratt truss optimization using
Pratt truss optimization using
 

Recently uploaded

Turin Startup Ecosystem 2024 - Ricerca sulle Startup e il Sistema dell'Innov...
Turin Startup Ecosystem 2024  - Ricerca sulle Startup e il Sistema dell'Innov...Turin Startup Ecosystem 2024  - Ricerca sulle Startup e il Sistema dell'Innov...
Turin Startup Ecosystem 2024 - Ricerca sulle Startup e il Sistema dell'Innov...
Quotidiano Piemontese
 
Tumelo-deep-dive-into-pass-through-voting-Feb23 (1).pdf
Tumelo-deep-dive-into-pass-through-voting-Feb23 (1).pdfTumelo-deep-dive-into-pass-through-voting-Feb23 (1).pdf
Tumelo-deep-dive-into-pass-through-voting-Feb23 (1).pdf
Henry Tapper
 
在线办理(GU毕业证书)美国贡萨加大学毕业证学历证书一模一样
在线办理(GU毕业证书)美国贡萨加大学毕业证学历证书一模一样在线办理(GU毕业证书)美国贡萨加大学毕业证学历证书一模一样
在线办理(GU毕业证书)美国贡萨加大学毕业证学历证书一模一样
5spllj1l
 
Seminar: Gender Board Diversity through Ownership Networks
Seminar: Gender Board Diversity through Ownership NetworksSeminar: Gender Board Diversity through Ownership Networks
Seminar: Gender Board Diversity through Ownership Networks
GRAPE
 
2. Elemental Economics - Mineral demand.pdf
2. Elemental Economics - Mineral demand.pdf2. Elemental Economics - Mineral demand.pdf
2. Elemental Economics - Mineral demand.pdf
Neal Brewster
 
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
muslimdavidovich670
 
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFiTdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
nimaruinazawa258
 
Donald Trump Presentation and his life.pptx
Donald Trump Presentation and his life.pptxDonald Trump Presentation and his life.pptx
Donald Trump Presentation and his life.pptx
SerdarHudaykuliyew
 
where can I find a legit pi merchant online
where can I find a legit pi merchant onlinewhere can I find a legit pi merchant online
where can I find a legit pi merchant online
DOT TECH
 
Scope Of Macroeconomics introduction and basic theories
Scope Of Macroeconomics introduction and basic theoriesScope Of Macroeconomics introduction and basic theories
Scope Of Macroeconomics introduction and basic theories
nomankalyar153
 
一比一原版(GWU,GW毕业证)加利福尼亚大学|尔湾分校毕业证如何办理
一比一原版(GWU,GW毕业证)加利福尼亚大学|尔湾分校毕业证如何办理一比一原版(GWU,GW毕业证)加利福尼亚大学|尔湾分校毕业证如何办理
一比一原版(GWU,GW毕业证)加利福尼亚大学|尔湾分校毕业证如何办理
obyzuk
 
Analyzing the instability of equilibrium in thr harrod domar model
Analyzing the instability of equilibrium in thr harrod domar modelAnalyzing the instability of equilibrium in thr harrod domar model
Analyzing the instability of equilibrium in thr harrod domar model
ManthanBhardwaj4
 
一比一原版(IC毕业证)帝国理工大学毕业证如何办理
一比一原版(IC毕业证)帝国理工大学毕业证如何办理一比一原版(IC毕业证)帝国理工大学毕业证如何办理
一比一原版(IC毕业证)帝国理工大学毕业证如何办理
conose1
 
BONKMILLON Unleashes Its Bonkers Potential on Solana.pdf
BONKMILLON Unleashes Its Bonkers Potential on Solana.pdfBONKMILLON Unleashes Its Bonkers Potential on Solana.pdf
BONKMILLON Unleashes Its Bonkers Potential on Solana.pdf
coingabbar
 
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
nexop1
 
一比一原版(UCSB毕业证)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB毕业证)圣芭芭拉分校毕业证如何办理一比一原版(UCSB毕业证)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB毕业证)圣芭芭拉分校毕业证如何办理
bbeucd
 
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Vighnesh Shashtri
 
Pensions and housing - Pensions PlayPen - 4 June 2024 v3 (1).pdf
Pensions and housing - Pensions PlayPen - 4 June 2024 v3 (1).pdfPensions and housing - Pensions PlayPen - 4 June 2024 v3 (1).pdf
Pensions and housing - Pensions PlayPen - 4 June 2024 v3 (1).pdf
Henry Tapper
 
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Godwin Emmanuel Oyedokun MBA MSc PhD FCA FCTI FCNA CFE FFAR
 
An Overview of the Prosocial dHEDGE Vault works
An Overview of the Prosocial dHEDGE Vault worksAn Overview of the Prosocial dHEDGE Vault works
An Overview of the Prosocial dHEDGE Vault works
Colin R. Turner
 

Recently uploaded (20)

Turin Startup Ecosystem 2024 - Ricerca sulle Startup e il Sistema dell'Innov...
Turin Startup Ecosystem 2024  - Ricerca sulle Startup e il Sistema dell'Innov...Turin Startup Ecosystem 2024  - Ricerca sulle Startup e il Sistema dell'Innov...
Turin Startup Ecosystem 2024 - Ricerca sulle Startup e il Sistema dell'Innov...
 
Tumelo-deep-dive-into-pass-through-voting-Feb23 (1).pdf
Tumelo-deep-dive-into-pass-through-voting-Feb23 (1).pdfTumelo-deep-dive-into-pass-through-voting-Feb23 (1).pdf
Tumelo-deep-dive-into-pass-through-voting-Feb23 (1).pdf
 
在线办理(GU毕业证书)美国贡萨加大学毕业证学历证书一模一样
在线办理(GU毕业证书)美国贡萨加大学毕业证学历证书一模一样在线办理(GU毕业证书)美国贡萨加大学毕业证学历证书一模一样
在线办理(GU毕业证书)美国贡萨加大学毕业证学历证书一模一样
 
Seminar: Gender Board Diversity through Ownership Networks
Seminar: Gender Board Diversity through Ownership NetworksSeminar: Gender Board Diversity through Ownership Networks
Seminar: Gender Board Diversity through Ownership Networks
 
2. Elemental Economics - Mineral demand.pdf
2. Elemental Economics - Mineral demand.pdf2. Elemental Economics - Mineral demand.pdf
2. Elemental Economics - Mineral demand.pdf
 
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
The WhatsPump Pseudonym Problem and the Hilarious Downfall of Artificial Enga...
 
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFiTdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
Tdasx: Unveiling the Trillion-Dollar Potential of Bitcoin DeFi
 
Donald Trump Presentation and his life.pptx
Donald Trump Presentation and his life.pptxDonald Trump Presentation and his life.pptx
Donald Trump Presentation and his life.pptx
 
where can I find a legit pi merchant online
where can I find a legit pi merchant onlinewhere can I find a legit pi merchant online
where can I find a legit pi merchant online
 
Scope Of Macroeconomics introduction and basic theories
Scope Of Macroeconomics introduction and basic theoriesScope Of Macroeconomics introduction and basic theories
Scope Of Macroeconomics introduction and basic theories
 
一比一原版(GWU,GW毕业证)加利福尼亚大学|尔湾分校毕业证如何办理
一比一原版(GWU,GW毕业证)加利福尼亚大学|尔湾分校毕业证如何办理一比一原版(GWU,GW毕业证)加利福尼亚大学|尔湾分校毕业证如何办理
一比一原版(GWU,GW毕业证)加利福尼亚大学|尔湾分校毕业证如何办理
 
Analyzing the instability of equilibrium in thr harrod domar model
Analyzing the instability of equilibrium in thr harrod domar modelAnalyzing the instability of equilibrium in thr harrod domar model
Analyzing the instability of equilibrium in thr harrod domar model
 
一比一原版(IC毕业证)帝国理工大学毕业证如何办理
一比一原版(IC毕业证)帝国理工大学毕业证如何办理一比一原版(IC毕业证)帝国理工大学毕业证如何办理
一比一原版(IC毕业证)帝国理工大学毕业证如何办理
 
BONKMILLON Unleashes Its Bonkers Potential on Solana.pdf
BONKMILLON Unleashes Its Bonkers Potential on Solana.pdfBONKMILLON Unleashes Its Bonkers Potential on Solana.pdf
BONKMILLON Unleashes Its Bonkers Potential on Solana.pdf
 
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
一比一原版(UoB毕业证)伯明翰大学毕业证如何办理
 
一比一原版(UCSB毕业证)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB毕业证)圣芭芭拉分校毕业证如何办理一比一原版(UCSB毕业证)圣芭芭拉分校毕业证如何办理
一比一原版(UCSB毕业证)圣芭芭拉分校毕业证如何办理
 
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
Abhay Bhutada Leads Poonawalla Fincorp To Record Low NPA And Unprecedented Gr...
 
Pensions and housing - Pensions PlayPen - 4 June 2024 v3 (1).pdf
Pensions and housing - Pensions PlayPen - 4 June 2024 v3 (1).pdfPensions and housing - Pensions PlayPen - 4 June 2024 v3 (1).pdf
Pensions and housing - Pensions PlayPen - 4 June 2024 v3 (1).pdf
 
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
Tax System, Behaviour, Justice, and Voluntary Compliance Culture in Nigeria -...
 
An Overview of the Prosocial dHEDGE Vault works
An Overview of the Prosocial dHEDGE Vault worksAn Overview of the Prosocial dHEDGE Vault works
An Overview of the Prosocial dHEDGE Vault works
 

Ant colony opitimization numerical example

  • 1. Ant Colony Optimization Numerical Example By :- Harish Kant Soni Roll No:- 12CE31004 IIT Kharagpur
  • 2. Problem • min (x1 2 + x1x2 + x2) • x1 = [1,2,3,4] • x2= [3,4,5]
  • 3. It’s better to assume same of no ants as no of values. So we take 4 ants for x1 and 3 ants for x2
  • 4. • Each ant is assigned a discrete value. • x1j , j = 1,2,3,4 • x2k , k = 1,2,3 Ants for x1 Ants for x2 x11 1 x21 3 x12 2 x22 4 x13 3 x23 5 x14 4
  • 5.
  • 6. • Assume equal pheromone for each path = 1
  • 7. Iteration=1 • for any ant k the probability of selecting it’s path is given by • P1j = τ1j τ1 𝑚 4 𝑚=1 = ¼, where j = [1,2,3,4] • P2k = τ2k τ1 𝑚 3 𝑚=1 = 1/3 where k = [3,4,5]
  • 8.
  • 9. • set roulette wheel using cdf for each ant. Ants for r1 Ants for r2 x11 (0,0.25) x21 (0,0.33) x12 (0.25, 0.50) x22 (0.33,0.67) x13 (0.50, 0.75) x23 (0.67, 1) x14 (0.75,1)
  • 10. • generate random numbers for each ant and find out which ant is selected using cdf(roulette wheel ). Ants for x1 Ants for x2 r11 0.609684 x13 r21 0.689113 x23 r12 0.999736 x14 r22 0.706781 x23 r13 0.586537 x13 r23 0.416401 x22 r14 0.177464 x11
  • 11. • find out value of objective fn for each selected set of ants. possible set = 4 x 3 =12
  • 12. Possible sets Ant values Value of objective fn (x1 2 + x1x2 + x2) X13, x23 3,5 49 (worst) X13, x23 3,5 49 (worst) X13, x22 3,4 37 X14, x23 4,5 61 X14, x23 4,5 61 X14, x22 4,4 48 X13, x23 3,5 49 (worst) X13, x23 3,5 49 (worst) X13, x22 3,4 37 x11, x23 1,5 31 x11, x23 1,5 31 X11, x22 1,4 21 (best) Ants for x1 Ants for x2 x11 1 x21 3 x12 2 x22 4 x13 3 x23 5 x14 4
  • 13. Iteration 2 Local pheromone update is an extension of what we are doing so we will not consider local updatation. Q/Lk Q= constant
  • 14. Iteration 2 • assume ρ = 0.4 and Q = 2 • Update pheromone for each ant • Increase pheromone for x11 and x22 as they are giving best solution. • Evaporate pheromone for other paths • Δτ =Q best/worst • best = 21 (only 1 time so z = 1) Updated Pheromone Ants for x1 Ants for x2 x11 1 (1-0.4)x1 + 2x21/49 = 1.457 x21 3 (1-0.4)x1 = 0.6 x12 2 (1-0.4)x1 = 0.6 x22 4 (1-0.4)x1 + 2x21/49 = 1.457 x13 3 (1-0.4)x1 = 0.6 x23 5 (1-0.4)x1 = 0.6 x14 4 (1-0.4)x1 = 0.6
  • 15. Iteration 2 • Update probability • P1j = τ1j τ1 𝑚 4 𝑚=1 = ?, where j = [1,2,3,4] • P2k = τ2k τ1 𝑚 3 𝑚=1 = ? where k = [3,4,5] Ants for x1 Ants for x2 x11 0.447 x21 0.226 x12 0.184 x22 0.548 x13 0.184 x23 0.226 x14 0.184
  • 17. Iteration 2 • set roulette wheel using cdf for each ant. Ants for r1 Ants for r2 x11 (0,0.447) x21 (0,0.226) x12 (0.447, 0.631) x22 (0.226, 0.774) x13 (0.631, 0.815) x23 (0.774, 1) x14 (0.815,1)
  • 18. Iteration 2 • generate random numbers for each ant and find out which ant is selected using cdf(roulette wheel ). Ants for x1 Ants for x2 r11 0.2356 x11 r21 0.386493 x22 r12 0.42656 x11 r22 0.526781 x22 r13 0.58687 x12 r23 0.795401 x23 r14 0.7864 x13 x11 and x22 were having higher probability as they were best solutions so they are selected twice
  • 19. Iteration 2 • Evaluate objective function value and repeat the procedure till convergence