Research Article
A Heuristic Algorithm of Cooperative Agents Communication for Enhanced GAF Routing Protocol in WSNs
Algorithm 3
Tree building and solution improvement.
1: Initialize , , . | |
2: repeat | |
3: | |
4: | |
5: repeat | |
6: fordo | |
7: | |
8: ifthen | |
9: | |
10: else | |
11: fordo | |
12: ifthen | |
13: | |
14: | |
15: | |
16: end if | |
17: end for | |
18: ifthen | |
19: Break | |
20: end if | |
21: end if | |
22: end for | |
23: | |
24: until | |
25: | |
26: | |
27: | |
28: ifthen | |
29: | |
30: end if | |
31: until T=V |