5.1. Sensitivity Analysis and Tuning the Model Parameters
Initially, the GA and SA models are validated by means of distributed demand points with a number equal to the population of each area of Region 11, Tehran. The considered weights for each function were as follows:
. Simultaneously, the best values of the model parameters were determined by sensitivity analysis to produce high-quality solutions. This study has practical importance for the solution of real-world problems when the optimal solutions are completely unknown [
32]. After some preliminary evaluations, the sensitivity analysis was performed for different values in the GA for crossover (0.4 to 0.9), population size (10 to 20), and mutation probabilities (0.1 to 0.4). For SA, the values were initial temperature (50 to 300), absolute temperature (0.01), and cooling rate (0.8 to 0.95). These rates are taken from previous research in the literature [
19,
20,
33].
The stopping condition for each run of the algorithms was 150 generations. Each set of factors generated for the analysis was used for five runs and the result is the average of the fitness over those five runs. The sensitivity analysis therefore considers all the algorithm parameter combinations. Sensitivity analysis was performed on the algorithms. It is necessary to use the best parameters for the GA and SA in order to achieve acceptable results.
Table 1 gives the results of the parameter sensitivity analysis for the genetic model, with fixed weights
.
From
Table 1, it can be observed that for population size the objective function values do not follow any pattern, but for crossover = 0.4 and mutation = 0.3 to 0.4, the objective function values follow a consistent pattern. Small population size values, small crossover values, and higher mutation values, (e.g., 0.3, 0.4) are preferred by the analysis. Therefore, the preferred parameter combination for solving the problem in this paper is: population size = 10, crossover = 0.4, and mutation = 0.4.
The model results with the best parameters, selecting six stations out of 27, show that the fitness of the final solutions has decreased, while the convergence of the fitness graph demonstrates that these facts ensure the model’s verification.
Figure 4 illustrates the locations of the optimal fire stations, their capacity, and their allocations for f1, f2, and f3 in ArcGIS by means of the best GA parameters with fixed weights
. The output graph shows the convergence of the fitness values. The sum of all demands for f1 and f2 is equal to the considered demands for this region, but in f3, it is not equal to the number of considered demands in the region. This shows that all the points have not been covered, and the time between some demand points and the optimal stations was more than five minutes.
Results of the sensitivity analysis for the SA model with fixed weights
are given in
Table 2. These rates are close to those obtained by Murray and Church [
34]. From
Table 2, it can be observed that fitness values decrease with increasing initial temperature. However, cooling rates do not follow any particular pattern, except for the case of initial temperature = 300 and cooling rates of, e.g., 0.8, 0.9, and 0.95, where the objective function values follow a consistent pattern, with the smallest objective function value obtained for initial temperature = 300 and cooling rate = 0.95. Therefore, these parameters are selected by the sensitivity analysis for this problem.
Figure 5 illustrates the locations of the optimal fire stations, their capacity, and their allocations for f1, f2, and f3 in ArcGIS by means of the best SA parameters with fixed weights
. The output graph shows the convergence of the fitness value. Furthermore,
Figure 5, like
Figure 4, shows that the sum of the demand allocation for f1 and f2 is equal to the demands present in this region. However, the sum of demands allocated to f3 is not equal to the demands in this region, showing that some points have not been covered. Thus, to cover all demand points, it is necessary to increase the number of optimal locations in the case study. Therefore, the goal is to choose seven fire stations from 27 existing and potential stations, using the algorithm selected as the best model in the algorithm evaluation step.
Table 3 compares the computation times for SA and GA, using their best parameters. Both algorithms were used as multi-objective algorithms with fixed weights
. The computer used to run the algorithms was an Intel(R) Core (TM) i7 760 @ 2.93 GHz with 8.00 GB of RAM, 1 TB hard disk, and Windows 7. The SA algorithm could achieve the results of the GA algorithm in approximately twice the number of iterations in this problem.
We wish to estimate the differences between the means with a 95% degree of confidence. According to Freund, if
and
are the values of the means of independent random samples of sizes
and
from normal populations with known variances
and
, then:
is a (1 −
) confidence interval for the difference between the population means.
For a 95% confidence interval, (1 − ∝) = 0.95 so
and
. From the z_tables for standard normal distribution (Table III in Freund [
35]),
[
35]. In this study, index 1 refers to the genetic algorithm, while index 2 refers to the simulated annealing method.
Table 4 shows the results of the comparison of the genetic algorithm with simulated annealing for data sets 1 and 2, which are used to calculate the confidence intervals.
Since both limits are negative, we can conclude with 95% confidence that the genetic algorithm produces a solution with a smaller average than simulated annealing in each data set.
5.2. Evaluation of the Algorithms
We compare the implementation of GA and SA in the ordered capacitated multi-objective location-allocation problem, solving for fire stations with the criteria of fitness rate and calculation time [
8]. The results of two heuristic algorithms are compared. The best algorithm is selected for the final implementation in the case study. SA is a simple and effective method that can produce a good solution for combined and difficult problems. However, the disadvantage of this algorithm is its need for a large amount of CPU time for producing the solutions.
It is understood from
Table 3 that the fitness value of GA is better than SA, since GA uses the elite individuals in each repetition, whereas SA only studies random solutions and their neighborhoods. With 95% confidence, we can state that the GA can produce better results than SA. SA with many repetitions can produce the same optimal locations as GA, but the convergence time and the number of repetitions in GA is less than for SA. The slowest part of these algorithms is the allocation of demands or customers to the stations, where the algorithms must analyze and then order all the distances between the demands and the chosen stations in each step, in order to find the best demand allocation for each station.
These calculations require a lot of memory resources. With respect to computational resources, GA showed better efficiency. After 150 repetitions, it was clear that the computational time for achieving optimal solutions for SA is about twice as long as for GA. As a result, GA is selected for the final implementation in the case study. In summary, GA produced better results than SA in this problem with a large number of allocations (280,000 demands) for time and fitness values for fire stations.