23 if route[i] in have_already: |
23 if route[i] in have_already: |
24 del route[i] |
24 del route[i] |
25 else: |
25 else: |
26 have_already.add(route[i]) |
26 have_already.add(route[i]) |
27 i += 1 |
27 i += 1 |
28 |
|
29 # if 'kauppatori' not in route: |
|
30 # priorities['länsikeskus'] = priorities['skanssi'] = priorities['kauppatori'] |
|
31 |
|
32 from_place = route[0] |
28 from_place = route[0] |
33 destination = route[-1] |
29 destination = route[-1] |
34 reitti_arvot = {} |
30 reitti_arvot = {} |
35 f = lambda i: i**-0.3 |
31 f = lambda i: i**-0.3 |
36 factor = 1 / max(f(i + 1) for i in range(len(route))) |
32 factor = 1 / max(f(i + 1) for i in range(len(route))) |