1 Introduction

In recent years, vehicular ad hoc network (VANET) has gained a lot of attention because of its applicability in various areas such as safety and security of the passengers, intelligent transportation system (ITS), and entertainment. VANETs are special case of mobile ad hoc networks (MANETs) where vehicles movement is constrained with respect to the density of the vehicles on the road. The network topology changes dynamically because of high speed of vehicles. The communication among vehicles is facilitated by the presence of fixed roadside units (RSUs) that are connected to the Internet.

The communication using VANETs is made possible by onboard unit (OBU) and application unit (AU) installed in vehicles. Vehicles can communicate among each other (V2V) or can use the existing infrastructure (V2I) in the form of roadside units (RSUs) deployed at strategic locations [6]. The V2V communication takes place using IEEE 802.11p or wireless access for vehicular environment (WAVE) standard, and V2I communication takes place using IEEE 802.11 a/b/g standards [7]. RSUs are connected to the Internet, and they along with vehicles can help in offloading the cellular data.

In recent times, there has been ever-increasing demand for communicating the data to the intended recipients, vehicles. The data can be either in textual, audio, image, video, or a combination of both. The mobile networks are the most common mode of communication between different entities over Internet because of the ubiquitous presence of its services. However, the increasing use of mobile communication can pose several challenges. According to the forecast by Cisco, the traffic in mobile communication will increase ten times with global monthly data traffic, which is expected to exceed 24.3 exabytes by 2019 [1]. Because of such massive increase, mobile users may face call drops, unreliable coverage, and limited bandwidth. Not only this, the quality of service (QoS) experienced by users may reduce owing to such data traffic expansion [2].

One of the possible solutions to the aforementioned problems is to increase the number of deployment of base stations across the network and increase the cellular capacity [3]. But, the patterns of increasing demands suggest that it may soon surpass the network capacity even if the more infrastructure is deployed. Hence, there is a need of using some alternate means for transmitting the data to the recipients. For this purpose, VANET and Wi-Fi can be used for offloading the cellular data in real time. A study reveals that more than 50 % of cellular data can be transferred by using Wi-Fi when it is available [35].

However, the offloading using vehicles also experiences several constraints and challenges. The velocity of the vehicles is very high, hence, to maintain communication at such a high speed, which is one of the biggest challenges. Also, the high mobility of vehicles results in constant change in the network topology and unstable communication links. To adapt to dynamic topology and high mobility of vehicles, an efficient scheme needs to be developed that can offload the data and communicate in real time using underlying VANET infrastructure.

However, implementation of mobile and vehicular data offloading has several challenges. The environment formed by Wi-Fi and vehicular communication has diverse offloading capacity. Hence, the heterogeneous environment needs exclusive offloading scheme for meeting the quality of service (QoS) requirements in real time. The general strategy for data offloading is to select the local best Wi-Fi or vehicle that can transfer the cellular data, but the selected node might not meet the QoS requirements. Hence, there is a trade-off between local best offloadings to meet the global QoS parameters.

1.1 Motivation

There is a need of offloading the cellular data with existing Wi-Fi or emerging vehicular communication. Most of the existing solutions [8, 9, 1113, 1518, 20] used either vehicles or Wi-Fi to offload the mobile data. As both vehicles and AP are available, hence, there is a need for a comprehensive technique that exploits the available VANET infrastructure. There are constraints and challenges for using these existing solutions. As vehicles move at high speed and topology changes frequently, a solution that uses IEEE 802.11p standard protocols for communication is required.

Moreover, the vehicles and Wi-Fi AP are having practical limitations of their position, communication radius, surrounding area, etc. Hence, a solution that considers real-time parameters needs to be designed. The existing offloading proposals focus mainly on local best solutions and do not focus on global QoS parameters. However, the end users are concerned with global QoS parameters for a better experience. Hence, there is a need of a scheme that meets the global QoS parameters while using either Wi-Fi or vehicles to offload the mobile data in real time.

1.2 Contribution

The main contributions of the proposed scheme are as follows:

  1. 1.

    A game theoretic approach is proposed, which provides globally best solution for mobile data offloading.

  2. 2.

    As the environment is dynamic and changes rapidly, the proposed scheme provides option for shifting from Wi-Fi to vehicles and vice versa.

  3. 3.

    The scheme meets the global QoS parameters with respect to end-to-end delay, message progress, and message dissemination speed. The simulation results prove the efficiency of the proposed scheme in comparison with the other existing schemes with respect to the above parameters.

1.3 Organization

The rest of the paper is organized as follows: the work related to the proposed scheme is elaborated in Sect. 2. The system model is described in Sect. 3. The proposed work is elaborated in Sect. 4. The simulation results are presented in Sect. 5. Finally, the paper concludes with future directions in Sect. 6.

2 Related work

The work related to mobile data offloading is discussed in following section. Li et al. [8] presented a mobile offloading scheme that used opportunistic vehicular networks. Their scheme was based on coding-based mobile data offloading for heterogeneous networks. In another work, Deshpande et al. [9] presented a strategy in which vehicles use Wi-Fi for transfer of data. The authors proposed a hand-off and data transfer strategy for quick connection establishment and faster data transfer. Li et al. [10] presented a mathematical framework for mobile data offloading in different network scenarios and heterogeneity of data in terms of size and lifetime. Cheung et al. [11] presented a delay-aware Wi-Fi offloading and network selection (DAWN) algorithm with an aim of delivering the data using Wi-Fi AP with the required time. The algorithm used minimum cost to deliver the data to destination when the time is not a critical factor.

Novo et al. [12] suggested some techniques to manage the increasing usage of mobile data. The suggested techniques included managing peak hours and increasing yield along with data offloading. The techniques discussed for offloading include Wi-Fi offloading and usage of smart cell. In another work, Kang et al. [13] suggest that Wi-Fi can be used to offload mobile data because of the provision of high data transmission rate in Wi-Fi. The authors used successive interference calculation (SIC) technique to offload the mobile data. Different cases have been considered for the availability and non-availability of SIC at AP. Different optimal solutions for both the cases have also been presented by them. In an another work, Han et al. [14] used opportunistic network for solving the increased use of mobile data usage problem. They proposed three algorithms, namely greedy, heuristic, and random for the data offloading. The authors used mobile social networks as an alternate means for communicating the mobile data. Lee et al. [15] presented a mobile offloading technique that used IP mobility. The highlight of this protocol was that it used distributed mobility anchors and provides selective data offloading.

In another work, Xiaofeng et al. [16] also proposed an opportunistic protocol. They put forward a subscribe-and-send architecture to be used by a user on content service providers. Iosifidis et al. [17] presented an iterative double auction mechanism to offload the mobile data through Wi-Fi access points (APs). The auction mechanism considers the benefits for mobile service providers and AP’s offloading cost. The authors considered various challenges including the interference of APs. In a similar approach, Gao et al. [18] presented a bargaining approach that includes mobile network operators and AP owners. The authors presented two different bargaining protocols, namely sequential bargaining and concurrent bargaining. The authors used the scenario when multiple APs form a group and used Nash bargaining theory for finding a solution with benefit to mobile operators and group of AP owners.

Table 1 Comparison of existing schemes with the proposed scheme

Trestian et al. [19] discussed various challenges for network selection using game theoretic approach. The authors analyzed and compared the existing game theoretic approaches and outlined the problems and solutions in various network scenarios. Aijaz et al. [5] presented a survey and discussed the options for mobile offloading. They have discussed offloading through Wi-Fi via femtocells, using WiMAX and by IP flow mobility. They have also studied offloading via opportunistic communication. In an another study, Choi et al. [20] studied the increase in the mobile traffic in the years to come. They have discussed the alternative means of data transfer by using Wi-Fi and LTE and suggested their use for better efficiency.

Kumar et al. [21] presented a Bayesian coalition game for contention-aware data forwarding in vehicular mobile cloud. The authors used the concept of learning automata for reliable data forwarding. In an another scheme [22], the Bayesian coalition game was used for the Internet of things. The authors used the concept of game theory and learning automata to compare the performance of Bayesian coalition game. The concept of stochastic coalition game has been used by [23] for the data dissemination in vehicular cyber-physical environment. In another work, Bali et al. [24] have used the concept of clustering for data dissemination in vehicular cyber-physical environment.

Another scheme proposed by Wang et al. [25] uses the concept of mixed integer programming for offloading the mobile data. The authors used both vehicles and Wi-Fi AP for offloading the data. All the existing schemes unanimously agreed on the fact that the mobile data traffic is increasing exponentially and that there is a requirement for using offloading techniques. Most of the authors suggested the use of Wi-Fi, and many others suggested the use of LTE, WiMAX, femtocells using vehicular networks. To the best of the authors’ knowledge, none of the existing schemes have used game theoretic approach and combined both vehicular and Wi-Fi offloading. A detailed comparison of the existing schemes is presented in Table 1.

3 System model

The following section discusses the network model used in the proposed work. Also, the problem formulation is described with associated constraints.

3.1 Network model

Vehicles are assumed to move in the network according to Poisson distribution, and inter-arrival time is distributed according to exponential distribution [8, 26]. As depicted in Fig. 1, the mobile data have to be transferred from source, S, to destination, D. Due to heavy congestion in the network, there is a possibility that the data might not reach the intended receiver on time. The problem becomes even more severe in peak hours. Hence, the alternate means to communicate the data is depicted in Fig. 1. There are two possibilities to communicate the data, namely through Wi-Fi APs and through vehicular network. The APs and RSUs are assumed to be already deployed in the network and need no further infrastructure installation. The communication through vehicular network is possible using IEEE 802.11 a/b/g and IEEE 802.11p or wireless access for vehicular environment (WAVE) protocols. Additionally, there are various dedicated short-range communication (DSRC) protocols defined for the efficient transfer of information among vehicles and between vehicles and RSUs.

Fig. 1
figure 1

Network model used

The mobile phones are assumed to be equipped with GPS sensors, which give them the knowledge of the network. This knowledge allows the mobile devices to locate the nearest vehicles, RSUs, and APs. The various parameters are used for calculating the payoff of the vehicle and nearest AP. The payoff or utility of the vehicle or AP and in turn the value of the parameters decides which next node is to be chosen for offloading. One of the parameters is the area of the network. There are two types of areas considered in the network, namely sparse and dense. The network area is sparse if there are less than \(\kappa\) vehicles in the square unit area surrounding the origin of message.

The vehicles considered in the proposed scheme are equipped with OBUs to communicate with other vehicles and RSUs. The GPS devices and modern navigation equipments are assumed to be installed in the network to assist the vehicles in communication. Also, the vehicle is having high computation and storage capabilities for offloading the mobile data in real time. As the batteries in vehicles are charged by fuel, there is no constraint on the energy of the vehicles. The network considered in the proposed work consists of both sparse and dense regions. Hence, the scheme is practically applicable for both the environments (Table 2).

Table 2 Symbols and their meaning

3.2 Background on game theory

The game theory has wide applicability and has been used for offloading mobile data using VANETs. There are three important components in game theory, namely the players, the strategy space, and the actions [23]. In the proposed scheme, there are two players, i.e., vehicles and APs. The utility or payoff function is associated with each player whose value depends upon the actions taken by all the players. In the proposed scheme, the utility of vehicle depends upon five factors, namely the connectivity, the density, the distance from destination, the speed, and the direction of the movement. However, the utility of AP depends on four factors, namely the distance between destination and AP, the bandwidth available, the area of the network, and the communication range of AP. The detailed description on how these factors affect the utility is explained in Sect. 4.

The strategies and strategy space are stored in distributed hash table (DHT) for faster access and computation of utilities for the players. It is assumed that the players in the game are rational and selfish. The rational behavior implies that the players take decision based on the knowledge of the information of other players. However, the selfish behavior means that the players want to maximize their utility. More details of game theory concepts can be seen in [2123].

3.3 Problem formulation

This section discusses the constraints and challenges used in formulating the problem. There are constraints for the movement of the vehicle, the communication range of the vehicles, and the location of APs. Additionally, there is a constraint in the size of data that can be offloaded by vehicles. These constraints are defined in the following Eqs.

$$\begin{aligned}&0 \le \nu \le \nu ^{max} \end{aligned}$$
(1)
$$\begin{aligned}&0 \le \zeta \le \zeta ^{max} \end{aligned}$$
(2)
$$\begin{aligned}&0 \le \varkappa \le \varkappa ^{max} \end{aligned}$$
(3)
$$\begin{aligned}&0 \le \xi \le \xi ^{max} \end{aligned}$$
(4)

Equations (1)–(4) emphasize that values for the velocity, vehicle range, AP range, and the data size must not exceed the maximum permissible limits. Moreover, in order to have the best user experience, the offloaded data must satisfy the quality of service (QoS) parameter, namely the message must not be dropped and it should reach the destination with minimum end-to-end delay. These constraints are defined in the objective function as follows.

$$\begin{aligned} \varpi = min\left\{ \varTheta + \Xi + \Upsilon ^{-1} + \aleph ^{-1} \right\} \end{aligned}$$
(5)

The objective function defined in Eq. (5) emphasizes that the end-to-end delay and the generation of extra messages must be minimized and message speed and message progress must be maximized. There are several constraints and challenges for achieving this objective. A practical scenario of data offloading is depicted in Fig. 2. As depicted in the figure, duration of data transfer decreases with an increase in the velocity. The decrease is expected because the time for the availability of the communication link decreases with an increase in the velocity vehicle. Moreover, the total data offloaded increases initially with the mobility of the vehicle because the higher velocity vehicle has larger communication range and can communicate large data to the destination. However, when the vehicle velocity increases beyond 70 Km/h, the communication link becomes unstable and cannot communicate larger data.

Hence, there is a requirement of a new solution that can exploit the existing infrastructure of vehicular and Wi-Fi AP. The solution must take into account the real-time parameters and meeting the QoS requirements. The proposed solution aims at satisfying the objective function and the requirements using the game theoretic approach.

Fig. 2
figure 2

Total data offloaded and duration of data transfer

4 Proposed scheme

The following section describes the proposed scheme. The scheme takes intelligent decision whether to offload the cellular data and which AP or vehicle to be used in disseminating the data. The decision to choose next node depends upon the utility of the nearby nodes. There are two types of offloading, namely offloading using vehicles, using Wi-Fi, and combination of both. The following segment describes the various factors used to take decisions about offloading.

4.1 Offloading using vehicles

The vehicles are considered a good option for offloading because of their high computational, communication, and storage capabilities. There is no need to deploy additional network apart from RSUs, which can be used for data dissemination. Even if the RSUs are not in proximity, still IEEE 802.11 p standard can be used to communicate using V2V communication. The source, S, has to decide which vehicle to be used to offload the data based on the utility of each vehicle in the vicinity. The factors on which utility of vehicles in VANET is decided are as follows:

  1. 1.

    Connectivity to the destination

  2. 2.

    Density of the vehicles

  3. 3.

    Distance from the destination

  4. 4.

    Speed of the vehicle

  5. 5.

    Angle of movement of the vehicle

Each of these components is discussed in detail as follows.

4.1.1 Connectivity to the destination

The connectivity to the destination is decided based on the distance to be traveled in store-carry-forward way. If the path to the destination is reachable from the current position of the vehicles, then the connectivity is considered as 1 [27]. However, if the vehicle has to move before being able to transfer the message to the vehicle which carries to the destination, the connectivity is non-unity. Hence, the lesser the value of connectivity, the better the chances for vehicle to meet the QoS requirements.

A diagram depicting the calculation of connectivity of the vehicle is presented in Fig. 3.

Fig. 3
figure 3

a Connectivity = 1, b Connectivity = 2, c Connectivity = 3, d Connectivity = 3

As depicted in the figure, the S having throughout communication to the destination is having connectivity value of 1. Second and third scenarios depicted in Fig. 3b, c are not having full communication connection to the destination. In second scenario, the closest vehicle to the destination is expected to move the distance on unit communication range in store-carry-forward way. This incurs additional time to transfer the data and experiences connectivity value of two. In the third scenario, a distance of two communication range has to be covered by store-carry-forward way; hence, the connectivity is three. In forth scenario, the intermediate vehicle has to travel two-unit distance, and once the data are communicated to next vehicle, there is availability of communication nodes after that. This makes the connectivity of three. The usage of connectivity for calculating the utility of vehicle has to be scaled down using a constant factor \(\alpha\). As connectivity (Con) is inversely proportional to the utility of vehicle \((U_v)\), i.e., higher connectivity denotes lesser utility, its contribution is as follows:

$$\begin{aligned} U_v\,\varpropto\, \frac{\alpha }{Con} \end{aligned}$$
(6)

Equation (6) signifies that the utility of the vehicle is inversely proportional to the connectivity.

4.1.2 Density of the vehicles

Density of vehicles is another important factor which affects the time taken to communicate the data to the destination. The density of vehicles is determined by the average number of vehicles in unit cross section in the path from source to destination. Higher is the density, higher is the probability to disseminate the message. Low density signifies that the message is likely to be communicated in store-carry-forward manner. This consumes extra time and is undesirable for offloading. Hence, the utility of vehicle is directly proportional to the density of vehicles (\(\rho\)). A scaling factor \(\beta\) is multiplied for normalization of utility of vehicle (\(U_v\)).

$$\begin{aligned} U_v \,\varpropto\, \beta \rho \end{aligned}$$
(7)

Equation (7) signifies that the utility of the vehicle is directly proportional to the density of the vehicles in the concerned area.

4.1.3 Distance from the destination

The distance from the destination gives an estimate of minimum time that is required to communicate the data. The smaller distance implies that if all other parameters are constant, the time taken would be lesser than time taken by vehicle having larger distance. Hence, utility of vehicle is inversely proportional to the distance (Dist) of vehicle from destination. A scaling factor \(\gamma\) is multiplied to normalize the impact of Dist on the utility.

$$\begin{aligned} U_v \,\varpropto\, \frac{\gamma }{Dist} \end{aligned}$$
(8)

Equation (8) signifies that the utility of the vehicle is inversely proportional to the distance of the vehicles from the destination.

4.1.4 Speed of the vehicle

The speed of vehicle is used for communicating the message to the other situated vehicle when the other vehicle is not in communication range. The other important situation when speed of vehicle is crucial factor is the condition of sparse distribution of vehicles. In such situations, the message is communicated in store-carry-forward manner, and higher speed vehicles are an advantage. Even in regular density, the speed plays a crucial role in offloading the mobile data. Intuitively, the payoff of vehicle is directly proportional to the speed of the vehicle (Spd). A constant factor \(\delta\) is multiplied to normalize the impact of speed for calculation of utility.

$$\begin{aligned} U_v\,\varpropto\,\delta \nu \end{aligned}$$
(9)

Equation (9) signifies that the utility of the vehicle is directly proportional to the speed of the vehicle.

4.1.5 Angle of movement of the vehicle

The angle of movement is a complementary factor to the speed of vehicle. Higher speed must be in conjunction with the movement forward in right direction. The angle of movement is measured by taking reference to the imaginary line joining the vehicle and the destination (D). If the vehicle is moving toward the D, the angle would be less and vehicle moving away from the destination has larger angle.

Fig. 4
figure 4

Angle of movement of the vehicle

The calculation of angle is depicted in Fig. 4, where S, D, and Dir are source, destination, and direction of the movement of the source vehicle. The D can be a vehicle or can be a general mobile device or any smart phone. If the D is a mobile device or a vehicle, its instantaneous position is taken as a reference. The angle made by the moving direction of S vehicle to the reference is \(\theta\). Utility of vehicle is inversely proportional to \(\theta\), i.e., the lesser the value of \(\theta\) the higher the utility. A constant \(\xi\) is used for normalization.

$$\begin{aligned} U_v \,\varpropto\, \frac{\chi }{\theta } \end{aligned}$$
(10)

Equation (10) signifies that the utility of the vehicle is inversely proportional to the angle of the vehicle to the destination.

The angle \(\theta\) would be zero when the vehicle is moving in the direction of the D. To cater this, the minimum value of \(\theta\) is considered as unity.

$$\begin{aligned} \theta = \left\{ \begin{array}{lr} 1 &{} if \ \theta =0 \\ \theta &{} \text{otherwise} \end{array}\right. \end{aligned}$$
(11)

To summarize, (\(U_v\)) is directly proportional to density and the speed of moving vehicle. It is inversely proportional to the connectivity, distance from destination, and angle made with the destination. The normalization factors \(\alpha ,\ \beta ,\ \gamma ,\ \delta ,\) and \(\chi\) are used. The following equation denotes the utility of the vehicle in the proposed solution.

$$\begin{aligned} U_v = \frac{\alpha }{Con} + \beta \rho + \frac{\gamma }{Dist} + \delta \nu + \frac{\chi }{\theta } \end{aligned}.$$
(12)

4.2 Offloading using AP

Wi-Fi access points (APs) are assumed to be located at major locations of cities. These can be utilized for sharing the burden of mobile data towers, especially during peak hours. This segment elaborates the possibilities of offloading using AP and the calculation of utility associated with each AP. There are various factors on which the utility of AP is dependent upon. These are summarized as follows and discussed in detail.

  1. 1.

    Distance of destination from AP

  2. 2.

    Bandwidth available

  3. 3.

    Area of the network

  4. 4.

    Communication radius of AP.

4.2.1 Distance of destination from AP

The distance of AP from the destination is a parameter for deciding the estimated time in delivering the message. Lesser the distance signifies better assurance of meeting QoS parameters. If all the parameters are same, the AP nearer to the destination is selected for offloading. Hence, the utility of AP (\(U_{AP}\)) is inversely proportional to the distance to destination \((Dist_{AP})\). A scaling factor \(\eta\) is used for normalization.

$$\begin{aligned} U_{AP}\,\varpropto\,\frac{\eta }{Dist_{AP}} \end{aligned}$$
(13)

Equation (13) signifies that the utility of the AP is inversely proportional to the distance of the AP from the destination.

4.2.2 Bandwidth available

Another important factor for calculating the utility is the available bandwidth. Different AP will be having having different maximum bandwidths. In a vicinity, if all the nearby APs are having same maximum bandwidth still, the available bandwidth varies. This is because each AP might be serving different nodes; hence, the bandwidth available might be different at various times of the day. Higher availability of bandwidth allows faster communication between source AP (\(S_{AP}\)) and progressive AP or to the D. Hence, the utility is directly proportional to the available (B). A constant factor \(\xi\) is used for normalization.

$$\begin{aligned} U_{AP} \,\varpropto\, \xi B \end{aligned}$$
(14)

Equation (14) signifies that the utility of the AP is directly proportional to the bandwidth available.

4.2.3 Area of the network

The area of the network can be sparse or dense depending upon the location and time of the day. A network can be dense in peak rush hours and can be sparse during night times or off-peak hours. However, there is no concrete classification that the network is dense or sparse. So, the value of the area of the network varies from 0.1 to 1. The more the density of nodes in the network is assigned, the value is closer to one. The less dense network will have value closer to 0.1. The lesser dense network is desirable because it gives higher probability for AP to communicate in less time. In the more dense networks, there are chances of other nodes seeking the service of the AP. Hence, the utility of AP is inversely proportional to the area of the network (Ar). A constant factor \(\varrho\) is used for normalization.

$$\begin{aligned} U_{AP} \,\varpropto\, \frac{\varrho }{Ar} \end{aligned}$$
(15)

Equation (15) signifies that the utility of the AP is inversely proportional to the area of the network.

4.2.4 Communication radius of AP

It is assumed that all APs are having same communication range. The actual communicable distance may be less than maximum because of the fading and interference due to surrounding buildings, trees, lamp posts, or other constructions. The obstructions are quantified by the impact on the communication radius. Hence, higher obstructions are undesirable and inversely affect the QoS factors. The utility is directly proportional to the communication radius (R) of the AP. A scaling constant factor \(\psi\) is used for normalization.

$$\begin{aligned} U_{AP} \,\varpropto\, \psi R \end{aligned}$$
(16)

Equation (16) signifies that the utility of the AP is directly proportional to the communication radius of the AP. To summarize, \(U_{AP}\) is directly proportional to the bandwidth available and communication radius and inversely proportional to the distance from destination and the area of the network. Hence, following equation holds.

$$\begin{aligned} U_{AP} = \frac{\eta }{Dist_{AP}} + \xi B + \frac{\varrho }{Ar} + \psi R \end{aligned}.$$
(17)

4.3 Proposed algorithm

The sequence of steps for the proposed scheme is presented in Algorithm 1. In order to offload the data, the best node is selected in the real time. The nearest vehicle and AP are known to the user using GPS. The mobile device probes the nearest vehicle and AP for various parameters and computes their utility. The vehicle or AP having higher utility is selected, and the current utility is updated. If the current utility is greater than threshold, the node is selected to offload the data. The selected AP or vehicle calculates the nearby nodes for their payoffs and selects the node having higher utility. The same procedure is followed, and the vehicle or AP having higher utility is selected in the direction to the destination. This process continues till the destination is reached and the intermediate nodes are returned to the source. The source decides whether to do offloading depending upon the QoS requirements fulfilled by the offloaded route by adjusting the threshold of current utility.

The step-by-step description of Algorithm 1 is presented in the following segment. The algorithm takes the source (S) and destination (D) as inputs and returns the offloaded path. The function Moff is created (line 1), which takes the S, and D as input variables. The vehicles in range of S are calculated (line 2) following which the maximum utility for vehicle is assigned as 0 (line 3). The algorithm calculates the utility of each vehicle, and maximum utility is assigned to \(U_{vmax}\) (lines 5–12). The ID of vehicle having maximum utility is stored in variable p. Similarly, the AP having maximum utility is calculated and stored in \(U_{APmax}\) (lines 16–23). The maximum utilities of vehicle and AP are compared (line 24). If vehicle (\(V_p\)) is having higher utility (\(U_{Vp}\)) and the destination is not reached, the current utility is updated (lines 24–27). If the current utility is greater than threshold, function Moff is called recursively (lines 29–36). Similarly the Moff function is called (lines 37–48) if AP (\(AP_q\)) is having higher utility (\(U_{APq}\)) than threshold. The procedure continues recursively, and the path from S to D is returned (line 50).

figure d

4.4 Mathematical analysis

As the data are offloaded, two quantities are quantified by numerical analysis, namely

  1. 1.

    The maximum data that can be communicated \((\varLambda )\).

  2. 2.

    The time the communication link remains active for offloading \((\Omega )\).

The inter-arrival time of vehicles is distributed according to exponential distribution. The vehicles arrive at a rate of \(\lambda\) per unit time. Hence, the probability density function is computed by following equation [28].

$$ f(t)=\left\{ \begin{array}{ll} \lambda e^{-\lambda t} &\quad t\ge 0\\ 0 &\quad t<0 \end{array}\right. $$
(18)

In order to communicate \(\varLambda\) units of data, the link must be active for that time. Assuming that rest of the parameters remain stable, the probability that at least \(\varLambda\) units is communicated within t time is

$$\begin{aligned} \int _{0}^{t} f(x)&= {} \int _{0}^{t}\lambda e^{-\lambda x} \end{aligned}$$
(19)
$$\begin{aligned}& = 1-e^{-\lambda t} \end{aligned}$$
(20)
$$\begin{aligned} \varLambda &= 1-e^{-\lambda t} \end{aligned}$$
(21)

where t is the communication time.

In order to offload the data while achieving the minimum QoS standards, the link must be active till the next vehicle arrives in the network. Suppose the vehicle i is moving with \(\nu _i\) velocity and the communication range is \(\zeta\). In order to successfully offload the data to the vehicle j at x distance apart by moving at \(\nu _j\) velocity, vehicle i has limited time.

$$\begin{aligned} t = \left\{ \begin{matrix}t_1= &{} \frac{\zeta +x}{\nu _i-\nu _j} &{} i,\ j\ in\ same\ direction \\ t_2 = &{} \frac{\zeta - x}{\nu _i-\nu _j} &{} i,\ j\ in\ opposite\ direction \end{matrix}\right. \end{aligned}$$
(22)
$$\begin{aligned} t_2\le t\le t_1 \end{aligned}$$
(23)

Hence, the probability is that there is successful offloading of the data in the scenario with \(\lambda\) as exponential arrival rate.

$$\begin{aligned} P(t_2\le t\le t_1) = \int _{t_2}^{t_1} f(x)= & {} \int _{t_2}^{t_1}\lambda e^{-\lambda x} \end{aligned}$$
(24)
$$\begin{aligned} &= {} [1-e^{-\lambda t}]_{t_2}^{t_1} \end{aligned}$$
(25)
$$\begin{aligned} &= {} e^{-\lambda t_2}- e^{-\lambda t_1} \end{aligned}.$$
(26)

5 Simulation results

To evaluate the performance of the proposed scheme, extensive simulations are performed. The detailed description of the simulation settings and results obtained is described as follows.

5.1 Simulation settings

An area of 10 × 5 Km of Patiala city was taken on which 5 APs and 10 RSUs were deployed at different locations. Vehicles were assumed to move in the area with vehicle density varying from 50 to 650. The speed of vehicles was confined in the limit of 10 to 100 Km/h. The mobile data were offloaded using APs and vehicles. The standards used were IEEE 802.11 b and IEEE 802.11 p with frequency of 2.4 GHz. The maximum data rate used for communication was 11 Mbit/s. The simulations were allowed to run for 650 s, and each test run was repeated 50 times, and an average was taken for producing the results. Two different topologies were considered for evaluation of the proposed scheme, namely dense and sparse. The dense topology has higher connectivity from S to D, while sparse topology is intermittently connected (Table 3).

The following parameters are evaluated to check the effectiveness of the proposed scheme.

  1. 1.

    Message progress: It is the average additional area covered in one hop. It is calculated as the fraction of total distance between S and D to the number of hops.

    $$\begin{aligned} Message\ progress= \frac{D_{SD}}{N_{hop}} \end{aligned}$$
    (27)
  2. 2.

    Number of extra packets exchanged: It is the number of hello packets and acknowledgment packets exchanged in the duration of starting of the transmission of data till the data are received at D.

  3. 3.

    Message dissemination speed: This quantity signifies the distance traveled by the data in unit second. An average distance traveled from S to D is taken for calculating the speed.

    $$\begin{aligned} Message\ dissemination\ speed = \frac{D_{SD}}{time_{SD}} \end{aligned}$$
    (28)
  4. 4.

    End-to-end delay: It is the time taken for transmission of data from S to D. It is an important QoS factor and must be minimized for success of a scheme (Figs. 5, 6).

Fig. 5
figure 5

Sumo map of Patiala city

Fig. 6
figure 6

Topologies in the network, a sparse connectivity and b dense connectivity

Table 3 Test data generated from SUMO
Table 4 Simulation settings

5.2 Performance evaluation

The following segment describes the results of simulations performed under various metrics (Table 4). Every result is compared with the two state-of-the-art protocols, namely GPCR [29] and GyTAR [30].

5.2.1 Message progress

As described earlier, message progress describes the fraction of area covered as the data traverse from S to D. In case of dense network, when the vehicle density is low, the message progress is low. It increases sharply with the vehicle density, which is justified from the fact that higher vehicles allow more radius of area to be covered by the transmitted data. As the density reaches to 500 vehicles, the rise in message progress is low. The similar trend is observed by GPCR, GyTAR, and the proposed scheme. However, the proposed scheme has higher message progress as compared to other two schemes. When the density is around 100 vehicles, the message progress is 75, 76, and 77 %, respectively, for GPCR, GyTAR, and the proposed scheme. It increases to 87 % when density is 250 vehicles and 92 % when density is 400 vehicles for the proposed scheme. However, progress is 80 and 84 % for density of 250 vehicles and 86 and 90 % at the density of 400 vehicles for GPCR and GyTAR, respectively. The progress stabilizes to 90, 92, and 93 %. respectively, at the density of 500 vehicles and marginally increases to 92, 93, and 95 % for GPCR, GyTAR, and proposed scheme at the density of 650 vehicles. The graph depicting the variation in message progress for dense network is presented in Fig. 7.

In case of sparse network, the message progress is low which is due to the fact that less number of vehicles is available to carry forward the data. The message progress is as low as 57, 67, and 71 % for GPCR, GyTAR, and proposed scheme at density of 100 vehicles. The increase is marginal for GPCR, which ultimately reaches maximum of 66 % at the density of 650 vehicles. The trend for GyTAR and proposed scheme is different where progress rises to 79 and 82 %, respectively, at density of 300 vehicles and further increases to 84 and 89 %, respectively, at density of 500 vehicles. The progress of GyTAR, however, increases marginally to 85 % at 550 vehicle density and then reduces to 83 % at the density of 650 vehicles. The same trend is observed for the proposed scheme where the progress drops to 86 % at density of 650 vehicles. This is because of large number of extra packets generated and the packet drop which reduces the progress. Figure 7 depicts the variation in message progress for sparse networks.

A comparison showing the message progress with initial S to D distance is presented in Fig. 8. Figure depicts that the progress is nearly same for GPCR, GyTAR and proposed schemes when the initial distance is 500m but decreases sharply for GPCR and GyTAR as the distance increases. This is because of the fact that lesser distance is traversed in fewer hops and covering larger percentage of area. The uncovered area increases with the increase in S to D distance for GPCR and GyTAR. The progress for GPCR reduces to 80 % with distance of 1000 m and reduces to 65 % as the distance approaches 2000 m. The progress ultimately reaches below 60 % with increase in distance to 3000 m. In a similar trend, GyTAR experiences progress of 84 % at 1500 m distance and 75 % at 2500m distance. The proposed scheme maintains progress of above 90 % throughout the simulation because of use of higher payoff vehicles to communicate the data. This not only reduces the number of hops but increases the coverage also.

Fig. 7
figure 7

Message progress: a dense network and b sparse network

Fig. 8
figure 8

Message progress with varying source to destination distance

Fig. 9
figure 9

Extra messages exchanged: a dense network and b sparse network

5.2.2 Extra messages exchanged

There are several messages exchanged in the course of transfer of data from S to D. These include hello packets for getting the information about the neighboring nodes and maintaining the network. Another important type extra message is acknowledgment message, which notifies the S about the reception of data at the D. Figure 9 depicts the number of extra messages exchanged from starting of data dissemination till reception of data at the D. In dense network, the messages exchanged by GyTAR increase with density, while messages exchanged by GPCR decrease with increase in vehicle density. This is because of the property of these schemes that GyTAR exchanges more extra messages with higher density of vehicles while GPCR exchanges less extra messages. The proposed scheme exchanges nearly same extra messages with increase in vehicle density. The extra messages exchanged by proposed scheme are less because the knowledge of location nearby vehicle is known using GPS and only favorable vehicles having higher utility are probed for communicating the data. This does not increase rapidly with increase in vehicle density. In case of dense networks, the GyTAR exchanges 27 messages and GPCR exchanges 22 messages when vehicle density is low. At moderate vehicle density of 300 vehicles, the messages exchanged are 21 and 30 for GPCR and GyTAR, respectively. This increases to 19 and 37 for GPCR and GyTAR, respectively, at high vehicle density of 650 vehicles. The extra messages exchanged for proposed scheme were found to vary between 15 to 18 messages throughout the vehicle density variations.

The trend remains the same even in sparse networks, but the absolute values of message exchange are higher. The trend remains the same because the underlying schemes are the same. There is an increase in number of messages exchanges because of intermittently connected networks in sparse environment. To counter the intermittent nature, extra messages are exchanged. The extra messages exchanged by GyTAR are 40 for 100 vehicle density and increase to 45 with 350 vehicle density. There is a drop in number of messages exchanged in GyTAR scheme because of reaching an optimal situation at 550 vehicles in the network. At this density, the number of packet exchanged drops to 42 which again increases to 46 at vehicle density of 650 vehicles. The extra messages exchanged by GPCR are 31 when density is low and gradually reduces to 29 when vehicle is high in the network. The proposed scheme exchanges 21 messages at low distribution of network and gradually increases to exchange 26 messages at 400 vehicle density. After this, there is no significant impact on extra messages exchanged in proposed scheme with the increase in vehicles in the network. The extra messages exchanged remain 26 at vehicle density of 650. The variation in extra messages exchanged is depicted in Fig. 9.

Fig. 10
figure 10

Message dissemination speed: a dense network and b sparse network

5.2.3 Message dissemination speed

The distance traversed by vehicles in unit second is signified by the message dissemination speed. The message dissemination speed for dense networks is depicted in Fig. 10. The proposed scheme selects the vehicles or APs that have highest payoff and are moving in the direction of the destination. Hence, the scheme is able to propagate the largest distance in smallest time. The message dissemination speed increases for proposed scheme as density increases because there are more vehicles available, and a choice is presented to select the best vehicle to traverse the distance toward the destination. A similar reason justifies the increase in message dissemination speed for GyTAR as a choice is presented to select the best vehicle to move larger distance in least time. However, the message dissemination speed parameter decreases with increase in vehicle density for GPCR because there is higher hand-off in transmitting the data from one vehicle to another. For dense networks, the distance traversed by GPCR, GyTAR, and proposed scheme is 260, 300, and 325 m/s, respectively, for 100 vehicles in network. The parameter’s values for GPCR, GyTAR and proposed scheme at 300 vehicle density are 255, 355, and 380 m/s, respectively. The message dissemination speed achieves a value of 425 m traversed in one second by proposed scheme at a vehicle density of 650 vehicles. However, at same density the values of message dissemination speed are 235 and 370 m/s for GPCR and GyTAR, respectively.

When the network is having sparse connectivity, the message dissemination speed decreases after certain vehicular density. This is because of the fact that too many messages are getting dropped in the network and intermittent connections result in reduction in message dissemination speed. The parameter attains a value of 250, 260, and 272 m in unit second for GPCR, GyTAR, and proposed scheme when the vehicle density is 100 vehicles. This value increases for proposed scheme and reaches a maximum of 300 m/s at 300 vehicle density and reduces to 280 m/s at 450 vehicle density and remains constant at this speed thereafter. A similar trend is observed for GyTAR, for which the speed attains a maximum of 270 m in unit second at a density of 200 vehicles. After that the value of message dissemination speed reduces gradually to 245 m/s at the density of 650 vehicles. The parameter value for GPCR reduces from 250 to 220 m/s as the vehicle density increases from 100 to 650 vehicles. The variations in message dissemination speed with vehicle density are depicted in Fig. 10.

Fig. 11
figure 11

End-to-end delay: a dense network and b sparse network

Fig. 12
figure 12

End-to-end delay with varying a source to destination distance and b simulation time

5.2.4 End-to-end delay

End-to-end delay increases with the increase in vehicle density. This is because of extra messages exchanged to maintain the network which results in frequent drop in the packets and thus higher delay. The delay is even higher when the network is sparsely connected, and there is not enough connectivity. The variation in end-to-end delay is depicted in Fig. 11. When the scenario is dense, at the density of 100 vehicles the delay is 2 and 5 s for GyTAR and GPCR, respectively. The delay increases to 3.2 and 6.5 s for GyTAR and GPCR, respectively, at the density of 400 vehicles. This value increases exponentially thereafter to reach 4.5 and 9 s, respectively, at density of 650 vehicles. The delay value for the proposed scheme increases gradually but is always less than 1 s even when the density is 650 vehicles. The delay is less for the proposed scheme because only selected vehicles and APs are used in communication. The selected vehicles and APs are having highest utility, and thus, the scheme incurs least delay in transmitting the message from S to D.

The delay for sparse network is higher as compared to dense networks. When delay of GyTAR in sparse network is compared with that of dense scenario, the delay is initially 3 s as compared to 2 s. As the vehicle density increases, the delay also increases and reaches 4 s at 300 vehicle density in sparse network as compared to 2.9 s in dense network. Similarly, the delay reaches 5 seconds in sparse networks when vehicle density is 650, but delay is 4.5s at same density which is dense scenario. Not only GyTAR, GPCR, and proposed scheme also experience higher delay in sparse scenario as compared to dense scenario. The proposed scheme has delay of 0.5 s when density is 300 and 1 s when the density is 500 vehicles. The delay value reaches 1.5 s at density of 650 vehicles, but still the delay is far less than GyTAR and GPCR at similar conditions.

The variations in end-to-end delay with increasing initial S to D distance are depicted in Fig. 12. When the distance between S and D increases, the delay also increases because the data have to traverse larger distance. The increase is less in the proposed scheme in which the end-to-end delay remains under 1 s even when the distance increases to 3000 m. The other schemes, namely GyTAR and GPCR, face higher delay and encounter a delay as high as 4.4 and 8 s, respectively, at 3000 m initial distance. Not only at high distance, even when the distance is only 500 m the delay experienced by them is 2 and 4 s, respectively.

In another experiment, data of constant size are transmitted from S to D throughout the simulation time. The end-to-end delay is recorded at each instant of time and plotted in Fig. 12. There is a variation of more than 3 s delay in GyTAR and GPCR schemes at different instances of time, while the proposed scheme maintains delay of less than 1 s throughout the simulation time. The variations in GyTAR and GPCR are because of network settlement, availability of forwarding vehicles, and drop of packets because of either less vehicles or excess of vehicles in the network. The proposed scheme is least affected by these factors and hence is most reliable in terms of delay incurred from S to D.

Table 5 Percentage improvement using proposed scheme

Table 5 depicts the % improvement in the proposed scheme as compared to GyTAR and GPCR. Hence, the proposed scheme achieves the QoS factors like time and progress better than other existing state-of-the-art schemes.

6 Conclusion and future work

The data exchange using mobile networks is increasing and may increase many fold in the years to come. A novel solution to solve this problem using data offloading by vehicles and Wi-Fi AP is presented in this paper. The proposed solution uses the game theoretic approach to calculate the utility of the nearby vehicles and APs based on the real-time parameters. The calculated utility is used to select the most favorable node for data offloading. Results indicate that the higher message progress and dissemination speed are achieved by the proposed scheme. Not only this, important QoS parameters are met with minimum end-to-end delay and extra packets generated. The scheme is compared with existing state-of-the-art protocols and found to achieve better results in real time.

In the future, the authors would implement the proposed scheme in real-world scenario and check its practical implications.