Research Article

Evaluation of Using Genetic Algorithm and ArcGIS for Determining the Optimal-Time Path in the Optimization of Vehicle Routing Applications

Algorithm 1

Pseudocode for GA implementation.
(1) ►Input: Graph (V, E)
(2)  fNode/ initial node in the route /
(3)    dNode/ destination node /
(4)   ►Output: Ch[]/array of Genes represents the optimal time route /
(5)   Define: Adj [][]/ 0, 1 Check nodes adjacency in the graph /
(6)   Ch [0] ← fNode
(7)    Pz ← Population size
(8)    Cr ← Crossover rate
(9)    Mr ← Mutatino rate
(10)     for each i, j where j = PZ
(11)    Create_Chromosome (fNode, dNode)
(12)    F ← Calculate Fitness Value for each chromosome
(13)     End for
(14)   Count ← 0
(15)   Gen ← 1
(16)    While Count ≤ 10 do
(17)   Ch1, Ch2 ← RouletteWheel _Selection ()
(18)   Ch1,Ch2 ← Crossover (Ch1, Ch2)
(19)    Ch3 ← Mutation (Ch1)
(20)    Ch4 ← Mutation (Ch2)
(21)    F1 ← Fitness Value for the first chromosome
(22)    F2 ← Fitness Value for the second chromosome
(23)    Fm ← Minimum Value of fitness function
(24)     If Gen > 1 && Fm (Gen-1) = = Fm (Gen-2)
(25)    Count ++
(26)   if count > 10
(27)    Break
(28)   else
(29)   count = 0
(30)   End If
(31)   End while
(32)   Gen ++
(33)   Go to 17