Research Article

Improved Fractal Space Filling Curves Hybrid Optimization Algorithm for Vehicle Routing Problem

Algorithm 3

Or-opt method to generate the initial population.
Algorithm: Generate initial population of GA by or-opt method
Function Name: GenerateInitialPopulation (int orLength, ArrayList InitialSolution)
Input: Initial solution of VRP, local search step length
Output: the set of solutions for VRP
Begin GenerateInitialPopulation (int orLength, ArrayList InitialSolution)
  Get current solution from input array.
  ,
  while (population less than expected number) do
      Generate two random integer , .
      if    then
      Exchange point and , get new solution
      Take point , respectively as center, select adjacent point to do -opt operation
      Add all these new solution into the set of initial population
      if (population number reaches expected number) then break
      Chose best solution as
      End
      
  End
  Output the set of population.
End