Example #1
0
 public DiscreteHMTSwGRASP2OptFirst4SPP(SPPInstance instance, double rclThreshold,
                                        int graspIterations, int tabuListLength,
                                        int neighborChecks)
     : base(tabuListLength, neighborChecks)
 {
     GRASP           = new DiscreteGRASP2OptFirst4SPP(instance, rclThreshold);
     Instance        = instance;
     GRASPIterations = graspIterations;
 }
        public DiscreteHMSAwGRASP2OptFirst4SPP(SPPInstance instance, double rclThreshold, 
		                                       int graspIterations, int initialSolutions, 
		                                       int levelLength, double tempReduction)
            : base(initialSolutions, levelLength, tempReduction)
        {
            GRASP = new DiscreteGRASP2OptFirst4SPP(instance, rclThreshold);
            Instance = instance;
            GRASPIterations = graspIterations;
        }
        public DiscreteHMTSwGRASP2OptFirst4SPP(SPPInstance instance, double rclThreshold, 
		                                       int graspIterations, int tabuListLength, 
		                                       int neighborChecks)
            : base(tabuListLength, neighborChecks)
        {
            GRASP = new DiscreteGRASP2OptFirst4SPP(instance, rclThreshold);
            Instance = instance;
            GRASPIterations = graspIterations;
        }
 public DiscreteHMSAwGRASP2OptFirst4SPP(SPPInstance instance, double rclThreshold,
                                        int graspIterations, int initialSolutions,
                                        int levelLength, double tempReduction)
     : base(initialSolutions, levelLength, tempReduction)
 {
     GRASP           = new DiscreteGRASP2OptFirst4SPP(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 DiscreteGRASP2OptFirst4SPP(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);
        }
        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 DiscreteGRASP2OptFirst4SPP(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);
        }