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); DiscreteTS ts = new DiscreteTS4QAP(instance, rclTreshold, tabuListLength, neighborChecks); ts.Run(timeLimit - timePenalty); QAPSolution solution = new QAPSolution(instance, ts.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); DiscreteTS ts = new DiscreteTS4QAP(instance, rclTreshold, tabuListLength, neighborChecks); ts.Run(timeLimit - timePenalty); QAPSolution solution = new QAPSolution(instance, ts.BestSolution); solution.Write(outputFile); }