public TSPIndividual() { Genome = new List <Interfaces.IGene>(); List <City> cities = TSP.GetCities(); while (cities.Count != 0) { int index = Parameters.RandomGenerator.Next(cities.Count); Genome.Add(new TSPGene(cities.ElementAt(index))); cities.RemoveAt(index); } }
public int GetDistance(TSPGene a_gene) { return(TSP.GetDistance(city, a_gene.city)); }