public void Oliver30AS() { aac = new AntAlgorithms.AntAlgorithmChooser(1, 2, 0.7, 10); aa = aac.getAlgorithm(); aa.setCities(TSPImporter.importTsp("oliver30.tsp")); aa.init(); for (int i = 0; i < 2500; i++) { aa.iteration(); } aa.printBestTour("Oliver30AS"); Assert.True(true); }
public void Eil51ACS() { aac = new AntAlgorithms.AntAlgorithmChooser(1, 2, 0.1, 20, 0.9); aa = aac.getAlgorithm(); aa.setCities(TSPImporter.importTsp("eil51.tsp")); aa.init(); for (int i = 0; i < 1000; i++) { aa.iteration(); } aa.printBestTour("Eil51ACS"); Assert.True(true); }
public void Berlin52ACS() { aac = new AntAlgorithms.AntAlgorithmChooser(1, 2, 0.1, 10, 0.9); aa = aac.getAlgorithm(); aa.setCities(TSPImporter.importTsp("berlin52.tsp")); aa.init(); for (int i = 0; i < 200; i++) { aa.iteration(); } aa.printBestTour("berlin52"); Assert.True(true); }
public void Oliver30ACSWithCustomPara() { aac = new AntAlgorithms.AntAlgorithmChooser(AntAlgorithms.Mode.antColonySystem, 1, 2, 0.1, 10, 0.9, 0.000088, 0.000088); aa = aac.getAlgorithm(); aa.setCities(TSPImporter.importTsp("oliver30.tsp")); aa.init(); for (int i = 0; i < 1000; i++) { aa.iteration(); } aa.printBestTour("Oliver30ACSWithCustomPara"); Assert.True(true); }
public void test8() { aac = new AntAlgorithms.AntAlgorithmChooser(1, 2, 0.1, 10, 0.9); aa = aac.getAlgorithm(); cities.Add(new City(2, 4, 0)); cities.Add(new City(1, 9, 1)); cities.Add(new City(3, 8, 2)); cities.Add(new City(9, 1, 3)); cities.Add(new City(10, 1, 4)); cities.Add(new City(5, 4, 5)); cities.Add(new City(1, 11, 6)); cities.Add(new City(3, 4, 7)); aa.setCities(cities); aa.init(); for (int i = 0; i < 400; i++) { aa.iteration(); } aa.printBestTour("test8"); Assert.True(true); }