public void Start(string inputFile, string outputFile, int timeLimit)
 {
     QAPInstance instance = new QAPInstance(inputFile);
         int levelLength = (int) Math.Ceiling(levelLengthFactor * (instance.NumberFacilities * (instance.NumberFacilities - 1)));
     DiscreteHMSAwGRASP2OptBest4QAP hm = new DiscreteHMSAwGRASP2OptBest4QAP(instance, rclTreshold, graspIterations, initialSolutions, levelLength, tempReduction);
     hm.Run(timeLimit - timePenalty);
     QAPSolution solution = new QAPSolution(instance, hm.BestSolution);
     solution.Write(outputFile);
 }
Exemple #2
0
        public void Start(string inputFile, string outputFile, int timeLimit)
        {
            QAPInstance instance              = new QAPInstance(inputFile);
            int         levelLength           = (int)Math.Ceiling(levelLengthFactor * (instance.NumberFacilities * (instance.NumberFacilities - 1)));
            DiscreteHMSAwGRASP2OptBest4QAP hm = new DiscreteHMSAwGRASP2OptBest4QAP(instance, rclTreshold, graspIterations, initialSolutions, levelLength, tempReduction);

            hm.Run(timeLimit - timePenalty);
            QAPSolution solution = new QAPSolution(instance, hm.BestSolution);

            solution.Write(outputFile);
        }