LEACH on ns2. Anyone know how to obtain residual network energy?
total energy
68
120.346
300.506
464.28
551.866
641.406
769.706
798.109
838.914
849.66
915.611
973.924
1006.277
Given that I started with 300J of energy. The LEACH results shows that I expended 1006.3J of energy. This is not realistic. Where is the error. I checked the stats.tcl and found
set total_energy [expr $total_energy + $expended]
This is reasonable, where the file prints the total energy. I tried to print the $expended energy and got very small decimal values and when removed the total energy is zero. This is ok as each node expends little energy and without any expenditure there will be zero total energy.
But the problem remains in printing the residual network energy values.
|