|
Algorithm 1
Circular Motion of MSs with Varied Velocity Algorithm
|
Initialize all the parameters;
Round = 0;
Static sinks computes the velocities of MSs based on Equation (30);
MSi Starts to move in predetermined circular path from position (((2j-1)(d/2)), 0)
Turn Round = Turn Round +1;
J = 1;// sector number
Stops at (((2j-1)(d/2).cos(ϴ/2) + Xcenter), ((2j-1)(d/2).Sin(ϴ/2) + Xcenter)); //MS stops at the bisector of sectors
MS sends a Hello packet to the nearest CH;
CH sends a data packet to the MS //data packet contains corona number, sector number and waiting time parameter;
MSi Computes the sojourn time in Cluster(i, j) based on Equation (30);
MS propagates Hello packets; // Hello packet contains of position of MS and cluster id
the MNs which are located in the cluster which is mentioned in received packet will connect to MS;
Set timer = ST(i,j,Round);
While timer > 0 do
CH Temporarily stops its operations;
MSi aggregates the data packets of nodes belonging Cluster (i, j);
MSi receives the data packets from CH (i-1, j) and nodes belonging Cluster (i, j);
Check timer;
End while
J = j + 1;
MSi Computes its velocity {MSi | 1 < I ≤ k} based on Equation (30);
MSi Starts to move;
Check the current position;
If current position = (((2 j-1) (d/2)), 0); // when the angle of position of MSs is 0.Go to 5;
End If
Go
|