public void Start(string inputFile, string outputFile, int timeLimit)
 {
     QAPInstance instance = new QAPInstance(inputFile);
     int[] lowerBounds = new int[instance.NumberFacilities];
     int[] upperBounds = new int[instance.NumberFacilities];
     for (int i = 0; i < instance.NumberFacilities; i++) {
         lowerBounds[i] = 0;
         upperBounds[i] = instance.NumberFacilities - 1;
     }
     DiscreteILS ils = new DiscreteILS2OptFirst4QAP(instance, restartIterations, lowerBounds, upperBounds);
     ils.Run(timeLimit - timePenalty);
     QAPSolution solution = new QAPSolution(instance, ils.BestSolution);
     solution.Write(outputFile);
 }
Beispiel #2
0
        public void Start(string inputFile, string outputFile, int timeLimit)
        {
            QAPInstance instance = new QAPInstance(inputFile);

            int[] lowerBounds = new int[instance.NumberFacilities];
            int[] upperBounds = new int[instance.NumberFacilities];
            for (int i = 0; i < instance.NumberFacilities; i++)
            {
                lowerBounds[i] = 0;
                upperBounds[i] = instance.NumberFacilities - 1;
            }
            DiscreteILS ils = new DiscreteILS2OptFirst4QAP(instance, restartIterations, lowerBounds, upperBounds);

            ils.Run(timeLimit - timePenalty);
            QAPSolution solution = new QAPSolution(instance, ils.BestSolution);

            solution.Write(outputFile);
        }