## 4 Quality-Aware Routing and Channel Assignment in Multi-Channel Multi-Gateway WOBAN  
With this, we now address the anycasting framework by considering a multi-gateway WOBAN where the wireless access network can connect to the fiber backbone through one of several gateways. As mentioned earlier, the multi-gateway WOBANs with anycast routing have several features (such as providing redundancy, reducing congestion, better utilization of network resources, etc.) that can be utilized for improving the quality of service of wireless connections. In addition to multiple gateways, the wireless routers are also equipped with multiple radio interfaces, which are capable of operating on multiple channels. However, this leads to a joint gateway selection and routing problem, which is computationally hard. In addition, the network parameters may vary over time, which increases the complexity of the problem. For instance, as illustrated in Figure 3, a user B may be initially connected to \(G_{6}\), which provides the best quality of service among a number of available gateway nodes in the absence of any other active node in its vicinity. However, if user A becomes active after B is connected, it may be necessary to switch B to \(G_{5}\) and connect A to \(G_{6}\) so that the two active routes do not interfere with each other and the overall performance is optimized. Such decisions depend on a number of parameters that affect the quality, which need to be evaluated at different locations and times, making the optimization difficult.  
Figure 2: Illustration of the effects of RTS/CTS packets to nodes located near a test link from \(S\) to \(D\).  
With this framework and assumptions, we next propose the routing protocol JRCA for multi-gateway, multi-channel WOBAN. Our approach for maximizing the quality metric through joint route and channel selection requires an effective representation of co-channel interference, which we model using the conflict graph. For multi-channel WOBAN, we define the route quality metric for route \(R\) of length \(v\) as follows:  
\[Q(R)=\frac{\prod_{f=1}^{v}P_{S}(I_{f})}{\sum_{f=1}^{v}T_{d}(n_{af},n_{bf})+\sum _{f=1}^{v}s_{d}\times y_{f}}. \tag{3}\]  
Here, \(f\) is a link on the route from source to gateway, \(P_{S}(I_{f})\) is the POS of link \(f\), \(I_{f}\) is the set of interferers. \(T_{d}(n_{af},n_{bf})\) is the delay with \(n_{af}\) and \(n_{bf}\) active neighbors at the sender and the receiver end, respectively. \(s_{d}\) is the switching delay for an interface to switch from one channel to another and \(y_{f}\) is a binary variable which is 1 when the interfaces of link \(f\) switch and 0 otherwise. For positive switching delay, this model prefers routes that avoid frequent switching of channels.  
For channel assignment, we use a conflict graph to model wireless interference. We first form the conflict graph (discussed in Section 4.1) and use a vertex coloring scheme (where colors represent channels) for channel assignment. From this point onwards, we use the word _channel_ and _color_ interchangeably. However, as the vertex coloring problem is an _NP-complete_ problem [38], we apply the _genetic algorithm_[39] to solve it, which has been successfully applied to several problems to avoid a brute-force-search.We propose a novel mechanism to reduce the number of vertices on which we apply the genetic algorithm, to reduce the convergence time. This is achieved by planarizing the conflict graph using _vertex deletion_ (in Section 4.2), applying backtracking to color the planar subgraph (in Section 4.3) and then using the genetic algorithm on the vertices that are not part of planar subgraph and those that violate the interface constraint (in Section 4.4). The details of the scheme are described in the following sections.