public void Start(string inputFile, string outputFile, int timeLimit) { TwoSPInstance instance = new TwoSPInstance(inputFile); int neighborChecks = (int) Math.Ceiling(neighborChecksFactor * (2 * instance.NumberItems)); int tabuListLength = (int) Math.Ceiling(tabuListFactor * instance.NumberItems); DiscreteTS ts = new DiscreteTSBL42SP(instance, tabuListLength, neighborChecks); ts.Run(timeLimit - timePenalty); int[,] coordinates = TwoSPUtils.BLCoordinates(instance, ts.BestSolution); TwoSPSolution solution = new TwoSPSolution(instance, coordinates); solution.Write(outputFile); }
public void Start(string inputFile, string outputFile, int timeLimit) { TwoSPInstance instance = new TwoSPInstance(inputFile); int neighborChecks = (int)Math.Ceiling(neighborChecksFactor * (2 * instance.NumberItems)); int tabuListLength = (int)Math.Ceiling(tabuListFactor * instance.NumberItems); DiscreteTS ts = new DiscreteTSBL42SP(instance, tabuListLength, neighborChecks); ts.Run(timeLimit - timePenalty); int[,] coordinates = TwoSPUtils.BLCoordinates(instance, ts.BestSolution); TwoSPSolution solution = new TwoSPSolution(instance, coordinates); solution.Write(outputFile); }