Skip to content

Commit

Permalink
Make iterated local search use the switch library.
Browse files Browse the repository at this point in the history
  • Loading branch information
skytreader committed Oct 14, 2018
1 parent 7d6f8bd commit 51efe35
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions python/stochastic/iterated_local_search.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! usr/bin/env python3

from .common import path_cost, random_permutation
from ..switch import decide

import math
import random
import sys

"""
2.5
Expand Down Expand Up @@ -120,10 +120,7 @@ def search(cities, max_iterations, max_no_improv, output_format="human"):
# Algorithm configuration
max_iterations = 100
max_no_improv = 50
output_format = "human"

if len(sys.argv) >= 2:
output_format = sys.argv[1]
output_format = decide()

# Execute the algorithm
best = search(berlin52, max_iterations, max_no_improv, output_format)
Expand Down

0 comments on commit 51efe35

Please sign in to comment.