public DiscreteHMTSwGRASP2OptBest4SPP(SPPInstance instance, double rclThreshold, int graspIterations, int tabuListLength, int neighborChecks) : base(tabuListLength, neighborChecks) { GRASP = new DiscreteGRASP2OptBest4SPP(instance, rclThreshold); Instance = instance; GRASPIterations = graspIterations; }
public DiscreteHMSAwGRASP2OptBest4SPP(SPPInstance instance, double rclThreshold, int graspIterations, int initialSolutions, int levelLength, double tempReduction) : base(initialSolutions, levelLength, tempReduction) { GRASP = new DiscreteGRASP2OptBest4SPP(instance, rclThreshold); Instance = instance; GRASPIterations = graspIterations; }
public void Start(string fileInput, string fileOutput, int timeLimit) { SPPInstance instance = new SPPInstance(fileInput); // Setting the parameters of the GRASP for this instance of the problem. DiscreteGRASP grasp = new DiscreteGRASP2OptBest4SPP(instance, rclThreshold); // Solving the problem and writing the best solution found. grasp.Run(timeLimit - (int)timePenalty, RunType.TimeLimit); SPPSolution solution = new SPPSolution(instance, grasp.BestSolution); solution.Write(fileOutput); }