Research Article

Topology Control by Transmission Range Adjustment Protocol for Clustered Mobile Ad Hoc Networks

Algorithm 2

Pseudo code for non-volunteer cluster head selection.
Begin
โ€ƒ โ€ฆ โ€ฆ
Let ๐‘– โ€‰= current_head//volunteer or non-volunteer
Compute max_wtโ€‰ = โ€‰max { W T ( ๐‘— ) where ๐‘— โˆˆ m e m b e r ( ๐‘– ) }
Set next_head = ๐‘ฃ where W T ( ๐‘ฃ ) = โ€‰max_wt
Head ( ๐‘– ) = next_head
For (every ๐‘— โˆˆ m e m b e r ( ๐‘– ) other than next_head)
{
If dist (next_head, ๐‘— ) โŸจ = n e x t _ h e a d t r a n g e T h e n
{
Head ( ๐‘— ) = next_headโ€ƒ//hand off
Else
Reaffiliate ๐‘— to other head within rangeโ€ƒ//Reaffiliation
Else
Select ๐‘— as volunteer headโ€ƒ//Reelection
}
End if
}
End for
โ€ƒ โ€ฆ โ€ฆ
โ€ƒEnd