Algorithm 1 Routing Protocol Algorithm |
1: INPUT: size of the network |
2: OUTPUT: Efficient array of routes |
3: Assumptions: |
4: Size: number of nodes |
5: Efficient_Paths: E [] |
6: Pc = 0.5 |
7: Pm =0.1 |
8: Presnt_route = P, Old_route = O, New_route = N |
9: F(x) = Fitness Function (Min of energy consumption) for all nodes of each route x |
10: PopSize: Population of routes xs returned by AOMDV |
11: POP_F = Apply F(x) on routes of PoSize |
12: while (POP_F) |
13: Crossover (P, O, Pc) |
14: Mutation (P, O, C, Pm) |
15: if (FM ≥ FP)&(FM ≥ FO) then |
16: E [] = x |
17: else |
18: Drop x |
19: end if |
20: end while |
21: return routes array in E [] |