public void nextCity() {
        if (!finished) {
            if (!cityPool.isEmpty()) {
                City bestCity = null;
                City currentCity = getRoute().getLastCity();
                double bestProbability = 0;
                double alpha = Main.data.getPheromon();
                double beta = Main.data.getLocalInformation();
                double sum = 0;
                for (City city : cityPool) {
                    double tau = Main.data.getPheromonData(currentCity.getNumber(), city.getNumber());
                    double eta = 1 / Main.data.getDistanceData(currentCity.getNumber(), city.getNumber());
                    if (!Double.isInfinite(tau) && !Double.isInfinite(eta)) {
                        sum += (Math.pow(tau, alpha) * Math.pow(eta, beta));
                    }
                    
                }

                for (City city : cityPool) {
                    double tau = Main.data.getPheromonData(currentCity.getNumber(), city.getNumber());
                    double eta = 1 / Main.data.getDistanceData(currentCity.getNumber(), city.getNumber());
                    double probability = ((Math.pow(tau, alpha) * Math.pow(eta, beta)) / sum);
                    if (probability >= bestProbability) {
                        bestProbability = probability;
                        bestCity = city;
                    }
                }

                cityPool.remove(bestCity);
                getRoute().addCity(bestCity);

            } else {
                getRoute().addCity(getRoute().getRoute().get(0));
                finished = true;
            }
        }
    }