Research Article

A Mathematical Optimization Model for the Pharmaceutical Waste Location-Routing Problem Using Genetic Algorithm and Particle Swarm Optimization

Algorithm 1

Genetic Algorithm (GA).
Input:
  Population size (n)
  Maximum number of iterations (MAX)
Output:
  Global best solution, Ybt
Begin
   # Create an initial population of n chromosomes Yi (i = 1, 2,…, n)
   For i = 1 to n
    Yi = generate_chromosome()
   compute_fitness(Yi)
   Set iteration counter t = 0
   While (t < MAX)
    A selection of two chromosomes is made from the initial population based on fitness
    Apply crossover operation on selected pair with crossover probability
    Apply mutation on the offspring with mutation probability
    Replace old population with new offspring
    Increase the current iteration t by one.
  end while
  return the best solution found, Ybt
end