## 3 System Model and Description
### Network Configuration and Data Transmission
#### 3.4.2 BFS-SPF-Three with Opportunistic Routing  
BFS-SPF-Three also forwards the data packets same as SPF-Three after ensuring the information of next 3-hop neighbors from the current node to avoid the void regions. BFS-SPF provides shortest paths among all available paths then BFS-SPF-Three performs opportunistic routing. It selects the single shortest path with minimum EC and least distance from the sea surface. Selection and transmission of BFS-SPF-Three is presented in Algorithm 2. Figure 8: Layer Division. ```
1:(Nodes, InitialEnergy, Layers, Sinks, PS, DR, TransmissionRedecivingPower, Area)
2:for node i e Nodes do
3: Deploy simple nodes, cross and sink nodes in the network
4: Track the IDs of nodes
5: Initiate the energies of nodes
6: Declare the type of nodes
7:endfor
8:for layer i e Layers do
9: Identify the nodes regarding each layer
10:endfor
11:for node i e Nodes do
12: Identify that how many cross nodes and simple nodes exists in the neighbor of current nodes
13:if Node type == 'Cross' && Neighbors exists \(>0\)then
14: calculate the depth from sea surface
15: Note the ID of the sensor node
16: Mark the node as cross node
17: Compute the distance using Equation (13)
18:else
19:for node i e Nodes do
20: Check for 3-hop neighbors
21:if 3-hop neighbors exist then
22: Calculate the depth from sea surface
23: Note the ID of the sensor node
24: Mark the node as normal node
25:endif
26:endfor
27:endif
28:for node i e Nodes do
29: Find void nodes to eliminate void hole regions
30:endfor
31: Call the procedure to find potential-forwarder
```
32 for node i \(\epsilon\) Nodes do
33 for node n \(\epsilon\) Neighbor-table do
34 if \(|\) Neighbor (n) \(|\geq 1\) then
35 if \(|\) Neighbor (Neighbor(n)) \(|\geq\)1 then
36 if n == Cross node then
37 Potential node forwarder = n
38 Go to step 32
39 endif
40 endif
41 if \(|\) Cross node == 0 \(|\) then
42 for node i \(\epsilon\) Not void nodes do
43 if \(|\) Neighbor (Neighbor (n)) \(|\geq\)1 then
44 [Distance, Path]= dijkstra (Nodes, Segments, Start ID, Final ID);
45 Save the complete shortest path
46
47 if \(|\) Neighbor (Neighbor (n)) \(|\geq\)1 then
48 Potential node forwarder = Path (2)
49 endif
50 endfor
51
52 endif
53 endfor
54
55 Now data transmission starts from here
56 Node i starts receiving data packets
57 if i is a cross node then
58 Multi-cast the data packets
59 else
60 Unicast the data packets
61 endif
62
63 Output: (\(Minimum\) EC, \(Affordable\) PRR, \(Affordable\) delay, \(Minimum\) active nodes)
```
**Algorithm 1**_Cont. ```
1:(Nodes, InitialEnergy, Layers, Sinks, PS, DR, TransmissionandReceivingPower, Area)
2:for node i \(\epsilon\) Nodes do
3: Deploy simple nodes, cross and sink nodes in the network
4: Track the IDs of nodes
5: Initiate the energies of nodes
6: Declare the type of nodes
7:endfor
8:for layer i \(\epsilon\) Layers do
9: Identify the nodes regarding each layer
10:endfor
11:for node i \(\epsilon\) Nodes do
12: Identify that how many cross nodes and simple nodes exists in the neighbor of current nodes
13:if Node type == 'Cross' && Neighbors exists \(>0\) then
14: calculate the depth from sea surface
15: Note the ID of the sensor node
16: Mark the node as cross node
17: Compute the distance using Equation (13)
18:else
19:for node i \(\epsilon\) Nodes do
20: Check for 3-hop neighbors
21:if 3-hop neighbors exist then
22: Calculate the depth from sea surface
23: Note the ID of the sensor node
24: Mark the node as normal node
25:endif
26:endfor
27:endfor
28:for node i \(\epsilon\) Nodes do
29: Find void nodes to eliminate void hole regions
30:endfor
```
**Algorithm 2** BFS-SPF-Three Pseudocode.