For the random node distribution, the nodes are randomly placed on the network area as illustrated in Figure (3.5). They are placed according to a particular probability distribution function (PDF), such as linear distribution, Poisson’s distribution, etc. For example, in a linear distribution, the x and y positions of a node are calculated as follows:
x = X• (3.8)
y = Y• (3.9)
Where X and Y are the length and width of the network area, and is a random number uniformly selected between 0 and 1 (0≤<1).
One important point that must be carefully considered using random node distribution is to make sure that initially each node within the network should have at least one neighboring node.
Semi-regular node distribution
In this distribution, the network area is divided into equal size zones across the length and the width of the network, and then, the node location is randomly determined within each zone using Eqns. (3.8) and (3,9) with X and Y are replaced by the Xz and Yz, where Xz and Yz are the length and width of the zone. Figure (3.6) shows an example of semi-regular node distribution.
As it can be seen in Figure (3.6), in semi-regular distribution, the node first-hop neighbors neither fixed as in the regular-grid distribution nor totally unpredictable as in the random distribution. Thus, it is believed that this distribution is more suitable in demonstrating the performance of the NWTD algorithm. The C++ implementation of semi-regular node distribution (SemiRegular) is given in Appendix I.
In all distribution, two nodes i and j are considered to be connected or first-hop neighbors if the Euclidean distance between these two nodes (r) is less than or equal to radio transmission range of the node (R), where r is given by:
(2) Algorithm module
In this module, the NWTD algorithm described in this chapter is implemented. It is important to know at this stage that the master node concept described in Section 3.2.1 is not implemented as it was explained, instead, during the node initialization stage each node is assigned a certain initial trust value. In particular, the initial trust can be determined using one of the following procedures:
(1) All nodes are assigned an equal pre-defined initial trust value between 0 and 1. For example all nodes are assigned an initial trust value of 0.8.
(2) Each node on the network is assigned a random initial trust value between 0 and 1, which is determined using a linear or non-linear PDFs. For example, for linear distribution, the following simple equation is implemented in MANSim:
Ti,j = (3.11)
Where Ti,j is the trust of node j as determined by node i and is a random number uniformly selected between 0 and 1 (0≤<1) (Hu et al, 2003; Theodorakopoulos & Baras, 2004).
(3) Computational module
MANSim calculates a number of network performance measures, such as: network reachability (RCH), number of retransmission...