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)));
     DiscreteHMSAwGRASP2OptFirst4QAP hm = new DiscreteHMSAwGRASP2OptFirst4QAP(instance, rclTreshold, graspIterations, initialSolutions, levelLength, tempReduction);
     hm.Run(timeLimit - timePenalty);
     QAPSolution solution = new QAPSolution(instance, hm.BestSolution);
     solution.Write(outputFile);
 }
예제 #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)));
            DiscreteHMSAwGRASP2OptFirst4QAP hm = new DiscreteHMSAwGRASP2OptFirst4QAP(instance, rclTreshold, graspIterations, initialSolutions, levelLength, tempReduction);

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

            solution.Write(outputFile);
        }