コード例 #1
0
 public void Start(string inputFile, string outputFile, int timeLimit)
 {
     SPPInstance instance = new SPPInstance(inputFile);
     MaxMinAntSystem aco = new MaxMinAntSystem2OptBest4SPP(instance, numberAnts, rho, alpha, beta, maxReinit);
     // Solving the problem and writing the best solution found.
     aco.Run(timeLimit - timePenalty);
     SPPSolution solution = new SPPSolution(instance, aco.BestSolution);
     solution.Write(outputFile);
 }
コード例 #2
0
        public void Start(string inputFile, string outputFile, int timeLimit)
        {
            SPPInstance     instance = new SPPInstance(inputFile);
            MaxMinAntSystem aco      = new MaxMinAntSystem2OptBest4SPP(instance, numberAnts, rho, alpha, beta, maxReinit);

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

            solution.Write(outputFile);
        }