public void Start(string inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); DiscreteSS ss = new DiscreteSS4SPP(instance, poolSize, refSetSize, explorationFactor); ss.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, ss.BestSolution); solution.Write(outputFile); }
public void Start(string fileInput, string fileOutput, int timeLimit) { SPPInstance instance = new SPPInstance(fileInput); int[] assignment = SPPUtils.GRCSolution(instance, 1.0); SPPUtils.LocalSearch2OptFirst(instance, assignment); SPPSolution solution = new SPPSolution(instance, assignment); solution.Write(fileOutput); }
public void Start(string inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); MaxMinAntSystem aco = new MaxMinAntSystem2OptFirst4SPP(instance, numberAnts, rho, alpha, beta, maxReinit); // Solving the problem and writing the best solution found. aco.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, aco.BestSolution); solution.Write(outputFile); }
public void Start(string inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); int levelLength = (int) Math.Ceiling(levelLengthFactor * (instance.NumberSubsets - 1)); DiscreteHMSAwGRASP2OptBest4SPP hm = new DiscreteHMSAwGRASP2OptBest4SPP(instance, rclTreshold, graspIterations, initialSolutions, levelLength, tempReduction); hm.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, hm.BestSolution); solution.Write(outputFile); }
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); }
public void Start(string inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); DiscreteSS ss = new DiscreteSS2OptBest4SPP(instance, poolSize, refSetSize, explorationFactor); ss.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, ss.BestSolution); solution.Write(outputFile); }
public void Start(string inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); int neighborChecks = (int) Math.Ceiling(neighborChecksFactor * (instance.NumberSubsets - 1)); int tabuListLength = (int) Math.Ceiling(tabuListFactor * instance.NumberItems); DiscreteTS ts = new DiscreteTS4SPP(instance, rclTreshold, tabuListLength, neighborChecks); ts.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, ts.BestSolution); solution.Write(outputFile); }
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); }
public void Start(string inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); MaxMinAntSystem aco = new MaxMinAntSystem2OptBest4SPP(instance, numberAnts, rho, alpha, beta, maxReinit); // Solving the problem and writing the best solution found. aco.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, aco.BestSolution); solution.Write(outputFile); }
public void Start(string inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); int levelLength = (int)Math.Ceiling(levelLengthFactor * (instance.NumberSubsets - 1)); DiscreteHMSAwGRASP2OptBest4SPP hm = new DiscreteHMSAwGRASP2OptBest4SPP(instance, rclTreshold, graspIterations, initialSolutions, levelLength, tempReduction); hm.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, hm.BestSolution); solution.Write(outputFile); }
public void Start(string inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); int neighborChecks = (int)Math.Ceiling(neighborChecksFactor * (instance.NumberSubsets - 1)); int tabuListLength = (int)Math.Ceiling(tabuListFactor * instance.NumberItems); DiscreteTS ts = new DiscreteTS4SPP(instance, rclTreshold, tabuListLength, neighborChecks); ts.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, ts.BestSolution); solution.Write(outputFile); }
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 DiscreteGRASP2OptBest4SPP(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 inputFile, string outputFile, int timeLimit) { SPPInstance instance = new SPPInstance(inputFile); int[] lowerBounds = new int[instance.NumberItems]; int[] upperBounds = new int[instance.NumberItems]; for (int i = 0; i < instance.NumberItems; i++) { lowerBounds[i] = 0; upperBounds[i] = instance.NumberSubsets - 1; } DiscreteILS ils = new DiscreteILS2OptFirst4SPP(instance, restartIterations, lowerBounds, upperBounds); ils.Run(timeLimit - timePenalty); SPPSolution solution = new SPPSolution(instance, ils.BestSolution); solution.Write(outputFile); }
public void Start(string fileInput, string fileOutput, int timeLimit) { SPPInstance instance = new SPPInstance(fileInput); // Setting the parameters of the GA for this instance of the problem. int[] lowerBounds = new int[instance.NumberItems]; int[] upperBounds = new int[instance.NumberItems]; for (int i = 0; i < instance.NumberItems; i++) { lowerBounds[i] = 0; upperBounds[i] = instance.NumberSubsets - 1; } DiscreteGA genetic = new DiscreteGA2OptBest4SPP(instance, (int)popSize, mutProbability, lowerBounds, upperBounds); // Solving the problem and writing the best solution found. genetic.Run(timeLimit); SPPSolution solution = new SPPSolution(instance, genetic.BestIndividual); solution.Write(fileOutput); }
public void Start(string fileInput, string fileOutput, int timeLimit) { SPPInstance instance = new SPPInstance(fileInput); // Setting the parameters of the UMDA for this instance of the problem. int popSize = (int) Math.Ceiling(popFactor * instance.NumberItems); int[] lowerBounds = new int[instance.NumberItems]; int[] upperBounds = new int[instance.NumberItems]; for (int i = 0; i < instance.NumberItems; i++) { lowerBounds[i] = 0; upperBounds[i] = instance.NumberSubsets - 1; } DiscreteUMDA umda = new DiscreteUMDA4SPP(instance, popSize, truncFactor, lowerBounds, upperBounds); // Solving the problem and writing the best solution found. umda.Run(timeLimit - (int) timePenalty); SPPSolution solution = new SPPSolution(instance, umda.BestIndividual); solution.Write(fileOutput); }
public void Start(string fileInput, string fileOutput, int timeLimit) { SPPInstance instance = new SPPInstance(fileInput); // Setting the parameters of the GA for this instance of the problem. int[] lowerBounds = new int[instance.NumberItems]; int[] upperBounds = new int[instance.NumberItems]; for (int i = 0; i < instance.NumberItems; i++) { lowerBounds[i] = 0; upperBounds[i] = instance.NumberSubsets - 1; } DiscreteGA genetic = new DiscreteGA2OptFirst4SPP(instance, (int)popSize, mutProbability, lowerBounds, upperBounds); // Solving the problem and writing the best solution found. genetic.Run(timeLimit); SPPSolution solution = new SPPSolution(instance, genetic.BestIndividual); solution.Write(fileOutput); }
public void Start(string fileInput, string fileOutput, int timeLimit) { SPPInstance instance = new SPPInstance(fileInput); // Setting the parameters of the UMDA for this instance of the problem. int popSize = (int)Math.Ceiling(popFactor * instance.NumberItems); int[] lowerBounds = new int[instance.NumberItems]; int[] upperBounds = new int[instance.NumberItems]; for (int i = 0; i < instance.NumberItems; i++) { lowerBounds[i] = 0; upperBounds[i] = instance.NumberSubsets - 1; } DiscreteUMDA umda = new DiscreteUMDA2OptBest4SPP(instance, popSize, truncFactor, lowerBounds, upperBounds); // Solving the problem and writing the best solution found. umda.Run(timeLimit - (int)timePenalty); SPPSolution solution = new SPPSolution(instance, umda.BestIndividual); solution.Write(fileOutput); }