## 4 Proposed Model
### Formulation of Objective Function  
A Beacon-based Scheduled Routing Algorithm for Localization (SRAL) (either adaptive or opportunistic) requires the following information for optimal results: Node deployment order (\(\rm{O}^{ND}\)) which refers to the sequence in which nodes are deployed in a network. Number of beacon nodes (\(\rm{B}^{unit}\)) which is the total number of beacon nodes in a network. Broadcasting communication scenario (\(\rm{S}^{cost}\)) which refers to the conditions under which broadcasting is conducted in a network. The criteria of beacon broadcasting (CB) are the factors that determine when a beacon node will broadcast its information. The neighboring list of primary nodes (\(\rm{LN}^{P}\)) is a list of all the primary nodes that are in close proximity to a given primary node. * Node deployment order (\(\rm{O}^{ND}\));
* Number of beacon nodes (\(\rm{B}^{unit}\));
* Broadcasting communication scenario (\(\rm{S}^{cost}\));
* Criteria of beacon broadcasting (CB);
* Neighboring list of primary nodes (\(\rm{LN}^{P}\)). For optimal node scheduling problems, the metaheuristic algorithms have their own characteristics, therefore the objective functions are split into two cases. The primary goal is to optimize energy efficiency, cost-effectiveness, and network overhead while maximizing trust, security, and the lifetime of the network with the help of simulation models in which nodes are randomly distributed as shown in Equation (1) as follows:  
\[\begin{array}{l}\rm{Obj}^{s}(N)=Min\sum_{n=1}^{N}(\sum(F_{f}^{c}(N.E)\times B ^{unit}(N.E)+S^{cost}(N.E)+\sum_{n=1}^{|CB|}\  
where 'E' is taken as each associated node energy at any given time 't'; \(\rm{B}^{unit}\) (N.E) is the nth beacon neighboring node while \(F_{f}^{c}\) is total fitness function cost; \(\rm{S}^{cost}\) is the scenario cost, and CB is the denoted criteria parameter of beacon broadcasting that are usually common in all types of data scenarios which are taken from [36]. UID is the unidentified node while UD is the identified; ND is the node deployment order (layer-by-layer scenario is adopted); and \(\rm{NL}^{P}\) is the neighboring list of nodes which are primary. In order to decide the number of sub-units of BNB Equation (3) works, in such a way that, the \(E(N^{B^{unit}})\), \(\rm{E}(N^{ND})\), \(\rm{E}(N^{UID})\), \(\rm{E}(N^{UID})\), and \(\rm{E}(N^{LN^{P}})\) are the cost evaluation of \(\rm{B}^{unit}\), ND, UID, UD, and \(\rm{LN}^{P}\), respectively. The beacon node generation function is given in Equation (3) as follows:  
\[F_{f}^{c}\ (\rm{N.E})=F_{a}(N)+F_{b}(N)+E^{bNB}(N)+F_{f}^{BND}(N)\times E\ (F_{f}^{BND}(N)t)^{2} \tag{3}\]  
The startup function cost is given in Equation (4) that helps to initiate the process of broadcasting as follows:  
\[\rm{S}^{cost}(N.E)=\rm{[S}^{cost},\,if\,\rm{B}^{unit}(N.E)-\rm{B}^{unit}(N,\,t- 1)=1,\,0\,\rm{otherwise}] \tag{4}\]  
where \(\rm{S}^{cost}\) is the initial startup cost. In case II (opportunistic beacon broadcasting), the maximum node broadcast is obtained from the localization revenue by sub-structuring the production cost of the scenario, and consequently the operation and energy costs are minimized. Thus, the objective function is split into \(Obj_{1}^{G}\) and \(Obj_{2}^{G}\) as demonstrated in Equations (5) and (6). \[ \begin{array}{l}Obj_{1}^{G}(N)=\min\sum_{t=1}^{T}(\rm{G}(t)\times E^{loc}(t) +\sum_{t=1}^{F_{f}^{c}}(\rm{F}_{f}^{c}(N.E))\times B^{unit}(N.E)+S^{cost}(N.E)+ \\ \sum_{n=1}^{|\rm{CB}|}\ (\rm{UID}(N.E)\times E^{UID}(N.E))+\sum_{n=1}^{|\rm{LN}|}(\rm{ UD}^{LN}\ (N.E)\times E^{UID}(P))+\sum_{n=1}^{|UD|}(\rm{UN}^{LN},\ (N.E))\\ +E^{UID}(P)+\sum_{n=1}^{|ND|}(\rm{ND}(N.E))\times E^{ND}(N.E)+\sum_{N=1}^{BNB} (\rm{BNB}(N.B)\times E^{NB}(N.E)))\end{array}  \tag{5}\]  
where, given t, \(\rm{G}_{all}(t)\) is the total generation cost of beacon node operation and \(\rm{E}^{Loc}(t)\) denotes the total cost of localization in \(\rm{G}_{all}(t)\). Meanwhile, all other related parameters must be greater than zero as \(\rm{E}^{Loc}(t)>0\). \[