public ASAntInteraction(int alpha, int beta, double rho, int numOfAnts, List <City> cities) : base(alpha, beta, rho, numOfAnts, cities)
    {
        pheromoneTrailInitialValue = numOfAnts / Distances.CalculateNNHeuristic();
        Pheromones = new Pheromones(cities.Count, pheromoneTrailInitialValue);
        Pheromones.Init();

        choiceInfo = new ChoiceInfo(cities.Count);
        choiceInfo.UpdateChoiceInfo(Pheromones, Distances, alpha, beta);
    }
Example #2
0
    public MinMaxAntInteraction(int alpha, int beta, double rho, int numOfAnts, List <City> cities, double pBest) : base(alpha, beta, rho, numOfAnts, cities)
    {
        this.pBest = pBest;
        pheromoneTrailInitialValue = 1.0f / (rho * Distances.CalculateNNHeuristic());

        Pheromones = new Pheromones(cities.Count, pheromoneTrailInitialValue, pBest);
        Pheromones.Init();

        choiceInfo = new ChoiceInfo(cities.Count);
        choiceInfo.UpdateChoiceInfo(Pheromones, Distances, alpha, beta);
    }
    public ACSAntInteraction(int alpha, int beta, double rho, int numOfAnts, List <City> cities, double acsQ0) : base(alpha, beta, rho, numOfAnts, cities)
    {
        this.acsQ0 = acsQ0;
        tau0       = 1.0f / (cities.Count * Distances.CalculateNNHeuristic());
        pheromoneTrailInitialValue = this.tau0;

        Pheromones = new Pheromones(cities.Count, pheromoneTrailInitialValue);
        Pheromones.Init();

        choiceInfo = new ChoiceInfo(cities.Count);
        choiceInfo.UpdateChoiceInfo(Pheromones, Distances, alpha, beta);
    }