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); }
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); }