## 7 Intelligent Decision-Making (IDM) Model  
We use the IDM model to increase the efficiency of BN-MAC. This model decides the nature of the environment, _i.e._, whether the environment is indoor or outdoor. The IDM model forces the sensor nodes [41] to work on either the passive or active mode of communication in response to the nature of the environment. The IDM model helps to reduce energy consumption in both modes but particularly in the passive mode. The sensor nodes working in the passive mode do not consume the energy of their battery but may instead harvest energy, such as solar energy from the environment. Let us assume that \"K\" is the number of sensor nodes available in the WSN, which are deployed to detect the presence or absence of the indoor and outdoor environment (IOE). K sensor nodes collect information regarding the IOE and then determine the nature of the environment. We have set values for the IOEs. If D\({}_{\rm i}\geq 1\) indicates the presence of an indoor environment (IE), then D\({}_{\rm i}<1\) indicates the presence of an outdoor environment (OE). To prove \"IE\" and \"OE\", we also use a third environment, _i.e._, an unknown environment (UE). The detection process is based on the maximized probability of detection (MPD) method used by the Neyman-Pearson Lemma [42]. The K sensor nodes start the detection process from the UE because they are initially unaware of the nature of the environment. We set the probability of \"UE\" and pick a random variable that denotes the constraint of the optimized problem in the form of \(\textit{UE}=\alpha\) (\(\textit{alpha}\)), as shown in Equation (16):  
\[E(\textit{UE})=\alpha \tag{16}\]  
One of the requirements for statistical optimization is establishing an expected value of UE. Hence, we maximize the expected value of the probability to detect UE with respect to the constraints of the expected value of the probability:  
\[\alpha=\sum_{k=0}^{\infty}\ \textrm{PK}\ (\textrm{K}=k)\textrm{UE}^{k}(\beta^{k}) \tag{17}\]  
Figure 13: Time consumption for sending a BNIS message with BN-MAC and other MAC protocols. Substitute the value of \(\alpha\) (\(alpha\)) in Equation (16) to find the UE that will be easier for the sensor node to sense out of IE and OE. \[E(UE)=\sum_{k=0}^{\infty}\ \mathrm{PK\ (K=k)UE^{k}(\beta^{k})} \tag{18}\]  
\(\mathrm{UE^{k}}\) and (\(\beta^{k}\)) are linked by the relative operating characteristics (ROCs) that are required to determine UE (ROCs are a strong method to validate probability estimates and particularly to compare its performance with deterministic estimate. it is two-dimensional process). We use the following probabilities to detect UEs and IEs:  
\(\mathrm{UE_{i}=P\ (D_{i}<1|IOE outdoor)}\), \(\mathrm{\beta i=P\ (D_{i}<1|IOE outdoor)}\), and \(\mathrm{PD_{i}=P\ (D_{i}>1|IOE indoor)}\), \(\gamma_{i}=P\ (D_{i}>1|IOE indoor)}\). Let us assume that the sensor nodes detect the environment independently. Thus, K sensor nodes detect UE based on the set probability values:  
\[\mathrm{Di=IOE-\sum_{k=0}^{\infty}\ \mathrm{PK\ (K=k)f(UE^{k}(\beta^{k}))}} \tag{19}\]  
Di =1 indicates that the passive mode is initiated and the K sensor nodes reduce energy consumption. If \(\mathrm{Di\geq 1}\) or \(\mathrm{Di\leq 2}\), then the environment is known, and the sensor nodes stop using the energy of the battery and activate the passive mode to obtain energy from the environment. This condition indicates the presence of an OE. The reduction in energy consumed can be calculated as follows:  
\[\mathrm{EN(X)}=\sum_{l=0}^{N}\mathrm{E\ (i)\gamma(ai)} \tag{20}\]  
\[\mathrm{EN(Y)}=\sum_{j=0}^{N}\mathrm{E(j)\partial(aj)} \tag{21}\]  
Let us assume that EN(X) and EN(Y) are the total energy saved by two different regions of the WSN. \(\mathrm{E(}i)\) and \(\mathrm{E(}j)\) indicate the energy saved by nodes i and j during transmission, respectively.