public void Start(string inputFile, string outputFile, int timeLimit) { QAPInstance instance = new QAPInstance(inputFile); int neighborChecks = (int) Math.Ceiling(neighborChecksFactor * (instance.NumberFacilities * (instance.NumberFacilities - 1))); int tabuListLength = (int) Math.Ceiling(tabuListFactor * instance.NumberFacilities); DiscreteHMTSwGRASP2OptFirst4QAP hm = new DiscreteHMTSwGRASP2OptFirst4QAP(instance, rclTreshold, graspIterations, tabuListLength, neighborChecks); 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 neighborChecks = (int)Math.Ceiling(neighborChecksFactor * (instance.NumberFacilities * (instance.NumberFacilities - 1))); int tabuListLength = (int)Math.Ceiling(tabuListFactor * instance.NumberFacilities); DiscreteHMTSwGRASP2OptFirst4QAP hm = new DiscreteHMTSwGRASP2OptFirst4QAP(instance, rclTreshold, graspIterations, tabuListLength, neighborChecks); hm.Run(timeLimit - timePenalty); QAPSolution solution = new QAPSolution(instance, hm.BestSolution); solution.Write(outputFile); }