# Intelligent Communication in Wireless Sensor Networks
## 3 The Proposed Strategy
### Partitioning the Network into Sectors  
To divide the network into sectors, we used the visiting center local (VCL) algorithm, and we considered the base station as a starting point. A mobile agent has been proposed for each sector to collect information from the SN along a route having a shape similar to that of the sector. After the receiver receives signals from the SN, it sends MA, to circulate between the sensors of its sectors. These MA group the data processed and captured by the SN to return to the receiver with the data collected. * _Linking the sink to the VCL sensor_ For each sector, the selected VCL was linked to the base station. As a consequence, several cases can occur: \(\mathsf{X_{Sink}\textgreater X_{VCL}}\) and \(\mathsf{Y_{Sink}\textgreater Y_{VCL}}\), \(\mathsf{X_{Sink}\textless X_{VCL}}\) and \(\mathsf{Y_{Sink}\textgreater Y_{VCL}}\), \(\mathsf{X_{Sink}\textgreater X_{VCL}}\) and \(\mathsf{Y_{Sink}\textless Y_{VCL}}\), \(\mathsf{X_{Sink}\textless X_{VCL}}\) and \(\mathsf{Y_{Sink}\textless Y_{VCL}}\); for each case we distinguish between several sub-cases. What follows is as an example the case \(\mathsf{X_{Sink}\textgreater X_{VCL}}\) and \(\mathsf{Y_{Sink}\textgreater Y_{VCL}}\), then the method used is the following in the Figure 1:  
* To obtain angle \(\alpha\): \[\mathsf{Tg}(\alpha)\ =\ \frac{(Ysink-Yvcl)}{(Xsink-Xvcl)}\quad\text{then}:\quad \alpha\ =\ \text{atg}\frac{(Ysink-Yvcl)}{(Xsink-Xvcl)}\]
* Obtain the coordinates of the first point of the perpendicular line: \[\left\{ \begin{array}{l}Xvcl-Xdp=radius\times sin\alpha\\ Yvcl-Ydp=radius\times cos\alpha\end{array} \right.\quad\text{Thus}:\ \left\{ \begin{array}{l}Xdp=Xvcl-radius\times sin\alpha\\ Ydp=Yvcl-radius\times sin\alpha\end{array} \right.\]Obtain the coordinates of the second point of the perpendicular line:  
\[\left\{ \begin{array}{l}Xdp^{\prime}-Xvcl=radius\times sin\alpha\\ Ydp^{\prime}-Yvcl=radius\times cos\alpha\end{array} \right.\ \ \mathbf{Thus:}\ \left\{ \begin{array}{l}Xdp^{\prime}=\ Xvcl+radius\times sin\alpha\\ Ydp^{\prime}=\ Yvcl+radius\times cos\alpha\end{array} \right.\]  
After fixing the coordinates of the two points on the perpendicular line, we can trace it. * _Connecting an intersection point to the sink_  
In each case, to connect a point of intersection of a perpendicular line of the circle whose center is the VCL with the sink, we have several sub-cases. We take an example of the case in Figure 2, X\({}_{\text{Sink}}\)\(<\)X\({}_{\text{VCL}}\) and Y\({}_{\text{Sink}}\)\(>\)Y\({}_{\text{VCL}}\):  
As we know, the equation of a straight line: Y = aX + b then:  
Figure 1: _Linking_ the sink with the VCL sensor. Figure 2: Connecting an intersection point to the sink. \(a=\frac{Y\text{Sink}-Y\text{Y}\text{Sink}}{X\text{Sink}-X\text{Y}\text{Sink}}\) and \(b=Y\text{Sink}-a\text{X}\text{Sink}\). Thus, it is necessary to calculate the coordinates (x, y) of the two points a and b to draw the straight line. * _Verify the belonging of a sensor in a group_ It is necessary to group the sensor membership to the same sector, after the construction of the sectors. We distinguish different cases and for each case, we distinguish different sub-cases. In the Figure 3, we will try to detail the case of: \(\text{X}_{\text{Sink}}\textgreater\text{X}_{\text{VCL}}\) and \(\text{Y}_{\text{Sink}}\textgreater\text{Y}_{\text{VCL}}\),
* First, we calculate the angles \(\alpha\) and \(\alpha^{\prime}\) of the group; Secondly, we calculate the angle for the sensors:\(\alpha_{1}\), \(\alpha_{2}\), \(\alpha_{3}\), \(\alpha_{4}\),\(\alpha_{5}\); and Third, for a sensor to be part of a sector, its angle must be (\(\geq\)\(\alpha\) and \(\leq\)\(\alpha^{\prime}\)) \(\mid\) (\(\leq\)\(\alpha\) and \(\geq\)\(\alpha^{\prime}\)).