Пример #1
0
 public void Start(string inputFile, string outputFile, int timeLimit)
 {
     QAPInstance instance = new QAPInstance(inputFile);
     MaxMinAntSystem aco = new MaxMinAntSystem2OptFirst4QAP(instance, instance.NumberFacilities, 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);
 }
Пример #2
0
        public void Start(string inputFile, string outputFile, int timeLimit)
        {
            QAPInstance     instance = new QAPInstance(inputFile);
            MaxMinAntSystem aco      = new MaxMinAntSystem2OptFirst4QAP(instance, instance.NumberFacilities, 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);
        }