コード例 #1
0
 public void Start(string inputFile, string outputFile, int timeLimit)
 {
     SPPInstance instance = new SPPInstance(inputFile);
     int levelLength = (int) Math.Ceiling(levelLengthFactor * (instance.NumberSubsets - 1));
     DiscreteHMSAwGRASP2OptFirst4SPP hm = new DiscreteHMSAwGRASP2OptFirst4SPP(instance, rclTreshold, graspIterations, initialSolutions, levelLength, tempReduction);
     hm.Run(timeLimit - timePenalty);
     SPPSolution solution = new SPPSolution(instance, hm.BestSolution);
     solution.Write(outputFile);
 }
コード例 #2
0
        public void Start(string inputFile, string outputFile, int timeLimit)
        {
            SPPInstance instance               = new SPPInstance(inputFile);
            int         levelLength            = (int)Math.Ceiling(levelLengthFactor * (instance.NumberSubsets - 1));
            DiscreteHMSAwGRASP2OptFirst4SPP hm = new DiscreteHMSAwGRASP2OptFirst4SPP(instance, rclTreshold, graspIterations, initialSolutions, levelLength, tempReduction);

            hm.Run(timeLimit - timePenalty);
            SPPSolution solution = new SPPSolution(instance, hm.BestSolution);

            solution.Write(outputFile);
        }