Research Article

Optimal Installation Locations for Automated External Defibrillators in Taipei 7-Eleven Stores: Using GIS and a Genetic Algorithm with a New Stirring Operator

Pseudocode 1

Step 1.  Reset all GA parameters and operators (i.e., selection, crossover, and mutation) to  their
   default settings.
Step 2.  Randomly generate a population of chromosomes (candidates or potential solutions) of  size
      (defulat: 300), with each    chromosome  containing   (default: 100) elements, and with
   each element  corresponding to the serial number (ranging from 1 to ) of a  specific
  convenience store (Figure 2(a)).
Step 3.  Assign each chromosome in the initial population a fitness  score obtained by the objective
  function.
Step 4.   Repeat Steps 4a–4c until   offspring have been created.
  Step 4a.  Using a roulette wheel sampling mechanism in which selection probability  is
      proportional to the fitness score, randomly select two chromosomes from  the
      population to serveas parents. Note that any chromosome can be selected more
      than once (i.e., in other iterations).
  Step 4b.  Using a two-point crossover process to exchange elements between
      parent  chromosomes, producing two new offspring with Probability     (default: 0.8)
      from each pair of parents (Figure 2(b)). If no crossover occurs, the two new offspring
      Will be exact copies of their respective parents. To avoid repeats,  rearrange parental
      elements prior to this exchange so that the same elements are moved to the front of
      each chromosome.
  Step 4c.  Mutate the two offspring for each element at probability     
      (default: 0.01) and insert the resulting chromosomes into the new population.
Step 5.  Replace the current population with the new one.
Step 6.  Assign each chromosome in the current population a fitness
  score obtained by the objective function.
Step 7.  Maintain the best chromosome as the approximate global optimal  solution for the AED
  location-allocation problem and its associated fitness score for each generation in the current
  population.
Step 8.  Use the stirring operator to prevent premature convergence.  Evolution should be  sufficiently
  stable so that the sum of the difference of best fitness scores over     generations (default: 20)
  falls  below a tolerance value   (default: 10−10). In the stirring operator, replace   percent
  (default: 20%) of the chromosomes in the current population  with new and randomly
  generated chromosomes to trigger searches for  additional     generations.
Step 9.  If the sum of the difference of best fitness scores in
   Additional     generations   then  Stop the evolution process and
   return the AED location-allocation solution with the best fitness score
  else
   Go  to Step 4.
  end if