import numpy as np import random import matplotlib.pyplot as plt from functions.plot_data import plot_data from functions.visib import visib from functions.prob_city import prob_city from functions.tau_branch import tau_branch from functions.tau_prune import tau_prune from Ant import Ant # Get visibility matrix n = visib() # Get the number of cities N = len(n[0,:]) ''' Ants ''' # Define number of ants and list object that will hold them number_of_ants = N #number_of_ants = 1 my_ants = [] # Define global ants characteristics alpha = 1 # Pheromone effect beta = 5 # Greed Q = 100 init_city = 0 ''' Stochastic Options''' # Define random characteristics #random.seed(1)
from functions.plot_data import plot_data from functions.visib import visib from functions.prob_city import prob_city from Ant import Ant from Colony import Colony from functions.colCreate import colCreate from functions.colEvo import colEvo from functions.tsp import tsp from functions.fitness import fitness from functions.antplot import plotFitnessMat from functions.antplot import plotAlphaDist from functions.antplot import plotLBox from functions.saveFiles import saveFiles # Get visibility matrix n_mat = visib() # Get the number of cities N = len(n_mat[0,:]) ''' Ants ''' # Define number of ants and list object that will hold them number_of_ants = N # Define global ants characteristics beta = 5 # Greed Q = 100 init_city = 0 ''' Stochastic Options'''