# Fine-Grained Boundary Conditions in Field-Based Routing
## 6 Performance Evaluation
### Review of ALFA  
ALFA is a field-based routing protocol designed based on Poisson's equation in physics, which models a distribution of electric fields across a region. This protocol design relies on a conceptual mapping between physics and network fields as follows: the medium in physics corresponds to mesh nodes in the network, (\(-\)) pole charges are analogous to mesh gateways, and (\(+\)) moving charges represent packets. According to this conceptual mapping relationship, the movement behavior of (\(+\)) moving charges towards (\(-\)) pole charges can be interpreted as the forwarding behavior of packets towards gateways. To provide a more detailed description, repulsion forces among (\(+\)) moving charges can be associated with congestion levels by packets, while attraction forces between (\(+\)) moving charges and (\(-\)) pole charges can be related to the consideration of the short path. This protocol metric shown in (3) is derived using the finite element method (FEM) [17], a widely used technique in designing distributed algorithms. \[\phi(x)=\frac{\left(\sum_{a=0}^{b-1}\frac{\left(\phi_{x,a+1}T_{x,a}-\phi_{x,a} T_{x,a+1}\right)\cdot\left(T_{x,a}-T_{x,a+1}\right)}{S_{a}}+\eta q_{x}\right)}{ \sum_{a=0}^{b-1}\frac{\|T_{x,a}-T_{x,a+1}\|^{2}}{S_{a}}} \tag{3}\]  
where \(\phi(x)\) represents the potential value of mesh node \(x\), \(\phi_{x,a}\) indicates the potential value of the \(a\)-th neighboring node from mesh node \(x\), \(\bar{t}_{x,a}\) is the relative distance vector from node \(a\) to mesh node \(x\), and \(S_{a}\) indicates the area of the \(a\)-th triangle element. Additionally, \(\eta\) is the sensitivity with respect to the number of packets in the queue of mesh node \(x\) and \(q_{x}\) represents the number of packets in the queue of mesh node \(x\). To calculate the potential value using (3), derived from the FEM, it is necessary for each mesh node to be entirely enclosed by triangle elements as finite elements formed with their neighboring nodes within the transmission range of the node. In cases where neighboring nodes at a mesh node fail to satisfy the requirement of forming a complete triangular enclosure, virtual nodes are assigned according to the deployment rule mentioned in the previous section. Initially, every mesh node is assigned a potential value of +1 as the highest potential value, except for gateways, which are assigned the lowest potential value within the given topology. Typically, the outer boundary nodes, located at the network boundaries, maintain a constant potential value of +1 since the Dirichlet-based outer boundary conditions assign a constant value to the boundary nodes. The potential values assigned to general mesh nodes, which are not outer boundary nodes, would vary since the values are just initial values at the initial phase. After this initial phase, periodic hello messages are broadcasted to neighbors from each mesh node, containing its potential value and location information. Each mesh node then calculates its potential value using (3) with the received information in the hello messages. As a result, a converged potential field is constructed through several iterations, corresponding to the local equilibrium method (LEM) [18], to ensure that several iterations of (3) at each element eventually lead to a global solution. In scenarios where congestion occurs, the shape of the potential field changes, indicating locally increased potential in specific areas. In such cases, packets would be routed away from the congested hot spot with higher potential in the next phase. This autonomous load balancing leads to efficient traffic distribution and gateway load balancing. ALFA also has the ability to adapt flexibly in the event of a node failure, promptly identifying alternative paths without incurring additional overhead. This adaptive behavior makes ALFA well suited for dynamic network environments, outperforming other routing protocols in performance in terms of packet delivery ratio and throughput.