## 1 Introduction
### Vertical Handoff  
Let us explain the VH process more in detail. When the MS changes its connection from a router (access point to the network) to another one belonging to a different network, a VH can happen; if both routers are of the same network, it is a HH [7]. In any case, this is possible because the MS can have multiple interfaces to establish connections with different types of networks. In this work we have considered the VH when the QoS requirements are the factors to choose the best network to connect to. In the VH process the first phase, periodically invoked, consists of discovering which networks can be used within the coverage area and which are their services. After this, the MS determines if the connection should whether to go on the same network or switch to other one. This decision phase depends on several parameters like type of application, minimum bandwidth, access cost, transmitted power, _etc._[8]. This is the reason to consider those parameters providing QoS to make a good choice. Finally, in the execution phase the connections are routed from the current network to the targeted network, by means of a set of tasks (authentication, data transfer, _etc._).  
In traditional handoffs only signal strength and channel availability are considered. In the new generation networks new metrics have been proposed [9]: Service type, cost, network conditions (including traffic, available bandwidth, network latency, packet loss), system performance (considering channel propagation characteristics, path loss, signal-to-noise ratio, bit error rate, battery power), mobile node conditions (like velocity, moving pattern, moving histories, location information) and user's preferences. In this context, a VH decision metric is needed. A fitness function F can be used for handoff decision. This function evaluates the network performance based on user's preferences [10] and evaluates various metrics [9]. Thus, the fitness function for heterogeneous networks can take into account two dimensions: The types of services requested by the user and the fitness to the network according to specific parameters, such as bandwidth, power consumption, _etc._  
Some references use the term \"cost function\" [9] (which must be minimized) and other ones use the term \"figure of merit\" [10] (which must be maximized). Both terms are comparable; they are only different in the way we want consider to optimize. In this work we bear in mind that, from now on, the term fitness is more suitable, because we want to reserve the term cost to the economic cost of the network access.  
We use the fitness function described in Equation (1), where we have \(n\) networks, \(s\) services and \(i\) QoS parameters; \  
If to larger \(p\), larger fitness (the fitness function gets worse), then \(p\)' in Equation (3) is determined as in Equation (4). This is the case, for example, of the delay or economic cost. But if to larger \(p\), smaller fitness (the fitness function gets better), then Equation (5) shows how \(p\)' must be computed (for example, bandwidth):  
\[{p^{*}}_{i}^{(n)}={p^{(n)}_{i}} \tag{4}\]  
\[{p^{*}}_{i}^{(n)}=\frac{1}{{p^{(n)}_{i}}} \tag{5}\]