# Energy-Efficient Distributed Edge Computing to Assist Dense Internet of Things
## 5 Optimized Energy Model  
The model is represented as a graph \(G=(V,Q)\), where \(V\) denotes the set of deployed nodes in the network, and \(Q\) denotes the set of links. The network nodes are IoT devices, fog nodes, and _MEC_ servers, while a communication channel between any two nodes is a link. Each node \(\
u\in V\) has a computational capacity \(C_{\
u}\) and an energy consumption rate \(\xi_{u}\). Each link \(q\in Q\) has a bandwidth \(\Omega_{q}\) and an energy consumption rate \(\xi_{q}\). The proposed optimized model aims to minimize the total energy consumption (\(E_{T}\)), while maintaining the required performance metrics for the dense deployment. The optimization problem is formulated as follows:  
\[\text{Min}f(E_{T}), \tag{9}\]  
\[E_{T}=\sum_{v\in V}\xi v+\sum_{q\in Q}\xi q \tag{10}\]  
It is subjected to:  
\[T\leq T_{T} \tag{11}\]  
\[\sum_{i=1}^{T_{\
u}}C_{i}\leq C_{\
u},\forall v\in V,\gamma_{\
u}\in\mathbb{R} \tag{12}\]  
\[\xi_{q}\leq\xi_{qT},\forall q\in Q \tag{13}\]  
\[\xi_{v}\leq\xi_{vT},\forall v\in V \tag{14}\]  
where \(C_{i}\) is the computational capacity required for handling task \(i\) over the node \(\
u\), \(\gamma_{\
u}\) is the number of tasks handled by node \(\
u\), \(\xi_{qT}\) is the energy limit for the communication channel, and \(\xi_{qT}\) is the energy limit for the network node \(\
u\). The first constraint ensures that the latency for processing and communication computing tasks (\(T\)) does not exceed a predefined threshold (\(T_{\tau}\)). This threshold value is chosen to support the QoS of computing services. The second constraint ensures that the computational load on each node does not exceed its computational capacity. The third constraint ensures that a certain link energy does not exceed the energy limit for communication links. This distributes the energy consumption among nodes, preserving energy and prolonging the network life. The last constraint ensures that the energy consumption by end nodesdoes not exceed the threshold levels. To solve the previous problem, we consider a salp swarm optimizer (SSO) using the steps introduced in [27]. The SSO method effectively identifies optimal configurations that reduce total energy usage, while meeting latency, computational, and energy requirements. Its ability to handle the complexity of dense IoT and fog networks, together with its exploration-exploitation balance, makes it an effective tool for resource allocation in next-generation network systems. The SSO algorithm is well-suited for high-dimensional optimization problems, including resource allocation in dense networks, due to its good balance between exploration and exploitation and relatively low computational complexity. Inspired by the swarming behavior of salps in oceanic environments, SSO mimics how salps form chains to optimize their movement and adapt to environmental changes. This bio-inspired approach is highly effective in navigating complex solution spaces, where numerous variables and constraints are at play, as in the case of resource allocation for dense IoT and fog computing networks. The SSO process goes through the following main steps [27; 28]:  
1. Exploration phase: During the initial iterations of SSO, the algorithm explores the solution space to uncover various candidate solutions. The leader salp directs the swarm toward promising locations, avoiding premature convergence on inferior solutions. This phase is critical for dealing with the high dimensionality of resource allocation problems, where the search space contains a wide range of job assignments, node capabilities, and energy consumption rates. 2. Exploitation phase: As the algorithm progresses, it moves toward exploitation, with follower salps refining their places based on the leader's instructions and the locations of their neighbors. This refinement provides convergence to the optimal solution, while remaining feasible under the given limitations (e.g., latency, processing capacity, and energy limits).