## 3 Proposed Deployment Methodology
### First Step: Deterministic Deployment
```
1:forS\({}_{i}\)\(\leftarrow\) 0 to total_sensors
2:forS\({}_{i}\)\(\leftarrow\) 0 to total_sensors
3: Calculate euclidean(sensor_source, sensor_destination)
4:if (Euclidean <= comm_range) and (same tunnel or level)
5: Communication = yes
6:else
7: Communication = no
8:endif
9:if (Euclidean <= sens_range) and (same tunnel or level)
10: Sensing = yes
11:else
12: Sensing = no
13:endif
14:If sensor_source == sensor_destination
15: Communication = no
16: Sensing = yes
17:endif
18:endfor
19:endfor
```  
**Algorithm 1** Node Evaluation  
This step is performed because it is possible that the first step does not reach coverage and connectivity requirements. The deployment process starts with the coordinate identifying the points between which additional nodes need to be deployed. These points indicate the section's start and finish within the mine where the nodes will be located. The linear distance between nodes is calculated using the Euclidean distance (the same is applied in deterministic deployment). This measurement is essential to determine the necessary node quantity and simulate its distribution along the tunnel. Next, the minimum and maximum sensing range parameters are defined. The parameters were obtained by analyzing previous research. The minimum sensing range for methane was established at 12 m after analyzing the simulations made in [39; 40; 41], and the maximum sensing range at 24 m for an overlap level of 50%. These ranges ensure that the nodes cover the RoI without holes or excessive overlap. Several random node placement strategies have been proposed based on a probability density function (PDF). [PERSON] et al. categorized the strategies into simple and compound [36]. Tree probability functions were chosen to model the nodes' distribution in the tunnels. The normal probability distribution, the Gaussian distribution, was used considering the sensing range average \(\mu\) = 18 m. The constant diffusion in [50] suggests an equal location probability over the interval; this work uses the minimum and maximum sensing range values. On the other hand, the exponential may prefer concentrations of nodes in certain areas, depending on the rate of the function, in this case, based on the minimum sensing range. The result of this step is the distance between sensors, which will be used to calculate the vector equation of the line. The next step involves the calculation of the vector equation of the line that joins the initial and final nodes' positions in the same section. The exact path along which the nodes will be distributed is obtained with this equation. By ensuring that the nodes are placed in line with this straight line, the model guarantees that the sensors will be correctly aligned with the physical section of the tunnel and, therefore, will be more effective regarding coverage and connectivity. The defined probability functions and the line equation proceed to the random generation of locations for the nodes. Each generated location is validated against the vector equation to ensure alignment with the span. Figure 4 shows the random deployment in which the algorithm adds nodes based on the distribution function chosen. Add 45 nodes to complete the coverage and communication requirements for a mine in a RoI of 345 m by 98 m.  
The solution to this system of equations provides the three-dimensional coordinates of the locations of the nodes that comply with the PDF, as shown in Algorithm 2. This process is repeated until all nodes are satisfactorily located, following the previously defined sensing range parameters and staying within the tunnel path. ```
1: calculate euclidean(sensor_source, sensor_destination)
2:while (nodes do not cover section)
3: distance = pdf.uniform(min_sensing_range, max_sensing_range)
4: distance = pdf.exponential(min_sensing_range)
5: distance = pdf.normal(average(min_sensing_range,max_sensing_range))
6:if distance < euclidean
7: xyz_coordinate = (x0,y0,z0)+ k(x,y,z)
8: add_node
9:endif
10:endwhile
```  
**Algorithm 2** Random Deployment