public string GetTspNameById(int id) { TspInfo value = null; bool found = allTSPs.TryGetValue(id, out value); return(found ? value.GetName() : "?(" + id + ")"); }
private AntAlgorithm CreateAntAlgorithm() { Tsp = TspLoader.Instance.SelectRandomTsp(); List <City> cities = Tsp.Load(); Debug.Log("Loaded TSP '" + Tsp.GetName() + "' with " + cities.Count + " cities."); AntAlgorithm algo = new ASAlgorithm(1, 2, 100, 6); algo.setCities(cities); algo.init(); for (int i = 0; i < 5; i++) { algo.iteration(); } return(algo); }
internal string GetCurrentTspName() { return(tsp.GetName()); }