diff --git a/src/processing.py b/src/processing.py index ced928f..3dad429 100644 --- a/src/processing.py +++ b/src/processing.py @@ -1,6 +1,7 @@ from preprocessing import parse_file from pandas import DataFrame from sys import argv +from random import seed, randint def get_first_solution(n, data): @@ -44,9 +45,19 @@ def greedy_algorithm(n, m, data): return solutions +def get_pseudorandom_solution(n, data): + seed(42) + return data.iloc[randint(a=0, b=n)] + + # NOTE In each step, switch to the element that gives the least amount def local_search(n, m, data): - pass + solutions = DataFrame(columns=["point", "distance"]) + first_solution = get_pseudorandom_solution(n=n, data=data) + solutions = solutions.append(first_solution, ignore_index=True) + for _ in range(m): + pass + return solutions def execute_algorithm(choice, n, m, data):