예제 #1
0
 public void Start(string fileInput, string fileOutput, int timeLimit)
 {
     TwoSPInstance instance = new TwoSPInstance(fileInput);
     int levelLength = (int) Math.Ceiling(levelLengthFactor * (2 * instance.NumberItems));
     DiscreteSA sa = new DiscreteSABL42SP(instance, initialSolutions, levelLength, tempReduction);
     sa.Run(timeLimit - timePenalty);
     int[,] coordinates = TwoSPUtils.BLCoordinates(instance, sa.BestSolution);
     TwoSPSolution solution = new TwoSPSolution(instance, coordinates);
     solution.Write(fileOutput);
 }
예제 #2
0
        public void Start(string fileInput, string fileOutput, int timeLimit)
        {
            TwoSPInstance instance    = new TwoSPInstance(fileInput);
            int           levelLength = (int)Math.Ceiling(levelLengthFactor * (2 * instance.NumberItems));
            DiscreteSA    sa          = new DiscreteSABL42SP(instance, initialSolutions, levelLength, tempReduction);

            sa.Run(timeLimit - timePenalty);
            int[,] coordinates = TwoSPUtils.BLCoordinates(instance, sa.BestSolution);
            TwoSPSolution solution = new TwoSPSolution(instance, coordinates);

            solution.Write(fileOutput);
        }