예제 #1
0
 public void Start(string inputFile, string outputFile, int timeLimit)
 {
     QAPInstance instance = new QAPInstance(inputFile);
     MaxMinAntSystem aco = new MaxMinAntSystem2OptBest4QAP(instance, numberAnts, rho, alpha, beta, maxReinit);
     // Solving the problem and writing the best solution found.
     aco.Run(timeLimit - timePenalty);
     QAPSolution solution = new QAPSolution(instance, aco.BestSolution);
     solution.Write(outputFile);
 }
        public void Start(string inputFile, string outputFile, int timeLimit)
        {
            QAPInstance     instance = new QAPInstance(inputFile);
            MaxMinAntSystem aco      = new MaxMinAntSystem2OptBest4QAP(instance, numberAnts, rho, alpha, beta, maxReinit);

            // Solving the problem and writing the best solution found.
            aco.Run(timeLimit - timePenalty);
            QAPSolution solution = new QAPSolution(instance, aco.BestSolution);

            solution.Write(outputFile);
        }