Research Article
Differential Evolution for Lifetime Maximization of Heterogeneous Wireless Sensor Networks
Pseudocode 1
Pseudocode of generated test data set algorithm.
/* generate test data set algorithm */ | randomly generate sensors , each has abscissa | and ordinate . | randomly generate targets , each has abscissa | and ordinate . | cell ; % save every sensor can sense | the targets | for 1: | for 1: | if | ; % sensor can sense | target | end if | end for | end for | /* compute upper of disjoint complete cover sets () */ | cell() | for 1: | for 1: | if (find ) | count++; | ; % target is covered | by sensor | end | end | ; | end | min ; | /* count all of critical targets and corresponding sensors */ | for 1: | if size | ; | numOfCritialTarget++; | end | end | reshape ; |
|