Metaheuristic – Threshold Acceptance (TA). Outlines. Measuring Computational Efficiency Construction Heuristics Local Search Algorithms Metaheuristic – Threshold Accepting Algorithm (TA) Traveling Salesman Problem (TSP). Measuring Computational Efficiency.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Metaheuristic – Threshold Acceptance (TA)
Threshold Accepting Algorithm (TA)
Consider the following algorithm
for(i=0; i<n; i++) {
for(j=0;j<m;j++) {
c[i][j] = a[i][j] + b[i][j];
}
}
Total number of operations:
Addition: (+)m*n + (++) m*n + (++) n => (2m+1)*n*C1
Assignments: (=)m*n + (=) n + (=) 1 => (m+1)*n +1*C2
Comparisons: (<) m*n + (<) n => (m+1)*n*C3
Which one is faster?
(b)
(a)
log(n) < n < n2 < n3 <2n<3n
f(n) is O(g(n)) : if there is a real number c > 0 and an integer constant n0≥ 1, such that f(n) ≤ cg(n) for every integer n ≥ n0.
7n-2 is O(n)
20n3+10nlogn+5isO(n3)
2100isO(1)
O(log(n)) < O(n) < O(n log(n)) <O(n2)< O(n3)<O(2n)<O(3n)
3
2
3
4
2
2
3
2
4
1
4
1
5
3
5
or – O(n2logn) (using heap)
3
2
3
4
2
2
3
2
4
1
4
1
5
3
5
Step 1: Suppose node 1 is chose as beginning.
Step 2: The node 4 is selected such that subtour with minimal cost 2c14
3
2
3
4
2
2
3
2
4
1
4
1
5
3
5
Step 3: Node 3 is selected and inserted into the subtour in order to derive minimal cost.
1-3-4: 3+2=5
1-2-4: 2+4=6
1-5-4: 3+5=8
3
2
3
4
2
2
3
2
4
1
4
1
5
3
5
Step 4: : Node 2 is selected and inserted into the subtour in order to derive minimal cost.
1-2-4: 2+4-2=4
1-2-3: 2+3-3=2
3-2-4 : 3+4-2=5
1-5-4: 3+5-2=6
1-5-3: 3+4-3=4
3-5-4: 4+5-2=7
3
2
3
4
2
2
3
2
4
1
4
1
5
3
5
Step 4: : Node 5 is inserted into the subtour and total cost is 2+1+4+2+2 = 11
1-5-4: 3+5-2=6
2-5-3: 1+4-5=2
1-5-2: 3+1-2=2
3-5-4: 4+5-2=7
(VRP)
3214
4231
2134
1234
1324
1243
1432
The neighborhood size of swap-based loacl search is n(n-1)/2
1
2
3
4
1
2
3
4
2
1
3
4
1
3
2
4
3
2
1
4
1
4
3
2
4
2
3
1
1
2
4
3
Local Search
Local Search for TSP
3
3
2
2
3
3
2
2
2
2
4
4
1
1
5
5
3
3
5
5
3
2
3
2
3
2
1
4
3
4
4
1
1
2
5
3
3
5
5
Two-exchange local Search for TSP – 2-opt
Implementation of 2-opt with array
Ref: G. Dueck, T. Scheuer, “Threshold accepting. A generalpurpose optimization algorithm appearing superior tosimulated annealing”, Journal of Computational Physics90 (1990) 161–175.
objective
Local optima
globe otima
solutions
Accepting probability