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