From 23cb534fc137874d58fca6bbb80fcd771c1b182a Mon Sep 17 00:00:00 2001 From: Eddy-123 Date: Wed, 1 Sep 2021 03:07:03 +0100 Subject: [PATCH] execution on pr03 --- genetic-algorithm.py | 8 +- genetic-algorithm05.py | 448 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm06.py | 449 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm09.py | 450 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm10.py | 451 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm11.py | 452 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm12.py | 453 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm15.py | 454 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm16.py | 455 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm17.py | 456 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm19.py | 457 +++++++++++++++++++++++++++++++++++++++ genetic-algorithm20.py | 458 ++++++++++++++++++++++++++++++++++++++++ instances/pr03.txt | 146 +++++++++++++ instances/pr04.txt | 194 +++++++++++++++++ instances/pr05.txt | 242 +++++++++++++++++++++ instances/pr06.txt | 290 +++++++++++++++++++++++++ instances/pr07.txt | 74 +++++++ instances/pr08.txt | 146 +++++++++++++ instances/pr09.txt | 218 +++++++++++++++++++ instances/pr10.txt | 290 +++++++++++++++++++++++++ instances/pr11.txt | 50 +++++ instances/pr12.txt | 98 +++++++++ instances/pr13.txt | 146 +++++++++++++ instances/pr14.txt | 194 +++++++++++++++++ instances/pr15.txt | 242 +++++++++++++++++++++ instances/pr16.txt | 290 +++++++++++++++++++++++++ instances/pr17.txt | 74 +++++++ instances/pr18.txt | 146 +++++++++++++ instances/pr19.txt | 218 +++++++++++++++++++ instances/pr20.txt | 290 +++++++++++++++++++++++++ instances/result_03.txt | 89 ++++++++ instances/result_05.txt | 10 + instances/result_06.txt | 0 instances/result_09.txt | 0 instances/result_10.txt | 2 + instances/result_11.txt | 0 instances/result_12.txt | 2 + instances/result_15.txt | 0 instances/result_16.txt | 0 instances/result_17.txt | 0 instances/result_19.txt | 0 instances/result_20.txt | 0 script.sh | 13 ++ 43 files changed, 8452 insertions(+), 3 deletions(-) create mode 100644 genetic-algorithm05.py create mode 100644 genetic-algorithm06.py create mode 100644 genetic-algorithm09.py create mode 100644 genetic-algorithm10.py create mode 100644 genetic-algorithm11.py create mode 100644 genetic-algorithm12.py create mode 100644 genetic-algorithm15.py create mode 100644 genetic-algorithm16.py create mode 100644 genetic-algorithm17.py create mode 100644 genetic-algorithm19.py create mode 100644 genetic-algorithm20.py create mode 100644 instances/pr03.txt create mode 100644 instances/pr04.txt create mode 100644 instances/pr05.txt create mode 100644 instances/pr06.txt create mode 100644 instances/pr07.txt create mode 100644 instances/pr08.txt create mode 100644 instances/pr09.txt create mode 100644 instances/pr10.txt create mode 100644 instances/pr11.txt create mode 100644 instances/pr12.txt create mode 100644 instances/pr13.txt create mode 100644 instances/pr14.txt create mode 100644 instances/pr15.txt create mode 100644 instances/pr16.txt create mode 100644 instances/pr17.txt create mode 100644 instances/pr18.txt create mode 100644 instances/pr19.txt create mode 100644 instances/pr20.txt create mode 100644 instances/result_03.txt create mode 100644 instances/result_05.txt create mode 100644 instances/result_06.txt create mode 100644 instances/result_09.txt create mode 100644 instances/result_10.txt create mode 100644 instances/result_11.txt create mode 100644 instances/result_12.txt create mode 100644 instances/result_15.txt create mode 100644 instances/result_16.txt create mode 100644 instances/result_17.txt create mode 100644 instances/result_19.txt create mode 100644 instances/result_20.txt create mode 100755 script.sh diff --git a/genetic-algorithm.py b/genetic-algorithm.py index f552b2b..77c41e7 100644 --- a/genetic-algorithm.py +++ b/genetic-algorithm.py @@ -10,12 +10,14 @@ class Instance: vertices = [] starting_time = { 'pr01': [188.54, 148.08, 83.13], - 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93] + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44] } - name = 'pr02' + name = 'pr03' @classmethod - def read(cls, instance_path = 'instances/pr02.txt'): + def read(cls, instance_path = 'instances/pr03.txt'): cls.vertices = [] with open(instance_path, 'r') as f: file_content = f.readlines()[:] diff --git a/genetic-algorithm05.py b/genetic-algorithm05.py new file mode 100644 index 0000000..f9edf11 --- /dev/null +++ b/genetic-algorithm05.py @@ -0,0 +1,448 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44] + } + name = 'pr05' + + @classmethod + def read(cls, instance_path = 'instances/pr05.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm06.py b/genetic-algorithm06.py new file mode 100644 index 0000000..b239267 --- /dev/null +++ b/genetic-algorithm06.py @@ -0,0 +1,449 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22] + } + name = 'pr06' + + @classmethod + def read(cls, instance_path = 'instances/pr06.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm09.py b/genetic-algorithm09.py new file mode 100644 index 0000000..6ef2f8a --- /dev/null +++ b/genetic-algorithm09.py @@ -0,0 +1,450 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24] + } + name = 'pr09' + + @classmethod + def read(cls, instance_path = 'instances/pr09.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm10.py b/genetic-algorithm10.py new file mode 100644 index 0000000..9c77dbd --- /dev/null +++ b/genetic-algorithm10.py @@ -0,0 +1,451 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24], + 'pr10': [71.55, 36.74, 15.61, 64.83, 63.55, 44.41, 58.02, 86.26, 96.71, 80.32] + } + name = 'pr10' + + @classmethod + def read(cls, instance_path = 'instances/pr10.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm11.py b/genetic-algorithm11.py new file mode 100644 index 0000000..05f2c89 --- /dev/null +++ b/genetic-algorithm11.py @@ -0,0 +1,452 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24], + 'pr10': [71.55, 36.74, 15.61, 64.83, 63.55, 44.41, 58.02, 86.26, 96.71, 80.32], + 'pr11': [254.83, 124.02, 172.66] + } + name = 'pr11' + + @classmethod + def read(cls, instance_path = 'instances/pr11.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm12.py b/genetic-algorithm12.py new file mode 100644 index 0000000..81a3e67 --- /dev/null +++ b/genetic-algorithm12.py @@ -0,0 +1,453 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24], + 'pr10': [71.55, 36.74, 15.61, 64.83, 63.55, 44.41, 58.02, 86.26, 96.71, 80.32], + 'pr11': [254.83, 124.02, 172.66], + 'pr12': [112.67, 125.24, 67.67, 165.62, 237.12] + } + name = 'pr12' + + @classmethod + def read(cls, instance_path = 'instances/pr12.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm15.py b/genetic-algorithm15.py new file mode 100644 index 0000000..424aa55 --- /dev/null +++ b/genetic-algorithm15.py @@ -0,0 +1,454 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24], + 'pr10': [71.55, 36.74, 15.61, 64.83, 63.55, 44.41, 58.02, 86.26, 96.71, 80.32], + 'pr11': [254.83, 124.02, 172.66], + 'pr12': [112.67, 125.24, 67.67, 165.62, 237.12], + 'pr15': [103.02, 183.08, 191.12, 0.00, 116.77, 107.51, 161.26, 320.68, 93.09, 9.56, 133.31] + } + name = 'pr15' + + @classmethod + def read(cls, instance_path = 'instances/pr15.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm16.py b/genetic-algorithm16.py new file mode 100644 index 0000000..4ea935d --- /dev/null +++ b/genetic-algorithm16.py @@ -0,0 +1,455 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24], + 'pr10': [71.55, 36.74, 15.61, 64.83, 63.55, 44.41, 58.02, 86.26, 96.71, 80.32], + 'pr11': [254.83, 124.02, 172.66], + 'pr12': [112.67, 125.24, 67.67, 165.62, 237.12], + 'pr15': [103.02, 183.08, 191.12, 0.00, 116.77, 107.51, 161.26, 320.68, 93.09, 9.56, 133.31], + 'pr16': [71.77, 25.83, 42.16, 56.29, 83.43, 0.00, 0.00, 0.00, 100.93, 117.25, 76.07, 69.52, 114.09] + } + name = 'pr16' + + @classmethod + def read(cls, instance_path = 'instances/pr16.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm17.py b/genetic-algorithm17.py new file mode 100644 index 0000000..8dbb445 --- /dev/null +++ b/genetic-algorithm17.py @@ -0,0 +1,456 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24], + 'pr10': [71.55, 36.74, 15.61, 64.83, 63.55, 44.41, 58.02, 86.26, 96.71, 80.32], + 'pr11': [254.83, 124.02, 172.66], + 'pr12': [112.67, 125.24, 67.67, 165.62, 237.12], + 'pr15': [103.02, 183.08, 191.12, 0.00, 116.77, 107.51, 161.26, 320.68, 93.09, 9.56, 133.31], + 'pr16': [71.77, 25.83, 42.16, 56.29, 83.43, 0.00, 0.00, 0.00, 100.93, 117.25, 76.07, 69.52, 114.09], + 'pr17': [81.11, 231.43, 116.86, 265.79] + } + name = 'pr17' + + @classmethod + def read(cls, instance_path = 'instances/pr17.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm19.py b/genetic-algorithm19.py new file mode 100644 index 0000000..d2e0452 --- /dev/null +++ b/genetic-algorithm19.py @@ -0,0 +1,457 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24], + 'pr10': [71.55, 36.74, 15.61, 64.83, 63.55, 44.41, 58.02, 86.26, 96.71, 80.32], + 'pr11': [254.83, 124.02, 172.66], + 'pr12': [112.67, 125.24, 67.67, 165.62, 237.12], + 'pr15': [103.02, 183.08, 191.12, 0.00, 116.77, 107.51, 161.26, 320.68, 93.09, 9.56, 133.31], + 'pr16': [71.77, 25.83, 42.16, 56.29, 83.43, 0.00, 0.00, 0.00, 100.93, 117.25, 76.07, 69.52, 114.09], + 'pr17': [81.11, 231.43, 116.86, 265.79], + 'pr19': [93.88, 160.75, 124.21, 146.67, 33.93, 18.34, 105.64, 120.65] + } + name = 'pr19' + + @classmethod + def read(cls, instance_path = 'instances/pr19.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/genetic-algorithm20.py b/genetic-algorithm20.py new file mode 100644 index 0000000..0889361 --- /dev/null +++ b/genetic-algorithm20.py @@ -0,0 +1,458 @@ +import numpy as np, random, operator, pandas as pd, matplotlib.pyplot as plt, collections +from datetime import datetime + +class Instance: + number_of_vehicles = None + number_of_services = None + vehicle_capacity = None + maximum_ride_time = None + depot = None + vertices = [] + starting_time = { + 'pr01': [188.54, 148.08, 83.13], + 'pr02': [98.25, 85.24, 130.29, 54.96, 79.93], + 'pr03': [43.59, 125.08, 99.04, 125.01, 70.93, 80.93, 137.01], + 'pr05': [136.50, 90.32, 97.37, 112.42, 88.77, 69.00, 161.34, 301.39, 33.37, 143.39, 104.44], + 'pr06': [97.93, 140.64, 63.71, 108.02, 131.44, 73.95, 97.74, 70.45, 66.56, 71.90, 75.42, 90.15, 51.22], + 'pr09': [35.22, 92.20, 96.06, 84.08, 34.32, 68.59, 120.59, 101.24], + 'pr10': [71.55, 36.74, 15.61, 64.83, 63.55, 44.41, 58.02, 86.26, 96.71, 80.32], + 'pr11': [254.83, 124.02, 172.66], + 'pr12': [112.67, 125.24, 67.67, 165.62, 237.12], + 'pr15': [103.02, 183.08, 191.12, 0.00, 116.77, 107.51, 161.26, 320.68, 93.09, 9.56, 133.31], + 'pr16': [71.77, 25.83, 42.16, 56.29, 83.43, 0.00, 0.00, 0.00, 100.93, 117.25, 76.07, 69.52, 114.09], + 'pr17': [81.11, 231.43, 116.86, 265.79], + 'pr19': [93.88, 160.75, 124.21, 146.67, 33.93, 18.34, 105.64, 120.65], + 'pr20': [78.40, 68.41, 227.59, 117.22, 202.48, 60.27, 37.06, 100.20, 103.90, 79.83] + } + name = 'pr20' + + @classmethod + def read(cls, instance_path = 'instances/pr20.txt'): + cls.vertices = [] + with open(instance_path, 'r') as f: + file_content = f.readlines()[:] + + datas = file_content[2:] + + #general information + instance_description = file_content[0] + instance_description = instance_description.split() + cls.number_of_vehicles = int(instance_description[0]) + cls.number_of_services = int(instance_description[1]) + cls.maximum_route_duration = float(instance_description[2]) + cls.vehicle_capacity = int(instance_description[3]) + cls.maximum_ride_time = float(instance_description[4]) + + + #depot + depot = file_content[1] + depot = depot.split() + cls.depot = Vertice(number = depot[0], x_coordinate = depot[1], y_coordinate = depot[2], service_time_duration = depot[3], service_nature = depot[4], service_early_time = depot[5], service_later_time = depot[6]) + + for data in datas: + data = data.split() + vertice = Vertice(number = data[0], x_coordinate = data[1], y_coordinate = data[2], service_time_duration = data[3], service_nature = data[4], service_early_time = data[5], service_later_time = data[6]) + cls.vertices.append(vertice) + + @classmethod + def get_vertice(cls, vertice_number): + if vertice_number == 0: + return Instance.depot + for vertice in Instance.vertices: + if vertice.number == vertice_number: + return vertice + + +class Vertice: + def __init__(self, number, x_coordinate, y_coordinate, service_time_duration, service_nature, service_early_time, service_later_time): + self.number = int(number) + self.x_coordinate = float(x_coordinate) + self.y_coordinate = float(y_coordinate) + self.service_time_duration = float(service_time_duration) + self.service_nature = int(service_nature) + self.service_early_time = float(service_early_time) + self.service_later_time = float(service_later_time) + #to do : values set to -1 must be reset + self.vehicle_arrival_time = -1 + self.departure_time = -1 + self.begin_service_time = -1 + + self.violation_load = -1 + + def distance(self, vertice): + x_distance = abs(self.x_coordinate - vertice.x_coordinate) + y_distance = abs(self.y_coordinate - vertice.y_coordinate) + distance = np.sqrt((x_distance**2) + (y_distance**2)) + return distance + + def __repr__(self): + return "(" + str(self.x_coordinate) + ", " + str(self.y_coordinate) + ")" + +#Global call +Instance.read() + +class Fitness: + def __init__(self, route): + self.route = route + self.distance = 0 #self.route_distance() + self.fitness = 0 #self.route_fitness() + violation_load = 0 + + def route_distance(self): + path_distance = 0 + for i in range(0, (len(self.route) - 1)):#complete route + from_vertice = self.route[i] + to_vertice = self.route[i+1] + path_distance += from_vertice.distance(to_vertice) + self.distance = path_distance + return self.distance + + def route_cost(self): #routing cost = sum(c_i_j) + return self.route_distance() + + def route_travel_time(self): + return self.route_distance() + + def route_ride_time(self): + return self.route_distance() + + def route_duration(self, starting_time = 0): + services_time_duration = 0 + path_distance = 0 + ending_time = starting_time + for i in range(len(self.route) - 1): + services_time_duration = self.route[i].service_time_duration + from_vertice = self.route[i] + to_vertice = self.route[i+1] + + path_distance = from_vertice.distance(to_vertice) + waiting_time = to_vertice.service_early_time - (ending_time + services_time_duration + path_distance) + transit_time = (ending_time + services_time_duration + path_distance) - to_vertice.service_later_time + if waiting_time < 0: + waiting_time = 0 + ending_time += services_time_duration + path_distance + waiting_time + route_duration = ending_time - starting_time + return route_duration + + def route_fitness(self): + c_routing_cost = self.route_cost() + q_violation_load = self.violation_load + d_violation_duration = max(0, Instance.maximum_route_duration - self.route_duration()) + w_violation_time_window = self.route_violation_time_window() + t_violation_ride_time = max(0, Instance.maximum_ride_time - self.route_ride_time()) + fitness = self.route_distance() + return fitness + + def route_violation_time_window(self): #one route + for i in range(len(self.route)): + vertice = self.route[i] + service_begin_time = max(vertice.service_early_time, vertice.vehicle_arrival_time) + x = service_begin_time - vertice.service_later_time + x = max(0, x) + route_violation_time_window += x + return route_violation_time_window + + def request_violation_ride_time(self, request_origin_vertice, request_destination_vertice): #one request + request_ride_time = request_destination_vertice.begin_service_time - request_origin_vertice.departure_time + x = request_ride_time - Instance.maximum_ride_time + request_violation_ride_time = max(0, x) + return request_violation_ride_time + + @classmethod + def individual_evaluation(cls, individual, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name] # [188.54, 148.08, 83.13] + total_duration = 0 + total_route_cost = 0 + + + for i in range(len(individual.sequences)): + fitness = Fitness(individual.sequences[i+1]) + route_duration = fitness.route_duration(starting_time = starting_time[i]) + route_cost = fitness.route_cost() + #print("route "+ str(i+1) + " duration cost = " + str(route_duration)) + total_duration += route_duration + total_route_cost += route_cost + + #print("total duration time = " + str(total_duration) + "total distance = " + str(total_route_cost)) + return [total_duration, total_route_cost] + + @classmethod + def sequence_evaluation(cls, sequence, sequence_key, instance_name = Instance.name): + starting_time = Instance.starting_time[instance_name][sequence_key] + total_duration = 0 + total_route_cost = 0 + + fitness + +class Gene: + def __init__(self, client_number, vehicle_number): + self.client_number = client_number + self.vehicle_number = vehicle_number + + def __repr__(self): + return "client " + str(self.client_number) + " --> vehicle " + str(self.vehicle_number) + +class Individual: + def __init__(self, number_of_clients = int(Instance.number_of_services / 2) , number_of_vehicles = Instance.number_of_vehicles): + #genes + loop = True + while loop: + genes = [] + for i in range(number_of_clients): + client = i + 1 + vehicle = random.randint(1, number_of_vehicles) + gene = Gene(client, vehicle) + genes.append(gene) + loop = False + for i in range(1, number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + loop = True + self.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(self) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = self.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + self.sequences = sequences + + @classmethod + def vehicles_from_genes(cls, genes): + vehicles = [] + for i in range(len(genes)): + gene = genes[i] + vehicles.append(gene.vehicle_number) + return vehicles + + + def show_sequences(self): + output = {} + for i in range(len(self.sequences)): + output[i + 1] = [] + for vertice in self.sequences[i+1]: + output[i + 1].append(vertice.number) + return output + + def best_sequence(self, vertices, sequence_key): + #find the best feasible sequence based on tabu search + sequence = vertices #initial solution + sequence_length = len(sequence) + tabu_time = 3 + i = sequence_length**2 + tabu_list = [[0]*sequence_length]*sequence_length + best_sequence = sequence + best_value = Fitness(sequence).route_distance() + #iterative algorithm + while i > 0: + #print(sequence) + #neighbouring by permutation + for j in range(1, sequence_length - 1): + for k in range(1, sequence_length - 1): + if tabu_list[j][k] <= 0: + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + if not Individual.isValid(sequence, sequence_key): + temp = sequence[j] + sequence[j] = sequence[k] + sequence[k] = temp + + #check if sequence is the best, then update best and tabu_list + sequence_value = Fitness(sequence).route_distance() + if (tabu_list[j][k] <= 0) and (sequence_value < best_value): + best_sequence = sequence + best_value = sequence_value + #update tabu list + for a in range(len(tabu_list)): + for b in range(len(tabu_list[a])): + if tabu_list[a][b] -1 >=0: + tabu_list[a][b] -= 1 + tabu_list[j][k] = tabu_time + + #update tabu list + sequence = best_sequence + i -= 1 + return best_sequence + + @classmethod + def isValid(cls, sequence, sequence_key): + capacity = 0 + for i in range(len(sequence)): + if sequence[i].service_nature == 1: + origin = sequence[i] + destination_number = origin.number + int(Instance.number_of_services / 2) + destination = Instance.get_vertice(destination_number) + elif sequence[i].service_nature == -1: + destination = sequence[i] + origin_number = destination.number - int(Instance.number_of_services / 2) + origin = Instance.get_vertice(origin_number) + #print("origin = {} destination = {}".format(origin.number, destination.number)) + #pickup before delivery + if sequence.index(destination) < sequence.index(origin): + #print("pickup after delivery") + return False + + #service 1 + trajet + service 2 + if (i < len(sequence)-1): + #first_service_duration = sequence[i].sevice_time_duration + #route_distance = Fitness([sequence[i], sequence[i+1]]).route_distance() + second_service_starting_time = Fitness(sequence[:i+2]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if second_service_starting_time > sequence[i+1].service_later_time: + return False + + #maximum ride time + origin_key = sequence.index(origin) + destination_key = sequence.index(destination) + origin_starting_time = Fitness(sequence[:origin_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + destination_starting_time = Fitness(sequence[:destination_key]).route_duration(starting_time = Instance.starting_time[Instance.name][sequence_key - 1]) + if (destination_starting_time - origin_starting_time) > Instance.maximum_ride_time: + return False + + #capacity + capacity += sequence[i].service_nature + if capacity > Instance.vehicle_capacity: + return False + + return True + + def set_sequences(self, sequences): + for i in range(len(sequences)): + self.sequences[i+1] = sequences[i] + + @classmethod + def crossover(cls, parent_1, parent_2): + #genes + individual = Individual() + genes = parent_1.genes[:int(len(parent_2.genes)/2)] + parent_2.genes[int(len(parent_1.genes)/2):] + loop = True + while loop: + loop = False + for i in range(1, Instance.number_of_vehicles + 1): + if i not in Individual.vehicles_from_genes(genes): + gene_indice = random.randint(0, len(genes) - 1) + genes[gene_indice].vehicle_number = i + loop = True + #mutation + i = random.randint(0, len(genes) - 1) + j = random.randint(0, len(genes) - 1) + temp = genes[i].vehicle_number + genes[i].vehicle_number = genes[j].vehicle_number + genes[j].vehicle_number = temp + individual.genes = genes + + #sequences + vertices = Instance.vertices + sequences = Utils.format_individual(individual) + for i in range(len(sequences)): + #i+1 = vehicle number = sequence key + sequence_key = i + 1 + clients = sequences[sequence_key] + vertices = [] + for j in clients: + origin = j + destination = int(j+Instance.number_of_services / 2) + vertices.append(Instance.get_vertice(origin)) + vertices.append(Instance.get_vertice(destination)) + #print("1: " + str(Fitness(vertices).route_distance())) + sequence = individual.best_sequence(vertices, sequence_key) + #print(sequence) + sequences[sequence_key] = [Instance.depot] + sequence + [Instance.depot] + individual.sequences = sequences + + + return individual + + def __repr__(self): + if len(self.genes) > 0: + result = "" + formatted_individual = Utils.format_individual(self) + for key in formatted_individual: + line = "Vehicle " + str(key) + " : " + str(formatted_individual[key]) + "\n" + result += line + else: + result = "Empty individual" + return result + +class Utils: + @classmethod + def format_individual(cls, individual): + solution = {} + for i in range(len(individual.genes)): + client = individual.genes[i].client_number + vehicle = individual.genes[i].vehicle_number + if vehicle in solution: + solution[vehicle].append(client) + else: + solution[vehicle] = [client] + return collections.OrderedDict(sorted(solution.items())) + + @classmethod + def current_time(cls): + now = datetime.now() + current_time = now.strftime("%H:%M:%S") + print("Temps actuel = ", current_time) + +main_program = 1 +while(main_program <= 20): + + print("<-- start execution {} -->".format(main_program)) + Utils.current_time() + # step 1: initial population + population_size = 50 + population = [] + maximum_generation = 50 + + for i in range(population_size): + individual = Individual() + population.append(individual) + + # step 2: loop-generations + parent_1 = population[0] + parent_2 = population[1] + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + + + for cpt in range(maximum_generation): + #print(cpt) + #population evaluation and parents detection + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + # step 3: new population: crossover and mutation + population = [parent_1, parent_2] + for j in range((population_size - 2)): + population.append(Individual.crossover(parent_1, parent_2)) + + #end loop-generations + + for i in range(population_size): + individual = population[i] + fitness = Fitness.individual_evaluation(individual) + if fitness[0] < Fitness.individual_evaluation(parent_1)[0]: + parent_2 = parent_1 + parent_1 = individual + + + print(parent_1.show_sequences(), Fitness.individual_evaluation(parent_1)) + print(parent_2.show_sequences(), Fitness.individual_evaluation(parent_2)) + Utils.current_time() + print("<-- end execution {} -->".format(main_program)) + main_program += 1 diff --git a/instances/pr03.txt b/instances/pr03.txt new file mode 100644 index 0000000..5a94d5e --- /dev/null +++ b/instances/pr03.txt @@ -0,0 +1,146 @@ +7 144 480 6 90 + 0 -1.839 0.112 0 0 0 1440 + 1 -5.528 -2.437 10 1 0 1440 + 2 -4.830 5.331 10 1 0 1440 + 3 -4.907 -3.849 10 1 0 1440 + 4 2.531 -1.856 10 1 0 1440 + 5 -2.447 -0.382 10 1 0 1440 + 6 2.459 -1.790 10 1 0 1440 + 7 -1.042 6.036 10 1 0 1440 + 8 3.818 -3.517 10 1 0 1440 + 9 -6.828 9.307 10 1 0 1440 + 10 -3.079 -5.734 10 1 0 1440 + 11 -3.706 -1.212 10 1 0 1440 + 12 -1.574 -4.764 10 1 0 1440 + 13 -6.338 -2.292 10 1 0 1440 + 14 -4.311 -4.344 10 1 0 1440 + 15 -2.562 1.360 10 1 0 1440 + 16 -0.263 1.663 10 1 0 1440 + 17 -4.158 -2.850 10 1 0 1440 + 18 0.208 1.288 10 1 0 1440 + 19 0.392 -4.784 10 1 0 1440 + 20 -8.329 2.632 10 1 0 1440 + 21 -0.646 2.635 10 1 0 1440 + 22 0.329 0.673 10 1 0 1440 + 23 -3.487 3.043 10 1 0 1440 + 24 1.555 -3.627 10 1 0 1440 + 25 1.284 0.513 10 1 0 1440 + 26 -4.845 -2.443 10 1 0 1440 + 27 -8.854 -1.046 10 1 0 1440 + 28 -2.977 0.100 10 1 0 1440 + 29 0.983 3.842 10 1 0 1440 + 30 0.141 9.294 10 1 0 1440 + 31 -7.930 1.538 10 1 0 1440 + 32 -3.065 4.006 10 1 0 1440 + 33 1.893 2.164 10 1 0 1440 + 34 4.509 -5.991 10 1 0 1440 + 35 -3.495 -0.382 10 1 0 1440 + 36 8.120 -7.474 10 1 0 1440 + 37 1.559 -2.845 10 1 285 306 + 38 -7.219 2.955 10 1 428 464 + 39 -4.291 -2.268 10 1 257 299 + 40 -7.639 -5.749 10 1 281 300 + 41 -2.854 1.207 10 1 472 506 + 42 -6.139 2.653 10 1 113 130 + 43 -0.847 1.262 10 1 159 188 + 44 -6.147 3.339 10 1 316 344 + 45 -3.467 -2.759 10 1 471 513 + 46 1.031 -1.252 10 1 142 167 + 47 -8.301 7.700 10 1 440 469 + 48 -4.042 4.999 10 1 377 411 + 49 8.383 3.391 10 1 265 292 + 50 -2.056 -7.583 10 1 387 402 + 51 1.544 -1.872 10 1 185 220 + 52 -5.994 -6.580 10 1 171 211 + 53 0.515 4.781 10 1 433 452 + 54 4.601 1.499 10 1 286 311 + 55 8.298 -0.166 10 1 86 102 + 56 3.989 -3.892 10 1 277 293 + 57 9.084 -8.354 10 1 361 395 + 58 0.707 0.007 10 1 112 155 + 59 1.896 4.009 10 1 111 148 + 60 -8.049 5.821 10 1 236 254 + 61 6.446 -6.295 10 1 337 370 + 62 -4.362 -2.612 10 1 252 283 + 63 -1.841 1.030 10 1 105 126 + 64 -4.392 6.325 10 1 146 178 + 65 1.135 2.622 10 1 320 364 + 66 -0.700 3.824 10 1 317 359 + 67 7.408 -3.422 10 1 340 381 + 68 1.430 -0.080 10 1 376 407 + 69 -9.414 -4.878 10 1 67 90 + 70 1.533 -4.217 10 1 445 462 + 71 -4.664 -1.646 10 1 210 238 + 72 -0.096 -8.100 10 1 114 131 + 73 -3.744 -4.251 10 -1 94 116 + 74 -0.368 -6.907 10 -1 73 94 + 75 3.489 -2.090 10 -1 474 502 + 76 4.554 5.141 10 -1 188 222 + 77 -3.193 8.824 10 -1 88 125 + 78 -1.358 -2.696 10 -1 149 169 + 79 1.265 -4.834 10 -1 471 498 + 80 -4.618 -3.827 10 -1 383 415 + 81 -2.962 3.508 10 -1 231 257 + 82 1.370 4.399 10 -1 277 294 + 83 3.834 -4.634 10 -1 169 192 + 84 -2.623 2.451 10 -1 326 349 + 85 9.001 -4.364 10 -1 296 327 + 86 -0.700 2.252 10 -1 211 253 + 87 -2.999 -2.885 10 -1 475 504 + 88 -5.627 -6.474 10 -1 479 496 + 89 -8.742 9.080 10 -1 371 386 + 90 -0.576 5.403 10 -1 176 212 + 91 -3.484 -2.718 10 -1 263 295 + 92 -1.648 1.618 10 -1 219 250 + 93 2.371 2.949 10 -1 206 238 + 94 -4.099 4.659 10 -1 365 389 + 95 -5.352 -2.162 10 -1 65 94 + 96 -1.756 3.749 10 -1 449 476 + 97 -3.731 5.684 10 -1 430 458 + 98 7.152 2.251 10 -1 269 288 + 99 -4.186 2.771 10 -1 361 379 +100 1.482 -8.212 10 -1 236 259 +101 3.032 -5.532 10 -1 348 386 +102 -3.917 4.800 10 -1 146 181 +103 -9.442 1.519 10 -1 173 194 +104 -0.781 1.127 10 -1 374 389 +105 2.857 -4.991 10 -1 159 174 +106 -2.065 2.455 10 -1 372 408 +107 -3.096 -1.890 10 -1 316 334 +108 0.172 -2.045 10 -1 310 343 +109 -3.101 -2.111 10 -1 0 1440 +110 -8.572 -2.801 10 -1 0 1440 +111 5.883 -6.304 10 -1 0 1440 +112 -1.575 -5.269 10 -1 0 1440 +113 -7.166 5.118 10 -1 0 1440 +114 -9.263 -0.660 10 -1 0 1440 +115 3.351 -4.926 10 -1 0 1440 +116 5.931 5.409 10 -1 0 1440 +117 3.074 -2.844 10 -1 0 1440 +118 -5.590 1.846 10 -1 0 1440 +119 -8.996 -3.953 10 -1 0 1440 +120 3.644 2.082 10 -1 0 1440 +121 -5.367 -5.643 10 -1 0 1440 +122 -3.187 3.254 10 -1 0 1440 +123 0.566 1.276 10 -1 0 1440 +124 -5.290 4.280 10 -1 0 1440 +125 4.713 -4.546 10 -1 0 1440 +126 3.079 0.987 10 -1 0 1440 +127 -4.521 -5.629 10 -1 0 1440 +128 1.092 1.331 10 -1 0 1440 +129 -3.299 -3.400 10 -1 0 1440 +130 -4.087 3.058 10 -1 0 1440 +131 -6.935 8.041 10 -1 0 1440 +132 -5.897 -2.954 10 -1 0 1440 +133 -3.685 -3.371 10 -1 0 1440 +134 -2.182 6.537 10 -1 0 1440 +135 2.298 -4.101 10 -1 0 1440 +136 -7.756 5.981 10 -1 0 1440 +137 -4.720 6.772 10 -1 0 1440 +138 -2.161 3.517 10 -1 0 1440 +139 -5.568 -3.138 10 -1 0 1440 +140 -8.523 8.879 10 -1 0 1440 +141 -0.392 -6.353 10 -1 0 1440 +142 -5.856 5.938 10 -1 0 1440 +143 -2.454 1.494 10 -1 0 1440 +144 -4.878 1.697 10 -1 0 1440 diff --git a/instances/pr04.txt b/instances/pr04.txt new file mode 100644 index 0000000..f6133c9 --- /dev/null +++ b/instances/pr04.txt @@ -0,0 +1,194 @@ +9 192 480 6 90 + 0 -1.228 0.916 0 0 0 1440 + 1 -4.463 -5.564 10 1 0 1440 + 2 3.610 6.494 10 1 0 1440 + 3 -2.547 4.458 10 1 0 1440 + 4 -3.395 -7.306 10 1 0 1440 + 5 4.565 3.573 10 1 0 1440 + 6 1.495 -3.672 10 1 0 1440 + 7 -0.148 4.720 10 1 0 1440 + 8 0.215 -4.091 10 1 0 1440 + 9 2.299 0.140 10 1 0 1440 + 10 -2.886 0.596 10 1 0 1440 + 11 -4.812 9.412 10 1 0 1440 + 12 0.724 1.732 10 1 0 1440 + 13 0.461 2.705 10 1 0 1440 + 14 -1.397 2.820 10 1 0 1440 + 15 1.295 -1.169 10 1 0 1440 + 16 -3.667 2.310 10 1 0 1440 + 17 -0.422 -4.931 10 1 0 1440 + 18 0.109 -0.714 10 1 0 1440 + 19 -5.696 2.791 10 1 0 1440 + 20 -8.099 -7.769 10 1 0 1440 + 21 7.226 5.903 10 1 0 1440 + 22 -2.166 0.164 10 1 0 1440 + 23 -2.015 -6.242 10 1 0 1440 + 24 -4.816 0.629 10 1 0 1440 + 25 -0.508 6.160 10 1 0 1440 + 26 1.714 -4.705 10 1 0 1440 + 27 -1.606 0.856 10 1 0 1440 + 28 0.668 -2.707 10 1 0 1440 + 29 1.503 -3.498 10 1 0 1440 + 30 3.795 7.391 10 1 0 1440 + 31 -4.120 -4.302 10 1 0 1440 + 32 3.254 1.179 10 1 0 1440 + 33 -2.031 -2.024 10 1 0 1440 + 34 -3.548 1.914 10 1 0 1440 + 35 5.804 5.666 10 1 0 1440 + 36 -3.669 -0.626 10 1 0 1440 + 37 0.045 -4.673 10 1 0 1440 + 38 -1.969 3.898 10 1 0 1440 + 39 -4.734 2.091 10 1 0 1440 + 40 -7.924 -5.768 10 1 0 1440 + 41 0.560 -3.408 10 1 0 1440 + 42 3.445 -0.829 10 1 0 1440 + 43 1.850 -5.115 10 1 0 1440 + 44 -0.435 -4.452 10 1 0 1440 + 45 -1.415 -7.416 10 1 0 1440 + 46 1.987 7.752 10 1 0 1440 + 47 -5.008 1.787 10 1 0 1440 + 48 4.279 -7.988 10 1 0 1440 + 49 0.152 -2.903 10 1 254 296 + 50 1.473 -0.344 10 1 379 401 + 51 -2.617 -4.900 10 1 108 151 + 52 -6.387 -0.527 10 1 211 229 + 53 -5.414 0.709 10 1 467 504 + 54 1.793 -3.409 10 1 217 261 + 55 -9.871 3.455 10 1 89 127 + 56 2.880 -0.858 10 1 307 350 + 57 0.272 9.059 10 1 227 264 + 58 -3.102 4.894 10 1 378 422 + 59 -4.655 4.232 10 1 429 449 + 60 2.729 5.818 10 1 404 424 + 61 2.881 -2.803 10 1 202 219 + 62 -2.610 1.133 10 1 69 87 + 63 0.054 -2.622 10 1 178 198 + 64 -5.046 0.781 10 1 453 490 + 65 3.000 1.909 10 1 102 137 + 66 -1.260 2.206 10 1 471 492 + 67 2.201 -0.864 10 1 327 352 + 68 0.894 0.287 10 1 195 228 + 69 -1.981 0.092 10 1 95 130 + 70 -0.423 3.125 10 1 309 328 + 71 1.798 -0.041 10 1 255 275 + 72 -0.235 4.294 10 1 99 139 + 73 -1.652 6.808 10 1 459 499 + 74 -0.119 4.202 10 1 409 448 + 75 5.663 -4.402 10 1 78 112 + 76 5.748 3.550 10 1 67 93 + 77 -2.610 0.748 10 1 373 389 + 78 0.749 -5.724 10 1 267 282 + 79 -2.209 5.578 10 1 158 185 + 80 1.987 3.882 10 1 385 410 + 81 0.531 4.922 10 1 113 150 + 82 1.515 0.630 10 1 291 328 + 83 0.548 -3.150 10 1 100 141 + 84 0.796 -2.866 10 1 215 235 + 85 -7.581 0.401 10 1 300 343 + 86 -4.367 -6.165 10 1 201 217 + 87 -0.258 -6.214 10 1 122 149 + 88 -1.884 -3.688 10 1 439 457 + 89 2.084 2.117 10 1 178 215 + 90 0.314 -1.922 10 1 450 474 + 91 -2.036 1.888 10 1 223 266 + 92 -0.090 -5.494 10 1 357 376 + 93 -2.955 0.928 10 1 474 495 + 94 0.505 -3.505 10 1 129 150 + 95 2.776 4.871 10 1 325 368 + 96 1.208 -4.235 10 1 294 331 + 97 -5.127 4.114 10 -1 353 371 + 98 -2.908 0.429 10 -1 279 317 + 99 -1.855 -1.482 10 -1 473 514 +100 0.786 -4.945 10 -1 470 501 +101 -1.912 -3.209 10 -1 419 443 +102 1.765 -5.227 10 -1 310 325 +103 1.691 -6.296 10 -1 372 402 +104 1.899 0.622 10 -1 104 119 +105 -6.888 -6.454 10 -1 159 175 +106 -1.336 2.026 10 -1 208 241 +107 -4.444 6.372 10 -1 473 489 +108 -0.650 7.144 10 -1 379 423 +109 -5.198 2.541 10 -1 170 212 +110 -0.074 5.949 10 -1 141 182 +111 -6.468 8.304 10 -1 425 462 +112 -1.127 -3.594 10 -1 335 367 +113 -1.686 0.778 10 -1 423 443 +114 1.984 -4.981 10 -1 213 253 +115 -1.628 -0.294 10 -1 89 114 +116 0.836 6.704 10 -1 230 272 +117 3.088 2.432 10 -1 335 350 +118 9.352 -2.023 10 -1 451 477 +119 -0.933 -5.618 10 -1 271 287 +120 -3.444 -6.331 10 -1 238 275 +121 2.094 -0.565 10 -1 91 129 +122 -0.342 8.959 10 -1 213 229 +123 -1.874 4.523 10 -1 413 431 +124 0.243 -3.052 10 -1 73 91 +125 -2.886 5.662 10 -1 83 104 +126 7.688 -2.990 10 -1 60 102 +127 -9.047 1.028 10 -1 472 506 +128 -3.510 4.655 10 -1 267 307 +129 -4.840 4.385 10 -1 410 450 +130 -4.100 2.670 10 -1 351 393 +131 1.370 3.461 10 -1 144 162 +132 -7.147 1.145 10 -1 409 449 +133 -3.623 5.190 10 -1 103 140 +134 -3.947 0.491 10 -1 167 200 +135 -1.657 2.377 10 -1 397 432 +136 1.075 -2.855 10 -1 205 246 +137 -2.303 4.702 10 -1 253 289 +138 -0.881 2.122 10 -1 454 478 +139 -4.004 2.744 10 -1 412 456 +140 -3.744 -4.104 10 -1 230 271 +141 4.822 0.009 10 -1 143 170 +142 -0.032 6.824 10 -1 404 424 +143 -1.429 -3.342 10 -1 86 110 +144 -0.144 -3.481 10 -1 340 383 +145 -3.445 4.235 10 -1 0 1440 +146 0.868 -6.618 10 -1 0 1440 +147 -6.125 -5.137 10 -1 0 1440 +148 -0.109 0.991 10 -1 0 1440 +149 -1.657 6.655 10 -1 0 1440 +150 0.844 5.284 10 -1 0 1440 +151 -2.203 -3.690 10 -1 0 1440 +152 1.577 1.732 10 -1 0 1440 +153 0.900 -1.869 10 -1 0 1440 +154 -0.458 0.349 10 -1 0 1440 +155 0.887 4.066 10 -1 0 1440 +156 2.609 -3.397 10 -1 0 1440 +157 -3.250 3.953 10 -1 0 1440 +158 -3.263 -8.258 10 -1 0 1440 +159 -9.849 2.202 10 -1 0 1440 +160 -5.905 0.416 10 -1 0 1440 +161 0.743 -0.257 10 -1 0 1440 +162 -5.960 1.247 10 -1 0 1440 +163 -1.122 -3.183 10 -1 0 1440 +164 -1.681 -3.504 10 -1 0 1440 +165 2.186 1.814 10 -1 0 1440 +166 4.504 -6.132 10 -1 0 1440 +167 -4.882 2.557 10 -1 0 1440 +168 -3.218 -1.674 10 -1 0 1440 +169 1.244 -4.149 10 -1 0 1440 +170 -2.108 -7.708 10 -1 0 1440 +171 -1.782 -1.852 10 -1 0 1440 +172 4.833 9.352 10 -1 0 1440 +173 -1.868 4.901 10 -1 0 1440 +174 1.214 3.004 10 -1 0 1440 +175 0.311 -4.030 10 -1 0 1440 +176 1.713 3.708 10 -1 0 1440 +177 2.258 0.084 10 -1 0 1440 +178 -3.043 5.294 10 -1 0 1440 +179 3.377 -6.711 10 -1 0 1440 +180 0.541 0.153 10 -1 0 1440 +181 7.216 3.010 10 -1 0 1440 +182 -2.411 -3.462 10 -1 0 1440 +183 1.741 7.515 10 -1 0 1440 +184 1.064 -6.005 10 -1 0 1440 +185 -0.518 -4.900 10 -1 0 1440 +186 -1.934 2.112 10 -1 0 1440 +187 -4.680 -1.466 10 -1 0 1440 +188 -1.678 4.344 10 -1 0 1440 +189 1.409 -1.361 10 -1 0 1440 +190 -2.106 2.602 10 -1 0 1440 +191 3.981 -4.067 10 -1 0 1440 +192 5.206 3.033 10 -1 0 1440 diff --git a/instances/pr05.txt b/instances/pr05.txt new file mode 100644 index 0000000..dcb891b --- /dev/null +++ b/instances/pr05.txt @@ -0,0 +1,242 @@ +11 240 480 6 90 + 0 0.868 -1.044 0 0 0 1440 + 1 6.599 -4.983 10 1 0 1440 + 2 -3.694 -3.674 10 1 0 1440 + 3 -0.273 1.877 10 1 0 1440 + 4 3.112 -3.591 10 1 0 1440 + 5 0.279 0.801 10 1 0 1440 + 6 3.115 4.367 10 1 0 1440 + 7 -3.630 -2.131 10 1 0 1440 + 8 5.281 3.505 10 1 0 1440 + 9 1.127 2.066 10 1 0 1440 + 10 -0.062 2.311 10 1 0 1440 + 11 4.309 -1.236 10 1 0 1440 + 12 0.685 1.907 10 1 0 1440 + 13 -0.685 2.532 10 1 0 1440 + 14 -2.793 -2.371 10 1 0 1440 + 15 3.324 -3.049 10 1 0 1440 + 16 6.388 -5.288 10 1 0 1440 + 17 -1.367 -4.394 10 1 0 1440 + 18 -0.065 -2.750 10 1 0 1440 + 19 5.941 -4.926 10 1 0 1440 + 20 2.717 -0.571 10 1 0 1440 + 21 7.000 -2.084 10 1 0 1440 + 22 3.533 -6.517 10 1 0 1440 + 23 -1.439 -4.224 10 1 0 1440 + 24 1.937 3.027 10 1 0 1440 + 25 -3.979 1.010 10 1 0 1440 + 26 -1.575 -4.020 10 1 0 1440 + 27 -2.842 -4.050 10 1 0 1440 + 28 2.708 0.973 10 1 0 1440 + 29 2.220 -0.922 10 1 0 1440 + 30 -0.083 -0.653 10 1 0 1440 + 31 1.022 7.553 10 1 0 1440 + 32 0.745 1.850 10 1 0 1440 + 33 4.891 -2.029 10 1 0 1440 + 34 -1.896 -2.968 10 1 0 1440 + 35 1.682 -0.666 10 1 0 1440 + 36 0.251 -3.042 10 1 0 1440 + 37 1.542 0.491 10 1 0 1440 + 38 6.031 8.980 10 1 0 1440 + 39 4.040 -4.537 10 1 0 1440 + 40 -2.684 -5.427 10 1 0 1440 + 41 6.917 7.258 10 1 0 1440 + 42 -2.282 4.617 10 1 0 1440 + 43 -1.426 -3.025 10 1 0 1440 + 44 7.605 1.207 10 1 0 1440 + 45 6.304 6.002 10 1 0 1440 + 46 -2.024 -8.197 10 1 0 1440 + 47 -4.117 -4.202 10 1 0 1440 + 48 7.920 -2.902 10 1 0 1440 + 49 -2.073 -0.707 10 1 0 1440 + 50 -0.416 -5.350 10 1 0 1440 + 51 3.959 -4.046 10 1 0 1440 + 52 -4.713 -7.785 10 1 0 1440 + 53 -0.123 4.918 10 1 0 1440 + 54 -0.037 -2.726 10 1 0 1440 + 55 3.154 -0.872 10 1 0 1440 + 56 -0.013 -2.026 10 1 0 1440 + 57 6.639 -2.669 10 1 0 1440 + 58 0.610 -6.409 10 1 0 1440 + 59 1.354 -2.087 10 1 0 1440 + 60 5.421 -0.654 10 1 0 1440 + 61 2.205 -3.414 10 1 439 465 + 62 -0.972 0.471 10 1 220 241 + 63 -1.158 -4.686 10 1 159 176 + 64 -0.290 -0.030 10 1 161 188 + 65 1.384 -4.445 10 1 87 118 + 66 1.748 2.775 10 1 396 416 + 67 0.297 -4.369 10 1 178 197 + 68 -4.435 -3.820 10 1 275 309 + 69 -5.940 0.151 10 1 198 222 + 70 -1.345 -7.553 10 1 148 171 + 71 -0.552 -5.195 10 1 169 193 + 72 -0.959 -2.688 10 1 209 238 + 73 1.932 2.950 10 1 449 467 + 74 2.625 3.674 10 1 250 290 + 75 4.371 -2.803 10 1 207 230 + 76 -5.203 -3.534 10 1 308 330 + 77 -0.844 -0.012 10 1 339 383 + 78 8.911 6.212 10 1 261 303 + 79 0.607 -1.613 10 1 81 117 + 80 2.709 -0.510 10 1 197 215 + 81 2.753 -1.534 10 1 177 195 + 82 4.251 3.206 10 1 192 223 + 83 2.531 1.269 10 1 176 215 + 84 4.778 -1.277 10 1 146 179 + 85 -0.314 -1.384 10 1 119 146 + 86 1.248 -7.810 10 1 432 459 + 87 -2.104 -0.343 10 1 361 383 + 88 -0.315 -5.543 10 1 425 459 + 89 5.301 8.490 10 1 208 232 + 90 3.564 -4.755 10 1 274 310 + 91 4.343 -1.844 10 1 311 329 + 92 0.660 -5.458 10 1 464 486 + 93 8.795 9.401 10 1 92 120 + 94 3.910 -4.874 10 1 130 148 + 95 -4.834 -2.648 10 1 129 158 + 96 7.200 -0.925 10 1 163 191 + 97 -3.773 0.335 10 1 321 352 + 98 -6.597 -3.675 10 1 62 103 + 99 -1.667 -3.528 10 1 223 244 +100 1.074 -0.467 10 1 272 302 +101 1.559 -0.582 10 1 323 349 +102 2.161 -1.811 10 1 451 476 +103 0.978 4.928 10 1 326 365 +104 9.415 -0.449 10 1 476 520 +105 1.038 -1.630 10 1 114 144 +106 -0.145 -0.086 10 1 350 386 +107 -0.622 2.530 10 1 313 347 +108 -0.625 1.022 10 1 477 512 +109 -1.744 -7.080 10 1 100 119 +110 -5.509 -4.385 10 1 401 423 +111 -0.944 2.372 10 1 336 352 +112 0.898 3.541 10 1 356 379 +113 -1.675 -0.081 10 1 320 356 +114 6.685 -3.784 10 1 135 150 +115 1.472 -2.372 10 1 448 483 +116 3.347 2.003 10 1 287 318 +117 6.639 -7.011 10 1 91 120 +118 -0.566 0.888 10 1 436 472 +119 -0.510 -4.673 10 1 176 217 +120 -0.883 5.574 10 1 352 379 +121 0.585 -0.319 10 -1 223 249 +122 -2.573 -3.769 10 -1 117 161 +123 -1.536 -2.455 10 -1 78 96 +124 4.379 -1.110 10 -1 344 363 +125 1.766 -2.560 10 -1 182 211 +126 -3.962 5.488 10 -1 229 272 +127 -2.455 -4.322 10 -1 290 308 +128 -2.689 -1.274 10 -1 156 176 +129 3.416 -3.846 10 -1 405 432 +130 -4.731 -2.947 10 -1 134 171 +131 4.937 -2.559 10 -1 99 135 +132 0.370 -1.645 10 -1 185 205 +133 2.243 -2.327 10 -1 140 160 +134 -3.755 -2.961 10 -1 429 458 +135 2.555 0.367 10 -1 95 127 +136 -1.522 0.328 10 -1 427 456 +137 -1.294 -0.750 10 -1 465 480 +138 -2.211 2.643 10 -1 256 271 +139 -1.794 0.773 10 -1 119 138 +140 -2.123 1.449 10 -1 123 151 +141 0.350 -1.971 10 -1 326 357 +142 3.260 -1.494 10 -1 220 240 +143 -0.574 -2.830 10 -1 339 372 +144 -0.613 -3.962 10 -1 207 236 +145 -0.246 1.282 10 -1 69 99 +146 -0.647 0.847 10 -1 159 177 +147 -3.789 -3.612 10 -1 164 195 +148 1.085 -1.875 10 -1 179 207 +149 5.010 0.864 10 -1 367 386 +150 4.684 0.471 10 -1 442 481 +151 1.960 -1.041 10 -1 371 409 +152 -3.895 5.294 10 -1 182 218 +153 -0.064 -2.129 10 -1 395 432 +154 4.091 -3.377 10 -1 361 404 +155 -0.057 -6.230 10 -1 440 481 +156 -0.978 2.679 10 -1 216 247 +157 3.426 -2.389 10 -1 237 274 +158 2.957 -2.456 10 -1 363 380 +159 1.638 -5.889 10 -1 215 232 +160 6.188 -1.517 10 -1 303 329 +161 4.009 -0.963 10 -1 313 352 +162 0.012 -0.464 10 -1 272 312 +163 -0.893 -4.390 10 -1 208 246 +164 -0.714 -5.743 10 -1 182 199 +165 0.755 -2.121 10 -1 462 483 +166 0.395 0.730 10 -1 439 474 +167 -1.512 9.202 10 -1 474 494 +168 8.482 -2.452 10 -1 230 268 +169 -5.232 3.068 10 -1 461 479 +170 0.754 1.382 10 -1 364 404 +171 -2.148 3.036 10 -1 476 493 +172 3.605 2.988 10 -1 227 254 +173 1.278 -4.094 10 -1 418 436 +174 -1.729 -1.025 10 -1 272 293 +175 -1.054 1.240 10 -1 141 158 +176 -1.585 -5.946 10 -1 318 356 +177 2.927 -0.222 10 -1 439 457 +178 -1.260 -5.893 10 -1 332 354 +179 -1.730 -3.530 10 -1 444 487 +180 5.705 -5.035 10 -1 281 313 +181 2.694 1.744 10 -1 0 1440 +182 -0.620 -0.888 10 -1 0 1440 +183 1.698 -1.632 10 -1 0 1440 +184 8.371 -3.252 10 -1 0 1440 +185 1.245 3.459 10 -1 0 1440 +186 1.506 6.700 10 -1 0 1440 +187 2.582 -0.584 10 -1 0 1440 +188 1.367 -1.483 10 -1 0 1440 +189 4.832 -0.516 10 -1 0 1440 +190 1.349 1.974 10 -1 0 1440 +191 -1.851 6.540 10 -1 0 1440 +192 1.755 3.838 10 -1 0 1440 +193 3.777 -1.600 10 -1 0 1440 +194 4.797 -3.031 10 -1 0 1440 +195 3.881 3.624 10 -1 0 1440 +196 -1.609 -4.284 10 -1 0 1440 +197 2.866 -0.199 10 -1 0 1440 +198 -0.586 -0.186 10 -1 0 1440 +199 6.052 6.342 10 -1 0 1440 +200 6.320 -4.777 10 -1 0 1440 +201 -1.531 -2.329 10 -1 0 1440 +202 -0.287 0.079 10 -1 0 1440 +203 3.206 -1.018 10 -1 0 1440 +204 -1.863 -2.567 10 -1 0 1440 +205 -0.363 2.543 10 -1 0 1440 +206 1.048 2.289 10 -1 0 1440 +207 0.182 -0.301 10 -1 0 1440 +208 -2.527 -1.218 10 -1 0 1440 +209 5.693 -7.551 10 -1 0 1440 +210 1.389 -3.623 10 -1 0 1440 +211 3.252 -2.952 10 -1 0 1440 +212 0.480 -0.729 10 -1 0 1440 +213 1.137 -0.834 10 -1 0 1440 +214 1.713 -2.465 10 -1 0 1440 +215 -3.366 -4.124 10 -1 0 1440 +216 -3.239 -5.088 10 -1 0 1440 +217 2.304 -1.450 10 -1 0 1440 +218 -2.186 -3.950 10 -1 0 1440 +219 3.201 7.733 10 -1 0 1440 +220 1.383 -7.619 10 -1 0 1440 +221 -0.805 -2.118 10 -1 0 1440 +222 2.539 4.661 10 -1 0 1440 +223 4.954 -5.464 10 -1 0 1440 +224 6.342 -0.864 10 -1 0 1440 +225 0.230 -0.554 10 -1 0 1440 +226 5.242 2.990 10 -1 0 1440 +227 0.930 -1.625 10 -1 0 1440 +228 3.484 -9.619 10 -1 0 1440 +229 -2.106 -4.150 10 -1 0 1440 +230 2.845 1.024 10 -1 0 1440 +231 1.625 -2.258 10 -1 0 1440 +232 -3.664 -3.403 10 -1 0 1440 +233 -2.736 -5.018 10 -1 0 1440 +234 -5.370 1.133 10 -1 0 1440 +235 2.628 -0.599 10 -1 0 1440 +236 -3.152 3.459 10 -1 0 1440 +237 -1.461 -3.151 10 -1 0 1440 +238 -0.424 -3.087 10 -1 0 1440 +239 -1.852 -2.949 10 -1 0 1440 +240 -1.713 -1.940 10 -1 0 1440 diff --git a/instances/pr06.txt b/instances/pr06.txt new file mode 100644 index 0000000..b9f9449 --- /dev/null +++ b/instances/pr06.txt @@ -0,0 +1,290 @@ +13 288 480 6 90 + 0 -0.268 -0.947 0 0 0 1440 + 1 -6.617 -3.781 10 1 0 1440 + 2 0.267 -3.522 10 1 0 1440 + 3 3.875 0.862 10 1 0 1440 + 4 6.265 2.067 10 1 0 1440 + 5 6.097 -0.611 10 1 0 1440 + 6 -9.854 -3.953 10 1 0 1440 + 7 0.841 -8.127 10 1 0 1440 + 8 -1.457 2.606 10 1 0 1440 + 9 -3.419 -7.670 10 1 0 1440 + 10 5.514 -3.391 10 1 0 1440 + 11 1.587 0.872 10 1 0 1440 + 12 -6.342 -2.028 10 1 0 1440 + 13 -0.936 -4.221 10 1 0 1440 + 14 -5.362 0.373 10 1 0 1440 + 15 5.349 -0.331 10 1 0 1440 + 16 -2.261 -3.279 10 1 0 1440 + 17 3.961 -0.155 10 1 0 1440 + 18 1.670 -2.275 10 1 0 1440 + 19 -5.124 -1.376 10 1 0 1440 + 20 -2.991 1.438 10 1 0 1440 + 21 -7.044 -2.791 10 1 0 1440 + 22 -7.539 -3.081 10 1 0 1440 + 23 1.059 -2.893 10 1 0 1440 + 24 8.634 -4.594 10 1 0 1440 + 25 0.386 3.458 10 1 0 1440 + 26 -3.760 -4.211 10 1 0 1440 + 27 6.944 0.138 10 1 0 1440 + 28 -1.382 0.125 10 1 0 1440 + 29 -2.712 -3.804 10 1 0 1440 + 30 -6.935 -1.473 10 1 0 1440 + 31 5.857 2.935 10 1 0 1440 + 32 5.810 3.170 10 1 0 1440 + 33 -6.225 -1.643 10 1 0 1440 + 34 -6.638 1.359 10 1 0 1440 + 35 6.803 -1.248 10 1 0 1440 + 36 -3.070 -4.168 10 1 0 1440 + 37 -5.539 -5.105 10 1 0 1440 + 38 3.624 -0.265 10 1 0 1440 + 39 -0.122 0.559 10 1 0 1440 + 40 1.028 -2.395 10 1 0 1440 + 41 -0.716 3.686 10 1 0 1440 + 42 -9.020 6.117 10 1 0 1440 + 43 4.637 6.508 10 1 0 1440 + 44 1.335 3.137 10 1 0 1440 + 45 -7.357 -2.884 10 1 0 1440 + 46 -4.153 -3.710 10 1 0 1440 + 47 -6.094 -2.725 10 1 0 1440 + 48 3.831 5.438 10 1 0 1440 + 49 2.631 1.198 10 1 0 1440 + 50 1.030 -4.835 10 1 0 1440 + 51 5.242 -2.836 10 1 0 1440 + 52 -4.376 -3.934 10 1 0 1440 + 53 4.932 1.139 10 1 0 1440 + 54 4.559 0.435 10 1 0 1440 + 55 -2.599 -1.581 10 1 0 1440 + 56 6.525 -5.963 10 1 0 1440 + 57 1.211 -3.439 10 1 0 1440 + 58 1.239 -1.625 10 1 0 1440 + 59 0.053 6.961 10 1 0 1440 + 60 -0.868 0.777 10 1 0 1440 + 61 4.147 -3.502 10 1 0 1440 + 62 1.186 -3.497 10 1 0 1440 + 63 -0.131 -5.806 10 1 0 1440 + 64 0.602 -3.102 10 1 0 1440 + 65 0.179 -3.254 10 1 0 1440 + 66 2.927 -0.649 10 1 0 1440 + 67 2.395 1.074 10 1 0 1440 + 68 -6.589 4.091 10 1 0 1440 + 69 -1.010 2.626 10 1 0 1440 + 70 5.809 6.735 10 1 0 1440 + 71 9.002 0.948 10 1 0 1440 + 72 -0.662 1.522 10 1 0 1440 + 73 -0.287 -4.284 10 1 423 451 + 74 -3.771 -0.731 10 1 129 148 + 75 4.417 -1.122 10 1 436 462 + 76 -5.870 -0.281 10 1 334 355 + 77 -0.391 1.007 10 1 461 489 + 78 -4.137 -0.150 10 1 133 161 + 79 5.818 2.756 10 1 267 291 + 80 -6.386 2.615 10 1 433 454 + 81 -5.679 -1.592 10 1 182 208 + 82 2.222 -2.751 10 1 72 101 + 83 -0.103 -1.484 10 1 98 132 + 84 -5.770 -1.048 10 1 378 403 + 85 8.085 0.630 10 1 458 495 + 86 0.289 1.082 10 1 111 140 + 87 -3.739 -0.780 10 1 221 264 + 88 -3.360 -2.674 10 1 225 247 + 89 9.520 2.423 10 1 228 259 + 90 -1.390 2.933 10 1 227 250 + 91 -5.346 0.930 10 1 454 470 + 92 6.758 1.301 10 1 281 322 + 93 -8.388 -5.327 10 1 273 309 + 94 3.026 -7.243 10 1 200 215 + 95 -2.233 -2.054 10 1 74 95 + 96 0.374 -3.546 10 1 145 169 + 97 -2.009 -4.398 10 1 310 331 + 98 -4.769 -2.110 10 1 403 438 + 99 -2.045 -1.385 10 1 424 456 +100 3.452 0.397 10 1 81 120 +101 2.051 -1.188 10 1 203 223 +102 -4.604 -2.256 10 1 180 216 +103 -3.963 2.538 10 1 115 150 +104 -0.102 5.043 10 1 470 500 +105 -2.863 2.349 10 1 161 187 +106 -5.300 -1.625 10 1 408 428 +107 -0.335 -2.295 10 1 239 264 +108 -6.264 -2.635 10 1 92 135 +109 2.540 0.053 10 1 84 111 +110 -2.990 7.292 10 1 453 470 +111 2.663 0.197 10 1 326 345 +112 -0.981 3.500 10 1 235 256 +113 -0.776 -4.243 10 1 216 238 +114 2.892 -0.712 10 1 445 467 +115 4.769 3.611 10 1 400 444 +116 -5.317 0.521 10 1 84 103 +117 1.756 1.321 10 1 121 146 +118 0.684 -0.250 10 1 429 452 +119 -1.732 9.726 10 1 71 111 +120 2.241 2.653 10 1 400 423 +121 -7.309 -1.325 10 1 157 191 +122 -6.500 -0.458 10 1 248 282 +123 -3.491 -4.390 10 1 478 508 +124 -9.235 -0.452 10 1 310 326 +125 0.065 -0.850 10 1 453 483 +126 0.505 -3.732 10 1 122 154 +127 -1.908 -1.418 10 1 343 375 +128 -7.170 -1.145 10 1 397 413 +129 -4.558 -2.872 10 1 397 433 +130 -2.835 -2.391 10 1 181 214 +131 -1.649 3.092 10 1 350 375 +132 -8.342 -2.093 10 1 382 422 +133 -1.205 -2.061 10 1 351 385 +134 -0.718 -6.372 10 1 108 144 +135 3.455 -0.888 10 1 272 314 +136 -0.487 7.369 10 1 475 512 +137 -3.601 -0.388 10 1 297 325 +138 -2.840 -2.182 10 1 227 258 +139 -5.628 -1.511 10 1 464 508 +140 -1.102 4.215 10 1 320 362 +141 -6.309 -6.257 10 1 281 319 +142 2.949 7.994 10 1 258 279 +143 -6.567 -0.024 10 1 201 224 +144 4.613 -2.042 10 1 165 184 +145 0.158 -1.636 10 -1 478 509 +146 4.028 -0.138 10 -1 376 411 +147 -1.527 4.225 10 -1 433 463 +148 3.322 -1.661 10 -1 281 313 +149 -7.239 1.307 10 -1 130 164 +150 -2.449 0.527 10 -1 188 223 +151 -0.660 -3.096 10 -1 298 321 +152 3.129 2.133 10 -1 233 252 +153 2.056 0.038 10 -1 368 407 +154 -6.720 -4.134 10 -1 352 387 +155 2.217 -4.037 10 -1 399 423 +156 3.116 0.222 10 -1 311 336 +157 7.463 3.022 10 -1 95 112 +158 6.070 8.112 10 -1 285 312 +159 -6.074 2.413 10 -1 205 243 +160 0.198 1.752 10 -1 295 320 +161 -8.057 -3.820 10 -1 197 221 +162 -4.993 -3.671 10 -1 72 93 +163 -6.045 -2.782 10 -1 409 440 +164 -7.875 -4.423 10 -1 396 411 +165 5.426 -0.926 10 -1 143 161 +166 -4.206 -2.664 10 -1 343 380 +167 -5.734 -1.672 10 -1 228 245 +168 -0.128 -1.333 10 -1 438 457 +169 -2.416 3.920 10 -1 438 470 +170 1.791 -4.044 10 -1 410 446 +171 5.983 -0.367 10 -1 443 470 +172 -0.351 0.626 10 -1 78 122 +173 4.017 0.859 10 -1 270 302 +174 -0.169 -5.438 10 -1 236 276 +175 -3.603 -1.707 10 -1 214 258 +176 0.728 -0.414 10 -1 140 175 +177 3.022 -0.683 10 -1 183 204 +178 -2.638 -6.306 10 -1 442 460 +179 2.877 -0.003 10 -1 387 423 +180 0.263 0.507 10 -1 113 157 +181 0.360 -2.160 10 -1 403 442 +182 -6.495 -1.096 10 -1 372 393 +183 1.867 -4.101 10 -1 435 469 +184 2.929 1.280 10 -1 209 247 +185 0.453 2.665 10 -1 161 181 +186 2.536 2.972 10 -1 272 291 +187 5.735 -1.540 10 -1 321 352 +188 -1.157 -1.901 10 -1 124 142 +189 -4.544 -7.181 10 -1 114 146 +190 0.220 -0.356 10 -1 468 497 +191 -0.185 -2.448 10 -1 292 311 +192 -5.985 -4.894 10 -1 141 181 +193 7.008 -1.782 10 -1 221 239 +194 -0.493 2.875 10 -1 468 487 +195 -4.662 -2.353 10 -1 403 420 +196 -4.987 -3.534 10 -1 119 153 +197 -6.750 0.814 10 -1 439 480 +198 3.119 -1.824 10 -1 420 458 +199 -4.214 -5.270 10 -1 283 304 +200 -1.509 1.893 10 -1 308 346 +201 -7.862 -2.434 10 -1 229 246 +202 5.147 -0.961 10 -1 449 464 +203 2.999 -3.106 10 -1 331 348 +204 4.674 0.145 10 -1 122 160 +205 -5.295 3.174 10 -1 334 352 +206 1.054 -6.143 10 -1 175 196 +207 -1.595 -5.601 10 -1 179 208 +208 -0.778 -5.473 10 -1 81 116 +209 1.105 -2.091 10 -1 301 316 +210 -2.436 -2.305 10 -1 409 435 +211 0.295 -2.040 10 -1 111 155 +212 -8.265 2.432 10 -1 72 87 +213 -1.213 4.207 10 -1 421 462 +214 -9.803 -3.636 10 -1 405 431 +215 -6.110 -1.348 10 -1 102 129 +216 -3.914 0.629 10 -1 192 234 +217 4.118 0.797 10 -1 0 1440 +218 0.425 1.983 10 -1 0 1440 +219 -3.414 -3.792 10 -1 0 1440 +220 -0.456 2.357 10 -1 0 1440 +221 3.789 -0.195 10 -1 0 1440 +222 7.826 1.594 10 -1 0 1440 +223 -0.866 -2.511 10 -1 0 1440 +224 1.007 3.716 10 -1 0 1440 +225 -4.262 -4.699 10 -1 0 1440 +226 9.216 -9.418 10 -1 0 1440 +227 3.220 -3.984 10 -1 0 1440 +228 -5.523 -1.503 10 -1 0 1440 +229 -2.675 -2.149 10 -1 0 1440 +230 -7.551 -0.071 10 -1 0 1440 +231 3.402 1.266 10 -1 0 1440 +232 -0.264 -2.083 10 -1 0 1440 +233 5.337 1.377 10 -1 0 1440 +234 -1.495 -4.026 10 -1 0 1440 +235 6.783 0.575 10 -1 0 1440 +236 -1.322 -2.603 10 -1 0 1440 +237 0.417 -3.262 10 -1 0 1440 +238 -2.605 -3.331 10 -1 0 1440 +239 3.196 -4.570 10 -1 0 1440 +240 9.682 2.621 10 -1 0 1440 +241 -4.470 -3.785 10 -1 0 1440 +242 3.342 1.179 10 -1 0 1440 +243 -3.519 1.923 10 -1 0 1440 +244 -1.423 -7.499 10 -1 0 1440 +245 3.716 -0.084 10 -1 0 1440 +246 -5.170 -2.645 10 -1 0 1440 +247 2.353 0.590 10 -1 0 1440 +248 -1.843 5.371 10 -1 0 1440 +249 -1.134 -1.762 10 -1 0 1440 +250 -0.781 -3.590 10 -1 0 1440 +251 0.352 2.694 10 -1 0 1440 +252 -4.659 -2.227 10 -1 0 1440 +253 -0.300 -0.055 10 -1 0 1440 +254 3.215 1.715 10 -1 0 1440 +255 3.202 1.301 10 -1 0 1440 +256 -0.663 2.989 10 -1 0 1440 +257 7.778 -2.540 10 -1 0 1440 +258 3.071 6.570 10 -1 0 1440 +259 -4.381 -4.304 10 -1 0 1440 +260 4.956 1.683 10 -1 0 1440 +261 -2.893 -0.044 10 -1 0 1440 +262 4.036 1.638 10 -1 0 1440 +263 2.275 4.067 10 -1 0 1440 +264 -0.147 0.657 10 -1 0 1440 +265 -0.119 1.686 10 -1 0 1440 +266 0.803 4.182 10 -1 0 1440 +267 -4.402 -2.278 10 -1 0 1440 +268 1.237 -1.135 10 -1 0 1440 +269 3.328 1.588 10 -1 0 1440 +270 -3.479 -1.504 10 -1 0 1440 +271 -9.686 -1.939 10 -1 0 1440 +272 3.843 -0.535 10 -1 0 1440 +273 -2.539 0.022 10 -1 0 1440 +274 0.085 -3.186 10 -1 0 1440 +275 -2.402 9.569 10 -1 0 1440 +276 -0.427 3.547 10 -1 0 1440 +277 -0.693 0.185 10 -1 0 1440 +278 -7.095 -0.322 10 -1 0 1440 +279 -3.265 -1.652 10 -1 0 1440 +280 4.286 -2.168 10 -1 0 1440 +281 0.518 0.640 10 -1 0 1440 +282 3.692 -0.499 10 -1 0 1440 +283 4.959 2.778 10 -1 0 1440 +284 4.504 1.079 10 -1 0 1440 +285 0.769 1.406 10 -1 0 1440 +286 -6.091 1.864 10 -1 0 1440 +287 -6.450 0.892 10 -1 0 1440 +288 3.716 -1.499 10 -1 0 1440 diff --git a/instances/pr07.txt b/instances/pr07.txt new file mode 100644 index 0000000..164b3b1 --- /dev/null +++ b/instances/pr07.txt @@ -0,0 +1,74 @@ +4 72 480 6 90 + 0 1.063 0.933 0 0 0 1440 + 1 -9.270 -5.918 10 1 0 1440 + 2 7.118 1.254 10 1 0 1440 + 3 3.154 6.664 10 1 0 1440 + 4 -0.469 2.554 10 1 0 1440 + 5 -3.019 6.777 10 1 0 1440 + 6 1.268 -5.747 10 1 0 1440 + 7 -3.235 -2.097 10 1 0 1440 + 8 1.991 4.897 10 1 0 1440 + 9 1.320 -1.914 10 1 0 1440 + 10 5.488 -4.117 10 1 0 1440 + 11 1.506 -2.517 10 1 0 1440 + 12 -5.060 -1.642 10 1 0 1440 + 13 -2.973 1.708 10 1 0 1440 + 14 1.754 0.158 10 1 0 1440 + 15 1.113 7.722 10 1 0 1440 + 16 3.375 7.126 10 1 0 1440 + 17 -5.601 -1.039 10 1 0 1440 + 18 5.787 -1.629 10 1 0 1440 + 19 1.072 -1.879 10 1 200 227 + 20 5.309 -1.875 10 1 248 269 + 21 0.157 0.753 10 1 108 124 + 22 3.153 4.894 10 1 249 279 + 23 -6.683 -3.785 10 1 261 304 + 24 -7.074 6.224 10 1 161 182 + 25 3.254 2.310 10 1 225 254 + 26 -5.145 -3.644 10 1 464 488 + 27 3.646 -2.264 10 1 131 149 + 28 -3.121 4.349 10 1 121 144 + 29 -1.039 3.449 10 1 223 256 + 30 1.472 -1.083 10 1 283 321 + 31 4.710 -2.139 10 1 425 467 + 32 4.378 3.477 10 1 116 138 + 33 5.355 -6.749 10 1 361 385 + 34 2.680 4.652 10 1 454 470 + 35 6.338 1.198 10 1 365 391 + 36 4.719 -0.547 10 1 179 219 + 37 -1.632 -1.127 10 -1 249 286 + 38 7.890 1.765 10 -1 208 250 + 39 7.982 2.227 10 -1 353 385 + 40 1.288 1.692 10 -1 127 144 + 41 -6.798 -0.375 10 -1 98 116 + 42 0.920 -1.860 10 -1 227 249 + 43 -3.595 -1.914 10 -1 166 197 + 44 2.877 4.528 10 -1 283 317 + 45 1.147 6.823 10 -1 124 140 + 46 -2.276 4.550 10 -1 236 251 + 47 -6.567 -2.312 10 -1 474 505 + 48 0.724 0.160 10 -1 174 210 + 49 -2.978 -1.129 10 -1 420 441 + 50 -8.905 1.621 10 -1 378 410 + 51 -4.689 -0.336 10 -1 312 328 + 52 -1.497 3.062 10 -1 240 256 + 53 -1.704 4.977 10 -1 387 425 + 54 3.163 5.362 10 -1 357 400 + 55 -0.358 1.334 10 -1 0 1440 + 56 3.301 5.896 10 -1 0 1440 + 57 -9.295 6.326 10 -1 0 1440 + 58 -0.914 -2.293 10 -1 0 1440 + 59 -3.996 0.620 10 -1 0 1440 + 60 2.843 -1.921 10 -1 0 1440 + 61 -2.854 -0.348 10 -1 0 1440 + 62 3.141 3.686 10 -1 0 1440 + 63 -4.943 6.060 10 -1 0 1440 + 64 -7.283 -2.776 10 -1 0 1440 + 65 6.008 -4.591 10 -1 0 1440 + 66 1.087 -0.390 10 -1 0 1440 + 67 2.512 0.767 10 -1 0 1440 + 68 -4.700 -1.747 10 -1 0 1440 + 69 1.606 3.302 10 -1 0 1440 + 70 2.541 -1.170 10 -1 0 1440 + 71 6.832 -0.514 10 -1 0 1440 + 72 -1.310 6.216 10 -1 0 1440 diff --git a/instances/pr08.txt b/instances/pr08.txt new file mode 100644 index 0000000..08c04fb --- /dev/null +++ b/instances/pr08.txt @@ -0,0 +1,146 @@ +6 144 480 6 90 + 0 -1.217 -0.009 0 0 0 1440 + 1 -4.029 -4.230 10 1 0 1440 + 2 -6.471 -1.739 10 1 0 1440 + 3 0.506 -1.435 10 1 0 1440 + 4 7.210 2.023 10 1 0 1440 + 5 0.259 -1.500 10 1 0 1440 + 6 -2.418 -7.289 10 1 0 1440 + 7 -1.319 6.650 10 1 0 1440 + 8 3.319 1.369 10 1 0 1440 + 9 6.683 -3.055 10 1 0 1440 + 10 1.993 3.588 10 1 0 1440 + 11 -2.777 3.227 10 1 0 1440 + 12 5.115 -1.683 10 1 0 1440 + 13 -1.921 2.375 10 1 0 1440 + 14 -4.664 -5.295 10 1 0 1440 + 15 -1.059 -1.663 10 1 0 1440 + 16 3.515 1.262 10 1 0 1440 + 17 -3.738 1.226 10 1 0 1440 + 18 8.279 2.584 10 1 0 1440 + 19 0.894 -0.372 10 1 0 1440 + 20 -5.666 2.555 10 1 0 1440 + 21 -5.202 -4.014 10 1 0 1440 + 22 3.927 1.279 10 1 0 1440 + 23 1.976 2.123 10 1 0 1440 + 24 -2.307 -1.266 10 1 0 1440 + 25 1.569 5.237 10 1 0 1440 + 26 5.877 -0.706 10 1 0 1440 + 27 -3.309 7.227 10 1 0 1440 + 28 0.255 4.685 10 1 0 1440 + 29 -1.872 7.313 10 1 0 1440 + 30 -6.763 -2.068 10 1 0 1440 + 31 -7.686 -1.137 10 1 0 1440 + 32 -2.419 -3.826 10 1 0 1440 + 33 -2.037 -3.190 10 1 0 1440 + 34 0.929 3.962 10 1 0 1440 + 35 2.604 3.597 10 1 0 1440 + 36 -5.739 -4.526 10 1 0 1440 + 37 0.149 -6.259 10 1 479 496 + 38 3.494 1.367 10 1 211 226 + 39 -2.229 4.565 10 1 134 176 + 40 -0.592 4.406 10 1 454 479 + 41 -3.845 -2.354 10 1 167 209 + 42 2.889 3.394 10 1 330 349 + 43 -3.539 -0.534 10 1 374 396 + 44 -1.950 1.352 10 1 193 208 + 45 -0.922 -3.099 10 1 421 452 + 46 -2.213 -1.707 10 1 184 204 + 47 -2.283 3.681 10 1 216 255 + 48 -6.136 -1.846 10 1 318 336 + 49 5.013 -6.605 10 1 314 339 + 50 2.565 2.414 10 1 111 147 + 51 6.552 4.281 10 1 356 379 + 52 -6.096 -4.792 10 1 75 111 + 53 -0.907 4.280 10 1 210 236 + 54 -1.906 0.448 10 1 357 388 + 55 -5.407 -0.387 10 1 186 220 + 56 -2.560 -1.887 10 1 435 466 + 57 -1.871 8.430 10 1 290 321 + 58 -7.018 -3.917 10 1 352 375 + 59 -1.464 -0.045 10 1 385 400 + 60 -7.647 -3.892 10 1 199 233 + 61 4.409 1.243 10 1 295 328 + 62 -2.277 -5.087 10 1 400 442 + 63 1.910 4.467 10 1 244 271 + 64 -4.402 -3.994 10 1 82 98 + 65 -0.297 -0.406 10 1 383 403 + 66 -2.426 3.591 10 1 387 416 + 67 -6.188 -7.390 10 1 252 291 + 68 -0.564 -2.672 10 1 136 175 + 69 4.584 -3.683 10 1 150 191 + 70 -5.175 -7.984 10 1 207 237 + 71 -3.301 1.099 10 1 285 307 + 72 -2.565 -0.037 10 1 90 107 + 73 -2.150 6.149 10 -1 389 427 + 74 0.203 2.673 10 -1 221 252 + 75 -2.676 1.481 10 -1 388 424 + 76 -3.726 -4.486 10 -1 140 165 + 77 -0.086 -1.642 10 -1 204 219 + 78 -5.116 3.497 10 -1 175 213 + 79 -4.127 -7.689 10 -1 240 264 + 80 -3.026 7.470 10 -1 408 429 + 81 -4.637 -0.151 10 -1 271 304 + 82 -7.162 7.308 10 -1 345 388 + 83 -4.661 -3.995 10 -1 238 278 + 84 -3.024 6.710 10 -1 386 420 + 85 -4.100 -4.304 10 -1 375 393 + 86 -7.429 -5.231 10 -1 125 148 + 87 -1.761 -7.185 10 -1 216 237 + 88 0.235 -8.181 10 -1 216 235 + 89 -8.549 -5.406 10 -1 479 516 + 90 2.382 1.057 10 -1 360 398 + 91 -2.453 -3.173 10 -1 259 301 + 92 -4.247 -1.501 10 -1 111 150 + 93 -3.362 5.033 10 -1 443 469 + 94 -8.146 -4.156 10 -1 313 338 + 95 -7.350 -4.828 10 -1 364 392 + 96 -0.305 7.090 10 -1 288 309 + 97 0.095 2.546 10 -1 77 98 + 98 -5.414 1.353 10 -1 140 168 + 99 -3.063 0.753 10 -1 94 138 +100 -6.833 -3.428 10 -1 104 143 +101 0.718 5.793 10 -1 100 122 +102 0.471 4.867 10 -1 110 139 +103 5.809 2.638 10 -1 266 295 +104 1.835 3.478 10 -1 322 351 +105 -4.463 -6.197 10 -1 165 190 +106 0.523 2.607 10 -1 173 209 +107 -4.806 -3.676 10 -1 164 190 +108 -0.359 -2.773 10 -1 170 192 +109 0.981 3.690 10 -1 0 1440 +110 5.946 0.123 10 -1 0 1440 +111 -4.752 1.987 10 -1 0 1440 +112 -4.843 -5.032 10 -1 0 1440 +113 4.467 2.095 10 -1 0 1440 +114 -1.923 3.277 10 -1 0 1440 +115 -1.566 1.746 10 -1 0 1440 +116 -9.167 7.772 10 -1 0 1440 +117 -3.003 -7.828 10 -1 0 1440 +118 7.366 3.294 10 -1 0 1440 +119 2.240 -6.008 10 -1 0 1440 +120 6.121 -1.350 10 -1 0 1440 +121 2.213 -5.001 10 -1 0 1440 +122 -0.632 5.667 10 -1 0 1440 +123 -2.047 1.288 10 -1 0 1440 +124 -6.108 -4.477 10 -1 0 1440 +125 -0.958 -1.937 10 -1 0 1440 +126 0.563 -8.850 10 -1 0 1440 +127 -0.262 2.213 10 -1 0 1440 +128 4.050 3.234 10 -1 0 1440 +129 -0.330 3.677 10 -1 0 1440 +130 -5.099 1.978 10 -1 0 1440 +131 -7.052 -0.381 10 -1 0 1440 +132 0.420 0.081 10 -1 0 1440 +133 0.996 2.634 10 -1 0 1440 +134 1.354 -2.131 10 -1 0 1440 +135 -2.187 -1.877 10 -1 0 1440 +136 -3.716 -3.077 10 -1 0 1440 +137 -8.697 1.034 10 -1 0 1440 +138 -4.727 -4.633 10 -1 0 1440 +139 0.409 -1.935 10 -1 0 1440 +140 0.420 3.029 10 -1 0 1440 +141 -4.202 5.399 10 -1 0 1440 +142 3.510 -1.089 10 -1 0 1440 +143 6.119 -5.987 10 -1 0 1440 +144 -3.467 -0.134 10 -1 0 1440 diff --git a/instances/pr09.txt b/instances/pr09.txt new file mode 100644 index 0000000..b8cc4f3 --- /dev/null +++ b/instances/pr09.txt @@ -0,0 +1,218 @@ +8 216 480 6 90 + 0 0.387 -0.260 0 0 0 1440 + 1 -4.123 -6.636 10 1 0 1440 + 2 3.406 -5.936 10 1 0 1440 + 3 2.092 -5.258 10 1 0 1440 + 4 -3.854 -3.740 10 1 0 1440 + 5 4.106 2.293 10 1 0 1440 + 6 -5.403 -5.313 10 1 0 1440 + 7 0.810 8.072 10 1 0 1440 + 8 8.130 1.341 10 1 0 1440 + 9 1.446 -0.297 10 1 0 1440 + 10 -5.254 6.011 10 1 0 1440 + 11 -5.720 -3.423 10 1 0 1440 + 12 -6.555 -4.022 10 1 0 1440 + 13 -1.975 -1.028 10 1 0 1440 + 14 -2.696 -8.701 10 1 0 1440 + 15 0.319 -8.865 10 1 0 1440 + 16 3.452 3.284 10 1 0 1440 + 17 8.003 0.527 10 1 0 1440 + 18 -3.984 -6.773 10 1 0 1440 + 19 1.460 1.137 10 1 0 1440 + 20 -2.099 -8.051 10 1 0 1440 + 21 4.824 4.728 10 1 0 1440 + 22 5.934 -3.186 10 1 0 1440 + 23 -1.399 -4.562 10 1 0 1440 + 24 3.240 -3.253 10 1 0 1440 + 25 0.283 5.082 10 1 0 1440 + 26 -6.608 -3.469 10 1 0 1440 + 27 -1.366 1.864 10 1 0 1440 + 28 -5.934 1.277 10 1 0 1440 + 29 -0.513 -1.846 10 1 0 1440 + 30 -2.296 -2.173 10 1 0 1440 + 31 5.813 4.661 10 1 0 1440 + 32 -4.960 -7.662 10 1 0 1440 + 33 -0.480 4.304 10 1 0 1440 + 34 6.862 -1.962 10 1 0 1440 + 35 3.792 6.360 10 1 0 1440 + 36 0.125 -2.655 10 1 0 1440 + 37 -3.795 0.169 10 1 0 1440 + 38 -4.050 0.804 10 1 0 1440 + 39 -0.839 -3.868 10 1 0 1440 + 40 -3.673 2.549 10 1 0 1440 + 41 -4.775 -5.007 10 1 0 1440 + 42 2.260 -2.836 10 1 0 1440 + 43 -3.637 -4.816 10 1 0 1440 + 44 7.545 -1.342 10 1 0 1440 + 45 -6.452 -1.323 10 1 0 1440 + 46 0.126 2.916 10 1 0 1440 + 47 -0.157 -3.597 10 1 0 1440 + 48 4.675 0.670 10 1 0 1440 + 49 8.208 2.706 10 1 0 1440 + 50 7.469 1.937 10 1 0 1440 + 51 4.702 0.934 10 1 0 1440 + 52 -6.204 -2.133 10 1 0 1440 + 53 0.919 2.004 10 1 0 1440 + 54 -0.309 2.158 10 1 0 1440 + 55 -7.545 1.309 10 1 186 220 + 56 1.003 -6.374 10 1 435 466 + 57 7.181 2.650 10 1 290 321 + 58 1.884 -3.802 10 1 352 375 + 59 -1.054 -3.131 10 1 385 400 + 60 0.825 -9.115 10 1 199 233 + 61 7.282 -3.892 10 1 295 328 + 62 -3.016 3.878 10 1 400 442 + 63 -5.626 -0.555 10 1 244 271 + 64 -0.840 -3.760 10 1 82 98 + 65 1.502 1.371 10 1 383 403 + 66 -6.020 2.429 10 1 387 416 + 67 -1.379 -2.711 10 1 252 291 + 68 -3.480 -2.220 10 1 136 175 + 69 6.964 8.306 10 1 150 191 + 70 -4.444 3.009 10 1 207 237 + 71 4.863 0.302 10 1 285 307 + 72 -1.531 5.171 10 1 90 107 + 73 3.626 2.678 10 1 389 427 + 74 5.996 2.431 10 1 221 252 + 75 5.530 0.663 10 1 388 424 + 76 3.996 4.830 10 1 140 165 + 77 -4.889 -7.110 10 1 204 219 + 78 -0.234 -6.291 10 1 175 213 + 79 0.949 -4.190 10 1 240 264 + 80 -5.467 -1.844 10 1 408 429 + 81 1.098 -0.761 10 1 271 304 + 82 -6.982 -5.035 10 1 345 388 + 83 -4.031 -0.745 10 1 238 278 + 84 6.224 4.363 10 1 386 420 + 85 2.908 6.312 10 1 375 393 + 86 -1.207 -2.151 10 1 125 148 + 87 1.473 2.891 10 1 216 237 + 88 -6.309 -6.011 10 1 216 235 + 89 3.365 -0.093 10 1 479 516 + 90 -1.222 1.415 10 1 360 398 + 91 -8.997 5.151 10 1 259 301 + 92 -0.076 4.134 10 1 111 150 + 93 8.069 3.298 10 1 443 469 + 94 -5.339 -1.424 10 1 313 338 + 95 -5.328 -6.414 10 1 364 392 + 96 7.326 1.067 10 1 288 309 + 97 5.961 1.345 10 1 77 98 + 98 -3.701 0.648 10 1 140 168 + 99 -5.366 2.169 10 1 94 138 +100 -3.689 1.837 10 1 104 143 +101 -0.461 -1.381 10 1 100 122 +102 5.380 3.699 10 1 110 139 +103 4.847 -6.604 10 1 266 295 +104 -4.639 -2.093 10 1 322 351 +105 -1.504 -4.085 10 1 165 190 +106 -7.362 -0.955 10 1 173 209 +107 9.285 4.559 10 1 164 190 +108 3.356 2.806 10 1 289 308 +109 4.732 2.441 10 -1 391 410 +110 -0.661 -3.016 10 -1 272 302 +111 1.210 2.384 10 -1 305 321 +112 -6.196 2.624 10 -1 372 405 +113 2.388 0.981 10 -1 174 217 +114 4.978 0.687 10 -1 98 123 +115 -5.302 -2.148 10 -1 440 460 +116 5.496 0.298 10 -1 138 153 +117 0.487 -6.959 10 -1 253 277 +118 3.395 4.521 10 -1 257 300 +119 -3.217 -2.362 10 -1 396 413 +120 -1.755 -4.676 10 -1 246 262 +121 3.174 3.397 10 -1 244 280 +122 4.537 2.213 10 -1 387 422 +123 -0.522 -2.311 10 -1 104 128 +124 -5.106 -4.655 10 -1 417 458 +125 1.177 1.113 10 -1 260 285 +126 -3.976 -1.302 10 -1 232 248 +127 2.793 2.932 10 -1 229 248 +128 3.374 6.659 10 -1 349 384 +129 -9.181 2.986 10 -1 98 136 +130 -2.463 -6.870 10 -1 72 116 +131 4.466 2.046 10 -1 471 492 +132 4.545 -2.107 10 -1 479 507 +133 -3.737 -1.210 10 -1 280 309 +134 4.200 0.015 10 -1 225 249 +135 -4.282 -3.017 10 -1 297 337 +136 3.491 -0.458 10 -1 219 234 +137 -6.514 -4.308 10 -1 292 311 +138 2.027 -0.500 10 -1 350 384 +139 -3.673 -0.893 10 -1 264 295 +140 -2.698 -1.957 10 -1 292 335 +141 -3.130 -8.381 10 -1 437 480 +142 -2.679 1.251 10 -1 71 95 +143 -3.936 -5.852 10 -1 110 146 +144 -3.437 0.061 10 -1 471 492 +145 4.337 0.419 10 -1 268 283 +146 -3.823 -0.945 10 -1 148 177 +147 -2.561 -9.924 10 -1 155 176 +148 4.806 2.952 10 -1 445 482 +149 -4.363 -3.232 10 -1 344 368 +150 -1.660 -2.933 10 -1 93 115 +151 -2.981 -1.241 10 -1 123 151 +152 -5.191 -2.871 10 -1 164 200 +153 -0.180 -1.867 10 -1 319 362 +154 1.874 2.140 10 -1 212 230 +155 6.012 0.779 10 -1 262 304 +156 4.308 4.202 10 -1 88 114 +157 -3.944 -0.590 10 -1 429 446 +158 -3.589 -1.603 10 -1 347 362 +159 -4.183 3.899 10 -1 400 434 +160 8.450 2.982 10 -1 150 174 +161 -1.756 -1.048 10 -1 342 369 +162 -4.838 -4.892 10 -1 329 355 +163 -4.934 -1.797 10 -1 0 1440 +164 1.609 -0.249 10 -1 0 1440 +165 6.553 1.403 10 -1 0 1440 +166 -0.293 1.322 10 -1 0 1440 +167 -1.877 -2.366 10 -1 0 1440 +168 -9.110 -8.074 10 -1 0 1440 +169 -2.109 -1.329 10 -1 0 1440 +170 4.699 1.722 10 -1 0 1440 +171 -6.196 -3.304 10 -1 0 1440 +172 -0.900 -2.545 10 -1 0 1440 +173 3.366 -0.767 10 -1 0 1440 +174 -2.559 -1.084 10 -1 0 1440 +175 3.656 -0.244 10 -1 0 1440 +176 0.714 2.482 10 -1 0 1440 +177 -4.317 -3.049 10 -1 0 1440 +178 -2.123 0.075 10 -1 0 1440 +179 1.970 1.077 10 -1 0 1440 +180 -0.649 -2.942 10 -1 0 1440 +181 5.439 0.863 10 -1 0 1440 +182 6.420 7.761 10 -1 0 1440 +183 4.038 0.161 10 -1 0 1440 +184 -4.171 -0.513 10 -1 0 1440 +185 7.427 -1.992 10 -1 0 1440 +186 -7.400 -5.463 10 -1 0 1440 +187 2.971 1.545 10 -1 0 1440 +188 2.378 1.218 10 -1 0 1440 +189 4.258 4.533 10 -1 0 1440 +190 -1.673 -1.656 10 -1 0 1440 +191 -1.470 -0.012 10 -1 0 1440 +192 -1.977 0.839 10 -1 0 1440 +193 -3.027 1.489 10 -1 0 1440 +194 -6.312 -6.746 10 -1 0 1440 +195 8.603 3.892 10 -1 0 1440 +196 7.948 -2.487 10 -1 0 1440 +197 3.514 1.473 10 -1 0 1440 +198 -4.937 -0.905 10 -1 0 1440 +199 -4.947 -1.758 10 -1 0 1440 +200 5.750 1.633 10 -1 0 1440 +201 5.489 1.202 10 -1 0 1440 +202 -5.303 -3.318 10 -1 0 1440 +203 -0.041 1.664 10 -1 0 1440 +204 2.159 1.614 10 -1 0 1440 +205 -4.692 -4.926 10 -1 0 1440 +206 1.846 1.973 10 -1 0 1440 +207 3.582 1.976 10 -1 0 1440 +208 7.187 2.903 10 -1 0 1440 +209 -5.638 -4.276 10 -1 0 1440 +210 -2.580 2.516 10 -1 0 1440 +211 -0.568 3.385 10 -1 0 1440 +212 5.404 -0.529 10 -1 0 1440 +213 -6.307 2.738 10 -1 0 1440 +214 -1.686 -4.977 10 -1 0 1440 +215 4.792 1.363 10 -1 0 1440 +216 -1.072 -0.208 10 -1 0 1440 diff --git a/instances/pr10.txt b/instances/pr10.txt new file mode 100644 index 0000000..3410abc --- /dev/null +++ b/instances/pr10.txt @@ -0,0 +1,290 @@ +10 288 480 6 90 + 0 -1.437 -2.034 0 0 0 1440 + 1 1.280 0.189 10 1 0 1440 + 2 1.821 0.137 10 1 0 1440 + 3 5.795 -4.878 10 1 0 1440 + 4 -5.243 -8.409 10 1 0 1440 + 5 6.080 -3.259 10 1 0 1440 + 6 2.315 0.420 10 1 0 1440 + 7 2.538 2.299 10 1 0 1440 + 8 2.551 -5.298 10 1 0 1440 + 9 -4.926 -4.172 10 1 0 1440 + 10 -3.756 -4.173 10 1 0 1440 + 11 -1.452 4.896 10 1 0 1440 + 12 4.123 -2.450 10 1 0 1440 + 13 -2.186 0.092 10 1 0 1440 + 14 -4.818 -1.628 10 1 0 1440 + 15 -0.778 4.435 10 1 0 1440 + 16 2.080 1.076 10 1 0 1440 + 17 -2.971 -4.633 10 1 0 1440 + 18 -2.020 -5.956 10 1 0 1440 + 19 -8.708 -5.290 10 1 0 1440 + 20 0.305 -0.630 10 1 0 1440 + 21 1.187 0.526 10 1 0 1440 + 22 -2.407 -5.593 10 1 0 1440 + 23 -2.280 0.566 10 1 0 1440 + 24 -5.190 0.941 10 1 0 1440 + 25 1.273 -4.097 10 1 0 1440 + 26 -3.099 0.765 10 1 0 1440 + 27 3.751 0.046 10 1 0 1440 + 28 0.295 -0.856 10 1 0 1440 + 29 0.055 0.364 10 1 0 1440 + 30 -5.248 0.971 10 1 0 1440 + 31 3.394 -4.872 10 1 0 1440 + 32 -1.313 -5.360 10 1 0 1440 + 33 -9.959 2.330 10 1 0 1440 + 34 0.644 -0.352 10 1 0 1440 + 35 -1.403 -1.982 10 1 0 1440 + 36 -2.468 1.661 10 1 0 1440 + 37 -1.026 -8.177 10 1 0 1440 + 38 3.586 0.560 10 1 0 1440 + 39 -1.160 4.291 10 1 0 1440 + 40 -3.466 -1.547 10 1 0 1440 + 41 6.685 0.114 10 1 0 1440 + 42 0.687 -0.142 10 1 0 1440 + 43 0.166 -0.223 10 1 0 1440 + 44 3.756 1.145 10 1 0 1440 + 45 5.167 -2.634 10 1 0 1440 + 46 1.902 -1.089 10 1 0 1440 + 47 -3.798 -0.636 10 1 0 1440 + 48 -5.654 -4.233 10 1 0 1440 + 49 0.110 -1.462 10 1 0 1440 + 50 -5.624 -0.308 10 1 0 1440 + 51 -2.367 -1.529 10 1 0 1440 + 52 -3.428 -0.141 10 1 0 1440 + 53 -6.418 6.381 10 1 0 1440 + 54 -4.708 -2.039 10 1 0 1440 + 55 -3.371 0.838 10 1 0 1440 + 56 3.429 2.603 10 1 0 1440 + 57 -3.886 4.211 10 1 0 1440 + 58 -9.273 4.489 10 1 0 1440 + 59 2.363 2.764 10 1 0 1440 + 60 -6.714 -6.708 10 1 0 1440 + 61 2.573 -2.584 10 1 0 1440 + 62 -4.098 -1.690 10 1 0 1440 + 63 7.701 -0.610 10 1 0 1440 + 64 -5.481 -0.194 10 1 0 1440 + 65 -5.394 -2.966 10 1 0 1440 + 66 1.609 -2.789 10 1 0 1440 + 67 -5.944 3.649 10 1 0 1440 + 68 3.447 2.539 10 1 0 1440 + 69 -0.928 -0.669 10 1 0 1440 + 70 -8.556 -2.048 10 1 0 1440 + 71 2.952 1.835 10 1 0 1440 + 72 2.781 0.651 10 1 0 1440 + 73 4.215 -2.558 10 1 273 301 + 74 8.220 8.583 10 1 100 130 + 75 -4.777 -3.559 10 1 461 480 + 76 2.202 -2.035 10 1 410 440 + 77 -5.576 -3.349 10 1 142 173 + 78 6.201 -0.145 10 1 61 77 + 79 2.555 -0.380 10 1 403 443 + 80 -4.337 -0.738 10 1 76 110 + 81 6.030 5.264 10 1 178 213 + 82 -9.616 3.410 10 1 250 277 + 83 -3.281 -0.385 10 1 383 418 + 84 -4.783 -4.520 10 1 154 189 + 85 -3.113 -9.385 10 1 224 258 + 86 -1.701 -2.186 10 1 291 316 + 87 -0.839 -0.226 10 1 217 247 + 88 3.583 1.315 10 1 179 220 + 89 2.932 5.447 10 1 455 481 + 90 4.835 -0.878 10 1 228 269 + 91 -0.293 2.704 10 1 288 310 + 92 -1.662 -5.539 10 1 239 276 + 93 -4.085 -4.774 10 1 390 417 + 94 -1.288 -0.204 10 1 389 422 + 95 -5.178 0.728 10 1 180 219 + 96 -3.292 2.383 10 1 165 197 + 97 1.398 -3.452 10 1 272 308 + 98 -3.583 -2.383 10 1 479 502 + 99 9.186 0.554 10 1 222 243 +100 -2.844 -3.418 10 1 456 494 +101 3.384 2.788 10 1 424 453 +102 9.843 3.135 10 1 110 132 +103 -5.775 -2.775 10 1 60 87 +104 -4.389 1.301 10 1 112 155 +105 3.759 4.977 10 1 389 419 +106 -0.369 0.737 10 1 411 435 +107 -9.824 6.166 10 1 380 402 +108 -2.356 -3.252 10 1 89 120 +109 2.298 -1.811 10 1 353 393 +110 4.391 -0.298 10 1 124 168 +111 7.151 1.165 10 1 345 372 +112 -4.301 -3.870 10 1 292 312 +113 -8.395 0.218 10 1 104 135 +114 1.109 -4.094 10 1 254 283 +115 2.717 -1.333 10 1 385 412 +116 -8.610 -5.981 10 1 174 208 +117 -2.234 -7.828 10 1 438 464 +118 -3.873 -3.359 10 1 432 474 +119 -0.123 -2.867 10 1 394 409 +120 8.133 -4.424 10 1 414 446 +121 5.190 1.989 10 1 286 321 +122 -3.497 -2.786 10 1 442 466 +123 -5.148 -2.325 10 1 458 502 +124 -0.065 -4.606 10 1 416 450 +125 6.822 -6.699 10 1 411 426 +126 -1.515 -2.548 10 1 325 355 +127 2.241 -3.438 10 1 230 250 +128 3.618 -1.043 10 1 355 385 +129 -2.364 -4.768 10 1 369 388 +130 -1.472 3.268 10 1 62 92 +131 1.682 -1.272 10 1 299 322 +132 9.338 2.300 10 1 124 153 +133 4.034 -2.418 10 1 342 358 +134 0.553 -0.490 10 1 217 246 +135 -7.801 0.127 10 1 82 103 +136 5.157 -4.567 10 1 81 113 +137 4.925 -3.090 10 1 439 482 +138 -6.220 -2.140 10 1 435 475 +139 -0.505 0.731 10 1 455 492 +140 0.173 -7.022 10 1 269 307 +141 0.136 -0.356 10 1 373 391 +142 -1.552 1.643 10 1 184 203 +143 -3.160 -6.094 10 1 192 236 +144 -4.700 -5.556 10 1 339 355 +145 0.230 0.554 10 -1 128 163 +146 -3.033 -0.058 10 -1 297 334 +147 -1.682 1.766 10 -1 459 495 +148 5.266 2.903 10 -1 147 180 +149 -1.199 -8.377 10 -1 378 410 +150 4.163 4.305 10 -1 98 137 +151 0.851 -0.254 10 -1 397 416 +152 3.151 -0.898 10 -1 229 265 +153 -0.334 -3.624 10 -1 103 126 +154 -2.638 1.378 10 -1 294 310 +155 2.843 1.057 10 -1 77 93 +156 0.597 2.729 10 -1 406 444 +157 -3.213 -4.507 10 -1 139 157 +158 3.110 -0.792 10 -1 454 484 +159 2.820 -2.975 10 -1 110 143 +160 -3.961 -3.359 10 -1 294 317 +161 -1.922 -0.513 10 -1 176 194 +162 -1.011 6.998 10 -1 67 88 +163 2.289 -4.435 10 -1 413 434 +164 -3.474 0.058 10 -1 417 450 +165 -4.495 -7.773 10 -1 399 442 +166 -2.375 -5.601 10 -1 232 265 +167 6.907 -9.713 10 -1 96 135 +168 1.217 -5.987 10 -1 193 213 +169 4.734 1.736 10 -1 107 148 +170 -0.471 1.406 10 -1 159 178 +171 -5.237 -5.024 10 -1 452 468 +172 3.922 -2.977 10 -1 454 472 +173 -4.232 -6.060 10 -1 137 178 +174 1.914 4.115 10 -1 324 348 +175 -5.471 -1.760 10 -1 263 283 +176 1.174 -8.317 10 -1 306 343 +177 -4.058 -5.325 10 -1 189 222 +178 -0.642 2.197 10 -1 475 494 +179 -3.127 -3.461 10 -1 407 447 +180 -0.367 -2.687 10 -1 375 409 +181 1.341 -2.230 10 -1 389 408 +182 -9.589 -8.632 10 -1 163 204 +183 8.898 -5.339 10 -1 470 501 +184 -5.505 -3.254 10 -1 85 102 +185 2.785 -1.003 10 -1 246 269 +186 4.092 -3.609 10 -1 162 188 +187 -5.835 1.581 10 -1 212 232 +188 -5.216 -7.472 10 -1 271 302 +189 -6.677 -3.494 10 -1 86 104 +190 -3.337 -6.202 10 -1 417 448 +191 -0.865 3.171 10 -1 193 221 +192 -2.617 -5.615 10 -1 188 221 +193 -3.987 -5.338 10 -1 77 100 +194 7.164 -3.698 10 -1 386 427 +195 -9.692 0.841 10 -1 116 146 +196 -0.291 3.620 10 -1 272 314 +197 -5.325 1.410 10 -1 350 387 +198 6.732 -3.973 10 -1 391 426 +199 -0.653 1.198 10 -1 194 234 +200 1.643 3.322 10 -1 378 415 +201 -1.906 -5.692 10 -1 123 138 +202 2.519 -2.105 10 -1 119 149 +203 3.785 -0.552 10 -1 137 171 +204 -1.648 4.866 10 -1 86 108 +205 0.234 -1.652 10 -1 386 428 +206 -4.862 -1.239 10 -1 393 410 +207 -4.262 -5.001 10 -1 208 225 +208 1.602 1.117 10 -1 363 389 +209 -8.041 -6.058 10 -1 225 255 +210 -9.507 4.429 10 -1 172 202 +211 -0.689 2.488 10 -1 72 110 +212 -0.480 2.167 10 -1 247 283 +213 0.704 -4.534 10 -1 281 303 +214 3.129 -3.990 10 -1 223 263 +215 1.498 2.617 10 -1 97 116 +216 3.320 -5.229 10 -1 469 494 +217 -5.928 3.967 10 -1 0 1440 +218 3.005 -3.682 10 -1 0 1440 +219 0.935 -3.904 10 -1 0 1440 +220 -1.065 5.443 10 -1 0 1440 +221 2.086 -2.647 10 -1 0 1440 +222 1.962 1.786 10 -1 0 1440 +223 -3.698 -9.295 10 -1 0 1440 +224 -0.376 5.987 10 -1 0 1440 +225 1.168 -6.334 10 -1 0 1440 +226 0.447 -3.613 10 -1 0 1440 +227 4.704 -4.125 10 -1 0 1440 +228 2.994 -5.871 10 -1 0 1440 +229 -7.057 -0.704 10 -1 0 1440 +230 5.626 0.182 10 -1 0 1440 +231 4.621 -5.352 10 -1 0 1440 +232 0.637 -1.426 10 -1 0 1440 +233 -3.454 -3.950 10 -1 0 1440 +234 -5.054 2.836 10 -1 0 1440 +235 -6.144 -1.090 10 -1 0 1440 +236 -3.082 1.790 10 -1 0 1440 +237 4.966 2.447 10 -1 0 1440 +238 -6.978 -4.141 10 -1 0 1440 +239 -1.894 5.769 10 -1 0 1440 +240 -2.245 1.577 10 -1 0 1440 +241 -0.760 3.703 10 -1 0 1440 +242 2.744 1.755 10 -1 0 1440 +243 4.553 -0.513 10 -1 0 1440 +244 -3.355 -2.559 10 -1 0 1440 +245 -0.464 5.375 10 -1 0 1440 +246 -4.112 -1.336 10 -1 0 1440 +247 2.301 -4.570 10 -1 0 1440 +248 1.723 0.510 10 -1 0 1440 +249 -0.682 -1.987 10 -1 0 1440 +250 5.297 5.141 10 -1 0 1440 +251 -2.866 -5.094 10 -1 0 1440 +252 6.968 -5.152 10 -1 0 1440 +253 3.688 -1.737 10 -1 0 1440 +254 -1.966 4.204 10 -1 0 1440 +255 7.213 6.540 10 -1 0 1440 +256 -7.137 5.986 10 -1 0 1440 +257 1.832 -3.775 10 -1 0 1440 +258 1.812 0.048 10 -1 0 1440 +259 -0.111 -3.068 10 -1 0 1440 +260 -4.457 -4.405 10 -1 0 1440 +261 -2.806 -5.944 10 -1 0 1440 +262 -0.795 0.464 10 -1 0 1440 +263 -3.737 -2.853 10 -1 0 1440 +264 0.439 -3.849 10 -1 0 1440 +265 -4.459 -3.533 10 -1 0 1440 +266 -5.671 -3.925 10 -1 0 1440 +267 1.345 -3.216 10 -1 0 1440 +268 -2.034 -1.118 10 -1 0 1440 +269 0.344 -5.273 10 -1 0 1440 +270 4.058 -5.449 10 -1 0 1440 +271 3.195 -2.542 10 -1 0 1440 +272 -5.743 3.853 10 -1 0 1440 +273 4.751 -4.204 10 -1 0 1440 +274 -2.814 -4.161 10 -1 0 1440 +275 -0.226 -0.508 10 -1 0 1440 +276 -2.717 -2.794 10 -1 0 1440 +277 -2.405 -4.719 10 -1 0 1440 +278 -7.752 -5.508 10 -1 0 1440 +279 -6.204 -4.344 10 -1 0 1440 +280 -7.194 -2.016 10 -1 0 1440 +281 -6.650 -3.979 10 -1 0 1440 +282 1.459 4.844 10 -1 0 1440 +283 3.137 -2.946 10 -1 0 1440 +284 0.651 -4.612 10 -1 0 1440 +285 0.965 3.951 10 -1 0 1440 +286 1.604 1.668 10 -1 0 1440 +287 0.774 -7.538 10 -1 0 1440 +288 -2.717 -0.446 10 -1 0 1440 diff --git a/instances/pr11.txt b/instances/pr11.txt new file mode 100644 index 0000000..3025003 --- /dev/null +++ b/instances/pr11.txt @@ -0,0 +1,50 @@ +3 48 480 6 90 + 0 -1.044 2.000 0 0 0 1440 + 1 -2.973 6.414 10 1 0 1440 + 2 -3.066 0.546 10 1 0 1440 + 3 5.164 0.547 10 1 0 1440 + 4 -1.317 6.934 10 1 0 1440 + 5 -6.741 6.832 10 1 0 1440 + 6 4.891 0.627 10 1 0 1440 + 7 0.524 2.226 10 1 0 1440 + 8 -6.500 7.723 10 1 0 1440 + 9 -0.417 -0.157 10 1 0 1440 + 10 2.303 1.164 10 1 0 1440 + 11 2.548 0.629 10 1 0 1440 + 12 -4.261 -2.639 10 1 0 1440 + 13 -7.667 9.934 10 1 455 544 + 14 -2.067 5.789 10 1 127 199 + 15 -5.204 0.657 10 1 239 323 + 16 -4.138 5.082 10 1 84 143 + 17 -9.194 2.759 10 1 264 342 + 18 -6.512 3.021 10 1 71 158 + 19 1.860 9.672 10 1 418 454 + 20 -4.094 8.321 10 1 400 488 + 21 -3.776 -3.333 10 1 233 306 + 22 2.377 2.908 10 1 154 222 + 23 -4.303 2.045 10 1 470 523 + 24 -3.530 -2.490 10 1 259 306 + 25 -5.476 1.437 10 -1 451 532 + 26 -4.933 3.337 10 -1 163 201 + 27 5.740 2.382 10 -1 464 543 + 28 -2.275 5.541 10 -1 421 505 + 29 -5.662 7.334 10 -1 402 433 + 30 -3.856 -0.370 10 -1 319 363 + 31 -1.678 1.954 10 -1 452 522 + 32 -1.156 1.161 10 -1 371 426 + 33 -4.655 9.797 10 -1 264 340 + 34 1.623 0.932 10 -1 219 269 + 35 0.129 0.735 10 -1 427 468 + 36 -2.640 2.953 10 -1 195 231 + 37 0.435 1.469 10 -1 0 1440 + 38 -5.066 -2.313 10 -1 0 1440 + 39 -2.283 -0.981 10 -1 0 1440 + 40 -7.110 -1.862 10 -1 0 1440 + 41 -0.785 3.207 10 -1 0 1440 + 42 1.188 -2.493 10 -1 0 1440 + 43 -1.893 -2.373 10 -1 0 1440 + 44 -1.192 1.175 10 -1 0 1440 + 45 2.984 1.163 10 -1 0 1440 + 46 1.227 -5.581 10 -1 0 1440 + 47 -3.793 -2.161 10 -1 0 1440 + 48 4.288 -0.297 10 -1 0 1440 diff --git a/instances/pr12.txt b/instances/pr12.txt new file mode 100644 index 0000000..bae66de --- /dev/null +++ b/instances/pr12.txt @@ -0,0 +1,98 @@ +5 96 480 6 90 + 0 3.022 2.479 0 0 0 1440 + 1 3.359 3.075 10 1 0 1440 + 2 4.883 6.531 10 1 0 1440 + 3 8.618 5.934 10 1 0 1440 + 4 3.927 -3.306 10 1 0 1440 + 5 -2.337 8.685 10 1 0 1440 + 6 4.813 9.559 10 1 0 1440 + 7 -1.636 9.331 10 1 0 1440 + 8 -5.770 -6.560 10 1 0 1440 + 9 0.715 3.268 10 1 0 1440 + 10 4.295 6.870 10 1 0 1440 + 11 3.708 -0.211 10 1 0 1440 + 12 7.776 5.582 10 1 0 1440 + 13 -1.746 -5.657 10 1 0 1440 + 14 5.857 5.989 10 1 0 1440 + 15 5.778 1.534 10 1 0 1440 + 16 -2.233 3.607 10 1 0 1440 + 17 -0.708 3.049 10 1 0 1440 + 18 5.566 6.042 10 1 0 1440 + 19 -1.431 1.146 10 1 0 1440 + 20 -2.972 2.427 10 1 0 1440 + 21 4.322 0.074 10 1 0 1440 + 22 4.518 3.547 10 1 0 1440 + 23 6.448 0.224 10 1 0 1440 + 24 5.508 7.224 10 1 0 1440 + 25 1.693 1.574 10 1 295 337 + 26 4.504 -0.372 10 1 479 562 + 27 -7.678 0.594 10 1 241 316 + 28 3.617 0.026 10 1 82 142 + 29 2.922 0.894 10 1 418 478 + 30 6.506 0.522 10 1 138 176 + 31 4.217 -2.228 10 1 386 472 + 32 2.557 3.173 10 1 229 294 + 33 3.156 3.726 10 1 378 429 + 34 6.650 -5.417 10 1 252 312 + 35 4.658 -1.794 10 1 193 249 + 36 6.506 4.088 10 1 442 506 + 37 -0.272 2.477 10 1 280 323 + 38 -4.000 0.387 10 1 75 120 + 39 -7.350 5.704 10 1 164 201 + 40 8.115 -2.571 10 1 218 296 + 41 1.201 -0.796 10 1 202 254 + 42 4.276 3.809 10 1 357 433 + 43 0.386 -2.318 10 1 118 193 + 44 -0.737 2.439 10 1 180 269 + 45 3.594 -1.183 10 1 171 229 + 46 5.208 0.969 10 1 114 146 + 47 3.073 3.070 10 1 235 297 + 48 4.122 7.792 10 1 326 366 + 49 6.888 -4.055 10 -1 436 471 + 50 7.631 8.667 10 -1 345 387 + 51 6.393 7.854 10 -1 281 346 + 52 2.915 -0.996 10 -1 389 422 + 53 8.552 3.995 10 -1 401 480 + 54 3.177 0.387 10 -1 189 222 + 55 -2.054 1.909 10 -1 461 532 + 56 5.535 4.382 10 -1 427 474 + 57 3.541 1.028 10 -1 85 149 + 58 2.546 -0.029 10 -1 87 128 + 59 1.240 0.024 10 -1 204 255 + 60 1.836 2.092 10 -1 141 207 + 61 2.796 -1.504 10 -1 405 454 + 62 -0.319 1.988 10 -1 333 377 + 63 0.933 -4.135 10 -1 419 466 + 64 -2.058 3.818 10 -1 234 309 + 65 2.782 2.873 10 -1 219 254 + 66 5.903 4.231 10 -1 465 549 + 67 5.631 5.873 10 -1 348 423 + 68 -5.165 -0.034 10 -1 462 521 + 69 0.258 3.272 10 -1 300 345 + 70 1.513 -0.305 10 -1 295 356 + 71 6.659 3.494 10 -1 458 514 + 72 1.948 2.014 10 -1 266 324 + 73 -0.117 2.065 10 -1 0 1440 + 74 -2.120 1.366 10 -1 0 1440 + 75 9.885 0.126 10 -1 0 1440 + 76 8.259 7.200 10 -1 0 1440 + 77 3.002 -3.090 10 -1 0 1440 + 78 3.323 4.166 10 -1 0 1440 + 79 3.949 -0.854 10 -1 0 1440 + 80 5.450 7.081 10 -1 0 1440 + 81 0.306 1.025 10 -1 0 1440 + 82 5.183 -1.687 10 -1 0 1440 + 83 7.642 1.135 10 -1 0 1440 + 84 0.524 0.024 10 -1 0 1440 + 85 5.059 3.425 10 -1 0 1440 + 86 -0.523 -0.208 10 -1 0 1440 + 87 2.419 2.584 10 -1 0 1440 + 88 3.363 3.759 10 -1 0 1440 + 89 3.144 -0.700 10 -1 0 1440 + 90 3.071 -2.817 10 -1 0 1440 + 91 4.986 0.104 10 -1 0 1440 + 92 -3.577 1.414 10 -1 0 1440 + 93 -2.931 0.489 10 -1 0 1440 + 94 1.905 4.197 10 -1 0 1440 + 95 2.760 1.393 10 -1 0 1440 + 96 5.283 5.068 10 -1 0 1440 diff --git a/instances/pr13.txt b/instances/pr13.txt new file mode 100644 index 0000000..835ecb3 --- /dev/null +++ b/instances/pr13.txt @@ -0,0 +1,146 @@ +7 144 480 6 90 + 0 -1.839 0.112 0 0 0 1440 + 1 -5.528 -2.437 10 1 0 1440 + 2 -4.830 5.331 10 1 0 1440 + 3 -4.907 -3.849 10 1 0 1440 + 4 2.531 -1.856 10 1 0 1440 + 5 -2.447 -0.382 10 1 0 1440 + 6 2.459 -1.790 10 1 0 1440 + 7 -1.042 6.036 10 1 0 1440 + 8 3.818 -3.517 10 1 0 1440 + 9 -6.828 9.307 10 1 0 1440 + 10 -3.079 -5.734 10 1 0 1440 + 11 -3.706 -1.212 10 1 0 1440 + 12 -1.574 -4.764 10 1 0 1440 + 13 -6.338 -2.292 10 1 0 1440 + 14 -4.311 -4.344 10 1 0 1440 + 15 -2.562 1.360 10 1 0 1440 + 16 -0.263 1.663 10 1 0 1440 + 17 -4.158 -2.850 10 1 0 1440 + 18 0.208 1.288 10 1 0 1440 + 19 0.392 -4.784 10 1 0 1440 + 20 -8.329 2.632 10 1 0 1440 + 21 -0.646 2.635 10 1 0 1440 + 22 0.329 0.673 10 1 0 1440 + 23 -3.487 3.043 10 1 0 1440 + 24 1.555 -3.627 10 1 0 1440 + 25 1.284 0.513 10 1 0 1440 + 26 -4.845 -2.443 10 1 0 1440 + 27 -8.854 -1.046 10 1 0 1440 + 28 -2.977 0.100 10 1 0 1440 + 29 0.983 3.842 10 1 0 1440 + 30 0.141 9.294 10 1 0 1440 + 31 -7.930 1.538 10 1 0 1440 + 32 -3.065 4.006 10 1 0 1440 + 33 1.893 2.164 10 1 0 1440 + 34 4.509 -5.991 10 1 0 1440 + 35 -3.495 -0.382 10 1 0 1440 + 36 8.120 -7.474 10 1 0 1440 + 37 1.559 -2.845 10 1 395 469 + 38 -7.219 2.955 10 1 187 253 + 39 -4.291 -2.268 10 1 456 530 + 40 -7.639 -5.749 10 1 266 316 + 41 -2.854 1.207 10 1 419 452 + 42 -6.139 2.653 10 1 173 206 + 43 -0.847 1.262 10 1 321 370 + 44 -6.147 3.339 10 1 291 349 + 45 -3.467 -2.759 10 1 242 302 + 46 1.031 -1.252 10 1 149 194 + 47 -8.301 7.700 10 1 249 317 + 48 -4.042 4.999 10 1 129 209 + 49 8.383 3.391 10 1 333 367 + 50 -2.056 -7.583 10 1 241 304 + 51 1.544 -1.872 10 1 127 208 + 52 -5.994 -6.580 10 1 192 279 + 53 0.515 4.781 10 1 315 382 + 54 4.601 1.499 10 1 296 359 + 55 8.298 -0.166 10 1 211 244 + 56 3.989 -3.892 10 1 435 478 + 57 9.084 -8.354 10 1 108 147 + 58 0.707 0.007 10 1 177 251 + 59 1.896 4.009 10 1 268 347 + 60 -8.049 5.821 10 1 148 233 + 61 6.446 -6.295 10 1 204 259 + 62 -4.362 -2.612 10 1 140 217 + 63 -1.841 1.030 10 1 85 136 + 64 -4.392 6.325 10 1 330 402 + 65 1.135 2.622 10 1 238 272 + 66 -0.700 3.824 10 1 174 239 + 67 7.408 -3.422 10 1 455 520 + 68 1.430 -0.080 10 1 289 352 + 69 -9.414 -4.878 10 1 146 182 + 70 1.533 -4.217 10 1 103 167 + 71 -4.664 -1.646 10 1 128 217 + 72 -0.096 -8.100 10 1 389 435 + 73 -3.744 -4.251 10 -1 127 160 + 74 -0.368 -6.907 10 -1 68 137 + 75 3.489 -2.090 10 -1 435 478 + 76 4.554 5.141 10 -1 307 351 + 77 -3.193 8.824 10 -1 335 411 + 78 -1.358 -2.696 10 -1 73 146 + 79 1.265 -4.834 10 -1 117 187 + 80 -4.618 -3.827 10 -1 241 304 + 81 -2.962 3.508 10 -1 375 447 + 82 1.370 4.399 10 -1 123 194 + 83 3.834 -4.634 10 -1 182 253 + 84 -2.623 2.451 10 -1 162 221 + 85 9.001 -4.364 10 -1 398 448 + 86 -0.700 2.252 10 -1 87 175 + 87 -2.999 -2.885 10 -1 205 286 + 88 -5.627 -6.474 10 -1 164 224 + 89 -8.742 9.080 10 -1 444 490 + 90 -0.576 5.403 10 -1 129 207 + 91 -3.484 -2.718 10 -1 269 344 + 92 -1.648 1.618 10 -1 79 118 + 93 2.371 2.949 10 -1 284 318 + 94 -4.099 4.659 10 -1 426 496 + 95 -5.352 -2.162 10 -1 377 425 + 96 -1.756 3.749 10 -1 159 219 + 97 -3.731 5.684 10 -1 63 116 + 98 7.152 2.251 10 -1 144 191 + 99 -4.186 2.771 10 -1 96 152 +100 1.482 -8.212 10 -1 394 477 +101 3.032 -5.532 10 -1 393 474 +102 -3.917 4.800 10 -1 422 460 +103 -9.442 1.519 10 -1 358 394 +104 -0.781 1.127 10 -1 333 400 +105 2.857 -4.991 10 -1 220 299 +106 -2.065 2.455 10 -1 242 324 +107 -3.096 -1.890 10 -1 300 358 +108 0.172 -2.045 10 -1 233 294 +109 -3.101 -2.111 10 -1 0 1440 +110 -8.572 -2.801 10 -1 0 1440 +111 5.883 -6.304 10 -1 0 1440 +112 -1.575 -5.269 10 -1 0 1440 +113 -7.166 5.118 10 -1 0 1440 +114 -9.263 -0.660 10 -1 0 1440 +115 3.351 -4.926 10 -1 0 1440 +116 5.931 5.409 10 -1 0 1440 +117 3.074 -2.844 10 -1 0 1440 +118 -5.590 1.846 10 -1 0 1440 +119 -8.996 -3.953 10 -1 0 1440 +120 3.644 2.082 10 -1 0 1440 +121 -5.367 -5.643 10 -1 0 1440 +122 -3.187 3.254 10 -1 0 1440 +123 0.566 1.276 10 -1 0 1440 +124 -5.290 4.280 10 -1 0 1440 +125 4.713 -4.546 10 -1 0 1440 +126 3.079 0.987 10 -1 0 1440 +127 -4.521 -5.629 10 -1 0 1440 +128 1.092 1.331 10 -1 0 1440 +129 -3.299 -3.400 10 -1 0 1440 +130 -4.087 3.058 10 -1 0 1440 +131 -6.935 8.041 10 -1 0 1440 +132 -5.897 -2.954 10 -1 0 1440 +133 -3.685 -3.371 10 -1 0 1440 +134 -2.182 6.537 10 -1 0 1440 +135 2.298 -4.101 10 -1 0 1440 +136 -7.756 5.981 10 -1 0 1440 +137 -4.720 6.772 10 -1 0 1440 +138 -2.161 3.517 10 -1 0 1440 +139 -5.568 -3.138 10 -1 0 1440 +140 -8.523 8.879 10 -1 0 1440 +141 -0.392 -6.353 10 -1 0 1440 +142 -5.856 5.938 10 -1 0 1440 +143 -2.454 1.494 10 -1 0 1440 +144 -4.878 1.697 10 -1 0 1440 diff --git a/instances/pr14.txt b/instances/pr14.txt new file mode 100644 index 0000000..aa1126e --- /dev/null +++ b/instances/pr14.txt @@ -0,0 +1,194 @@ +9 192 480 6 90 + 0 -1.228 0.916 0 0 0 1440 + 1 -4.463 -5.564 10 1 0 1440 + 2 3.610 6.494 10 1 0 1440 + 3 -2.547 4.458 10 1 0 1440 + 4 -3.395 -7.306 10 1 0 1440 + 5 4.565 3.573 10 1 0 1440 + 6 1.495 -3.672 10 1 0 1440 + 7 -0.148 4.720 10 1 0 1440 + 8 0.215 -4.091 10 1 0 1440 + 9 2.299 0.140 10 1 0 1440 + 10 -2.886 0.596 10 1 0 1440 + 11 -4.812 9.412 10 1 0 1440 + 12 0.724 1.732 10 1 0 1440 + 13 0.461 2.705 10 1 0 1440 + 14 -1.397 2.820 10 1 0 1440 + 15 1.295 -1.169 10 1 0 1440 + 16 -3.667 2.310 10 1 0 1440 + 17 -0.422 -4.931 10 1 0 1440 + 18 0.109 -0.714 10 1 0 1440 + 19 -5.696 2.791 10 1 0 1440 + 20 -8.099 -7.769 10 1 0 1440 + 21 7.226 5.903 10 1 0 1440 + 22 -2.166 0.164 10 1 0 1440 + 23 -2.015 -6.242 10 1 0 1440 + 24 -4.816 0.629 10 1 0 1440 + 25 -0.508 6.160 10 1 0 1440 + 26 1.714 -4.705 10 1 0 1440 + 27 -1.606 0.856 10 1 0 1440 + 28 0.668 -2.707 10 1 0 1440 + 29 1.503 -3.498 10 1 0 1440 + 30 3.795 7.391 10 1 0 1440 + 31 -4.120 -4.302 10 1 0 1440 + 32 3.254 1.179 10 1 0 1440 + 33 -2.031 -2.024 10 1 0 1440 + 34 -3.548 1.914 10 1 0 1440 + 35 5.804 5.666 10 1 0 1440 + 36 -3.669 -0.626 10 1 0 1440 + 37 0.045 -4.673 10 1 0 1440 + 38 -1.969 3.898 10 1 0 1440 + 39 -4.734 2.091 10 1 0 1440 + 40 -7.924 -5.768 10 1 0 1440 + 41 0.560 -3.408 10 1 0 1440 + 42 3.445 -0.829 10 1 0 1440 + 43 1.850 -5.115 10 1 0 1440 + 44 -0.435 -4.452 10 1 0 1440 + 45 -1.415 -7.416 10 1 0 1440 + 46 1.987 7.752 10 1 0 1440 + 47 -5.008 1.787 10 1 0 1440 + 48 4.279 -7.988 10 1 0 1440 + 49 0.152 -2.903 10 1 333 367 + 50 1.473 -0.344 10 1 241 304 + 51 -2.617 -4.900 10 1 127 208 + 52 -6.387 -0.527 10 1 192 279 + 53 -5.414 0.709 10 1 315 382 + 54 1.793 -3.409 10 1 296 359 + 55 -9.871 3.455 10 1 211 244 + 56 2.880 -0.858 10 1 435 478 + 57 0.272 9.059 10 1 108 147 + 58 -3.102 4.894 10 1 177 251 + 59 -4.655 4.232 10 1 268 347 + 60 2.729 5.818 10 1 148 233 + 61 2.881 -2.803 10 1 204 259 + 62 -2.610 1.133 10 1 140 217 + 63 0.054 -2.622 10 1 85 136 + 64 -5.046 0.781 10 1 330 402 + 65 3.000 1.909 10 1 238 272 + 66 -1.260 2.206 10 1 174 239 + 67 2.201 -0.864 10 1 455 520 + 68 0.894 0.287 10 1 289 352 + 69 -1.981 0.092 10 1 146 182 + 70 -0.423 3.125 10 1 103 167 + 71 1.798 -0.041 10 1 128 217 + 72 -0.235 4.294 10 1 389 435 + 73 -1.652 6.808 10 1 127 160 + 74 -0.119 4.202 10 1 68 137 + 75 5.663 -4.402 10 1 435 478 + 76 5.748 3.550 10 1 307 351 + 77 -2.610 0.748 10 1 335 411 + 78 0.749 -5.724 10 1 73 146 + 79 -2.209 5.578 10 1 117 187 + 80 1.987 3.882 10 1 241 304 + 81 0.531 4.922 10 1 375 447 + 82 1.515 0.630 10 1 123 194 + 83 0.548 -3.150 10 1 182 253 + 84 0.796 -2.866 10 1 162 221 + 85 -7.581 0.401 10 1 398 448 + 86 -4.367 -6.165 10 1 87 175 + 87 -0.258 -6.214 10 1 205 286 + 88 -1.884 -3.688 10 1 164 224 + 89 2.084 2.117 10 1 444 490 + 90 0.314 -1.922 10 1 129 207 + 91 -2.036 1.888 10 1 269 344 + 92 -0.090 -5.494 10 1 79 118 + 93 -2.955 0.928 10 1 284 318 + 94 0.505 -3.505 10 1 426 496 + 95 2.776 4.871 10 1 377 425 + 96 1.208 -4.235 10 1 159 219 + 97 -5.127 4.114 10 -1 63 116 + 98 -2.908 0.429 10 -1 144 191 + 99 -1.855 -1.482 10 -1 96 152 +100 0.786 -4.945 10 -1 394 477 +101 -1.912 -3.209 10 -1 393 474 +102 1.765 -5.227 10 -1 422 460 +103 1.691 -6.296 10 -1 358 394 +104 1.899 0.622 10 -1 333 400 +105 -6.888 -6.454 10 -1 220 299 +106 -1.336 2.026 10 -1 242 324 +107 -4.444 6.372 10 -1 300 358 +108 -0.650 7.144 10 -1 75 111 +109 -5.198 2.541 10 -1 295 379 +110 -0.074 5.949 10 -1 387 435 +111 -6.468 8.304 10 -1 150 181 +112 -1.127 -3.594 10 -1 406 449 +113 -1.686 0.778 10 -1 230 261 +114 1.984 -4.981 10 -1 279 338 +115 -1.628 -0.294 10 -1 258 307 +116 0.836 6.704 10 -1 222 268 +117 3.088 2.432 10 -1 135 180 +118 9.352 -2.023 10 -1 232 315 +119 -0.933 -5.618 10 -1 212 245 +120 -3.444 -6.331 10 -1 276 350 +121 2.094 -0.565 10 -1 429 516 +122 -0.342 8.959 10 -1 322 379 +123 -1.874 4.523 10 -1 240 309 +124 0.243 -3.052 10 -1 294 383 +125 -2.886 5.662 10 -1 300 350 +126 7.688 -2.990 10 -1 188 265 +127 -9.047 1.028 10 -1 210 247 +128 -3.510 4.655 10 -1 64 139 +129 -4.840 4.385 10 -1 126 188 +130 -4.100 2.670 10 -1 168 235 +131 1.370 3.461 10 -1 417 485 +132 -7.147 1.145 10 -1 438 469 +133 -3.623 5.190 10 -1 436 484 +134 -3.947 0.491 10 -1 446 491 +135 -1.657 2.377 10 -1 217 273 +136 1.075 -2.855 10 -1 60 105 +137 -2.303 4.702 10 -1 222 289 +138 -0.881 2.122 10 -1 356 435 +139 -4.004 2.744 10 -1 181 226 +140 -3.744 -4.104 10 -1 399 480 +141 4.822 0.009 10 -1 313 349 +142 -0.032 6.824 10 -1 332 419 +143 -1.429 -3.342 10 -1 163 232 +144 -0.144 -3.481 10 -1 401 489 +145 -3.445 4.235 10 -1 0 1440 +146 0.868 -6.618 10 -1 0 1440 +147 -6.125 -5.137 10 -1 0 1440 +148 -0.109 0.991 10 -1 0 1440 +149 -1.657 6.655 10 -1 0 1440 +150 0.844 5.284 10 -1 0 1440 +151 -2.203 -3.690 10 -1 0 1440 +152 1.577 1.732 10 -1 0 1440 +153 0.900 -1.869 10 -1 0 1440 +154 -0.458 0.349 10 -1 0 1440 +155 0.887 4.066 10 -1 0 1440 +156 2.609 -3.397 10 -1 0 1440 +157 -3.250 3.953 10 -1 0 1440 +158 -3.263 -8.258 10 -1 0 1440 +159 -9.849 2.202 10 -1 0 1440 +160 -5.905 0.416 10 -1 0 1440 +161 0.743 -0.257 10 -1 0 1440 +162 -5.960 1.247 10 -1 0 1440 +163 -1.122 -3.183 10 -1 0 1440 +164 -1.681 -3.504 10 -1 0 1440 +165 2.186 1.814 10 -1 0 1440 +166 4.504 -6.132 10 -1 0 1440 +167 -4.882 2.557 10 -1 0 1440 +168 -3.218 -1.674 10 -1 0 1440 +169 1.244 -4.149 10 -1 0 1440 +170 -2.108 -7.708 10 -1 0 1440 +171 -1.782 -1.852 10 -1 0 1440 +172 4.833 9.352 10 -1 0 1440 +173 -1.868 4.901 10 -1 0 1440 +174 1.214 3.004 10 -1 0 1440 +175 0.311 -4.030 10 -1 0 1440 +176 1.713 3.708 10 -1 0 1440 +177 2.258 0.084 10 -1 0 1440 +178 -3.043 5.294 10 -1 0 1440 +179 3.377 -6.711 10 -1 0 1440 +180 0.541 0.153 10 -1 0 1440 +181 7.216 3.010 10 -1 0 1440 +182 -2.411 -3.462 10 -1 0 1440 +183 1.741 7.515 10 -1 0 1440 +184 1.064 -6.005 10 -1 0 1440 +185 -0.518 -4.900 10 -1 0 1440 +186 -1.934 2.112 10 -1 0 1440 +187 -4.680 -1.466 10 -1 0 1440 +188 -1.678 4.344 10 -1 0 1440 +189 1.409 -1.361 10 -1 0 1440 +190 -2.106 2.602 10 -1 0 1440 +191 3.981 -4.067 10 -1 0 1440 +192 5.206 3.033 10 -1 0 1440 diff --git a/instances/pr15.txt b/instances/pr15.txt new file mode 100644 index 0000000..9742301 --- /dev/null +++ b/instances/pr15.txt @@ -0,0 +1,242 @@ +11 240 480 6 90 + 0 0.868 -1.044 0 0 0 1440 + 1 6.599 -4.983 10 1 0 1440 + 2 -3.694 -3.674 10 1 0 1440 + 3 -0.273 1.877 10 1 0 1440 + 4 3.112 -3.591 10 1 0 1440 + 5 0.279 0.801 10 1 0 1440 + 6 3.115 4.367 10 1 0 1440 + 7 -3.630 -2.131 10 1 0 1440 + 8 5.281 3.505 10 1 0 1440 + 9 1.127 2.066 10 1 0 1440 + 10 -0.062 2.311 10 1 0 1440 + 11 4.309 -1.236 10 1 0 1440 + 12 0.685 1.907 10 1 0 1440 + 13 -0.685 2.532 10 1 0 1440 + 14 -2.793 -2.371 10 1 0 1440 + 15 3.324 -3.049 10 1 0 1440 + 16 6.388 -5.288 10 1 0 1440 + 17 -1.367 -4.394 10 1 0 1440 + 18 -0.065 -2.750 10 1 0 1440 + 19 5.941 -4.926 10 1 0 1440 + 20 2.717 -0.571 10 1 0 1440 + 21 7.000 -2.084 10 1 0 1440 + 22 3.533 -6.517 10 1 0 1440 + 23 -1.439 -4.224 10 1 0 1440 + 24 1.937 3.027 10 1 0 1440 + 25 -3.979 1.010 10 1 0 1440 + 26 -1.575 -4.020 10 1 0 1440 + 27 -2.842 -4.050 10 1 0 1440 + 28 2.708 0.973 10 1 0 1440 + 29 2.220 -0.922 10 1 0 1440 + 30 -0.083 -0.653 10 1 0 1440 + 31 1.022 7.553 10 1 0 1440 + 32 0.745 1.850 10 1 0 1440 + 33 4.891 -2.029 10 1 0 1440 + 34 -1.896 -2.968 10 1 0 1440 + 35 1.682 -0.666 10 1 0 1440 + 36 0.251 -3.042 10 1 0 1440 + 37 1.542 0.491 10 1 0 1440 + 38 6.031 8.980 10 1 0 1440 + 39 4.040 -4.537 10 1 0 1440 + 40 -2.684 -5.427 10 1 0 1440 + 41 6.917 7.258 10 1 0 1440 + 42 -2.282 4.617 10 1 0 1440 + 43 -1.426 -3.025 10 1 0 1440 + 44 7.605 1.207 10 1 0 1440 + 45 6.304 6.002 10 1 0 1440 + 46 -2.024 -8.197 10 1 0 1440 + 47 -4.117 -4.202 10 1 0 1440 + 48 7.920 -2.902 10 1 0 1440 + 49 -2.073 -0.707 10 1 0 1440 + 50 -0.416 -5.350 10 1 0 1440 + 51 3.959 -4.046 10 1 0 1440 + 52 -4.713 -7.785 10 1 0 1440 + 53 -0.123 4.918 10 1 0 1440 + 54 -0.037 -2.726 10 1 0 1440 + 55 3.154 -0.872 10 1 0 1440 + 56 -0.013 -2.026 10 1 0 1440 + 57 6.639 -2.669 10 1 0 1440 + 58 0.610 -6.409 10 1 0 1440 + 59 1.354 -2.087 10 1 0 1440 + 60 5.421 -0.654 10 1 0 1440 + 61 2.205 -3.414 10 1 334 410 + 62 -0.972 0.471 10 1 86 167 + 63 -1.158 -4.686 10 1 91 157 + 64 -0.290 -0.030 10 1 213 288 + 65 1.384 -4.445 10 1 367 446 + 66 1.748 2.775 10 1 135 187 + 67 0.297 -4.369 10 1 317 398 + 68 -4.435 -3.820 10 1 443 508 + 69 -5.940 0.151 10 1 479 525 + 70 -1.345 -7.553 10 1 357 444 + 71 -0.552 -5.195 10 1 138 185 + 72 -0.959 -2.688 10 1 206 288 + 73 1.932 2.950 10 1 235 281 + 74 2.625 3.674 10 1 389 465 + 75 4.371 -2.803 10 1 424 477 + 76 -5.203 -3.534 10 1 150 211 + 77 -0.844 -0.012 10 1 129 175 + 78 8.911 6.212 10 1 222 266 + 79 0.607 -1.613 10 1 433 508 + 80 2.709 -0.510 10 1 477 544 + 81 2.753 -1.534 10 1 303 343 + 82 4.251 3.206 10 1 478 519 + 83 2.531 1.269 10 1 75 159 + 84 4.778 -1.277 10 1 388 420 + 85 -0.314 -1.384 10 1 137 196 + 86 1.248 -7.810 10 1 475 527 + 87 -2.104 -0.343 10 1 389 439 + 88 -0.315 -5.543 10 1 162 204 + 89 5.301 8.490 10 1 320 351 + 90 3.564 -4.755 10 1 471 530 + 91 4.343 -1.844 10 1 233 274 + 92 0.660 -5.458 10 1 64 128 + 93 8.795 9.401 10 1 260 313 + 94 3.910 -4.874 10 1 404 455 + 95 -4.834 -2.648 10 1 123 201 + 96 7.200 -0.925 10 1 474 547 + 97 -3.773 0.335 10 1 474 562 + 98 -6.597 -3.675 10 1 448 479 + 99 -1.667 -3.528 10 1 434 506 +100 1.074 -0.467 10 1 84 118 +101 1.559 -0.582 10 1 142 174 +102 2.161 -1.811 10 1 248 336 +103 0.978 4.928 10 1 222 293 +104 9.415 -0.449 10 1 137 167 +105 1.038 -1.630 10 1 361 400 +106 -0.145 -0.086 10 1 268 305 +107 -0.622 2.530 10 1 212 272 +108 -0.625 1.022 10 1 358 438 +109 -1.744 -7.080 10 1 441 502 +110 -5.509 -4.385 10 1 146 179 +111 -0.944 2.372 10 1 203 244 +112 0.898 3.541 10 1 392 441 +113 -1.675 -0.081 10 1 133 205 +114 6.685 -3.784 10 1 207 241 +115 1.472 -2.372 10 1 237 291 +116 3.347 2.003 10 1 120 187 +117 6.639 -7.011 10 1 252 317 +118 -0.566 0.888 10 1 312 392 +119 -0.510 -4.673 10 1 179 256 +120 -0.883 5.574 10 1 418 448 +121 0.585 -0.319 10 -1 459 510 +122 -2.573 -3.769 10 -1 116 164 +123 -1.536 -2.455 10 -1 421 501 +124 4.379 -1.110 10 -1 124 200 +125 1.766 -2.560 10 -1 217 268 +126 -3.962 5.488 10 -1 406 479 +127 -2.455 -4.322 10 -1 291 357 +128 -2.689 -1.274 10 -1 79 152 +129 3.416 -3.846 10 -1 199 252 +130 -4.731 -2.947 10 -1 393 468 +131 4.937 -2.559 10 -1 399 485 +132 0.370 -1.645 10 -1 217 263 +133 2.243 -2.327 10 -1 282 370 +134 -3.755 -2.961 10 -1 107 185 +135 2.555 0.367 10 -1 379 467 +136 -1.522 0.328 10 -1 403 475 +137 -1.294 -0.750 10 -1 193 280 +138 -2.211 2.643 10 -1 70 110 +139 -1.794 0.773 10 -1 395 435 +140 -2.123 1.449 10 -1 456 496 +141 0.350 -1.971 10 -1 286 362 +142 3.260 -1.494 10 -1 433 468 +143 -0.574 -2.830 10 -1 222 308 +144 -0.613 -3.962 10 -1 403 476 +145 -0.246 1.282 10 -1 200 266 +146 -0.647 0.847 10 -1 259 297 +147 -3.789 -3.612 10 -1 291 372 +148 1.085 -1.875 10 -1 231 265 +149 5.010 0.864 10 -1 406 467 +150 4.684 0.471 10 -1 436 501 +151 1.960 -1.041 10 -1 264 336 +152 -3.895 5.294 10 -1 185 263 +153 -0.064 -2.129 10 -1 340 389 +154 4.091 -3.377 10 -1 472 530 +155 -0.057 -6.230 10 -1 271 356 +156 -0.978 2.679 10 -1 328 360 +157 3.426 -2.389 10 -1 353 414 +158 2.957 -2.456 10 -1 117 152 +159 1.638 -5.889 10 -1 255 342 +160 6.188 -1.517 10 -1 398 475 +161 4.009 -0.963 10 -1 298 344 +162 0.012 -0.464 10 -1 454 491 +163 -0.893 -4.390 10 -1 114 164 +164 -0.714 -5.743 10 -1 144 231 +165 0.755 -2.121 10 -1 424 459 +166 0.395 0.730 10 -1 287 338 +167 -1.512 9.202 10 -1 401 481 +168 8.482 -2.452 10 -1 127 185 +169 -5.232 3.068 10 -1 129 167 +170 0.754 1.382 10 -1 458 528 +171 -2.148 3.036 10 -1 89 154 +172 3.605 2.988 10 -1 359 435 +173 1.278 -4.094 10 -1 108 188 +174 -1.729 -1.025 10 -1 417 481 +175 -1.054 1.240 10 -1 397 466 +176 -1.585 -5.946 10 -1 219 271 +177 2.927 -0.222 10 -1 453 502 +178 -1.260 -5.893 10 -1 266 300 +179 -1.730 -3.530 10 -1 339 410 +180 5.705 -5.035 10 -1 163 206 +181 2.694 1.744 10 -1 0 1440 +182 -0.620 -0.888 10 -1 0 1440 +183 1.698 -1.632 10 -1 0 1440 +184 8.371 -3.252 10 -1 0 1440 +185 1.245 3.459 10 -1 0 1440 +186 1.506 6.700 10 -1 0 1440 +187 2.582 -0.584 10 -1 0 1440 +188 1.367 -1.483 10 -1 0 1440 +189 4.832 -0.516 10 -1 0 1440 +190 1.349 1.974 10 -1 0 1440 +191 -1.851 6.540 10 -1 0 1440 +192 1.755 3.838 10 -1 0 1440 +193 3.777 -1.600 10 -1 0 1440 +194 4.797 -3.031 10 -1 0 1440 +195 3.881 3.624 10 -1 0 1440 +196 -1.609 -4.284 10 -1 0 1440 +197 2.866 -0.199 10 -1 0 1440 +198 -0.586 -0.186 10 -1 0 1440 +199 6.052 6.342 10 -1 0 1440 +200 6.320 -4.777 10 -1 0 1440 +201 -1.531 -2.329 10 -1 0 1440 +202 -0.287 0.079 10 -1 0 1440 +203 3.206 -1.018 10 -1 0 1440 +204 -1.863 -2.567 10 -1 0 1440 +205 -0.363 2.543 10 -1 0 1440 +206 1.048 2.289 10 -1 0 1440 +207 0.182 -0.301 10 -1 0 1440 +208 -2.527 -1.218 10 -1 0 1440 +209 5.693 -7.551 10 -1 0 1440 +210 1.389 -3.623 10 -1 0 1440 +211 3.252 -2.952 10 -1 0 1440 +212 0.480 -0.729 10 -1 0 1440 +213 1.137 -0.834 10 -1 0 1440 +214 1.713 -2.465 10 -1 0 1440 +215 -3.366 -4.124 10 -1 0 1440 +216 -3.239 -5.088 10 -1 0 1440 +217 2.304 -1.450 10 -1 0 1440 +218 -2.186 -3.950 10 -1 0 1440 +219 3.201 7.733 10 -1 0 1440 +220 1.383 -7.619 10 -1 0 1440 +221 -0.805 -2.118 10 -1 0 1440 +222 2.539 4.661 10 -1 0 1440 +223 4.954 -5.464 10 -1 0 1440 +224 6.342 -0.864 10 -1 0 1440 +225 0.230 -0.554 10 -1 0 1440 +226 5.242 2.990 10 -1 0 1440 +227 0.930 -1.625 10 -1 0 1440 +228 3.484 -9.619 10 -1 0 1440 +229 -2.106 -4.150 10 -1 0 1440 +230 2.845 1.024 10 -1 0 1440 +231 1.625 -2.258 10 -1 0 1440 +232 -3.664 -3.403 10 -1 0 1440 +233 -2.736 -5.018 10 -1 0 1440 +234 -5.370 1.133 10 -1 0 1440 +235 2.628 -0.599 10 -1 0 1440 +236 -3.152 3.459 10 -1 0 1440 +237 -1.461 -3.151 10 -1 0 1440 +238 -0.424 -3.087 10 -1 0 1440 +239 -1.852 -2.949 10 -1 0 1440 +240 -1.713 -1.940 10 -1 0 1440 diff --git a/instances/pr16.txt b/instances/pr16.txt new file mode 100644 index 0000000..17d16a4 --- /dev/null +++ b/instances/pr16.txt @@ -0,0 +1,290 @@ +13 288 480 6 90 + 0 -0.268 -0.947 0 0 0 1440 + 1 -6.617 -3.781 10 1 0 1440 + 2 0.267 -3.522 10 1 0 1440 + 3 3.875 0.862 10 1 0 1440 + 4 6.265 2.067 10 1 0 1440 + 5 6.097 -0.611 10 1 0 1440 + 6 -9.854 -3.953 10 1 0 1440 + 7 0.841 -8.127 10 1 0 1440 + 8 -1.457 2.606 10 1 0 1440 + 9 -3.419 -7.670 10 1 0 1440 + 10 5.514 -3.391 10 1 0 1440 + 11 1.587 0.872 10 1 0 1440 + 12 -6.342 -2.028 10 1 0 1440 + 13 -0.936 -4.221 10 1 0 1440 + 14 -5.362 0.373 10 1 0 1440 + 15 5.349 -0.331 10 1 0 1440 + 16 -2.261 -3.279 10 1 0 1440 + 17 3.961 -0.155 10 1 0 1440 + 18 1.670 -2.275 10 1 0 1440 + 19 -5.124 -1.376 10 1 0 1440 + 20 -2.991 1.438 10 1 0 1440 + 21 -7.044 -2.791 10 1 0 1440 + 22 -7.539 -3.081 10 1 0 1440 + 23 1.059 -2.893 10 1 0 1440 + 24 8.634 -4.594 10 1 0 1440 + 25 0.386 3.458 10 1 0 1440 + 26 -3.760 -4.211 10 1 0 1440 + 27 6.944 0.138 10 1 0 1440 + 28 -1.382 0.125 10 1 0 1440 + 29 -2.712 -3.804 10 1 0 1440 + 30 -6.935 -1.473 10 1 0 1440 + 31 5.857 2.935 10 1 0 1440 + 32 5.810 3.170 10 1 0 1440 + 33 -6.225 -1.643 10 1 0 1440 + 34 -6.638 1.359 10 1 0 1440 + 35 6.803 -1.248 10 1 0 1440 + 36 -3.070 -4.168 10 1 0 1440 + 37 -5.539 -5.105 10 1 0 1440 + 38 3.624 -0.265 10 1 0 1440 + 39 -0.122 0.559 10 1 0 1440 + 40 1.028 -2.395 10 1 0 1440 + 41 -0.716 3.686 10 1 0 1440 + 42 -9.020 6.117 10 1 0 1440 + 43 4.637 6.508 10 1 0 1440 + 44 1.335 3.137 10 1 0 1440 + 45 -7.357 -2.884 10 1 0 1440 + 46 -4.153 -3.710 10 1 0 1440 + 47 -6.094 -2.725 10 1 0 1440 + 48 3.831 5.438 10 1 0 1440 + 49 2.631 1.198 10 1 0 1440 + 50 1.030 -4.835 10 1 0 1440 + 51 5.242 -2.836 10 1 0 1440 + 52 -4.376 -3.934 10 1 0 1440 + 53 4.932 1.139 10 1 0 1440 + 54 4.559 0.435 10 1 0 1440 + 55 -2.599 -1.581 10 1 0 1440 + 56 6.525 -5.963 10 1 0 1440 + 57 1.211 -3.439 10 1 0 1440 + 58 1.239 -1.625 10 1 0 1440 + 59 0.053 6.961 10 1 0 1440 + 60 -0.868 0.777 10 1 0 1440 + 61 4.147 -3.502 10 1 0 1440 + 62 1.186 -3.497 10 1 0 1440 + 63 -0.131 -5.806 10 1 0 1440 + 64 0.602 -3.102 10 1 0 1440 + 65 0.179 -3.254 10 1 0 1440 + 66 2.927 -0.649 10 1 0 1440 + 67 2.395 1.074 10 1 0 1440 + 68 -6.589 4.091 10 1 0 1440 + 69 -1.010 2.626 10 1 0 1440 + 70 5.809 6.735 10 1 0 1440 + 71 9.002 0.948 10 1 0 1440 + 72 -0.662 1.522 10 1 0 1440 + 73 -0.287 -4.284 10 1 342 417 + 74 -3.771 -0.731 10 1 121 155 + 75 4.417 -1.122 10 1 299 374 + 76 -5.870 -0.281 10 1 295 328 + 77 -0.391 1.007 10 1 309 381 + 78 -4.137 -0.150 10 1 191 230 + 79 5.818 2.756 10 1 132 203 + 80 -6.386 2.615 10 1 199 284 + 81 -5.679 -1.592 10 1 349 396 + 82 2.222 -2.751 10 1 69 104 + 83 -0.103 -1.484 10 1 380 411 + 84 -5.770 -1.048 10 1 69 143 + 85 8.085 0.630 10 1 231 307 + 86 0.289 1.082 10 1 219 257 + 87 -3.739 -0.780 10 1 156 206 + 88 -3.360 -2.674 10 1 438 522 + 89 9.520 2.423 10 1 95 127 + 90 -1.390 2.933 10 1 468 537 + 91 -5.346 0.930 10 1 399 460 + 92 6.758 1.301 10 1 361 415 + 93 -8.388 -5.327 10 1 159 190 + 94 3.026 -7.243 10 1 293 347 + 95 -2.233 -2.054 10 1 364 447 + 96 0.374 -3.546 10 1 196 250 + 97 -2.009 -4.398 10 1 133 183 + 98 -4.769 -2.110 10 1 269 355 + 99 -2.045 -1.385 10 1 213 274 +100 3.452 0.397 10 1 345 421 +101 2.051 -1.188 10 1 182 215 +102 -4.604 -2.256 10 1 444 505 +103 -3.963 2.538 10 1 225 303 +104 -0.102 5.043 10 1 239 297 +105 -2.863 2.349 10 1 422 475 +106 -5.300 -1.625 10 1 115 185 +107 -0.335 -2.295 10 1 451 532 +108 -6.264 -2.635 10 1 89 129 +109 2.540 0.053 10 1 431 498 +110 -2.990 7.292 10 1 302 368 +111 2.663 0.197 10 1 276 360 +112 -0.981 3.500 10 1 69 140 +113 -0.776 -4.243 10 1 164 225 +114 2.892 -0.712 10 1 324 390 +115 4.769 3.611 10 1 79 127 +116 -5.317 0.521 10 1 222 272 +117 1.756 1.321 10 1 214 262 +118 0.684 -0.250 10 1 422 497 +119 -1.732 9.726 10 1 109 156 +120 2.241 2.653 10 1 161 249 +121 -7.309 -1.325 10 1 349 401 +122 -6.500 -0.458 10 1 333 400 +123 -3.491 -4.390 10 1 155 228 +124 -9.235 -0.452 10 1 391 427 +125 0.065 -0.850 10 1 207 258 +126 0.505 -3.732 10 1 362 443 +127 -1.908 -1.418 10 1 172 246 +128 -7.170 -1.145 10 1 294 355 +129 -4.558 -2.872 10 1 171 212 +130 -2.835 -2.391 10 1 114 162 +131 -1.649 3.092 10 1 268 329 +132 -8.342 -2.093 10 1 333 414 +133 -1.205 -2.061 10 1 404 464 +134 -0.718 -6.372 10 1 323 409 +135 3.455 -0.888 10 1 397 479 +136 -0.487 7.369 10 1 445 504 +137 -3.601 -0.388 10 1 162 226 +138 -2.840 -2.182 10 1 107 165 +139 -5.628 -1.511 10 1 183 267 +140 -1.102 4.215 10 1 304 372 +141 -6.309 -6.257 10 1 171 219 +142 2.949 7.994 10 1 274 335 +143 -6.567 -0.024 10 1 78 112 +144 4.613 -2.042 10 1 80 128 +145 0.158 -1.636 10 -1 166 206 +146 4.028 -0.138 10 -1 321 395 +147 -1.527 4.225 10 -1 352 398 +148 3.322 -1.661 10 -1 317 378 +149 -7.239 1.307 10 -1 391 435 +150 -2.449 0.527 10 -1 250 315 +151 -0.660 -3.096 10 -1 106 158 +152 3.129 2.133 10 -1 95 146 +153 2.056 0.038 10 -1 456 497 +154 -6.720 -4.134 10 -1 407 451 +155 2.217 -4.037 10 -1 100 154 +156 3.116 0.222 10 -1 430 481 +157 7.463 3.022 10 -1 357 410 +158 6.070 8.112 10 -1 435 510 +159 -6.074 2.413 10 -1 252 338 +160 0.198 1.752 10 -1 86 158 +161 -8.057 -3.820 10 -1 111 182 +162 -4.993 -3.671 10 -1 254 333 +163 -6.045 -2.782 10 -1 463 497 +164 -7.875 -4.423 10 -1 201 275 +165 5.426 -0.926 10 -1 194 271 +166 -4.206 -2.664 10 -1 203 258 +167 -5.734 -1.672 10 -1 128 183 +168 -0.128 -1.333 10 -1 390 426 +169 -2.416 3.920 10 -1 320 386 +170 1.791 -4.044 10 -1 204 276 +171 5.983 -0.367 10 -1 69 112 +172 -0.351 0.626 10 -1 92 165 +173 4.017 0.859 10 -1 319 407 +174 -0.169 -5.438 10 -1 263 297 +175 -3.603 -1.707 10 -1 443 505 +176 0.728 -0.414 10 -1 391 423 +177 3.022 -0.683 10 -1 157 202 +178 -2.638 -6.306 10 -1 419 460 +179 2.877 -0.003 10 -1 198 239 +180 0.263 0.507 10 -1 454 522 +181 0.360 -2.160 10 -1 472 518 +182 -6.495 -1.096 10 -1 93 131 +183 1.867 -4.101 10 -1 355 437 +184 2.929 1.280 10 -1 166 215 +185 0.453 2.665 10 -1 261 326 +186 2.536 2.972 10 -1 76 136 +187 5.735 -1.540 10 -1 405 442 +188 -1.157 -1.901 10 -1 157 213 +189 -4.544 -7.181 10 -1 96 168 +190 0.220 -0.356 10 -1 276 306 +191 -0.185 -2.448 10 -1 170 218 +192 -5.985 -4.894 10 -1 75 134 +193 7.008 -1.782 10 -1 294 377 +194 -0.493 2.875 10 -1 347 430 +195 -4.662 -2.353 10 -1 94 161 +196 -4.987 -3.534 10 -1 285 318 +197 -6.750 0.814 10 -1 439 506 +198 3.119 -1.824 10 -1 148 214 +199 -4.214 -5.270 10 -1 263 320 +200 -1.509 1.893 10 -1 452 539 +201 -7.862 -2.434 10 -1 85 173 +202 5.147 -0.961 10 -1 256 339 +203 2.999 -3.106 10 -1 98 169 +204 4.674 0.145 10 -1 195 235 +205 -5.295 3.174 10 -1 234 314 +206 1.054 -6.143 10 -1 135 205 +207 -1.595 -5.601 10 -1 120 163 +208 -0.778 -5.473 10 -1 132 204 +209 1.105 -2.091 10 -1 105 186 +210 -2.436 -2.305 10 -1 308 349 +211 0.295 -2.040 10 -1 262 299 +212 -8.265 2.432 10 -1 166 219 +213 -1.213 4.207 10 -1 374 431 +214 -9.803 -3.636 10 -1 478 521 +215 -6.110 -1.348 10 -1 449 534 +216 -3.914 0.629 10 -1 97 155 +217 4.118 0.797 10 -1 0 1440 +218 0.425 1.983 10 -1 0 1440 +219 -3.414 -3.792 10 -1 0 1440 +220 -0.456 2.357 10 -1 0 1440 +221 3.789 -0.195 10 -1 0 1440 +222 7.826 1.594 10 -1 0 1440 +223 -0.866 -2.511 10 -1 0 1440 +224 1.007 3.716 10 -1 0 1440 +225 -4.262 -4.699 10 -1 0 1440 +226 9.216 -9.418 10 -1 0 1440 +227 3.220 -3.984 10 -1 0 1440 +228 -5.523 -1.503 10 -1 0 1440 +229 -2.675 -2.149 10 -1 0 1440 +230 -7.551 -0.071 10 -1 0 1440 +231 3.402 1.266 10 -1 0 1440 +232 -0.264 -2.083 10 -1 0 1440 +233 5.337 1.377 10 -1 0 1440 +234 -1.495 -4.026 10 -1 0 1440 +235 6.783 0.575 10 -1 0 1440 +236 -1.322 -2.603 10 -1 0 1440 +237 0.417 -3.262 10 -1 0 1440 +238 -2.605 -3.331 10 -1 0 1440 +239 3.196 -4.570 10 -1 0 1440 +240 9.682 2.621 10 -1 0 1440 +241 -4.470 -3.785 10 -1 0 1440 +242 3.342 1.179 10 -1 0 1440 +243 -3.519 1.923 10 -1 0 1440 +244 -1.423 -7.499 10 -1 0 1440 +245 3.716 -0.084 10 -1 0 1440 +246 -5.170 -2.645 10 -1 0 1440 +247 2.353 0.590 10 -1 0 1440 +248 -1.843 5.371 10 -1 0 1440 +249 -1.134 -1.762 10 -1 0 1440 +250 -0.781 -3.590 10 -1 0 1440 +251 0.352 2.694 10 -1 0 1440 +252 -4.659 -2.227 10 -1 0 1440 +253 -0.300 -0.055 10 -1 0 1440 +254 3.215 1.715 10 -1 0 1440 +255 3.202 1.301 10 -1 0 1440 +256 -0.663 2.989 10 -1 0 1440 +257 7.778 -2.540 10 -1 0 1440 +258 3.071 6.570 10 -1 0 1440 +259 -4.381 -4.304 10 -1 0 1440 +260 4.956 1.683 10 -1 0 1440 +261 -2.893 -0.044 10 -1 0 1440 +262 4.036 1.638 10 -1 0 1440 +263 2.275 4.067 10 -1 0 1440 +264 -0.147 0.657 10 -1 0 1440 +265 -0.119 1.686 10 -1 0 1440 +266 0.803 4.182 10 -1 0 1440 +267 -4.402 -2.278 10 -1 0 1440 +268 1.237 -1.135 10 -1 0 1440 +269 3.328 1.588 10 -1 0 1440 +270 -3.479 -1.504 10 -1 0 1440 +271 -9.686 -1.939 10 -1 0 1440 +272 3.843 -0.535 10 -1 0 1440 +273 -2.539 0.022 10 -1 0 1440 +274 0.085 -3.186 10 -1 0 1440 +275 -2.402 9.569 10 -1 0 1440 +276 -0.427 3.547 10 -1 0 1440 +277 -0.693 0.185 10 -1 0 1440 +278 -7.095 -0.322 10 -1 0 1440 +279 -3.265 -1.652 10 -1 0 1440 +280 4.286 -2.168 10 -1 0 1440 +281 0.518 0.640 10 -1 0 1440 +282 3.692 -0.499 10 -1 0 1440 +283 4.959 2.778 10 -1 0 1440 +284 4.504 1.079 10 -1 0 1440 +285 0.769 1.406 10 -1 0 1440 +286 -6.091 1.864 10 -1 0 1440 +287 -6.450 0.892 10 -1 0 1440 +288 3.716 -1.499 10 -1 0 1440 diff --git a/instances/pr17.txt b/instances/pr17.txt new file mode 100644 index 0000000..ca3a10b --- /dev/null +++ b/instances/pr17.txt @@ -0,0 +1,74 @@ +4 72 480 6 90 + 0 1.063 0.933 0 0 0 1440 + 1 -9.270 -5.918 10 1 0 1440 + 2 7.118 1.254 10 1 0 1440 + 3 3.154 6.664 10 1 0 1440 + 4 -0.469 2.554 10 1 0 1440 + 5 -3.019 6.777 10 1 0 1440 + 6 1.268 -5.747 10 1 0 1440 + 7 -3.235 -2.097 10 1 0 1440 + 8 1.991 4.897 10 1 0 1440 + 9 1.320 -1.914 10 1 0 1440 + 10 5.488 -4.117 10 1 0 1440 + 11 1.506 -2.517 10 1 0 1440 + 12 -5.060 -1.642 10 1 0 1440 + 13 -2.973 1.708 10 1 0 1440 + 14 1.754 0.158 10 1 0 1440 + 15 1.113 7.722 10 1 0 1440 + 16 3.375 7.126 10 1 0 1440 + 17 -5.601 -1.039 10 1 0 1440 + 18 5.787 -1.629 10 1 0 1440 + 19 1.072 -1.879 10 1 95 169 + 20 5.309 -1.875 10 1 216 293 + 21 0.157 0.753 10 1 141 176 + 22 3.153 4.894 10 1 230 312 + 23 -6.683 -3.785 10 1 303 384 + 24 -7.074 6.224 10 1 86 131 + 25 3.254 2.310 10 1 78 135 + 26 -5.145 -3.644 10 1 207 249 + 27 3.646 -2.264 10 1 345 377 + 28 -3.121 4.349 10 1 180 216 + 29 -1.039 3.449 10 1 237 304 + 30 1.472 -1.083 10 1 286 326 + 31 4.710 -2.139 10 1 362 404 + 32 4.378 3.477 10 1 324 362 + 33 5.355 -6.749 10 1 345 414 + 34 2.680 4.652 10 1 84 159 + 35 6.338 1.198 10 1 229 284 + 36 4.719 -0.547 10 1 291 356 + 37 -1.632 -1.127 10 -1 282 369 + 38 7.890 1.765 10 -1 257 293 + 39 7.982 2.227 10 -1 400 462 + 40 1.288 1.692 10 -1 211 292 + 41 -6.798 -0.375 10 -1 478 550 + 42 0.920 -1.860 10 -1 82 152 + 43 -3.595 -1.914 10 -1 376 426 + 44 2.877 4.528 10 -1 388 428 + 45 1.147 6.823 10 -1 465 514 + 46 -2.276 4.550 10 -1 210 281 + 47 -6.567 -2.312 10 -1 284 373 + 48 0.724 0.160 10 -1 405 447 + 49 -2.978 -1.129 10 -1 330 412 + 50 -8.905 1.621 10 -1 471 503 + 51 -4.689 -0.336 10 -1 191 252 + 52 -1.497 3.062 10 -1 331 411 + 53 -1.704 4.977 10 -1 265 301 + 54 3.163 5.362 10 -1 374 444 + 55 -0.358 1.334 10 -1 0 1440 + 56 3.301 5.896 10 -1 0 1440 + 57 -9.295 6.326 10 -1 0 1440 + 58 -0.914 -2.293 10 -1 0 1440 + 59 -3.996 0.620 10 -1 0 1440 + 60 2.843 -1.921 10 -1 0 1440 + 61 -2.854 -0.348 10 -1 0 1440 + 62 3.141 3.686 10 -1 0 1440 + 63 -4.943 6.060 10 -1 0 1440 + 64 -7.283 -2.776 10 -1 0 1440 + 65 6.008 -4.591 10 -1 0 1440 + 66 1.087 -0.390 10 -1 0 1440 + 67 2.512 0.767 10 -1 0 1440 + 68 -4.700 -1.747 10 -1 0 1440 + 69 1.606 3.302 10 -1 0 1440 + 70 2.541 -1.170 10 -1 0 1440 + 71 6.832 -0.514 10 -1 0 1440 + 72 -1.310 6.216 10 -1 0 1440 diff --git a/instances/pr18.txt b/instances/pr18.txt new file mode 100644 index 0000000..ff07a9e --- /dev/null +++ b/instances/pr18.txt @@ -0,0 +1,146 @@ +6 144 480 6 90 + 0 -1.217 -0.009 0 0 0 1440 + 1 -4.029 -4.230 10 1 0 1440 + 2 -6.471 -1.739 10 1 0 1440 + 3 0.506 -1.435 10 1 0 1440 + 4 7.210 2.023 10 1 0 1440 + 5 0.259 -1.500 10 1 0 1440 + 6 -2.418 -7.289 10 1 0 1440 + 7 -1.319 6.650 10 1 0 1440 + 8 3.319 1.369 10 1 0 1440 + 9 6.683 -3.055 10 1 0 1440 + 10 1.993 3.588 10 1 0 1440 + 11 -2.777 3.227 10 1 0 1440 + 12 5.115 -1.683 10 1 0 1440 + 13 -1.921 2.375 10 1 0 1440 + 14 -4.664 -5.295 10 1 0 1440 + 15 -1.059 -1.663 10 1 0 1440 + 16 3.515 1.262 10 1 0 1440 + 17 -3.738 1.226 10 1 0 1440 + 18 8.279 2.584 10 1 0 1440 + 19 0.894 -0.372 10 1 0 1440 + 20 -5.666 2.555 10 1 0 1440 + 21 -5.202 -4.014 10 1 0 1440 + 22 3.927 1.279 10 1 0 1440 + 23 1.976 2.123 10 1 0 1440 + 24 -2.307 -1.266 10 1 0 1440 + 25 1.569 5.237 10 1 0 1440 + 26 5.877 -0.706 10 1 0 1440 + 27 -3.309 7.227 10 1 0 1440 + 28 0.255 4.685 10 1 0 1440 + 29 -1.872 7.313 10 1 0 1440 + 30 -6.763 -2.068 10 1 0 1440 + 31 -7.686 -1.137 10 1 0 1440 + 32 -2.419 -3.826 10 1 0 1440 + 33 -2.037 -3.190 10 1 0 1440 + 34 0.929 3.962 10 1 0 1440 + 35 2.604 3.597 10 1 0 1440 + 36 -5.739 -4.526 10 1 0 1440 + 37 0.149 -6.259 10 1 282 369 + 38 3.494 1.367 10 1 257 293 + 39 -2.229 4.565 10 1 400 462 + 40 -0.592 4.406 10 1 211 292 + 41 -3.845 -2.354 10 1 478 550 + 42 2.889 3.394 10 1 82 152 + 43 -3.539 -0.534 10 1 376 426 + 44 -1.950 1.352 10 1 388 428 + 45 -0.922 -3.099 10 1 465 514 + 46 -2.213 -1.707 10 1 210 281 + 47 -2.283 3.681 10 1 284 373 + 48 -6.136 -1.846 10 1 405 447 + 49 5.013 -6.605 10 1 330 412 + 50 2.565 2.414 10 1 471 503 + 51 6.552 4.281 10 1 191 252 + 52 -6.096 -4.792 10 1 331 411 + 53 -0.907 4.280 10 1 265 301 + 54 -1.906 0.448 10 1 459 506 + 55 -5.407 -0.387 10 1 332 380 + 56 -2.560 -1.887 10 1 124 192 + 57 -1.871 8.430 10 1 70 112 + 58 -7.018 -3.917 10 1 196 272 + 59 -1.464 -0.045 10 1 290 326 + 60 -7.647 -3.892 10 1 462 522 + 61 4.409 1.243 10 1 239 287 + 62 -2.277 -5.087 10 1 143 230 + 63 1.910 4.467 10 1 187 218 + 64 -4.402 -3.994 10 1 134 220 + 65 -0.297 -0.406 10 1 438 477 + 66 -2.426 3.591 10 1 477 519 + 67 -6.188 -7.390 10 1 348 416 + 68 -0.564 -2.672 10 1 84 124 + 69 4.584 -3.683 10 1 377 407 + 70 -5.175 -7.984 10 1 259 313 + 71 -3.301 1.099 10 1 195 262 + 72 -2.565 -0.037 10 1 82 132 + 73 -2.150 6.149 10 -1 410 462 + 74 0.203 2.673 10 -1 114 167 + 75 -2.676 1.481 10 -1 262 297 + 76 -3.726 -4.486 10 -1 436 520 + 77 -0.086 -1.642 10 -1 229 264 + 78 -5.116 3.497 10 -1 426 498 + 79 -4.127 -7.689 10 -1 108 140 + 80 -3.026 7.470 10 -1 334 365 + 81 -4.637 -0.151 10 -1 146 214 + 82 -7.162 7.308 10 -1 158 241 + 83 -4.661 -3.995 10 -1 181 228 + 84 -3.024 6.710 10 -1 89 121 + 85 -4.100 -4.304 10 -1 185 247 + 86 -7.429 -5.231 10 -1 249 316 + 87 -1.761 -7.185 10 -1 132 192 + 88 0.235 -8.181 10 -1 467 497 + 89 -8.549 -5.406 10 -1 429 464 + 90 2.382 1.057 10 -1 224 275 + 91 -2.453 -3.173 10 -1 138 185 + 92 -4.247 -1.501 10 -1 175 240 + 93 -3.362 5.033 10 -1 221 259 + 94 -8.146 -4.156 10 -1 184 244 + 95 -7.350 -4.828 10 -1 142 229 + 96 -0.305 7.090 10 -1 277 331 + 97 0.095 2.546 10 -1 311 386 + 98 -5.414 1.353 10 -1 184 267 + 99 -3.063 0.753 10 -1 77 128 +100 -6.833 -3.428 10 -1 451 501 +101 0.718 5.793 10 -1 442 494 +102 0.471 4.867 10 -1 464 499 +103 5.809 2.638 10 -1 431 517 +104 1.835 3.478 10 -1 98 173 +105 -4.463 -6.197 10 -1 73 132 +106 0.523 2.607 10 -1 113 156 +107 -4.806 -3.676 10 -1 384 438 +108 -0.359 -2.773 10 -1 384 453 +109 0.981 3.690 10 -1 0 1440 +110 5.946 0.123 10 -1 0 1440 +111 -4.752 1.987 10 -1 0 1440 +112 -4.843 -5.032 10 -1 0 1440 +113 4.467 2.095 10 -1 0 1440 +114 -1.923 3.277 10 -1 0 1440 +115 -1.566 1.746 10 -1 0 1440 +116 -9.167 7.772 10 -1 0 1440 +117 -3.003 -7.828 10 -1 0 1440 +118 7.366 3.294 10 -1 0 1440 +119 2.240 -6.008 10 -1 0 1440 +120 6.121 -1.350 10 -1 0 1440 +121 2.213 -5.001 10 -1 0 1440 +122 -0.632 5.667 10 -1 0 1440 +123 -2.047 1.288 10 -1 0 1440 +124 -6.108 -4.477 10 -1 0 1440 +125 -0.958 -1.937 10 -1 0 1440 +126 0.563 -8.850 10 -1 0 1440 +127 -0.262 2.213 10 -1 0 1440 +128 4.050 3.234 10 -1 0 1440 +129 -0.330 3.677 10 -1 0 1440 +130 -5.099 1.978 10 -1 0 1440 +131 -7.052 -0.381 10 -1 0 1440 +132 0.420 0.081 10 -1 0 1440 +133 0.996 2.634 10 -1 0 1440 +134 1.354 -2.131 10 -1 0 1440 +135 -2.187 -1.877 10 -1 0 1440 +136 -3.716 -3.077 10 -1 0 1440 +137 -8.697 1.034 10 -1 0 1440 +138 -4.727 -4.633 10 -1 0 1440 +139 0.409 -1.935 10 -1 0 1440 +140 0.420 3.029 10 -1 0 1440 +141 -4.202 5.399 10 -1 0 1440 +142 3.510 -1.089 10 -1 0 1440 +143 6.119 -5.987 10 -1 0 1440 +144 -3.467 -0.134 10 -1 0 1440 diff --git a/instances/pr19.txt b/instances/pr19.txt new file mode 100644 index 0000000..8dcb06e --- /dev/null +++ b/instances/pr19.txt @@ -0,0 +1,218 @@ +8 216 480 6 90 + 0 0.387 -0.260 0 0 0 1440 + 1 -4.123 -6.636 10 1 0 1440 + 2 3.406 -5.936 10 1 0 1440 + 3 2.092 -5.258 10 1 0 1440 + 4 -3.854 -3.740 10 1 0 1440 + 5 4.106 2.293 10 1 0 1440 + 6 -5.403 -5.313 10 1 0 1440 + 7 0.810 8.072 10 1 0 1440 + 8 8.130 1.341 10 1 0 1440 + 9 1.446 -0.297 10 1 0 1440 + 10 -5.254 6.011 10 1 0 1440 + 11 -5.720 -3.423 10 1 0 1440 + 12 -6.555 -4.022 10 1 0 1440 + 13 -1.975 -1.028 10 1 0 1440 + 14 -2.696 -8.701 10 1 0 1440 + 15 0.319 -8.865 10 1 0 1440 + 16 3.452 3.284 10 1 0 1440 + 17 8.003 0.527 10 1 0 1440 + 18 -3.984 -6.773 10 1 0 1440 + 19 1.460 1.137 10 1 0 1440 + 20 -2.099 -8.051 10 1 0 1440 + 21 4.824 4.728 10 1 0 1440 + 22 5.934 -3.186 10 1 0 1440 + 23 -1.399 -4.562 10 1 0 1440 + 24 3.240 -3.253 10 1 0 1440 + 25 0.283 5.082 10 1 0 1440 + 26 -6.608 -3.469 10 1 0 1440 + 27 -1.366 1.864 10 1 0 1440 + 28 -5.934 1.277 10 1 0 1440 + 29 -0.513 -1.846 10 1 0 1440 + 30 -2.296 -2.173 10 1 0 1440 + 31 5.813 4.661 10 1 0 1440 + 32 -4.960 -7.662 10 1 0 1440 + 33 -0.480 4.304 10 1 0 1440 + 34 6.862 -1.962 10 1 0 1440 + 35 3.792 6.360 10 1 0 1440 + 36 0.125 -2.655 10 1 0 1440 + 37 -3.795 0.169 10 1 0 1440 + 38 -4.050 0.804 10 1 0 1440 + 39 -0.839 -3.868 10 1 0 1440 + 40 -3.673 2.549 10 1 0 1440 + 41 -4.775 -5.007 10 1 0 1440 + 42 2.260 -2.836 10 1 0 1440 + 43 -3.637 -4.816 10 1 0 1440 + 44 7.545 -1.342 10 1 0 1440 + 45 -6.452 -1.323 10 1 0 1440 + 46 0.126 2.916 10 1 0 1440 + 47 -0.157 -3.597 10 1 0 1440 + 48 4.675 0.670 10 1 0 1440 + 49 8.208 2.706 10 1 0 1440 + 50 7.469 1.937 10 1 0 1440 + 51 4.702 0.934 10 1 0 1440 + 52 -6.204 -2.133 10 1 0 1440 + 53 0.919 2.004 10 1 0 1440 + 54 -0.309 2.158 10 1 0 1440 + 55 -7.545 1.309 10 1 343 432 + 56 1.003 -6.374 10 1 101 133 + 57 7.181 2.650 10 1 278 327 + 58 1.884 -3.802 10 1 105 137 + 59 -1.054 -3.131 10 1 477 556 + 60 0.825 -9.115 10 1 436 488 + 61 7.282 -3.892 10 1 346 400 + 62 -3.016 3.878 10 1 194 253 + 63 -5.626 -0.555 10 1 314 377 + 64 -0.840 -3.760 10 1 70 142 + 65 1.502 1.371 10 1 332 399 + 66 -6.020 2.429 10 1 121 181 + 67 -1.379 -2.711 10 1 219 258 + 68 -3.480 -2.220 10 1 388 464 + 69 6.964 8.306 10 1 87 170 + 70 -4.444 3.009 10 1 106 180 + 71 4.863 0.302 10 1 426 468 + 72 -1.531 5.171 10 1 391 444 + 73 3.626 2.678 10 1 284 367 + 74 5.996 2.431 10 1 242 303 + 75 5.530 0.663 10 1 361 410 + 76 3.996 4.830 10 1 442 495 + 77 -4.889 -7.110 10 1 370 413 + 78 -0.234 -6.291 10 1 436 486 + 79 0.949 -4.190 10 1 391 476 + 80 -5.467 -1.844 10 1 79 135 + 81 1.098 -0.761 10 1 288 329 + 82 -6.982 -5.035 10 1 457 542 + 83 -4.031 -0.745 10 1 204 277 + 84 6.224 4.363 10 1 350 404 + 85 2.908 6.312 10 1 318 396 + 86 -1.207 -2.151 10 1 123 182 + 87 1.473 2.891 10 1 64 150 + 88 -6.309 -6.011 10 1 429 491 + 89 3.365 -0.093 10 1 412 460 + 90 -1.222 1.415 10 1 91 154 + 91 -8.997 5.151 10 1 331 420 + 92 -0.076 4.134 10 1 461 514 + 93 8.069 3.298 10 1 151 232 + 94 -5.339 -1.424 10 1 366 396 + 95 -5.328 -6.414 10 1 385 461 + 96 7.326 1.067 10 1 247 296 + 97 5.961 1.345 10 1 467 520 + 98 -3.701 0.648 10 1 161 209 + 99 -5.366 2.169 10 1 110 195 +100 -3.689 1.837 10 1 364 438 +101 -0.461 -1.381 10 1 368 450 +102 5.380 3.699 10 1 153 227 +103 4.847 -6.604 10 1 403 439 +104 -4.639 -2.093 10 1 181 250 +105 -1.504 -4.085 10 1 235 286 +106 -7.362 -0.955 10 1 149 182 +107 9.285 4.559 10 1 206 246 +108 3.356 2.806 10 1 248 312 +109 4.732 2.441 10 -1 69 109 +110 -0.661 -3.016 10 -1 301 378 +111 1.210 2.384 10 -1 462 493 +112 -6.196 2.624 10 -1 108 193 +113 2.388 0.981 10 -1 232 283 +114 4.978 0.687 10 -1 161 222 +115 -5.302 -2.148 10 -1 181 268 +116 5.496 0.298 10 -1 172 203 +117 0.487 -6.959 10 -1 413 472 +118 3.395 4.521 10 -1 382 451 +119 -3.217 -2.362 10 -1 309 342 +120 -1.755 -4.676 10 -1 192 222 +121 3.174 3.397 10 -1 236 297 +122 4.537 2.213 10 -1 92 168 +123 -0.522 -2.311 10 -1 352 413 +124 -5.106 -4.655 10 -1 201 274 +125 1.177 1.113 10 -1 357 441 +126 -3.976 -1.302 10 -1 277 346 +127 2.793 2.932 10 -1 451 518 +128 3.374 6.659 10 -1 308 358 +129 -9.181 2.986 10 -1 475 554 +130 -2.463 -6.870 10 -1 427 473 +131 4.466 2.046 10 -1 394 432 +132 4.545 -2.107 10 -1 185 253 +133 -3.737 -1.210 10 -1 325 358 +134 4.200 0.015 10 -1 185 228 +135 -4.282 -3.017 10 -1 111 177 +136 3.491 -0.458 10 -1 161 223 +137 -6.514 -4.308 10 -1 118 167 +138 2.027 -0.500 10 -1 192 272 +139 -3.673 -0.893 10 -1 415 484 +140 -2.698 -1.957 10 -1 293 356 +141 -3.130 -8.381 10 -1 296 330 +142 -2.679 1.251 10 -1 151 210 +143 -3.936 -5.852 10 -1 356 434 +144 -3.437 0.061 10 -1 412 483 +145 4.337 0.419 10 -1 329 401 +146 -3.823 -0.945 10 -1 467 523 +147 -2.561 -9.924 10 -1 420 466 +148 4.806 2.952 10 -1 92 151 +149 -4.363 -3.232 10 -1 201 253 +150 -1.660 -2.933 10 -1 361 418 +151 -2.981 -1.241 10 -1 474 561 +152 -5.191 -2.871 10 -1 61 98 +153 -0.180 -1.867 10 -1 177 226 +154 1.874 2.140 10 -1 465 502 +155 6.012 0.779 10 -1 467 528 +156 4.308 4.202 10 -1 344 406 +157 -3.944 -0.590 10 -1 309 392 +158 -3.589 -1.603 10 -1 72 120 +159 -4.183 3.899 10 -1 355 437 +160 8.450 2.982 10 -1 477 527 +161 -1.756 -1.048 10 -1 305 392 +162 -4.838 -4.892 10 -1 200 238 +163 -4.934 -1.797 10 -1 0 1440 +164 1.609 -0.249 10 -1 0 1440 +165 6.553 1.403 10 -1 0 1440 +166 -0.293 1.322 10 -1 0 1440 +167 -1.877 -2.366 10 -1 0 1440 +168 -9.110 -8.074 10 -1 0 1440 +169 -2.109 -1.329 10 -1 0 1440 +170 4.699 1.722 10 -1 0 1440 +171 -6.196 -3.304 10 -1 0 1440 +172 -0.900 -2.545 10 -1 0 1440 +173 3.366 -0.767 10 -1 0 1440 +174 -2.559 -1.084 10 -1 0 1440 +175 3.656 -0.244 10 -1 0 1440 +176 0.714 2.482 10 -1 0 1440 +177 -4.317 -3.049 10 -1 0 1440 +178 -2.123 0.075 10 -1 0 1440 +179 1.970 1.077 10 -1 0 1440 +180 -0.649 -2.942 10 -1 0 1440 +181 5.439 0.863 10 -1 0 1440 +182 6.420 7.761 10 -1 0 1440 +183 4.038 0.161 10 -1 0 1440 +184 -4.171 -0.513 10 -1 0 1440 +185 7.427 -1.992 10 -1 0 1440 +186 -7.400 -5.463 10 -1 0 1440 +187 2.971 1.545 10 -1 0 1440 +188 2.378 1.218 10 -1 0 1440 +189 4.258 4.533 10 -1 0 1440 +190 -1.673 -1.656 10 -1 0 1440 +191 -1.470 -0.012 10 -1 0 1440 +192 -1.977 0.839 10 -1 0 1440 +193 -3.027 1.489 10 -1 0 1440 +194 -6.312 -6.746 10 -1 0 1440 +195 8.603 3.892 10 -1 0 1440 +196 7.948 -2.487 10 -1 0 1440 +197 3.514 1.473 10 -1 0 1440 +198 -4.937 -0.905 10 -1 0 1440 +199 -4.947 -1.758 10 -1 0 1440 +200 5.750 1.633 10 -1 0 1440 +201 5.489 1.202 10 -1 0 1440 +202 -5.303 -3.318 10 -1 0 1440 +203 -0.041 1.664 10 -1 0 1440 +204 2.159 1.614 10 -1 0 1440 +205 -4.692 -4.926 10 -1 0 1440 +206 1.846 1.973 10 -1 0 1440 +207 3.582 1.976 10 -1 0 1440 +208 7.187 2.903 10 -1 0 1440 +209 -5.638 -4.276 10 -1 0 1440 +210 -2.580 2.516 10 -1 0 1440 +211 -0.568 3.385 10 -1 0 1440 +212 5.404 -0.529 10 -1 0 1440 +213 -6.307 2.738 10 -1 0 1440 +214 -1.686 -4.977 10 -1 0 1440 +215 4.792 1.363 10 -1 0 1440 +216 -1.072 -0.208 10 -1 0 1440 diff --git a/instances/pr20.txt b/instances/pr20.txt new file mode 100644 index 0000000..3834c3f --- /dev/null +++ b/instances/pr20.txt @@ -0,0 +1,290 @@ +10 288 480 6 90 + 0 -1.437 -2.034 0 0 0 1440 + 1 1.280 0.189 10 1 0 1440 + 2 1.821 0.137 10 1 0 1440 + 3 5.795 -4.878 10 1 0 1440 + 4 -5.243 -8.409 10 1 0 1440 + 5 6.080 -3.259 10 1 0 1440 + 6 2.315 0.420 10 1 0 1440 + 7 2.538 2.299 10 1 0 1440 + 8 2.551 -5.298 10 1 0 1440 + 9 -4.926 -4.172 10 1 0 1440 + 10 -3.756 -4.173 10 1 0 1440 + 11 -1.452 4.896 10 1 0 1440 + 12 4.123 -2.450 10 1 0 1440 + 13 -2.186 0.092 10 1 0 1440 + 14 -4.818 -1.628 10 1 0 1440 + 15 -0.778 4.435 10 1 0 1440 + 16 2.080 1.076 10 1 0 1440 + 17 -2.971 -4.633 10 1 0 1440 + 18 -2.020 -5.956 10 1 0 1440 + 19 -8.708 -5.290 10 1 0 1440 + 20 0.305 -0.630 10 1 0 1440 + 21 1.187 0.526 10 1 0 1440 + 22 -2.407 -5.593 10 1 0 1440 + 23 -2.280 0.566 10 1 0 1440 + 24 -5.190 0.941 10 1 0 1440 + 25 1.273 -4.097 10 1 0 1440 + 26 -3.099 0.765 10 1 0 1440 + 27 3.751 0.046 10 1 0 1440 + 28 0.295 -0.856 10 1 0 1440 + 29 0.055 0.364 10 1 0 1440 + 30 -5.248 0.971 10 1 0 1440 + 31 3.394 -4.872 10 1 0 1440 + 32 -1.313 -5.360 10 1 0 1440 + 33 -9.959 2.330 10 1 0 1440 + 34 0.644 -0.352 10 1 0 1440 + 35 -1.403 -1.982 10 1 0 1440 + 36 -2.468 1.661 10 1 0 1440 + 37 -1.026 -8.177 10 1 0 1440 + 38 3.586 0.560 10 1 0 1440 + 39 -1.160 4.291 10 1 0 1440 + 40 -3.466 -1.547 10 1 0 1440 + 41 6.685 0.114 10 1 0 1440 + 42 0.687 -0.142 10 1 0 1440 + 43 0.166 -0.223 10 1 0 1440 + 44 3.756 1.145 10 1 0 1440 + 45 5.167 -2.634 10 1 0 1440 + 46 1.902 -1.089 10 1 0 1440 + 47 -3.798 -0.636 10 1 0 1440 + 48 -5.654 -4.233 10 1 0 1440 + 49 0.110 -1.462 10 1 0 1440 + 50 -5.624 -0.308 10 1 0 1440 + 51 -2.367 -1.529 10 1 0 1440 + 52 -3.428 -0.141 10 1 0 1440 + 53 -6.418 6.381 10 1 0 1440 + 54 -4.708 -2.039 10 1 0 1440 + 55 -3.371 0.838 10 1 0 1440 + 56 3.429 2.603 10 1 0 1440 + 57 -3.886 4.211 10 1 0 1440 + 58 -9.273 4.489 10 1 0 1440 + 59 2.363 2.764 10 1 0 1440 + 60 -6.714 -6.708 10 1 0 1440 + 61 2.573 -2.584 10 1 0 1440 + 62 -4.098 -1.690 10 1 0 1440 + 63 7.701 -0.610 10 1 0 1440 + 64 -5.481 -0.194 10 1 0 1440 + 65 -5.394 -2.966 10 1 0 1440 + 66 1.609 -2.789 10 1 0 1440 + 67 -5.944 3.649 10 1 0 1440 + 68 3.447 2.539 10 1 0 1440 + 69 -0.928 -0.669 10 1 0 1440 + 70 -8.556 -2.048 10 1 0 1440 + 71 2.952 1.835 10 1 0 1440 + 72 2.781 0.651 10 1 0 1440 + 73 4.215 -2.558 10 1 290 348 + 74 8.220 8.583 10 1 299 335 + 75 -4.777 -3.559 10 1 250 339 + 76 2.202 -2.035 10 1 199 261 + 77 -5.576 -3.349 10 1 250 281 + 78 6.201 -0.145 10 1 215 291 + 79 2.555 -0.380 10 1 301 346 + 80 -4.337 -0.738 10 1 216 292 + 81 6.030 5.264 10 1 377 464 + 82 -9.616 3.410 10 1 64 118 + 83 -3.281 -0.385 10 1 179 249 + 84 -4.783 -4.520 10 1 388 461 + 85 -3.113 -9.385 10 1 195 244 + 86 -1.701 -2.186 10 1 303 353 + 87 -0.839 -0.226 10 1 423 458 + 88 3.583 1.315 10 1 288 342 + 89 2.932 5.447 10 1 300 336 + 90 4.835 -0.878 10 1 278 309 + 91 -0.293 2.704 10 1 101 182 + 92 -1.662 -5.539 10 1 301 364 + 93 -4.085 -4.774 10 1 431 517 + 94 -1.288 -0.204 10 1 197 254 + 95 -5.178 0.728 10 1 143 214 + 96 -3.292 2.383 10 1 156 243 + 97 1.398 -3.452 10 1 337 381 + 98 -3.583 -2.383 10 1 215 301 + 99 9.186 0.554 10 1 446 485 +100 -2.844 -3.418 10 1 338 382 +101 3.384 2.788 10 1 257 301 +102 9.843 3.135 10 1 307 357 +103 -5.775 -2.775 10 1 200 237 +104 -4.389 1.301 10 1 374 458 +105 3.759 4.977 10 1 163 209 +106 -0.369 0.737 10 1 451 501 +107 -9.824 6.166 10 1 110 170 +108 -2.356 -3.252 10 1 437 467 +109 2.298 -1.811 10 1 248 291 +110 4.391 -0.298 10 1 254 322 +111 7.151 1.165 10 1 447 518 +112 -4.301 -3.870 10 1 312 376 +113 -8.395 0.218 10 1 452 540 +114 1.109 -4.094 10 1 281 362 +115 2.717 -1.333 10 1 112 153 +116 -8.610 -5.981 10 1 101 166 +117 -2.234 -7.828 10 1 241 312 +118 -3.873 -3.359 10 1 450 525 +119 -0.123 -2.867 10 1 405 475 +120 8.133 -4.424 10 1 342 376 +121 5.190 1.989 10 1 458 524 +122 -3.497 -2.786 10 1 233 267 +123 -5.148 -2.325 10 1 106 154 +124 -0.065 -4.606 10 1 90 153 +125 6.822 -6.699 10 1 285 347 +126 -1.515 -2.548 10 1 146 203 +127 2.241 -3.438 10 1 157 235 +128 3.618 -1.043 10 1 77 116 +129 -2.364 -4.768 10 1 387 451 +130 -1.472 3.268 10 1 68 152 +131 1.682 -1.272 10 1 378 415 +132 9.338 2.300 10 1 269 310 +133 4.034 -2.418 10 1 399 454 +134 0.553 -0.490 10 1 462 529 +135 -7.801 0.127 10 1 105 172 +136 5.157 -4.567 10 1 353 386 +137 4.925 -3.090 10 1 158 194 +138 -6.220 -2.140 10 1 113 163 +139 -0.505 0.731 10 1 238 279 +140 0.173 -7.022 10 1 439 526 +141 0.136 -0.356 10 1 369 405 +142 -1.552 1.643 10 1 235 323 +143 -3.160 -6.094 10 1 446 503 +144 -4.700 -5.556 10 1 115 187 +145 0.230 0.554 10 -1 72 111 +146 -3.033 -0.058 10 -1 314 391 +147 -1.682 1.766 10 -1 174 210 +148 5.266 2.903 10 -1 471 505 +149 -1.199 -8.377 10 -1 284 370 +150 4.163 4.305 10 -1 358 426 +151 0.851 -0.254 10 -1 299 353 +152 3.151 -0.898 10 -1 354 432 +153 -0.334 -3.624 10 -1 279 358 +154 -2.638 1.378 10 -1 122 208 +155 2.843 1.057 10 -1 71 104 +156 0.597 2.729 10 -1 440 515 +157 -3.213 -4.507 10 -1 128 177 +158 3.110 -0.792 10 -1 367 401 +159 2.820 -2.975 10 -1 390 471 +160 -3.961 -3.359 10 -1 388 466 +161 -1.922 -0.513 10 -1 67 120 +162 -1.011 6.998 10 -1 314 361 +163 2.289 -4.435 10 -1 267 332 +164 -3.474 0.058 10 -1 215 246 +165 -4.495 -7.773 10 -1 280 314 +166 -2.375 -5.601 10 -1 341 376 +167 6.907 -9.713 10 -1 266 318 +168 1.217 -5.987 10 -1 436 466 +169 4.734 1.736 10 -1 144 176 +170 -0.471 1.406 10 -1 463 506 +171 -5.237 -5.024 10 -1 101 183 +172 3.922 -2.977 10 -1 476 521 +173 -4.232 -6.060 10 -1 141 214 +174 1.914 4.115 10 -1 204 292 +175 -5.471 -1.760 10 -1 306 343 +176 1.174 -8.317 10 -1 394 460 +177 -4.058 -5.325 10 -1 276 330 +178 -0.642 2.197 10 -1 435 465 +179 -3.127 -3.461 10 -1 474 519 +180 -0.367 -2.687 10 -1 75 135 +181 1.341 -2.230 10 -1 205 277 +182 -9.589 -8.632 10 -1 313 393 +183 8.898 -5.339 10 -1 93 153 +184 -5.505 -3.254 10 -1 417 463 +185 2.785 -1.003 10 -1 289 367 +186 4.092 -3.609 10 -1 273 341 +187 -5.835 1.581 10 -1 345 404 +188 -5.216 -7.472 10 -1 440 522 +189 -6.677 -3.494 10 -1 153 198 +190 -3.337 -6.202 10 -1 418 496 +191 -0.865 3.171 10 -1 219 287 +192 -2.617 -5.615 10 -1 233 316 +193 -3.987 -5.338 10 -1 80 128 +194 7.164 -3.698 10 -1 439 471 +195 -9.692 0.841 10 -1 301 387 +196 -0.291 3.620 10 -1 289 374 +197 -5.325 1.410 10 -1 332 370 +198 6.732 -3.973 10 -1 379 452 +199 -0.653 1.198 10 -1 332 398 +200 1.643 3.322 10 -1 63 104 +201 -1.906 -5.692 10 -1 237 298 +202 2.519 -2.105 10 -1 412 448 +203 3.785 -0.552 10 -1 66 140 +204 -1.648 4.866 10 -1 469 513 +205 0.234 -1.652 10 -1 478 557 +206 -4.862 -1.239 10 -1 79 131 +207 -4.262 -5.001 10 -1 259 316 +208 1.602 1.117 10 -1 173 234 +209 -8.041 -6.058 10 -1 382 422 +210 -9.507 4.429 10 -1 295 345 +211 -0.689 2.488 10 -1 107 143 +212 -0.480 2.167 10 -1 170 245 +213 0.704 -4.534 10 -1 167 198 +214 3.129 -3.990 10 -1 266 350 +215 1.498 2.617 10 -1 326 386 +216 3.320 -5.229 10 -1 388 465 +217 -5.928 3.967 10 -1 0 1440 +218 3.005 -3.682 10 -1 0 1440 +219 0.935 -3.904 10 -1 0 1440 +220 -1.065 5.443 10 -1 0 1440 +221 2.086 -2.647 10 -1 0 1440 +222 1.962 1.786 10 -1 0 1440 +223 -3.698 -9.295 10 -1 0 1440 +224 -0.376 5.987 10 -1 0 1440 +225 1.168 -6.334 10 -1 0 1440 +226 0.447 -3.613 10 -1 0 1440 +227 4.704 -4.125 10 -1 0 1440 +228 2.994 -5.871 10 -1 0 1440 +229 -7.057 -0.704 10 -1 0 1440 +230 5.626 0.182 10 -1 0 1440 +231 4.621 -5.352 10 -1 0 1440 +232 0.637 -1.426 10 -1 0 1440 +233 -3.454 -3.950 10 -1 0 1440 +234 -5.054 2.836 10 -1 0 1440 +235 -6.144 -1.090 10 -1 0 1440 +236 -3.082 1.790 10 -1 0 1440 +237 4.966 2.447 10 -1 0 1440 +238 -6.978 -4.141 10 -1 0 1440 +239 -1.894 5.769 10 -1 0 1440 +240 -2.245 1.577 10 -1 0 1440 +241 -0.760 3.703 10 -1 0 1440 +242 2.744 1.755 10 -1 0 1440 +243 4.553 -0.513 10 -1 0 1440 +244 -3.355 -2.559 10 -1 0 1440 +245 -0.464 5.375 10 -1 0 1440 +246 -4.112 -1.336 10 -1 0 1440 +247 2.301 -4.570 10 -1 0 1440 +248 1.723 0.510 10 -1 0 1440 +249 -0.682 -1.987 10 -1 0 1440 +250 5.297 5.141 10 -1 0 1440 +251 -2.866 -5.094 10 -1 0 1440 +252 6.968 -5.152 10 -1 0 1440 +253 3.688 -1.737 10 -1 0 1440 +254 -1.966 4.204 10 -1 0 1440 +255 7.213 6.540 10 -1 0 1440 +256 -7.137 5.986 10 -1 0 1440 +257 1.832 -3.775 10 -1 0 1440 +258 1.812 0.048 10 -1 0 1440 +259 -0.111 -3.068 10 -1 0 1440 +260 -4.457 -4.405 10 -1 0 1440 +261 -2.806 -5.944 10 -1 0 1440 +262 -0.795 0.464 10 -1 0 1440 +263 -3.737 -2.853 10 -1 0 1440 +264 0.439 -3.849 10 -1 0 1440 +265 -4.459 -3.533 10 -1 0 1440 +266 -5.671 -3.925 10 -1 0 1440 +267 1.345 -3.216 10 -1 0 1440 +268 -2.034 -1.118 10 -1 0 1440 +269 0.344 -5.273 10 -1 0 1440 +270 4.058 -5.449 10 -1 0 1440 +271 3.195 -2.542 10 -1 0 1440 +272 -5.743 3.853 10 -1 0 1440 +273 4.751 -4.204 10 -1 0 1440 +274 -2.814 -4.161 10 -1 0 1440 +275 -0.226 -0.508 10 -1 0 1440 +276 -2.717 -2.794 10 -1 0 1440 +277 -2.405 -4.719 10 -1 0 1440 +278 -7.752 -5.508 10 -1 0 1440 +279 -6.204 -4.344 10 -1 0 1440 +280 -7.194 -2.016 10 -1 0 1440 +281 -6.650 -3.979 10 -1 0 1440 +282 1.459 4.844 10 -1 0 1440 +283 3.137 -2.946 10 -1 0 1440 +284 0.651 -4.612 10 -1 0 1440 +285 0.965 3.951 10 -1 0 1440 +286 1.604 1.668 10 -1 0 1440 +287 0.774 -7.538 10 -1 0 1440 +288 -2.717 -0.446 10 -1 0 1440 diff --git a/instances/result_03.txt b/instances/result_03.txt new file mode 100644 index 0000000..ed70917 --- /dev/null +++ b/instances/result_03.txt @@ -0,0 +1,89 @@ +<-- start execution 1 --> +Temps actuel = 08:29:42 +{1: [0, 3, 75, 8, 80, 10, 82, 16, 88, 24, 96, 26, 98, 31, 103, 35, 107, 37, 109, 47, 119, 48, 120, 53, 125, 54, 126, 57, 129, 58, 130, 63, 135, 66, 138, 0], 2: [0, 6, 78, 12, 84, 41, 113, 45, 117, 71, 143, 0], 3: [0, 27, 99, 39, 111, 50, 122, 55, 127, 60, 132, 64, 136, 0], 4: [0, 7, 79, 17, 89, 43, 115, 44, 116, 0], 5: [0, 9, 81, 14, 86, 18, 90, 21, 93, 30, 102, 46, 118, 56, 128, 62, 134, 65, 137, 68, 140, 72, 144, 0], 6: [0, 4, 76, 5, 77, 13, 85, 15, 87, 19, 91, 22, 94, 25, 97, 28, 100, 36, 108, 38, 110, 49, 121, 51, 123, 70, 142, 0], 7: [0, 1, 73, 2, 74, 11, 83, 20, 92, 23, 95, 29, 101, 32, 104, 33, 105, 34, 106, 40, 112, 42, 114, 52, 124, 59, 131, 61, 133, 67, 139, 69, 141, 0]} [4249.283060974854, 1165.493677295403] +{1: [0, 1, 73, 5, 77, 7, 79, 11, 83, 14, 86, 17, 89, 18, 90, 31, 103, 36, 108, 51, 123, 52, 124, 53, 125, 56, 128, 57, 129, 58, 130, 59, 131, 66, 138, 0], 2: [0, 4, 76, 24, 96, 26, 98, 33, 105, 40, 112, 46, 118, 50, 122, 55, 127, 72, 144, 0], 3: [0, 3, 75, 9, 81, 10, 82, 12, 84, 21, 93, 25, 97, 35, 107, 38, 110, 44, 116, 45, 117, 62, 134, 64, 136, 69, 141, 0], 4: [0, 22, 94, 34, 106, 39, 111, 42, 114, 43, 115, 63, 135, 65, 137, 0], 5: [0, 6, 78, 8, 80, 19, 91, 27, 99, 29, 101, 32, 104, 37, 109, 47, 119, 48, 120, 54, 126, 68, 140, 0], 6: [0, 2, 74, 13, 85, 20, 92, 23, 95, 30, 102, 41, 113, 49, 121, 61, 133, 67, 139, 0], 7: [0, 15, 87, 16, 88, 28, 100, 60, 132, 70, 142, 71, 143, 0]} [4556.8615983476575, 1161.5332130503932] +{1: [0, 6, 78, 9, 81, 10, 82, 11, 83, 13, 85, 15, 87, 16, 88, 25, 97, 27, 99, 32, 104, 35, 107, 38, 110, 43, 115, 52, 124, 66, 138, 70, 142, 72, 144, 0], 2: [0, 21, 93, 30, 102, 51, 123, 60, 132, 68, 140, 0], 3: [0, 20, 92, 23, 95, 33, 105, 37, 109, 40, 112, 41, 113, 42, 114, 61, 133, 64, 136, 65, 137, 0], 4: [0, 2, 74, 3, 75, 7, 79, 17, 89, 24, 96, 45, 117, 49, 121, 50, 122, 54, 126, 58, 130, 0], 5: [0, 8, 80, 14, 86, 19, 91, 26, 98, 28, 100, 44, 116, 48, 120, 55, 127, 56, 128, 57, 129, 59, 131, 69, 141, 0], 6: [0, 1, 73, 18, 90, 22, 94, 29, 101, 46, 118, 47, 119, 63, 135, 67, 139, 71, 143, 0], 7: [0, 4, 76, 5, 77, 12, 84, 31, 103, 34, 106, 36, 108, 39, 111, 53, 125, 62, 134, 0]} [4012.0566915013046, 1169.0548620412571] +{1: [0, 4, 76, 6, 78, 10, 82, 11, 83, 13, 85, 15, 87, 16, 88, 24, 96, 25, 97, 32, 104, 43, 115, 52, 124, 60, 132, 66, 138, 70, 142, 71, 143, 72, 144, 0], 2: [0, 21, 93, 30, 102, 35, 107, 51, 123, 68, 140, 0], 3: [0, 18, 90, 20, 92, 23, 95, 26, 98, 33, 105, 40, 112, 41, 113, 42, 114, 61, 133, 65, 137, 0], 4: [0, 2, 74, 3, 75, 7, 79, 19, 91, 38, 110, 45, 117, 48, 120, 50, 122, 58, 130, 69, 141, 0], 5: [0, 8, 80, 14, 86, 17, 89, 28, 100, 37, 109, 44, 116, 49, 121, 54, 126, 55, 127, 56, 128, 57, 129, 59, 131, 0], 6: [0, 1, 73, 27, 99, 29, 101, 46, 118, 47, 119, 53, 125, 63, 135, 64, 136, 67, 139, 0], 7: [0, 5, 77, 9, 81, 12, 84, 22, 94, 31, 103, 34, 106, 36, 108, 39, 111, 62, 134, 0]} [4014.5043724017387, 1123.3622788128582] +Temps actuel = 09:30:56 +<-- end execution 1 --> +<-- start execution 1 --> +Temps actuel = 10:13:34 +{1: [0, 2, 74, 6, 78, 33, 105, 34, 106, 52, 124, 59, 131, 0], 2: [0, 10, 82, 14, 86, 25, 97, 31, 103, 35, 107, 36, 108, 44, 116, 48, 120, 57, 129, 58, 130, 60, 132, 66, 138, 67, 139, 71, 143, 0], 3: [0, 7, 79, 9, 81, 16, 88, 18, 90, 20, 92, 22, 94, 24, 96, 27, 99, 32, 104, 39, 111, 49, 121, 51, 123, 55, 127, 61, 133, 62, 134, 63, 135, 68, 140, 0], 4: [0, 1, 73, 4, 76, 11, 83, 13, 85, 19, 91, 21, 93, 28, 100, 38, 110, 40, 112, 41, 113, 46, 118, 54, 126, 72, 144, 0], 5: [0, 26, 98, 29, 101, 0], 6: [0, 5, 77, 12, 84, 15, 87, 17, 89, 30, 102, 42, 114, 43, 115, 56, 128, 64, 136, 69, 141, 70, 142, 0], 7: [0, 3, 75, 8, 80, 23, 95, 37, 109, 45, 117, 47, 119, 50, 122, 53, 125, 65, 137, 0]} [4196.275485991011, 1116.4317180627122] +{1: [0, 5, 77, 11, 83, 12, 84, 17, 89, 20, 92, 27, 99, 31, 103, 35, 107, 46, 118, 59, 131, 60, 132, 63, 135, 64, 136, 67, 139, 0], 2: [0, 1, 73, 14, 86, 19, 91, 33, 105, 47, 119, 56, 128, 0], 3: [0, 3, 75, 9, 81, 15, 87, 16, 88, 29, 101, 43, 115, 57, 129, 61, 133, 65, 137, 72, 144, 0], 4: [0, 8, 80, 13, 85, 21, 93, 24, 96, 28, 100, 34, 106, 36, 108, 41, 113, 44, 116, 48, 120, 58, 130, 66, 138, 68, 140, 0], 5: [0, 2, 74, 4, 76, 6, 78, 10, 82, 22, 94, 30, 102, 37, 109, 40, 112, 53, 125, 54, 126, 70, 142, 0], 6: [0, 25, 97, 38, 110, 42, 114, 45, 117, 50, 122, 52, 124, 55, 127, 62, 134, 0], 7: [0, 7, 79, 18, 90, 23, 95, 26, 98, 32, 104, 39, 111, 49, 121, 51, 123, 69, 141, 71, 143, 0]} [4287.206733309064, 1116.0510758360058] +{1: [0, 8, 80, 26, 98, 29, 101, 59, 131, 64, 136, 0], 2: [0, 3, 75, 4, 76, 7, 79, 12, 84, 15, 87, 16, 88, 17, 89, 24, 96, 28, 100, 51, 123, 54, 126, 55, 127, 61, 133, 67, 139, 0], 3: [0, 11, 83, 32, 104, 35, 107, 36, 108, 39, 111, 41, 113, 44, 116, 58, 130, 63, 135, 65, 137, 72, 144, 0], 4: [0, 1, 73, 5, 77, 14, 86, 34, 106, 48, 120, 49, 121, 53, 125, 56, 128, 57, 129, 60, 132, 0], 5: [0, 33, 69, 105, 141, 0], 6: [0, 6, 78, 10, 82, 13, 85, 18, 90, 19, 91, 22, 94, 25, 97, 31, 103, 40, 112, 42, 114, 43, 115, 46, 118, 47, 119, 50, 122, 52, 124, 68, 140, 70, 142, 71, 143, 0], 7: [0, 2, 74, 9, 81, 20, 92, 21, 93, 23, 95, 27, 99, 30, 102, 37, 109, 38, 110, 45, 117, 62, 134, 66, 138, 0]} [3741.8333908433433, 1113.2555400766291] +{1: [0, 8, 80, 26, 98, 29, 101, 59, 131, 64, 136, 0], 2: [0, 3, 75, 4, 76, 7, 79, 12, 84, 15, 87, 16, 88, 17, 89, 24, 96, 28, 100, 51, 123, 52, 124, 54, 126, 55, 127, 61, 133, 0], 3: [0, 11, 83, 32, 104, 35, 107, 36, 108, 39, 111, 41, 113, 44, 116, 58, 130, 63, 135, 65, 137, 72, 144, 0], 4: [0, 1, 73, 5, 77, 14, 86, 34, 106, 48, 120, 49, 121, 53, 125, 56, 128, 57, 129, 60, 132, 0], 5: [0, 33, 69, 105, 141, 0], 6: [0, 6, 78, 10, 82, 13, 85, 18, 90, 19, 91, 22, 94, 25, 97, 31, 103, 40, 112, 42, 114, 43, 115, 46, 118, 47, 119, 50, 122, 67, 139, 68, 140, 70, 142, 71, 143, 0], 7: [0, 2, 74, 9, 81, 20, 92, 21, 93, 23, 95, 27, 99, 30, 102, 37, 109, 38, 110, 45, 117, 62, 134, 66, 138, 0]} [3748.1264583481725, 1119.548607581458] +Temps actuel = 11:22:53 +<-- end execution 1 --> +<-- start execution 2 --> +Temps actuel = 11:22:53 +{1: [0, 5, 77, 9, 81, 18, 90, 21, 93, 22, 94, 25, 97, 42, 114, 43, 115, 44, 116, 48, 120, 58, 130, 65, 137, 66, 138, 0], 2: [0, 6, 78, 7, 79, 8, 80, 12, 84, 15, 87, 17, 89, 46, 118, 50, 122, 60, 132, 64, 136, 71, 143, 0], 3: [0, 14, 86, 23, 95, 30, 102, 37, 109, 39, 111, 51, 123, 54, 126, 55, 127, 56, 128, 57, 129, 61, 133, 68, 140, 0], 4: [0, 1, 73, 4, 76, 13, 85, 24, 96, 29, 101, 31, 103, 45, 117, 52, 124, 63, 135, 70, 142, 0], 5: [0, 11, 83, 16, 88, 26, 98, 28, 100, 32, 104, 34, 106, 47, 119, 59, 131, 62, 134, 0], 6: [0, 3, 75, 10, 82, 19, 91, 27, 99, 35, 107, 40, 112, 53, 125, 69, 141, 72, 144, 0], 7: [0, 2, 74, 20, 92, 33, 105, 36, 108, 38, 110, 41, 113, 49, 121, 67, 139, 0]} [4213.169435014117, 1120.3448516739866] +{1: [0, 7, 79, 15, 87, 23, 95, 27, 99, 32, 104, 38, 110, 44, 116, 45, 117, 62, 134, 63, 135, 0], 2: [0, 8, 80, 9, 81, 24, 96, 31, 103, 34, 106, 39, 111, 46, 118, 54, 126, 68, 140, 0], 3: [0, 4, 76, 11, 83, 36, 43, 115, 108, 57, 129, 67, 139, 0], 4: [0, 2, 74, 5, 77, 6, 78, 14, 86, 20, 92, 22, 94, 28, 100, 29, 101, 41, 113, 51, 123, 56, 128, 59, 131, 60, 132, 66, 138, 70, 142, 71, 143, 0], 5: [0, 1, 73, 16, 88, 18, 90, 26, 98, 33, 105, 37, 109, 47, 119, 50, 122, 0], 6: [0, 3, 75, 10, 82, 13, 85, 19, 91, 40, 112, 42, 114, 48, 120, 49, 121, 52, 124, 58, 130, 61, 133, 64, 136, 65, 137, 69, 141, 0], 7: [0, 12, 84, 17, 89, 21, 93, 25, 97, 30, 102, 35, 107, 53, 125, 55, 127, 72, 144, 0]} [4271.332387113367, 1132.2524437588768] +{1: [0, 5, 77, 18, 90, 33, 105, 54, 126, 57, 129, 62, 134, 64, 136, 0], 2: [0, 10, 82, 19, 91, 22, 94, 24, 96, 27, 99, 38, 110, 39, 111, 42, 114, 45, 117, 58, 130, 61, 133, 0], 3: [0, 1, 73, 2, 74, 9, 81, 13, 85, 23, 95, 26, 98, 40, 112, 44, 116, 47, 119, 52, 124, 53, 125, 55, 127, 59, 131, 69, 141, 70, 142, 71, 143, 0], 4: [0, 28, 100, 29, 35, 101, 107, 48, 120, 49, 121, 0], 5: [0, 3, 75, 7, 79, 14, 86, 16, 88, 20, 92, 30, 102, 37, 109, 41, 113, 43, 115, 46, 118, 50, 122, 56, 128, 66, 138, 0], 6: [0, 4, 76, 8, 80, 11, 83, 12, 84, 15, 87, 32, 104, 65, 137, 67, 139, 68, 140, 0], 7: [0, 6, 78, 17, 89, 21, 93, 25, 97, 31, 103, 34, 106, 36, 108, 51, 123, 60, 132, 63, 135, 72, 144, 0]} [3952.8106500458284, 1132.9754185584825] +{1: [0, 5, 77, 18, 90, 33, 105, 54, 126, 57, 129, 62, 134, 64, 136, 0], 2: [0, 10, 82, 19, 91, 22, 94, 24, 96, 27, 99, 38, 110, 39, 111, 42, 114, 45, 117, 58, 130, 61, 133, 0], 3: [0, 1, 73, 2, 74, 9, 81, 13, 85, 23, 95, 26, 98, 31, 103, 40, 112, 44, 116, 47, 119, 52, 124, 53, 125, 55, 127, 59, 131, 69, 141, 70, 142, 0], 4: [0, 28, 100, 29, 35, 101, 107, 48, 120, 49, 121, 0], 5: [0, 3, 75, 7, 79, 14, 86, 16, 88, 20, 92, 30, 102, 37, 109, 41, 113, 43, 115, 46, 118, 50, 122, 56, 128, 66, 138, 0], 6: [0, 4, 76, 8, 80, 11, 83, 12, 84, 15, 87, 32, 104, 65, 137, 67, 139, 68, 140, 0], 7: [0, 6, 78, 17, 89, 21, 93, 25, 97, 34, 106, 36, 108, 51, 123, 60, 132, 63, 135, 71, 143, 72, 144, 0]} [3961.614752034388, 1141.7795205470418] +Temps actuel = 12:26:22 +<-- end execution 2 --> + +<-- start execution 1 --> +Temps actuel = 12:34:45 +{1: [0, 15, 87, 18, 90, 25, 97, 41, 113, 54, 126, 56, 128, 58, 130, 60, 132, 0], 2: [0, 4, 76, 10, 82, 13, 85, 31, 103, 32, 104, 47, 119, 48, 120, 50, 122, 51, 123, 55, 127, 61, 133, 67, 139, 0], 3: [0, 2, 74, 9, 81, 11, 83, 19, 91, 24, 96, 36, 108, 38, 110, 42, 114, 52, 124, 57, 129, 0], 4: [0, 27, 99, 30, 102, 37, 109, 43, 115, 45, 117, 59, 131, 62, 134, 63, 135, 64, 136, 68, 140, 70, 142, 71, 143, 0], 5: [0, 5, 77, 12, 84, 17, 89, 46, 118, 69, 141, 72, 144, 0], 6: [0, 3, 75, 6, 78, 14, 86, 16, 88, 21, 93, 22, 94, 33, 105, 34, 106, 35, 107, 39, 111, 44, 116, 49, 121, 0], 7: [0, 1, 73, 7, 79, 8, 80, 20, 92, 23, 95, 26, 98, 28, 100, 29, 101, 40, 112, 53, 125, 65, 137, 66, 138, 0]} [4357.17503216341, 1147.9033206228223] +{1: [0, 9, 81, 12, 84, 47, 119, 60, 132, 70, 142, 0], 2: [0, 14, 86, 19, 91, 20, 92, 25, 97, 27, 99, 29, 101, 49, 121, 61, 133, 64, 136, 66, 138, 72, 144, 0], 3: [0, 2, 74, 21, 93, 22, 94, 24, 96, 31, 103, 48, 120, 51, 123, 59, 131, 62, 134, 67, 139, 0], 4: [0, 7, 79, 13, 85, 17, 89, 23, 95, 30, 102, 35, 107, 36, 108, 38, 110, 43, 115, 44, 116, 52, 124, 53, 125, 55, 127, 63, 135, 65, 137, 68, 140, 0], 5: [0, 6, 78, 10, 82, 11, 83, 32, 104, 40, 112, 42, 114, 50, 122, 56, 128, 58, 130, 0], 6: [0, 4, 76, 8, 80, 15, 87, 16, 88, 18, 90, 26, 98, 33, 105, 34, 106, 41, 113, 54, 126, 57, 129, 71, 143, 0], 7: [0, 1, 73, 3, 75, 5, 77, 28, 100, 37, 109, 39, 111, 45, 117, 46, 118, 69, 141, 0]} [4414.713708310954, 1158.0781971626673] +{1: [0, 6, 78, 23, 95, 28, 100, 31, 103, 32, 104, 48, 120, 55, 127, 62, 134, 67, 139, 68, 140, 0], 2: [0, 2, 74, 19, 91, 20, 92, 26, 98, 29, 101, 46, 118, 47, 119, 50, 122, 51, 123, 57, 129, 69, 141, 0], 3: [0, 17, 89, 21, 93, 33, 105, 42, 114, 53, 125, 56, 128, 58, 130, 65, 137, 0], 4: [0, 3, 75, 7, 79, 8, 80, 11, 83, 30, 102, 36, 108, 37, 109, 38, 110, 44, 116, 45, 117, 60, 132, 0], 5: [0, 18, 90, 43, 59, 115, 131, 0], 6: [0, 1, 73, 4, 76, 5, 77, 10, 82, 12, 84, 14, 86, 16, 88, 24, 96, 27, 99, 34, 106, 35, 107, 39, 111, 40, 112, 49, 121, 52, 124, 54, 126, 64, 136, 71, 143, 72, 144, 0], 7: [0, 9, 81, 13, 85, 15, 87, 22, 94, 25, 97, 41, 113, 61, 133, 63, 135, 66, 138, 70, 142, 0]} [3936.3790577394348, 1159.8980728071729] +{1: [0, 6, 78, 23, 95, 28, 100, 31, 103, 32, 104, 48, 120, 55, 127, 62, 134, 67, 139, 68, 140, 0], 2: [0, 2, 74, 19, 91, 20, 92, 22, 94, 26, 98, 46, 118, 47, 119, 50, 122, 51, 123, 57, 129, 69, 141, 0], 3: [0, 17, 89, 21, 93, 33, 105, 42, 114, 53, 125, 56, 128, 58, 130, 65, 137, 0], 4: [0, 3, 75, 7, 79, 8, 80, 11, 83, 30, 102, 36, 108, 37, 109, 38, 110, 44, 116, 45, 117, 60, 132, 0], 5: [0, 18, 90, 43, 59, 115, 131, 0], 6: [0, 1, 73, 4, 76, 5, 77, 10, 82, 12, 84, 14, 86, 16, 88, 24, 96, 27, 99, 29, 101, 34, 106, 35, 107, 39, 111, 40, 112, 49, 121, 52, 124, 54, 126, 71, 143, 72, 144, 0], 7: [0, 9, 81, 13, 85, 15, 87, 25, 97, 41, 113, 61, 133, 63, 135, 64, 136, 66, 138, 70, 142, 0]} [3946.19566589439, 1150.3606477272065] +Temps actuel = 13:43:16 +<-- end execution 1 --> +<-- start execution 2 --> +Temps actuel = 13:43:16 +{1: [0, 5, 77, 9, 81, 28, 100, 36, 108, 43, 115, 49, 121, 50, 122, 67, 139, 69, 141, 71, 143, 0], 2: [0, 8, 80, 17, 89, 34, 106, 39, 111, 48, 120, 54, 126, 61, 133, 0], 3: [0, 4, 76, 13, 85, 22, 94, 26, 98, 27, 99, 33, 105, 35, 107, 52, 124, 55, 127, 68, 140, 0], 4: [0, 1, 73, 15, 87, 23, 95, 24, 96, 30, 102, 40, 112, 51, 123, 53, 125, 60, 132, 0], 5: [0, 7, 79, 10, 82, 11, 83, 12, 84, 14, 86, 18, 90, 21, 93, 29, 101, 37, 109, 41, 113, 42, 114, 57, 129, 58, 130, 63, 135, 65, 137, 72, 144, 0], 6: [0, 2, 74, 16, 88, 31, 103, 38, 110, 44, 116, 45, 117, 46, 118, 56, 128, 62, 134, 64, 136, 66, 138, 0], 7: [0, 3, 75, 6, 78, 19, 91, 20, 92, 25, 97, 32, 104, 47, 119, 59, 131, 70, 142, 0]} [4409.054358350151, 1110.4010953946588] +{1: [0, 13, 85, 38, 110, 42, 114, 44, 116, 45, 117, 52, 124, 57, 129, 60, 132, 63, 135, 68, 140, 72, 144, 0], 2: [0, 14, 86, 23, 95, 26, 98, 29, 101, 34, 106, 40, 112, 58, 130, 59, 131, 0], 3: [0, 4, 76, 5, 77, 6, 78, 10, 82, 31, 103, 32, 104, 35, 107, 39, 111, 56, 128, 62, 134, 65, 137, 69, 141, 0], 4: [0, 3, 75, 7, 79, 17, 89, 21, 93, 22, 94, 41, 113, 48, 120, 61, 133, 70, 142, 71, 143, 0], 5: [0, 8, 80, 16, 88, 24, 96, 27, 99, 28, 100, 33, 105, 36, 108, 46, 118, 47, 119, 55, 127, 0], 6: [0, 1, 73, 9, 81, 12, 84, 15, 87, 18, 90, 30, 102, 49, 121, 50, 122, 53, 125, 54, 126, 64, 136, 66, 138, 67, 139, 0], 7: [0, 2, 74, 11, 83, 19, 91, 20, 92, 25, 97, 37, 109, 43, 115, 51, 123, 0]} [4147.106946609036, 1112.5569367048206] +{1: [0, 1, 73, 6, 78, 23, 95, 28, 100, 34, 106, 39, 111, 49, 121, 52, 124, 60, 132, 63, 135, 64, 136, 68, 140, 71, 143, 0], 2: [0, 19, 91, 30, 102, 56, 128, 58, 130, 59, 131, 0], 3: [0, 7, 79, 15, 87, 17, 89, 20, 92, 22, 94, 41, 113, 53, 125, 54, 126, 65, 137, 69, 141, 72, 144, 0], 4: [0, 3, 75, 9, 81, 10, 82, 14, 86, 16, 88, 24, 96, 29, 101, 42, 114, 44, 116, 61, 133, 62, 134, 0], 5: [0, 8, 80, 21, 93, 25, 97, 36, 108, 46, 118, 47, 119, 48, 120, 51, 123, 55, 127, 0], 6: [0, 5, 77, 11, 83, 18, 90, 26, 98, 31, 103, 32, 104, 33, 105, 35, 107, 38, 110, 45, 117, 57, 129, 66, 138, 67, 139, 0], 7: [0, 2, 74, 4, 76, 12, 84, 13, 85, 27, 99, 37, 109, 40, 112, 43, 115, 50, 122, 70, 142, 0]} [4000.174200440395, 1120.3362528759778] +{1: [0, 1, 73, 6, 78, 23, 95, 28, 100, 34, 106, 39, 111, 49, 121, 52, 124, 60, 132, 63, 135, 64, 136, 68, 140, 71, 143, 0], 2: [0, 19, 91, 30, 102, 40, 112, 58, 130, 59, 131, 0], 3: [0, 7, 79, 15, 87, 17, 89, 20, 92, 22, 94, 41, 113, 53, 125, 54, 126, 65, 137, 69, 141, 72, 144, 0], 4: [0, 3, 75, 9, 81, 10, 82, 14, 86, 16, 88, 24, 96, 29, 101, 42, 114, 44, 116, 61, 133, 62, 134, 0], 5: [0, 8, 80, 21, 93, 25, 97, 36, 108, 46, 118, 47, 119, 48, 120, 51, 123, 55, 127, 0], 6: [0, 5, 77, 11, 83, 18, 90, 26, 98, 31, 103, 32, 104, 33, 105, 35, 107, 38, 110, 45, 117, 57, 129, 66, 138, 67, 139, 0], 7: [0, 2, 74, 4, 76, 12, 84, 13, 85, 27, 99, 37, 109, 43, 115, 50, 122, 56, 128, 70, 142, 0]} [4002.5051131749583, 1122.6671656105414] +Temps actuel = 14:51:12 +<-- end execution 2 --> +<-- start execution 1 --> +Temps actuel = 15:54:06 +{1: [0, 10, 82, 11, 83, 16, 88, 17, 89, 25, 97, 26, 98, 28, 100, 31, 103, 33, 105, 37, 109, 43, 115, 44, 116, 61, 133, 64, 136, 66, 138, 0], 2: [0, 4, 76, 15, 87, 34, 106, 54, 126, 56, 128, 60, 132, 65, 137, 69, 141, 0], 3: [0, 6, 78, 8, 80, 22, 94, 40, 112, 42, 114, 45, 117, 48, 120, 49, 121, 57, 129, 70, 142, 0], 4: [0, 3, 75, 13, 85, 19, 91, 21, 93, 29, 101, 30, 102, 50, 122, 52, 124, 53, 125, 59, 131, 0], 5: [0, 5, 77, 18, 90, 55, 127, 68, 140, 0], 6: [0, 1, 73, 2, 74, 9, 81, 14, 86, 23, 95, 24, 96, 27, 99, 46, 118, 62, 134, 67, 139, 71, 143, 0], 7: [0, 7, 79, 12, 84, 20, 92, 32, 104, 35, 107, 36, 108, 38, 110, 39, 111, 41, 113, 47, 119, 51, 123, 58, 130, 63, 135, 72, 144, 0]} [4455.730236272056, 1166.0569500057431] +{1: [0, 13, 85, 23, 95, 25, 97, 27, 99, 35, 107, 41, 113, 44, 116, 45, 117, 47, 119, 50, 122, 54, 126, 55, 127, 71, 143, 72, 144, 0], 2: [0, 5, 77, 16, 88, 28, 100, 31, 103, 32, 104, 42, 114, 51, 123, 56, 128, 66, 138, 67, 139, 68, 140, 0], 3: [0, 3, 75, 6, 78, 7, 79, 12, 84, 17, 89, 24, 96, 30, 102, 43, 115, 61, 133, 0], 4: [0, 4, 76, 9, 81, 21, 93, 26, 98, 29, 101, 33, 105, 40, 112, 49, 121, 52, 124, 0], 5: [0, 8, 80, 18, 90, 19, 91, 59, 131, 69, 141, 70, 142, 0], 6: [0, 10, 82, 15, 87, 20, 92, 22, 94, 34, 106, 36, 108, 38, 110, 39, 111, 46, 118, 48, 120, 53, 125, 58, 130, 60, 132, 63, 135, 65, 137, 0], 7: [0, 1, 73, 2, 74, 11, 83, 14, 86, 37, 109, 57, 129, 62, 134, 64, 136, 0]} [4222.501951514075, 1130.375772727805] +{1: [0, 18, 90, 20, 92, 51, 123, 56, 128, 57, 129, 65, 137, 70, 142, 0], 2: [0, 9, 81, 12, 84, 13, 85, 16, 88, 31, 103, 34, 106, 38, 110, 47, 119, 48, 120, 58, 130, 63, 135, 64, 136, 66, 138, 0], 3: [0, 8, 80, 19, 91, 21, 93, 22, 94, 40, 112, 52, 124, 54, 126, 61, 133, 67, 139, 69, 141, 0], 4: [0, 4, 76, 5, 77, 6, 78, 26, 98, 28, 100, 30, 102, 32, 104, 33, 105, 49, 121, 55, 127, 59, 131, 60, 132, 62, 134, 72, 144, 0], 5: [0, 2, 74, 10, 82, 11, 83, 17, 89, 25, 97, 29, 101, 41, 113, 42, 114, 44, 116, 45, 117, 71, 143, 0], 6: [0, 23, 95, 24, 96, 37, 109, 39, 111, 53, 125, 68, 140, 0], 7: [0, 1, 73, 3, 75, 7, 79, 14, 86, 15, 87, 27, 99, 35, 107, 36, 108, 43, 115, 46, 118, 50, 122, 0]} [4061.4970372447992, 1143.8094985342295] +{1: [0, 3, 75, 13, 85, 23, 95, 26, 98, 48, 120, 49, 121, 58, 130, 63, 135, 0], 2: [0, 9, 81, 28, 100, 30, 102, 34, 106, 35, 107, 36, 108, 41, 113, 43, 115, 47, 119, 56, 128, 0], 3: [0, 2, 74, 6, 78, 7, 79, 14, 86, 25, 97, 50, 122, 51, 123, 53, 125, 54, 126, 59, 131, 60, 132, 64, 136, 69, 141, 71, 143, 0], 4: [0, 1, 73, 8, 80, 12, 84, 15, 87, 16, 88, 22, 94, 24, 96, 31, 103, 33, 105, 44, 116, 46, 118, 57, 129, 66, 138, 68, 140, 70, 142, 0], 5: [0, 4, 76, 18, 90, 19, 91, 29, 101, 32, 104, 39, 111, 45, 117, 55, 127, 61, 133, 62, 134, 67, 139, 0], 6: [0, 20, 92, 21, 52, 37, 109, 93, 124, 65, 137, 0], 7: [0, 5, 77, 10, 82, 11, 83, 17, 89, 27, 99, 38, 110, 40, 112, 42, 114, 72, 144, 0]} [4069.666178289837, 1176.955821824192] +Temps actuel = 16:55:31 +<-- end execution 1 --> +<-- start execution 2 --> +Temps actuel = 16:55:31 +{1: [0, 14, 86, 28, 100, 29, 101, 30, 102, 33, 105, 38, 110, 39, 111, 56, 128, 58, 130, 64, 136, 0], 2: [0, 3, 75, 6, 78, 7, 79, 40, 112, 41, 113, 47, 119, 54, 126, 65, 137, 69, 141, 0], 3: [0, 2, 74, 8, 80, 10, 82, 12, 84, 18, 90, 19, 91, 20, 92, 21, 93, 26, 98, 27, 99, 45, 117, 59, 131, 62, 134, 63, 135, 0], 4: [0, 16, 88, 34, 106, 43, 115, 48, 120, 49, 121, 51, 123, 0], 5: [0, 9, 81, 13, 85, 25, 97, 37, 109, 42, 114, 53, 125, 66, 138, 68, 140, 70, 142, 0], 6: [0, 4, 76, 11, 83, 15, 87, 17, 89, 22, 94, 24, 96, 31, 103, 35, 107, 44, 116, 46, 118, 52, 124, 57, 129, 72, 144, 0], 7: [0, 1, 73, 5, 77, 23, 95, 32, 104, 36, 108, 50, 122, 55, 127, 60, 132, 61, 133, 67, 139, 71, 143, 0]} [4365.08309992061, 1160.6074060788083] +{1: [0, 1, 73, 15, 87, 25, 97, 36, 108, 41, 113, 0], 2: [0, 6, 78, 16, 88, 17, 89, 20, 92, 24, 96, 32, 104, 49, 121, 52, 124, 53, 125, 57, 129, 63, 135, 65, 137, 72, 144, 0], 3: [0, 11, 83, 13, 85, 19, 91, 26, 98, 31, 103, 35, 107, 37, 109, 45, 117, 46, 118, 47, 119, 48, 120, 51, 123, 59, 131, 61, 133, 69, 141, 71, 143, 0], 4: [0, 18, 90, 43, 115, 50, 122, 67, 139, 68, 140, 0], 5: [0, 2, 74, 5, 77, 7, 79, 8, 80, 10, 82, 12, 84, 14, 86, 27, 99, 29, 101, 33, 105, 34, 106, 40, 112, 42, 114, 44, 116, 58, 130, 60, 132, 66, 138, 70, 142, 0], 6: [0, 4, 76, 9, 81, 21, 93, 22, 94, 28, 100, 30, 102, 38, 110, 64, 136, 0], 7: [0, 3, 75, 23, 95, 39, 111, 54, 126, 55, 127, 56, 128, 62, 134, 0]} [4331.642490195379, 1092.7614148613764] +{1: [0, 11, 83, 40, 112, 52, 124, 54, 126, 68, 140, 71, 143, 0], 2: [0, 3, 75, 6, 78, 7, 79, 8, 80, 13, 85, 14, 86, 16, 88, 20, 92, 25, 97, 33, 105, 35, 107, 45, 117, 46, 118, 55, 127, 0], 3: [0, 2, 74, 21, 93, 22, 94, 29, 101, 32, 104, 34, 106, 41, 113, 43, 115, 50, 122, 64, 136, 66, 138, 67, 139, 70, 142, 72, 144, 0], 4: [0, 9, 81, 17, 89, 28, 100, 30, 102, 42, 114, 49, 121, 58, 130, 65, 137, 0], 5: [0, 10, 82, 12, 84, 15, 87, 24, 96, 26, 98, 36, 108, 38, 110, 44, 116, 51, 123, 61, 133, 62, 134, 63, 135, 0], 6: [0, 4, 76, 18, 90, 23, 95, 27, 99, 31, 103, 53, 125, 0], 7: [0, 1, 73, 5, 77, 19, 91, 37, 109, 39, 111, 47, 119, 48, 120, 56, 128, 57, 129, 59, 131, 60, 132, 69, 141, 0]} [4069.4053402728555, 1121.9513895277391] +{1: [0, 11, 83, 40, 112, 52, 124, 54, 126, 68, 140, 71, 143, 0], 2: [0, 3, 75, 6, 78, 7, 79, 8, 80, 13, 85, 14, 86, 16, 88, 20, 92, 25, 97, 33, 105, 35, 107, 45, 117, 46, 118, 55, 127, 0], 3: [0, 2, 74, 4, 76, 21, 93, 22, 94, 32, 104, 34, 106, 41, 113, 43, 115, 50, 122, 64, 136, 66, 138, 67, 139, 70, 142, 72, 144, 0], 4: [0, 9, 81, 17, 89, 28, 100, 30, 102, 42, 114, 49, 121, 58, 130, 65, 137, 0], 5: [0, 10, 82, 12, 84, 15, 87, 24, 96, 26, 98, 36, 108, 38, 110, 44, 116, 51, 123, 61, 133, 62, 134, 63, 135, 0], 6: [0, 18, 90, 23, 95, 27, 99, 29, 101, 31, 103, 53, 125, 0], 7: [0, 1, 73, 5, 77, 19, 91, 37, 109, 39, 111, 47, 119, 48, 120, 56, 128, 57, 129, 59, 131, 60, 132, 69, 141, 0]} [4073.5278348710335, 1114.8981653412488] +Temps actuel = 17:56:39 +<-- end execution 2 --> +<-- start execution 1 --> +Temps actuel = 22:07:56 +{1: [0, 22, 94, 31, 103, 36, 108, 37, 109, 42, 114, 49, 121, 64, 136, 69, 141, 0], 2: [0, 14, 86, 16, 88, 25, 97, 29, 101, 40, 112, 50, 122, 56, 128, 60, 132, 61, 133, 65, 137, 67, 139, 72, 144, 0], 3: [0, 1, 73, 6, 78, 11, 83, 17, 89, 19, 91, 24, 96, 28, 100, 39, 111, 41, 113, 51, 123, 0], 4: [0, 4, 76, 10, 82, 13, 85, 32, 104, 34, 106, 35, 107, 43, 115, 46, 118, 48, 120, 52, 124, 63, 135, 0], 5: [0, 20, 92, 21, 93, 23, 95, 53, 125, 55, 127, 57, 129, 68, 140, 70, 142, 0], 6: [0, 2, 74, 3, 75, 7, 79, 9, 81, 12, 84, 15, 87, 18, 90, 26, 98, 27, 99, 30, 102, 45, 117, 54, 126, 58, 130, 59, 131, 62, 134, 66, 138, 71, 143, 0], 7: [0, 5, 77, 8, 80, 33, 105, 38, 110, 44, 116, 47, 119, 0]} [4270.269370390651, 1194.8832000498105] +{1: [0, 12, 84, 18, 90, 27, 99, 33, 105, 42, 114, 49, 121, 55, 127, 67, 139, 0], 2: [0, 10, 82, 21, 93, 22, 94, 57, 129, 72, 144, 0], 3: [0, 5, 77, 8, 80, 20, 92, 23, 95, 24, 96, 25, 97, 29, 101, 31, 103, 35, 107, 41, 113, 64, 136, 0], 4: [0, 4, 76, 26, 98, 32, 104, 36, 108, 38, 110, 40, 112, 44, 116, 47, 119, 50, 122, 56, 128, 62, 134, 66, 138, 68, 140, 69, 141, 71, 143, 0], 5: [0, 1, 73, 6, 78, 28, 100, 30, 102, 34, 106, 43, 115, 51, 123, 58, 130, 63, 135, 65, 137, 70, 142, 0], 6: [0, 2, 74, 9, 81, 13, 85, 14, 86, 15, 87, 16, 88, 17, 89, 39, 111, 54, 126, 61, 133, 0], 7: [0, 3, 75, 7, 79, 11, 83, 19, 91, 37, 109, 45, 117, 46, 118, 48, 120, 52, 124, 53, 125, 59, 131, 60, 132, 0]} [4030.6833922063033, 1145.6505369869749] +{1: [0, 4, 76, 14, 86, 22, 94, 30, 102, 38, 110, 48, 120, 57, 129, 58, 130, 67, 139, 0], 2: [0, 7, 79, 12, 84, 16, 88, 20, 92, 27, 99, 33, 105, 36, 108, 39, 111, 45, 117, 59, 131, 64, 136, 0], 3: [0, 9, 81, 10, 82, 21, 93, 28, 100, 32, 104, 34, 106, 43, 115, 61, 133, 62, 134, 63, 135, 69, 141, 70, 142, 0], 4: [0, 2, 74, 11, 83, 17, 89, 23, 95, 35, 107, 40, 112, 41, 113, 50, 122, 68, 140, 0], 5: [0, 1, 73, 5, 77, 6, 78, 8, 80, 13, 85, 24, 96, 47, 119, 49, 121, 54, 126, 72, 144, 0], 6: [0, 3, 75, 15, 87, 19, 91, 25, 97, 29, 101, 31, 103, 42, 114, 51, 123, 53, 125, 55, 127, 56, 128, 60, 132, 65, 137, 71, 143, 0], 7: [0, 18, 90, 26, 98, 37, 109, 44, 116, 46, 118, 52, 124, 66, 138, 0]} [4011.636406245623, 1118.4171492179776] +{1: [0, 12, 84, 18, 90, 27, 99, 33, 105, 42, 114, 49, 121, 55, 127, 67, 139, 0], 2: [0, 10, 82, 21, 93, 22, 94, 57, 129, 72, 144, 0], 3: [0, 5, 77, 8, 80, 20, 92, 23, 95, 24, 96, 25, 97, 29, 101, 31, 103, 35, 107, 41, 113, 64, 136, 0], 4: [0, 4, 76, 26, 98, 32, 104, 36, 108, 38, 110, 40, 112, 44, 116, 47, 119, 50, 122, 56, 128, 62, 134, 66, 138, 68, 140, 69, 141, 71, 143, 0], 5: [0, 1, 73, 6, 78, 28, 100, 30, 102, 34, 106, 43, 115, 51, 123, 58, 130, 63, 135, 65, 137, 70, 142, 0], 6: [0, 2, 74, 9, 81, 13, 85, 14, 86, 15, 87, 16, 88, 17, 89, 39, 111, 54, 126, 61, 133, 0], 7: [0, 3, 75, 7, 79, 11, 83, 19, 91, 37, 109, 45, 117, 46, 118, 48, 120, 52, 124, 53, 125, 59, 131, 60, 132, 0]} [4030.6833922063033, 1145.6505369869749] +Temps actuel = 23:11:48 +<-- end execution 1 --> +<-- start execution 2 --> +Temps actuel = 23:11:48 +{1: [0, 7, 79, 27, 99, 28, 100, 30, 102, 32, 104, 36, 108, 40, 112, 57, 129, 63, 135, 64, 136, 72, 144, 0], 2: [0, 1, 73, 2, 74, 6, 78, 20, 92, 21, 93, 25, 97, 31, 103, 39, 111, 52, 124, 58, 130, 70, 142, 0], 3: [0, 4, 76, 11, 83, 23, 95, 24, 96, 44, 116, 45, 117, 53, 125, 54, 126, 56, 128, 60, 132, 0], 4: [0, 5, 77, 12, 84, 13, 85, 14, 86, 19, 91, 22, 94, 34, 106, 49, 121, 50, 122, 55, 127, 68, 140, 0], 5: [0, 3, 75, 9, 81, 16, 88, 46, 118, 59, 131, 65, 137, 71, 143, 0], 6: [0, 10, 82, 15, 87, 26, 98, 33, 105, 38, 110, 41, 113, 42, 114, 48, 120, 51, 123, 62, 134, 66, 138, 69, 141, 0], 7: [0, 8, 80, 17, 89, 18, 90, 29, 101, 35, 107, 37, 109, 43, 115, 47, 119, 61, 133, 67, 139, 0]} [4441.053877762241, 1179.1487953477113] +{1: [0, 3, 75, 21, 93, 35, 107, 44, 116, 45, 117, 46, 118, 51, 123, 55, 127, 70, 142, 0], 2: [0, 1, 73, 10, 82, 18, 90, 25, 97, 27, 99, 30, 102, 34, 106, 37, 109, 38, 110, 41, 113, 43, 115, 50, 122, 0], 3: [0, 4, 76, 7, 79, 15, 87, 23, 95, 28, 100, 29, 101, 33, 105, 56, 128, 62, 134, 63, 135, 67, 139, 0], 4: [0, 2, 74, 11, 83, 19, 91, 24, 96, 39, 111, 40, 112, 42, 114, 49, 121, 52, 124, 58, 130, 61, 133, 65, 137, 69, 141, 0], 5: [0, 6, 78, 13, 85, 17, 89, 31, 103, 36, 108, 47, 119, 48, 120, 60, 132, 66, 138, 68, 140, 72, 144, 0], 6: [0, 5, 77, 9, 81, 12, 84, 14, 86, 53, 125, 57, 129, 59, 131, 64, 136, 0], 7: [0, 8, 80, 16, 88, 20, 92, 22, 94, 26, 98, 32, 104, 54, 126, 71, 143, 0]} [4389.589102821192, 1141.9557338720224] +{1: [0, 6, 78, 9, 81, 14, 86, 19, 91, 26, 98, 32, 104, 39, 111, 55, 127, 62, 134, 0], 2: [0, 1, 73, 4, 76, 18, 90, 20, 92, 23, 95, 27, 99, 29, 101, 34, 106, 42, 114, 45, 117, 47, 119, 63, 135, 68, 140, 69, 141, 71, 143, 0], 3: [0, 8, 80, 11, 83, 21, 93, 22, 94, 24, 96, 25, 97, 31, 103, 38, 110, 50, 122, 56, 128, 61, 133, 64, 136, 0], 4: [0, 2, 74, 10, 82, 12, 84, 17, 89, 30, 102, 35, 107, 40, 112, 44, 116, 48, 120, 49, 121, 53, 125, 65, 137, 66, 138, 0], 5: [0, 28, 100, 36, 108, 37, 109, 43, 115, 52, 124, 57, 129, 59, 131, 60, 132, 67, 139, 0], 6: [0, 16, 88, 41, 113, 72, 144, 0], 7: [0, 3, 75, 5, 77, 7, 79, 13, 85, 15, 87, 33, 105, 46, 118, 51, 123, 54, 126, 58, 130, 70, 142, 0]} [3981.0934178611296, 1104.2150206720746] +{1: [0, 4, 76, 6, 78, 9, 81, 14, 86, 26, 98, 32, 104, 39, 111, 55, 127, 62, 134, 0], 2: [0, 1, 73, 18, 90, 19, 91, 20, 92, 23, 95, 27, 99, 29, 101, 34, 106, 42, 114, 45, 117, 47, 119, 63, 135, 68, 140, 69, 141, 71, 143, 0], 3: [0, 3, 75, 8, 80, 11, 83, 21, 93, 22, 94, 24, 96, 25, 97, 31, 103, 38, 110, 50, 122, 56, 128, 61, 133, 0], 4: [0, 2, 74, 10, 82, 12, 84, 17, 89, 30, 102, 35, 107, 40, 112, 44, 116, 48, 120, 49, 121, 53, 125, 65, 137, 66, 138, 0], 5: [0, 28, 100, 36, 108, 37, 109, 43, 115, 52, 124, 57, 129, 59, 131, 60, 132, 67, 139, 0], 6: [0, 16, 88, 41, 113, 72, 144, 0], 7: [0, 5, 77, 7, 79, 13, 85, 15, 87, 33, 105, 46, 118, 51, 123, 54, 126, 58, 130, 64, 136, 70, 142, 0]} [4022.7219142070608, 1095.9185297197655] +Temps actuel = 00:19:21 +<-- end execution 2 --> +<-- start execution 3 --> +Temps actuel = 00:19:21 +{1: [0, 4, 76, 13, 85, 17, 89, 18, 90, 26, 98, 37, 109, 39, 111, 42, 114, 48, 120, 60, 132, 62, 134, 0], 2: [0, 6, 78, 8, 80, 25, 97, 30, 102, 32, 104, 38, 110, 43, 115, 52, 124, 61, 133, 69, 141, 71, 143, 0], 3: [0, 2, 74, 5, 77, 10, 82, 14, 86, 34, 106, 46, 118, 50, 122, 54, 126, 57, 129, 59, 131, 63, 135, 64, 136, 0], 4: [0, 15, 87, 19, 91, 28, 100, 41, 113, 45, 117, 55, 127, 58, 130, 0], 5: [0, 3, 75, 7, 79, 9, 81, 21, 93, 33, 105, 44, 116, 47, 119, 65, 137, 0], 6: [0, 1, 73, 12, 84, 22, 94, 23, 95, 24, 96, 27, 99, 35, 107, 36, 108, 53, 125, 56, 128, 67, 139, 0], 7: [0, 11, 83, 16, 88, 20, 92, 29, 101, 31, 103, 40, 112, 49, 121, 51, 123, 66, 138, 68, 140, 70, 142, 72, 144, 0]} [4352.985163360482, 1172.809627164948] +{1: [0, 2, 74, 6, 78, 8, 80, 12, 84, 21, 93, 28, 100, 43, 115, 49, 121, 51, 123, 53, 125, 68, 140, 0], 2: [0, 1, 73, 14, 86, 18, 90, 29, 101, 31, 103, 52, 124, 65, 137, 70, 142, 0], 3: [0, 9, 81, 10, 82, 24, 96, 33, 105, 35, 107, 71, 143, 0], 4: [0, 7, 79, 13, 85, 16, 88, 22, 94, 23, 95, 25, 97, 26, 98, 42, 114, 44, 116, 58, 130, 63, 135, 67, 139, 69, 141, 72, 144, 0], 5: [0, 5, 77, 19, 91, 34, 106, 41, 113, 46, 118, 50, 122, 57, 129, 64, 136, 66, 138, 0], 6: [0, 3, 75, 4, 76, 11, 83, 30, 102, 45, 117, 54, 126, 55, 127, 62, 134, 0], 7: [0, 15, 87, 17, 89, 20, 92, 27, 99, 32, 104, 36, 108, 37, 109, 38, 110, 39, 111, 40, 112, 47, 119, 48, 120, 56, 128, 59, 131, 60, 132, 61, 133, 0]} [4451.290717215481, 1095.3527002235242] +{1: [0, 5, 77, 10, 82, 14, 86, 18, 90, 31, 103, 32, 104, 43, 115, 47, 119, 48, 120, 50, 122, 51, 123, 53, 125, 54, 126, 57, 129, 63, 135, 66, 138, 0], 2: [0, 2, 74, 3, 75, 7, 79, 17, 89, 29, 101, 33, 105, 38, 110, 45, 117, 52, 124, 59, 131, 64, 136, 68, 140, 0], 3: [0, 9, 81, 15, 87, 16, 88, 26, 98, 35, 107, 44, 116, 55, 127, 0], 4: [0, 11, 83, 13, 85, 21, 93, 28, 100, 42, 114, 62, 134, 0], 5: [0, 1, 73, 4, 76, 23, 95, 46, 118, 60, 132, 65, 137, 69, 141, 71, 143, 0], 6: [0, 8, 80, 19, 91, 20, 92, 24, 96, 25, 97, 27, 99, 37, 109, 40, 112, 49, 121, 61, 133, 67, 139, 72, 144, 0], 7: [0, 6, 78, 12, 84, 22, 94, 30, 102, 34, 106, 36, 108, 39, 111, 41, 113, 56, 128, 58, 130, 70, 142, 0]} [3989.4738325615826, 1164.0381977448708] +{1: [0, 5, 77, 10, 82, 14, 86, 18, 90, 32, 104, 42, 114, 43, 115, 47, 119, 48, 120, 50, 122, 51, 123, 53, 125, 54, 126, 60, 132, 63, 135, 66, 138, 0], 2: [0, 2, 74, 3, 75, 7, 79, 17, 89, 28, 100, 29, 101, 38, 110, 45, 117, 52, 124, 59, 131, 64, 136, 68, 140, 0], 3: [0, 9, 81, 15, 87, 16, 88, 26, 98, 35, 107, 44, 116, 55, 127, 0], 4: [0, 11, 83, 13, 85, 21, 93, 33, 105, 57, 129, 62, 134, 0], 5: [0, 1, 73, 4, 76, 23, 95, 31, 103, 46, 118, 65, 137, 69, 141, 71, 143, 0], 6: [0, 8, 80, 19, 91, 20, 92, 24, 96, 25, 97, 27, 99, 37, 109, 40, 112, 49, 121, 61, 133, 67, 139, 72, 144, 0], 7: [0, 6, 78, 12, 84, 22, 94, 30, 102, 34, 106, 36, 108, 39, 111, 41, 113, 56, 128, 58, 130, 70, 142, 0]} [3996.9116547095687, 1158.9584204553187] +Temps actuel = 01:24:52 +<-- end execution 3 --> +<-- start execution 4 --> +Temps actuel = 01:24:52 +{1: [0, 3, 75, 9, 81, 37, 109, 46, 118, 47, 119, 48, 120, 54, 126, 55, 127, 64, 136, 72, 144, 0], 2: [0, 7, 79, 23, 95, 33, 105, 45, 117, 58, 130, 60, 132, 68, 140, 71, 143, 0], 3: [0, 6, 78, 11, 83, 14, 86, 15, 87, 19, 91, 25, 97, 27, 99, 30, 102, 39, 111, 40, 112, 41, 113, 61, 133, 62, 134, 0], 4: [0, 2, 74, 4, 76, 5, 77, 12, 84, 17, 89, 20, 92, 26, 98, 28, 100, 34, 106, 36, 108, 38, 110, 44, 116, 52, 124, 56, 128, 63, 135, 67, 139, 0], 5: [0, 8, 80, 10, 82, 13, 85, 29, 101, 35, 107, 43, 115, 65, 137, 0], 6: [0, 1, 73, 16, 88, 24, 96, 31, 103, 57, 129, 59, 131, 70, 142, 0], 7: [0, 18, 90, 21, 93, 22, 94, 32, 104, 42, 114, 49, 121, 50, 122, 51, 123, 53, 125, 66, 138, 69, 141, 0]} [4450.36888353493, 1166.0628663188425] +{1: [0, 9, 81, 11, 83, 20, 92, 28, 100, 31, 103, 35, 107, 38, 110, 40, 112, 0], 2: [0, 6, 78, 10, 82, 18, 90, 26, 98, 27, 99, 37, 109, 45, 117, 48, 120, 58, 130, 62, 134, 69, 141, 0], 3: [0, 13, 85, 16, 88, 21, 93, 23, 95, 49, 121, 59, 131, 72, 144, 0], 4: [0, 4, 76, 8, 80, 12, 84, 14, 86, 41, 113, 43, 115, 50, 122, 53, 125, 55, 127, 57, 129, 68, 140, 70, 142, 71, 143, 0], 5: [0, 5, 77, 7, 79, 19, 91, 24, 96, 29, 101, 30, 102, 32, 104, 39, 111, 42, 114, 44, 116, 51, 123, 52, 124, 54, 126, 65, 137, 66, 138, 0], 6: [0, 1, 73, 15, 87, 22, 94, 33, 105, 36, 108, 47, 119, 61, 133, 63, 135, 64, 136, 67, 139, 0], 7: [0, 2, 74, 3, 75, 17, 89, 25, 97, 34, 106, 46, 118, 56, 128, 60, 132, 0]} [4404.510665019191, 1169.3193565470292] +{1: [0, 2, 74, 3, 75, 15, 87, 16, 88, 41, 113, 47, 119, 50, 122, 60, 132, 67, 139, 70, 142, 0], 2: [0, 1, 73, 5, 77, 6, 78, 7, 79, 14, 86, 25, 97, 40, 112, 51, 123, 58, 130, 69, 141, 0], 3: [0, 11, 83, 12, 84, 18, 90, 22, 94, 27, 99, 33, 105, 36, 108, 37, 109, 45, 117, 48, 120, 54, 126, 57, 129, 62, 134, 0], 4: [0, 8, 80, 9, 81, 30, 102, 31, 103, 32, 104, 35, 107, 44, 116, 49, 121, 66, 138, 0], 5: [0, 4, 76, 10, 82, 21, 93, 26, 98, 28, 100, 29, 101, 34, 106, 38, 110, 42, 114, 43, 115, 52, 124, 63, 135, 0], 6: [0, 13, 85, 17, 89, 20, 92, 23, 95, 24, 96, 53, 125, 56, 128, 59, 131, 61, 133, 0], 7: [0, 19, 91, 39, 111, 46, 118, 55, 127, 64, 136, 65, 137, 68, 140, 71, 143, 72, 144, 0]} [3988.1996131086667, 1095.264766806219] +{1: [0, 2, 74, 3, 75, 15, 87, 16, 88, 41, 113, 47, 119, 50, 122, 60, 132, 67, 139, 70, 142, 0], 2: [0, 1, 73, 5, 77, 6, 78, 7, 79, 14, 86, 25, 97, 40, 112, 51, 123, 58, 130, 69, 141, 0], 3: [0, 11, 83, 12, 84, 18, 90, 22, 94, 27, 99, 33, 105, 37, 109, 45, 117, 48, 120, 54, 126, 57, 129, 62, 134, 72, 144, 0], 4: [0, 8, 80, 9, 81, 30, 102, 31, 103, 32, 104, 35, 107, 44, 116, 49, 121, 66, 138, 0], 5: [0, 4, 76, 10, 82, 21, 93, 26, 98, 28, 100, 29, 101, 34, 106, 38, 110, 42, 114, 43, 115, 52, 124, 63, 135, 0], 6: [0, 13, 85, 17, 89, 20, 92, 23, 95, 24, 96, 53, 125, 56, 128, 59, 131, 61, 133, 0], 7: [0, 19, 91, 36, 108, 39, 111, 46, 118, 55, 127, 64, 136, 65, 137, 68, 140, 71, 143, 0]} [4004.190383672367, 1106.4215787984335] +Temps actuel = 02:25:05 +<-- end execution 4 --> diff --git a/instances/result_05.txt b/instances/result_05.txt new file mode 100644 index 0000000..41ac9a4 --- /dev/null +++ b/instances/result_05.txt @@ -0,0 +1,10 @@ +<-- start execution 1 --> +Temps actuel = 08:19:09 +<-- start execution 1 --> +Temps actuel = 08:25:59 +<-- start execution 1 --> +Temps actuel = 10:08:07 +<-- start execution 1 --> +Temps actuel = 12:33:37 +<-- start execution 1 --> +Temps actuel = 18:16:27 diff --git a/instances/result_06.txt b/instances/result_06.txt new file mode 100644 index 0000000..e69de29 diff --git a/instances/result_09.txt b/instances/result_09.txt new file mode 100644 index 0000000..e69de29 diff --git a/instances/result_10.txt b/instances/result_10.txt new file mode 100644 index 0000000..2a25e1c --- /dev/null +++ b/instances/result_10.txt @@ -0,0 +1,2 @@ +<-- start execution 1 --> +Temps actuel = 08:19:16 diff --git a/instances/result_11.txt b/instances/result_11.txt new file mode 100644 index 0000000..e69de29 diff --git a/instances/result_12.txt b/instances/result_12.txt new file mode 100644 index 0000000..a83087f --- /dev/null +++ b/instances/result_12.txt @@ -0,0 +1,2 @@ +<-- start execution 1 --> +Temps actuel = 08:19:19 diff --git a/instances/result_15.txt b/instances/result_15.txt new file mode 100644 index 0000000..e69de29 diff --git a/instances/result_16.txt b/instances/result_16.txt new file mode 100644 index 0000000..e69de29 diff --git a/instances/result_17.txt b/instances/result_17.txt new file mode 100644 index 0000000..e69de29 diff --git a/instances/result_19.txt b/instances/result_19.txt new file mode 100644 index 0000000..e69de29 diff --git a/instances/result_20.txt b/instances/result_20.txt new file mode 100644 index 0000000..e69de29 diff --git a/script.sh b/script.sh new file mode 100755 index 0000000..4025ae3 --- /dev/null +++ b/script.sh @@ -0,0 +1,13 @@ +echo "begin of file" +python3 genetic-algorithm11.py >> instances/result_11.txt +python3 genetic-algorithm17.py >> instances/result_17.txt +python3 genetic-algorithm05.py >> instances/result_05.txt +python3 genetic-algorithm06.py >> instances/result_06.txt +python3 genetic-algorithm09.py >> instances/result_09.txt +python3 genetic-algorithm10.py >> instances/result_10.txt +python3 genetic-algorithm12.py >> instances/result_12.txt +python3 genetic-algorithm15.py >> instances/result_15.txt +python3 genetic-algorithm16.py >> instances/result_16.txt +python3 genetic-algorithm19.py >> instances/result_19.txt +python3 genetic-algorithm20.py >> instances/result_20.txt +echo "end of file"