Abstract
The vehicular infrastructures or roadside units (RSUs) in vehicular delay tolerant networks (VDTNs) can be used as the gateways of the distributed sensor networks. The different classes of service (CoS) support are desired when more than one type of the sensed data are collected by the RSUs. In this paper, the CoS support traffic scheduling problem for the RSU in VDTNs is considered. By exploring the contact information between the vehicles and the RSU, the CoS traffic scheduling problem is formulated as a maximum weighted triple matching problem, where the traffic scheduling strategy is a timeslot-vehicle-traffic matched pair. A flow network based method is proposed to optimally solve the maximum weighted triple matching problem. Both the offline version and the online version of the traffic scheduling algorithm are developed. Extensive simulations are conducted and the simulation results show the effectiveness and efficiency of the proposed flow network based algorithms.
1. Introduction
Traffic scheduling in vehicular delay tolerant networks (VDTNs) [1–3] has been attracting increasing research interests recently. One type of the VDTNs is installed in the sparse or less populated remote areas, which includes a limited number of unconnected vehicular infrastructures or roadside units (RSUs) and the passing by vehicles. The unconnected RSUs (without backbone network connections) are served as the gateways of the distributed sensor networks. For example, the distributed sensor networks are deployed to monitor the environment or the wildlife [1–6] in the sparse or less populated area. Since the direct communication connections are sparse in the less populated area which may not be covered by the cellular networks, a feasible low cost solution is proposed by using the passing by vehicles [7] carrying the sensed data from the unconnected RSU to the destination RSUs. In other words, after the sensed data is collected by the gateways or the RSUs, the unconnected RSU opportunistically sends the data to the vehicles. Then the vehicles store, carry, and forward the data to the destination RSUs when they arrive at the destination RSUs, that is, in a direct delivery routing scheme.
In this paper, we aim at solving the different classes of service (CoS) support downlink traffic scheduling problem, where the traffic is delivered by the unconnected RSU to the passing by vehicles. Generally speaking, there are two aspects of causes which may make the downlink traffic scheduling problem much more difficult than that of the conventional networks, for example, the cellular networks or the WLAN, which are the diversity of the traffics and the diversity of the vehicles.
1.1. Diversity of the Traffics
It means that the traffics have different transmission requests and need different classes of service (CoS) support [8]. Since the gateway or the RSU is much more expensive than the sensors, a limited number of RSUs will be deployed. And more than one type of the sensed data may be possibly collected by the RSU, waiting to be delivered to their respective destinations, for example, the wildlife tracking information [4], the agricultural information [5], and the environment information [6]. Additionally, these different types of data may be classified into different categories according to their importance, such as the TTL (time to live), destinations, or QoS (quality of service). Since the direct delivery routing scheme is assumed, thus the more of the much more important data is delivered to the passing by vehicles, the more gains will be obtained by the RSU. For example, in certain scenarios, the agriculture information is much more important than the environment information. More gains will be obtained by the RSU if it delivers more agriculture information to the vehicles. However, some vehicles may not drive to the destination RSU which collects the agriculture information, or the buffer capacity of the vehicles may be limited. Thus, another challenge arises, that is, the diversity of the vehicles.
1.2. Diversity of the Vehicles
It means that the vehicles are different from each other, in terms of their trajectories, buffer capacities, speeds, arrival times, and so on. Firstly, each vehicle drives in a different trajectory and may only pass a subset of the destination RSUs; thus only a subset of traffics can be carried by it. Secondly, each vehicle has a limited buffer capacity; thus the RSU can not send more data to avoid the buffer overflow. Thirdly, the velocities and the arrival times of the vehicles are different, which result in the contact durations of the vehicles and the RSU being different.
The short contact duration between the passing by vehicles and the RSU is one of the unique characteristics of the VDTNs [10]. Since the transmission range of the RSU is limited and the vehicles will not speed down to wait for the traffic downloading from the RSU, thus how to make a sufficient schedule during such a limited period becomes a significant problem. In addition, since the vehicles randomly arrive at the RSU, thus when there are more than one vehicle located in the transmission range, the problem with which order should the RSU deliver the data to the vehicles to maximize the total gains of the RSU is much more challenged.
To address these two challenges, in this paper we propose to explore the information of the contact durations between the vehicles and the RSU. The contact duration is defined as a time period, starting from the instant when the vehicle drives into the transmission area of the RSU and ending at the instant when the vehicle drives out of the transmission area of the RSU. During the contact duration, the RSU can use power control technology to transmit traffic to the passing by vehicles in a constant data rate [11–13]. Thus, the contact duration can be slotted and during each timeslot one unit of traffic (or one bundle) can be assumed to be transmitted from the RSU to the vehicle.
The main contributions of this paper are threefold. (1) By exploring the contact durations of each vehicle, the proposed different CoS support downlink traffic scheduling problem is formulated as a maximum weighted triple matching problem. A schedule strategy of the RSU is a timeslot-vehicle-traffic (
The rest of the paper is organized as follows. The availability analysis of the contact information is presented in Section 2. The related works are given in Section 3, and the differences between our work with the related works are also discussed. The system model is given in Section 4. A priority greedy based method is proposed in Section 5 firstly. Then, the flow network based traffic scheduling algorithm is developed. In Section 6, the online version of the proposed flow network based traffic scheduling algorithm is presented. Section 7 evaluates the performance of the proposed flow network based method through simulation, and Section 8 concludes this paper.
2. Contact Information Availability Analysis
Before exploring the information of the contact duration, we first analyse the availability of the contact information.
In [14], a layered architecture for the VDTNs is proposed where the bundle layer is placed below the network layer and above the data link layer. Particularly, the control plane functionalities and protocols are separated from the data plane. The former is responsible for connection setup for the data plane, by transmitting signalling control bundle out of band, while the latter is responsible for data bundle transmission, by aggregation and deaggregation the data bundles. These two are named as bundle signalling control (BSC) and bundle aggregation and deaggregation (BAD) in [14]. Normally speaking, a low powered, long-range, low bandwidth control plane link connection is used by the BSC to exchange control messages out of band, and a high powered, short-range and high bandwidth link is used by the BAD to exchange data bundles. In other words, the radius of the BSC,

An example of the source RSU and the passing by vehicles in VDTN.
When a vehicle is approaching the RSU (driving into the BSC area), the control plane works first to set up the connection. The vehicle registers itself to the RSU with the information in terms of the trajectory or destinations, geographical location, speed, power, and storage capacity. After that, the RSU will compute and update its traffic scheduling strategy when the vehicle drives into the BAD area. At the instant when the vehicle drives into the BAD area, an updated downlink traffic scheduling strategy will be invoked and the traffic will be delivered to this new arrived vehicle.
The setting (
Reference [15] also justifies the feasibility and availability of the contact information. In [15], the node localization is explored through the exchange of the signalling information related to nodes' real-time location, current trajectory, velocity, and transmit range. A contact prediction algorithm is proposed to estimate the contact durations. With the predicted contact duration, a contact duration scheduling policy which always schedules the bundles which can be finished within the contact is proposed. The gains are demonstrated through simulation.
Reference [17] shows the effects of the density of the vehicles and the velocity of the vehicles on the number of the contact opportunities and on the length of the contact durations. The results show that the number of the contact opportunities grows as the vehicle velocity increases and as the density of the vehicles increases. The results also show that the length of the contact durations decreases as the velocity of the vehicles increases.
Both [15, 17] are based on the layered architecture [14]. However, we note that the proposed layered architecture in [14] is a general case for the VDTNs, which consists of three node types: terminal nodes, relay nodes, and mobile nodes. In this paper, only two types of nodes are considered, where the terminal nodes are corresponding to the RSUs and the mobile nodes are corresponding to the vehicles. And the route scheme is the direct delivery, where the vehicle receives traffic from the source RSU and directly forwards to the destination RSUs when they pass by them. In this paper, we mainly consider the downlink CoS support traffic scheduling problem with the objective of maximizing the total gains of the RSU.
3. Related Works
A recent survey on the VDTNs can be found in [2]. Reference [3] details the layered architecture of VDTN, including the bundle aggregation and deaggregation mechanisms, network protocols, scheduling and dropping policies, fragmentation mechanisms, and the created testbed for VDTNs performance evaluation, demonstration, and validation. In the VDTNs, three classical routing schemes are mainly employed [3], that is, direct delivery, epidemic [18], and spray and wait [19]. According to the employed routing schemes, the related works on traffic scheduling can be classified into two categories, that is, replicated copy based traffic scheduling and direct deliver based traffic scheduling. The replicated copy based traffic scheduling employs the epidemic or spray and wait routing schemes, and the direct deliver based traffic scheduling employs the direct delivery routing scheme.
3.1. Replicated Copy Based Traffic Scheduling
The epidemic and the spray and wait routing schemes always deliver the replicated copies of the bundles to the contact nodes when a connection opportunity appears, in order to increase their deliver probability and decrease their delivery delay. However the replicate approach may cause contention for network resources, such as link bandwidth and storage, which will reduce the performance of the network. Thus an efficient scheduling and dropping policy is necessary to optimize the performance of the network. The scheduling policies address the problem with which order the bundles should send when two nodes contact. The dropping policies are used to decide which bundles should be dropped when the buffer is full. The existing literatures can be classified into two categories according to their objectives, that is, to improve the message delivery delay and delivery ratio and to support the different classes of service (CoS).
3.1.1. To Improve the Message Delivery Delay and Delivery Ratio
The authors of [20] propose three scheduling policies, that is, FIFO (first in first out), random, and RL-DESC (remaining lifetime descending order), and three dropping policies, that is, head drop, random, and RL-ASC (remaining lifetime ascending order). Simulation results show that these policies based on the lifetime criteria decrease the average delivery delay and increase the delivery ratio. Reference [17] extends the works in [20], where the number of the replicated copies is considered to design the scheduling and dropping policies. In other words, when a contact opportunity appears or when the buffer is full, the bundles with less/more replicated copies are scheduled/dropped first. Reference [21] studies the impact of scheduling and dropping policies through a VDTNs testbed and concludes that the policies should consider the bundles' lifetime as a criterion to improve the network performance.
3.1.2. To Support the Different Classes of Service (CoS)
Reference [8] considers scheduling and dropping policies for traffic differentiation in VDTNs. An urban scenario is considered in reference [8], where the VDTNs support several asynchronous applications simultaneously. Each application generates different requirements traffic in terms of message delivery probability and message average delay, which motivates the traffic priority support of the scheduling and dropping policies. A method to specify the relative priority of messages is proposed, where the bulk messages have the lowest priority, and the normal messages are sent prior to the bulk ones, and the expedited messages have the higher priority. Three traffic differentiation scheduling policies are proposed, that is, priority greedy, round robin, and time threshold. Two dropping policies are proposed where the messages with the lowest propriety or the lowest remaining lifetime are dropped first. Reference [22] further extends the work in [8]. Two different buffer management schemes and corresponding dropping policies are proposed. The first method is to store the bundles in a sharing buffer, and when the buffer is full the lowest priority bundles are dropped. The second method is to store the bundles in separate buffers according to the bundle's priority, and the bundles with the lowest lifetime are dropped when the buffer is full. A priority greedy scheduling policy is proposed with the sharing buffer management method. And a custom service time scheduling policy is proposed with the separated priority buffer management method. The performances are evaluated through simulations.
3.2. Direct Deliver Based Traffic Scheduling
When the direct deliver routing scheme is employed, the RSU has two functionalities, that is, relaying the bundles to their destinations and meeting the requirements of the vehicles. According to these two functionalities, the related existing literatures can be classified into two categories, that is, bundle relaying and requirements satisfying.
3.2.1. Bundle Relaying
In [23], the bundle delivery delay minimization problem is considered, where a Markov decision process framework is proposed, and the optimal traffic strategy is derived. Based on the optimal strategy, the source RSU should transfer the traffic to the vehicle with velocity larger than a threshold. Reference [24] also considers the delay minimization problem. The probability that the RSU should release its bundle to the passing by vehicles is predicted based on the vehicles' information. Then based on the probability the RSU determines when to deliver its bundles such that the bundle delivery delay can be minimized.
To jointly minimize the transmitting energy consumption and the traffic delay penalties, an optimal traffic scheduling strategy is derived in [25]. The traffic scheduling problem is formulated as an optimal stopping problem. An optimal threshold based schedule strategy is derived, where when the penalty exceeds the derived threshold, the RSU is optimal to deliver its bundle to the passing by vehicles.
In [26], the mobile vehicle is considered as the constraint resource for the multiple source RSUs to communicate with their destination RSUs. Due to the contention for the limited network resource, that is, the vehicle, an optimal traffic strategy for the mobile vehicle is derived, whether or not to relay a specified RSUs' traffic. Furthermore, the optimal strategies for the source RSUs are derived, when the source RSUs operate in a cooperative game mode or in a noncooperative game mode, respectively.
3.2.2. Requirements Satisfying
Reference [27] is one of the earliest works which considers the traffic scheduling problem, the objective of which is improving the service ratio of the vehicles. A
Reference [11] is another related work which considers how to minimize the RSU energy cost while meeting the vehicles request. By considering the exponential increase of the transmission power with the linear increase of the distance between the vehicle and the RSU, a heuristic strategy is proposed. The basic idea is to serve these vehicles first, which have the fastest speed and are nearest to the RSU. That scheme is motivated by the fact that if a fastest and nearest vehicle is served later more transmission power will be spent. Reference [12] further studies the energy efficient problem. Two cases of the energy efficient problem are discussed, that is, the packet-based case and the timeslot-based case. The packet-based schedule problem requests continuous downlink time to meet the vehicle's request, which is proved to be an NP-complete problem. The timeslot-based problem is proposed to solve in a flow network scheme, where the optimal traffic schedule strategy is corresponding to a minimum cost flow of the flow network.
Reference [13] studies a jointly optimization problem, which aims to fairly serve the vehicles while minimizing the total energy cost. The proposed problem is a three-step optimization problem which is however proved to be optimally solved in a flow network method. The key is to assign the cost of the edges in the flow network with a square function.
3.3. Relationships with the Existing Literatures
From the viewpoint of routing schemes, our work belongs to the direct delivery one. From the viewpoint of the functionality of the RSU in VDTNs, our work belongs to the bundle relaying one. However, to the best knowledge of the authors, the traffic scheduling problem to support different classes of the service (CoS) has not been considered in this scenario, let alone the diversity of the vehicles. However, the CoS and the diversity of the vehicles are so realistic and practical which make the traffic scheduling problem significant and challenged. Therefore, we propose to study this practical traffic scheduling problem for the source RSU.
4. System Model and Problem Formulation
In this paper, the vehicles are used as mobile relays of the RSUs and the direct delivery routing scheme is employed. In other words, when the vehicle receives bundles from the source RSU, it will store, carry, and forward these bundles to the destination RSUs when it arrives at the destinations; that is, no dropping policies are used by the vehicles. Each bundle can be sent by the RSU to one vehicle in one timeslot, and after that the bundle will be deleted from the buffer of the RSU. The buffers of the vehicles are shared by the variety of types of bundles. All types of bundles of the RSU are all delay tolerant and their lifetimes are considered to be long enough. In the following, we detail the system model used in this paper.
4.1. System Model
Suppose there is an RSU S deployed along the highway road, which is used as a gateway of the underlay deployed distributed sensor networks. There are many types of the sensed data collected by the RSU, waiting for the passing by vehicles to be delivered to the destinations. According to the traffic differentiation mechanism, for example, proposed in [8, 22], the sensed data in the source RSU S can be prioritized into M types. Let
Suppose there are totally N vehicles located in the BAD area of the RSU S. These vehicles arrive at the RSU S in a random process, where the interarrival times of the vehicles are independent and identically exponentially distributed [28]. Let
Suppose the RSU S can use power control to transmit data bundles to the vehicles which are located in the BAD area. And, in each timeslot, only one data bundle will be transmitted from the RSU to the vehicles. Let

Examples of slotting of the contact durations, where
Next we formally formulate the CoS support downlink traffic scheduling problem.
4.2. Problem Formulation
Based on the system model, a traffic scheduling strategy for the RSU S can be represented as a timeslots-vehicles-traffic (
Define

Triple matching graph.
Recall that the objective of the proposed traffic scheduling problem is to maximize the total gains of the RSU S. The weight of the edge
For each edge of
The objective of the maximum weighted triple matching problem is to maximize the total weighted gains of the RSU S. As indicated in the objective in (6), only the weight
A feasible solution of the maximum weighted triple matching problem is a feasible traffic schedule strategy. For example, for any triple matching pair
An optimal solution of the formulated maximum weighted triple matching problem is called a maximum weighted triple matching, which maximizes the total gains of the source RSU. However, it is not easy to derive from the formulated problem as shown in (6)–(10) directly. Thus, in the next section, we present a flow network based method to optimally solve the formulated problem.
5. Flow Network Based Traffic Scheduling
In this section, we firstly propose a priority greedy based method to solve the maximum weighted triple matching problem, which will be used in the simulation to compare the performance with our flow network based traffic scheduling algorithm. Next, we detail the flow network based method.
5.1. A Priority Greedy Based Method
To maximize the total gains of the RSU S, an intuitive method is to deliver the highest priority bundles as many as possible to the passing by vehicles, to obtain as many gains as possible. In other words, at each timeslot
Suppose that at timeslot
The priority greedy based method locally maximizes the benefit of S at each transmission slot
5.2. Flow Network Based Method
In this paper we propose to optimally solve the maximum weighted triple matching problem by using a flow network based method.
Flow network is a mathematical tool of graph theory [29], used to solve the problem of how to efficiently carry things from the source to the sink through routes between them. In specific, a flow over the routes in the flow network can be imagined as a water flow over the water pipes in a water network [10]. Let
Next we detail how to transform a maximum weighted triple matching problem to a minimum cost maximum flow problem. The flow network graph
(1) Construct the triple matching graph and (2) Construct the flow network graph where network graph. The edge set where (3) \\For each edge in (4) (5) set the initial flow as 0. (6) (7) set (8) (9) set (10) (11) set (12) (13) set (14) (15) set obtained by the RSU S when one bundle of (16) Apply the Push-relabel Algorithms in [9] on the flow network graph cost maximum flow. (17) Convert the minimum cost maximum flow to the traffic scheduling strategy

The constructed flow network graph.
5.2.1. Construction of
To construct the flow network graph
Note that the constraints in (7)–(10) have not all been indicated in
5.2.2. Edge Attributes Assignment
In the flow network graph
First of all, the initial flow of all edges is set as 0. Then, for each edge
Next, the conventional push-relabel algorithms in [9] are applied on
5.2.3. Converting Flow to Traffic Scheduling Strategy
Finally, we present the details of how to convert a minimum flow to a traffic scheduling strategy.
Firstly, the timeslots allocated to each vehicle are determined with the information of the minimum cost maximum flow. For each edge
Then the traffics to be delivered to each vehicle are determined. For each edge
Therefore, the traffic scheduling strategy can be represented as
5.3. Discussion and Remarks
The equivalence of a minimum cost maximum flow with an optimal solution of the maximum weighted triple matching problem can be resulted from the properties of the flow. A flow in Capacity constraint: for all Skew symmetry: for all Flow conservation: for all
Therefore, with the capacity constraint property of the flow, the constraints in (7)–(9) are perfectly mapped to the flow network. With the properties of the skew symmetry and the flow conservation, the constraint (10) is perfectly mapped to the flow network, where the total number of timeslots assigned to vehicle
Since the computed minimum cost maximum flow maximizes the total number of the flows and minimizes the total cost simultaneously, thus the total gains of the RSU can be maximized (recall that the minus gain is mapped as the cost of the flow). Therefore, from Algorithm 1, it is clear that the minimum cost maximum flow of the constructed flow network graph is exactly the optimal solution of the maximum weighted triple matching problem. Therefore the maximum triple matching problem is transformed as a minimum cost maximum flow problem.
We remark that the optimal traffic scheduling strategy for the maximum weighted triple matching problem may not be only one. Since there may exist more than one minimum cost maximum flow of
5.4. An Example for Comparison
Figure 5 shows a comparison example between the priority greedy based method and the flow network based method.

An example. The capabilities of the vehicles
Firstly, Figure 5(a) presents the original triple matching problem. In the original triple matching graph, there are 3 vehicles, 10 timeslots, and 3 kinds of traffic. The vehicles' delivery capability for each type of data are given as
Note that there exists overlaps among the slotted contact durations. That is, from timeslots
Then, Figure 5(b) presents the traffic schedule strategy derived by the priority greedy based method. For the priority greedy based method, at each slot the RSU S will always transmit the traffic which values the most to the vehicle. Thus, at
Finally, Figure 5(c) presents the traffic schedule strategy derived by the flow network based method. By computing the minimum cost maximum flow of the flow network, the traffic scheduling strategy is given as follows. From
In summary, these two strategies both deliver 10 bundles of traffic to the vehicles. However, with the priority greedy based method, the RSU S obtains 82 gains, but, with the flow network based method, the RSU S obtains 86 gains, more than the priority greedy one.
The gains of the flow network based method come from the fact that all of the information are explored, in terms of the timeslots (contact information), the vehicles (the bundle delivery capability and the buffer capacity), and the traffics (the quantity of the bundles and the gains of each type of bundle). However, the priority greedy based method only explores the traffic information.
5.5. Complexity Analysis
The complexity of the priority greedy based method and the proposed flow network based method is analysed as follows.
Firstly the complexity of the priority greedy based method is analysed. The core step of this method is to find the maximum valued vehicles-traffic (
Next, the complexity of the flow network based method is analysed. The computational complexity of the flow network base method depends on the computational complexity of the push-relabel algorithm. The computation complexity of push-relabel algorithm is
Normally, the number of vehicles N and the types of traffic M are finite numbers, and thus the computation complexity depends on K, that is, the total number of the timeslots (which is inverse to the length of the timeslot δ). In this case, the computation complexity of the priority greedy based method is
6. Online Traffic Scheduling
In both Sections 4 and 5, the complete information of the N vehicles (including the information of the contact durations) and the information of the traffics W are known by the RSU. This can be referred to as the offline version of the proposed traffic scheduling problem. However, in the real environment the vehicles arrive randomly one by one, which is unknown and can not be predicted by the RSU. Therefore, it is necessary to design the online traffic scheduling strategy for the RSU.
In this section, the online version of the traffic scheduling algorithm is given. The basic idea of the online version of the traffic scheduling algorithm is also applying Algorithm 1 with the following modifications.
At the time instant
Suppose that, at the time instant
7. Performance Evaluation
In this paper, we aim at developing the CoS support traffic scheduling algorithms. Particularly, the direct delivery routing scheme is employed, and the vehicle registering and negotiating processes are omitted. Therefore, a customized C++ simulator is developed to evaluate the performance of the proposed flow network based algorithm.
Note that as forementioned in the related work, this paper is the first work to address the proposed traffic scheduling problem in the open literature. And thus, in our simulator, the flow network based method, the priority greedy based method, the FIFO (first-in first-out) based scheduling method, the random-max based scheduling method, and the bi-random based scheduling method are implemented. They are labelled as “FlowNet,” “PritGred,” “FifoMax,” “RndMax,” and “BiRnd” in short, respectively. The basic ideas of the FIFO based method (FifoMax), the random-max based method (RndMax), and the bi-random based method (BiRnd) are illustrated as follows.
FifoMax. The basic idea is that the RSU delivers the bundles to the first arriving vehicle in a priority first ordering, until the buffer of that vehicle is full or the bundles in the RSU are empty. RndMax. The basic idea is that at each timeslot the RSU randomly selects a vehicle (if any). Then the bundle is delivered in a priority first ordering. BiRnd. The basic idea is that at each timeslot the RSU randomly selects a vehicle (if any). Then a bundle (if any) which that vehicle can carry is randomly selected. Finally, the selected bundle is delivered to the selected vehicle.
Note that these three methods are usually used as benchmarks in the existing literatures, and in this paper we compare the simulation results of the proposed algorithms with them.
Next, we initially analyse the relevance relationship between the simulation parameters, based on which we set the parameters in our simulation. We analyse the relevance relationships between the parameters from the aspects of conditions of overlapped contact durations and conditions of RSU buffer overflow avoidance. Particularly, we analyse the conditions of RSU's buffer overflow avoidance from two aspects, that is, the viewpoint of the timeslot and the viewpoint of the vehicle.
7.1. Relevance Relationship Analysis between Parameters
7.1.1. Conditions of Overlapped Contact Durations, That Is,
Recall that
Note that when the vehicles' arrival density μ is very low where there may exist only one vehicle located in the BAD transmission area of the RSU, then the optimal traffic scheduling strategy is to deliver the bundles in a priority first ordering. Therefore, in this case, the FlowNet, PritGred, FifoMax, and RndMax methods all can achieve the optimal performance. However, when the vehicles' arrival density is not very low, there may exist overlaps among the contact durations of the vehicles. In this case, how will our proposed algorithms perform needs to be evaluated.
Then, in the following we derive the conditions when the contact duration may be overlapped. Note that the interarrival time between two consecutive vehicles is i.i.d. exponential random variables, and in average the interarrival time is
7.1.2. Conditions of RSU's Buffer Overflow Avoidance, That Is,
and
Recall that δ is the length of a timeslot and
From the viewpoint of the timeslot, since in one timeslot only one bundle can be delivered from the RSU to the vehicles, therefore when the interarrival time between the bundles is less than δ, then the buffer of the RSU will be overflowed. In other words, if
From the viewpoint of the vehicle, if the number of the arrived bundles during the contact duration
Therefore, with some mathematical manipulations on (13) and (15), we have
Figure 6 shows the relevance relationship of the simulation parameters given in (17). Since

Relationship of the simulation parameters.
7.2. Performance Metrics
The most interesting performance metrics are the number of total obtained gains and the number of total transmitted bundles.
Recall that the objective of the proposed problem is to maximize the total obtained gains of the RSU, as shown in (6). It can be seen that it depends on
Therefore, the metric of the number of total obtained gains can be defined as
7.3. Computer Simulations
In the following, we will evaluate the impacts of the arrival density of the mth type bundles
The simulation parameters are set as follows. The length of a timeslot δ is assumed to be constant and
We note that the values of
Based on the relevant relationship analysis of the simulation parameters, we evaluate the behaviour of the traffic scheduling algorithms in terms of by changing s from 20 to 40 with a step of 2, by changing μ from 0.125 to 0.225 with a step of 0.01, and by changing
7.3.1. Impacts of
Firstly, the impacts of

Relationship of the simulation parameters.

Relationship of the simulation parameters.
However, as shown in Figure 8 BiRnd becomes the worst one instead of RndMax. This is because RndMax always delivers the bundles to randomly selected vehicles in a priority first ordering, and thus the obtained gains are larger. Among all of the traffic scheduling algorithms, FlowNet outperforms the others, and PritGred is the second best one. FlowNet outperforms BiRnd from at least 9.8% to at most 20.9% and, in average 18.4%, and outperforms PritGred from at least 2.3% to at most 3.1% and in average 2.5%.
7.3.2. Impacts of μ
Secondly, the impacts of μ on the performance metrics are evaluated and given in Figures 9 and 10. From Figure 9, it can be seen that with the increase of μ the total number of transmitted bundles increases. This is mainly because with the increase of μ, more vehicles arrive at the RSU. Therefore, the number of the contact durations increases and thus the total number of transmitted bundles increases. Among all of the traffic scheduling algorithms, FlowNet outperforms the others as expected and RndMax is the worst one. The other three algorithms are almost the same.

Relationship of the simulation parameters.

Relationship of the simulation parameters.
However, from Figure 10 it can be seen that BiRnd is the worst one instead of RndMax. This is mainly due to the fact that RndMax can support traffic differentiation and thus obtains more gains since it always delivers the bundles to randomly selected vehicles in a priority first ordering. Among all of the traffic scheduling algorithms, FlowNet outperforms the others as expected. And the second best one is shown as the PritGred. This is mainly because at each timeslot PritGred always delivers the most gained bundles. In other words, PritGred has the second best CoS support capability among the other four (except for FlowNet). FlowNet outperforms BiRnd by almost 19.5% in average and outperforms PriGred by almost 2.5% in average.
7.3.3. Impacts of s
Finally, the impacts of s on the performance metrics are evaluated and given in Figures 11 and 12. From Figure 11, it can be seen that, with the increase of s, the total number of transmitted bundles decreases. This is because with the increase of s the length of the contact durations decreases. Thus, less bundles can be taken by the vehicles. Among all of the traffic scheduling algorithms, FlowNet outperforms the others and RndMax is also the worst one. The other three algorithms are almost the same.

Relationship of the simulation parameters.

Relationship of the simulation parameters.
Similar to the behaviour of changing μ, BiRnd obtains the least gains instead of RndMax as shown in Figure 12. Among all of the traffic scheduling algorithms, FlowNet outperforms the others and PritGred is the second best one. FlowNet outperforms BiRnd by almost 19.4% in average and outperforms PritGred by almost 2.6% in average.
8. Conclusion
In the sparse or unpopulated area, one type of VDTNs including the vehicular infrastructures or roadside units (RSUs) and mobile vehicles is deployed. The unconnected RSUs of the VDTNs are used as the gateways of the distributed sensor networks, and the mobile vehicles are used as the mobile relays of the data. The sensed data are collected by the RSU and delivered to the passing by vehicles. Then the vehicles store, carry, and forward them to the destinations. In general, more than one type of the sensed data are collected by the RSU, and different classes of service (CoS) support are desired.
In this paper, we consider the CoS traffic scheduling problem for the RSU, with the objective of maximizing the total obtained gains. The availability of the contact information between the vehicles and the RSU is analysed. By exploring the contact durations, the proposed problem is formulated as a maximum weighted triple matching problem and is optimally solved with a flow network based method. Both the offline version and the online version of the proposed algorithms are developed. Extensive simulations are conducted to evaluate the performance of the proposed algorithms. Simulation results show the efficiency and effectiveness of the proposed algorithms.
In the future, the analytical results of the proposed traffic scheduling problem can be derived to deeply understand the behaviour of the CoS traffic scheduling strategy. And the fairness issue for the different CoS traffic scheduling will be considered.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
This work was supported in part by the National Natural Science Foundations of China (Grant nos. 61201157 and 61271279), the National 863 plans project (Grant no. 2014AA01A707), the National Science and Technology Major Project (Grant no. 2015ZX03002006), and the Fundamental Research Foundation of NPU (Grant no. JCY20130131).
