|
Algorithm 2.
Modified ant colony algorithm. |
|
Input:
the number of sensor nodes , the power expended to run the transmitter or receiver circuitry of sensor node , energy consumption of multi-path fading amplifier , energy consumption of free-space amplifier , distance threshold , impact factors of pheromone information , impact factors of heuristic information , is a small positive constant , pheromone information on edge , heuristic information on edge
, and are constants. |
|
Output: optimal routing . |
| 1 Initialization routing , energy for each node and tabu |
| 2 calculate distance of different nodes,
|
| 3 while maximum iterations has not be reached |
| 4 for
=1:
|
| 5 compute according to the node communication radius. |
| 6 generate transition probability based on Equations (15) and (16) |
| 7 choose the next hop node, relying on , modify routing and tabu |
| 8 the destination node or not? If not, go back to step 2, or proceed to step 9 |
| 9 update the node residual energy based on Equations (5) and (6), routing depending on Equation (17) |
| 10 end for
|
| 11 end while
|
| 12 return the optimal routing . |