Example #1
0
    public string GetTspNameById(int id)
    {
        TspInfo value = null;
        bool    found = allTSPs.TryGetValue(id, out value);

        return(found ? value.GetName() : "?(" + id + ")");
    }
Example #2
0
    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);
    }
Example #3
0
 internal string GetCurrentTspName()
 {
     return(tsp.GetName());
 }