Ejemplo n.º 1
0
 public void Start(string fileInput, string fileOutput, int timeLimit)
 {
     SPPInstance instance = new SPPInstance(fileInput);
     int levelLength = (int) Math.Ceiling(levelLengthFactor * (instance.NumberSubsets - 1));
     DiscreteSA sa = new DiscreteSA4SPP(instance, initialSolutions, levelLength, tempReduction);
     sa.Run(timeLimit - timePenalty);
     SPPSolution solution = new SPPSolution(instance, sa.BestSolution);
     solution.Write(fileOutput);
 }
Ejemplo n.º 2
0
        public void Start(string fileInput, string fileOutput, int timeLimit)
        {
            SPPInstance instance    = new SPPInstance(fileInput);
            int         levelLength = (int)Math.Ceiling(levelLengthFactor * (instance.NumberSubsets - 1));
            DiscreteSA  sa          = new DiscreteSA4SPP(instance, initialSolutions, levelLength, tempReduction);

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

            solution.Write(fileOutput);
        }