public DiscreteHMSAwGRASP2OptFirst4TSP(TSPInstance instance, double rclThreshold, 
		                                       int graspIterations, int initialSolutions, 
		                                       int levelLength, double tempReduction)
            : base(initialSolutions, levelLength, tempReduction)
        {
            GRASP = new DiscreteGRASP2OptFirst4TSP(instance, rclThreshold);
            Instance = instance;
            GRASPIterations = graspIterations;
        }
        public DiscreteHMTSwGRASP2OptFirst4TSP(TSPInstance instance, double rclThreshold, 
		                                       int graspIterations, int tabuListLength, 
		                                       int neighborChecks)
            : base(tabuListLength, neighborChecks)
        {
            GRASP = new DiscreteGRASP2OptFirst4TSP(instance, rclThreshold);
            Instance = instance;
            GRASPIterations = graspIterations;
        }
 public DiscreteHMSAwGRASP2OptFirst4TSP(TSPInstance instance, double rclThreshold,
                                        int graspIterations, int initialSolutions,
                                        int levelLength, double tempReduction)
     : base(initialSolutions, levelLength, tempReduction)
 {
     GRASP           = new DiscreteGRASP2OptFirst4TSP(instance, rclThreshold);
     Instance        = instance;
     GRASPIterations = graspIterations;
 }
Example #4
0
 public DiscreteHMTSwGRASP2OptFirst4TSP(TSPInstance instance, double rclThreshold,
                                        int graspIterations, int tabuListLength,
                                        int neighborChecks)
     : base(tabuListLength, neighborChecks)
 {
     GRASP           = new DiscreteGRASP2OptFirst4TSP(instance, rclThreshold);
     Instance        = instance;
     GRASPIterations = graspIterations;
 }
        public void Start(string fileInput, string fileOutput, int timeLimit)
        {
            TSPInstance instance = new TSPInstance(fileInput);

            // Setting the parameters of the GRASP for this instance of the problem.
            DiscreteGRASP grasp = new DiscreteGRASP2OptFirst4TSP(instance, rclThreshold);

            // Solving the problem and writing the best solution found.
            grasp.Run(timeLimit - (int)timePenalty, RunType.TimeLimit);
            TSPSolution solution = new TSPSolution(instance, grasp.BestSolution);
            solution.Write(fileOutput);
        }
Example #6
0
        public void Start(string fileInput, string fileOutput, int timeLimit)
        {
            TSPInstance instance = new TSPInstance(fileInput);

            // Setting the parameters of the GRASP for this instance of the problem.
            DiscreteGRASP grasp = new DiscreteGRASP2OptFirst4TSP(instance, rclThreshold);

            // Solving the problem and writing the best solution found.
            grasp.Run(timeLimit - (int)timePenalty, RunType.TimeLimit);
            TSPSolution solution = new TSPSolution(instance, grasp.BestSolution);

            solution.Write(fileOutput);
        }