Skip to content

Commit 899c01d

Browse files
committed
Switch commit.
1 parent 1714701 commit 899c01d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /usr/bin/env python3
2+
3+
from .common import euc_2d
4+
5+
"""
6+
2.7
7+
8+
Variable Local Search involves iterative exploration of larger and larger
9+
neighborhoods for a given local optima until an improvement is located after
10+
which time the search across expanding neighborhoods is repeated. The strategy
11+
is motivated by three principles: 1) a local minimum for one neighborhood
12+
structure may not be a local minimum for another neighborhood structure, 2) a
13+
global minimum is local minimum for all possible neighborhood structures, and
14+
3) local minima are relatively close to global minima for many problem classes.
15+
"""
16+
17+
def cost(permutation, cities):
18+
distance = 0
19+
limit = len(permutation)
20+
21+
for idx, perm:
22+
c2 = permutation[idx % limit]

0 commit comments

Comments
 (0)