Trajectory Optimization of Packet Ferries in Opportunistic Social-Based Machine-to-Machine Networks

Machine-to-machine (M2M) communication is an emerging paradigm to connect a large number of devices through wireless technologies. In recent application scenarios, devices are normally carried by people in social contexts. Like the behavior of people, the moving activity of devices always happens in a specific area, which corresponds to some specific communities. How to guarantee the higher packet delivery ratio while reducing forwarding delay in such M2M networks is a challenging issue and has not been well addressed yet. In this paper, we put some special mobile devices (called postmen) in the opportunistic social-based M2M networks and their main responsibility is to carry packets for normal devices which belong to specific communities. Our work focuses on the optimization of the moving trajectory by considering the minimum transmission delay. We formulate the optimal issue into semi-Markov Decision Process model. The decision process includes two parts: packets-choosing strategy and trajectory of packet-ferrying determination strategy. By maximizing the individual reward of a postman, its optimal trajectory will be found. Furthermore, the proposed solution guarantees the packet delivery ratio and delay for isolated communities. Simulation results show that the proposed packet-ferrying solution outperforms the two existing ferrying solutions in terms of packet delivery ratio.


Introduction
With the development of wireless technology [1][2][3], the progress in short range networking, growth of wireless mobile networks, and advances in device networking have allowed the development of a new technology, machine-tomachine (M2M) communications [4], which has recently received considerable attention [5,6].Features such as selforganization, ease of deployment, low cost, and infrastructurelessness bring to wireless M2M networks the advantages of robustness, easy maintenance, economy, and flexibility.Therefore, M2M networks are envisioned to be the key technology for next generation wireless networks [7].An M2M network consists of a large number of self-organized and self-configured nodes.In some real application scenarios, nodes are carried by people; the behavior of human being reflects on the node.Then, these nodes which are carried by people have the social property.
As we know, mobile social network belongs to a typical application branch of M2M network, so, we call it social-based M2M network.Due to the sparse distribution of nodes, it is difficult to guarantee permanent forwarding path between the source and destination nodes [8].In such case, nodes need to cooperate with each other to achieve the task of multihop forwarding.In mobile social networks, normally, mobile nodes are carried by people [9].Therefore, the behavior and moving activity of nodes are similar to human activities, which are usually in specific areas [10].For instance, university students always move around the university campus.From a sociological point of view [11], we call the activity area community.
In a network which is composed by some communities, the communities are typically isolated from each other.For example, the source and destination nodes belong to the same community; it is easy to achieve the goal of packet delivery, so this issue is not discussed in our work.This paper only considers the situation where the source and destination nodes belong to the different communities.In most existing solutions, source node prefers to choose the neighbor node which has higher probability to reach the destination [12] or International Journal of Distributed Sensor Networks the nodes which have higher cluster coefficient [13].However, there are some instinct limitations in these solutions, and the delivery ratio is difficult to be guaranteed.Some researchers proposed to set particular mobile nodes (i.e., supernodes) to finish the forwarding task among the isolated communities [14,15].These supernodes do not belong to any community and they only need to take packets from different communities [16].However, these solutions only consider the scenario of stationary nodes [17] or assume the supernodes move according to fixed routes.Packet ferry issue was first proposed in [17]; the authors only considered one ferry node works in sparse mobile wireless networks.The main idea of [17] is to introduce nonrandomness in the movement of nodes and exploit such nonrandomness to help forward packet between isolated communities for social M2M networks.In [18], ferry calculates the fixed trajectory which follows TSP algorithm according to the parameters of community such as coordinate.Then ferry moves along the concluded trajectory and forward packets.Since in different time slot community has different packet generate rate, the request of forward service is dynamic in each community.However, ferry only moves along the concluded trajectory neglecting the dynamic request.Thus, this algorithm wastes a lot forwarding ability of ferry and has very low efficiency.The authors of [19] start with a Markov Decision Problem (MDP) formulation which produces the optimal ferry route that minimizes the average data delivery delay.While this formulation, in principle, enables optimal ferry route design, it is numerically intractable for moderate to large size problems.
In this paper, we call a supernode as postman.Then, how to optimize the moving trajectory for a postman to forward packet efficiently is a key issue.Our basic idea is that, given a packet delivery ratio objective, we minimize the delivery delay as the basis of optimizing the moving trajectory of the postman.In our work, we assume the postman is rational.Towards the forwarding task, the only goal of a postman is to obtain the maximum reward.That is, when the postman forwards packets to a destination between communities, reward can be obtained.Meanwhile, we assume all packets have expired time (TTL) and the forwarding reward and the residual time of packet exist with linear and proportional relationship.It means, within packet TTL, if the postman delivers packet earlier, more reward can be obtained.Otherwise, the postman obtains nothing for a expired packet.To maximize the reward, postman would try to forward packets as soon as possible and reduce the delivery delay.When postman has taken several packets and some destinations are different, how to order the delivery sequence and further optimize the moving trajectory are the main goals in this paper.As we know, in sparse social-based M2M networks, the permanent link between isolated devices is hard to achieve.In such case, some researchers proposed the ferry based solution for packet delivery.And this approach has been proved that it is useful in the real application scenario.As for our proposed solution, the postman device makes moving decision based on the status of the isolated communities; it is fully distributed algorithm.There is no need to introduce any additional centralized algorithm or equipment.From these points, we can see that our proposed solution is useful and practical.
We formulate the optimal trajectory issue as a semi-Markov Decision Process to maximize the reward.The decision process is divided into two decision strategies.Firstly, when a postman arrives at a community, there are several packets that need to be forwarded in this community.Due to the buffer limitation and the requirement of successful delivery, the postman needs to make decision on which packets it would carry according to the attributes of packets.Secondly, after the above decision was made, the postman needs to decide how to move among the different destination communities, and optimize the packets delivery sequence and the moving trajectory.By optimizing the moving trajectory, our solution ensures the packet delivery ratio while reducing the delivery delay.
The remainder of this paper is organized as follows.Section 2 describes the problem formulation of our proposed packet ferry protocol and introduces our network model.In Section 3, we present the optimal model of postman mobility trajectory by using semi-Markov Decision Process.Section 4 models the multiple postman working scenario and concludes the optimal number of postmen which are working in the same network area.Section 5 provides our simulation results.We conclude our work in Section 6.

Problem Formulation
In this paper, we adopt the university campus as network model.According to the activity area of the people who belong to the university campus, we divide the entire campus into several subareas or communities, for example, library, dormitory, and so forth.In [14], the authors assume that in each community, there exists at least one mobile node which is appointed as gateway node.Furthermore, gateway nodes never move to the outside of the community.In practical scenario, it is difficult to find such special node to be gateway for the community.Furthermore, the buffer requirement and bandwidth overhead become too heavy for gateway node, since all the nodes within the same community send packets to it.Normally, in mobile social networks, mobile devices are carried by people, it is difficult to find such people who like to do such kind of voluntary job unselfishly.In comparison, this paper introduces one gateway with fixed position for each community.Its only mission is to store the packets which come from other nodes and forward the packets to the packet ferry.We assume that the gateway has the same communication ability as normal mobile node.In addition, each gateway is equipped with finite buffer.Since the number of communities is limited, the implementation of gateway node would not lead to too much additional cost for the entire network.I set one fixed position device for each community.All devices which are in the same community send the packets to this fixed position device.Ferry device only needs to know the location information of fixed position device; it also means the location of community is known for all ferry devices.
Regarding the normal mobile nodes in community, the communication radius is  and the buffer size is .Mobile node generates packet to the random destination within a fixed time interval (e.g., Δ).In order to achieve the goal of packet transportation between different communities, we exploit some ferry nodes in the network.Since ferry node has only one mission of packet delivery, we call it as postman which moves among the communities.In the following section, we optimize the moving trajectory for postman by using semi-Markov Decision Process.By considering the real application scenario, we assume the buffer of postman is finite and the communication radius is .
In order to describe our work more clearly, we make the following constraints for our network model.
First, all the packets are sent to the gateway of each community.In our work, we ignore the community-detection issues, which means each node knows its belonging community.Secondly, a postman knows the community that the packet should be ferried to.Note that this assumption needs a unique ID for each node.Within time interval Δ, mobile node generates a packet and assigns destination randomly.In order to save buffer and bandwidth, we initialize active time for each packet, which is denoted by time to live (TTL).If the packet reaches destination before deadline, it is deemed as a positive transmission.In contrast, the transmission is negative and the packet would be erased without retransmission.When a postman reaches a gateway node, it communicates with the gateway node to exchange information.The moving velocity of postman is constant, and its buffer size is fixed and limited.

Optimized Trajectory for Postman
3.1.Design Framework.In this section, we discuss how to formulate the moving trajectory of individual postman into semi-Markov Decision Processes (SMDPS).By using the expected discount criterion of SMDPS, we conclude the optimal expression of decision function.Furthermore, based on the optimal expression, we conclude the optimal moving trajectory of postman.Our main goal is to minimize transmission delay of packet and, meanwhile, guarantee the required packet delivery ratio.Here, the optimal trajectory for postman is defined as the route by which the corrected packet is distributed to the destination gateway as quick as possible.We assume that postman is pursuing reward by ferrying packets.By combining packet TTL and reward of postman into consideration, the linear relationship exists between TTL and reward.That is, the less time a postman spends on delivering packet to the destination gateway before TTL, the more reward it would obtain.If the packet is expired, the postman gains nothing.In such case, we conclude the optimal moving trajectory of postman by maximizing the reward, which also means the packets are transmitted with the minimum delay.

Overview of Proposed Protocol Modeled by SMDP.
Since the decision-making process of postman only relies on the current state of the networks, independent from the previous state, postman with the same current states would make the identical decisions to determine what it should do in the next state.Therefore, we formulate this issue as a semi-Markov Decision Process (SMDP), which is composed by the the following six tuples: {, (),   (), (⋅ | , , ), (, , , , ), , ,  ∈ ,  ∈ ()}.Here,  means the state set.Towards the state  ∈ , at time point , the available decision set is ().When the system model is in the decision-making time point  and adopts the decision , its transition probability from state  to  is   () and the transition time from  to  is the nonnegative random variables of distributed function (⋅ | , , ).Under the condition of locating in transition state  and transition time is , the system would gain (, , , , ) as reward.The reward function is shown by Towards the given function   (), only in case  = , the value of given function is 1.Otherwise, in case  ̸ = , the value of given function is 0. Equation (1) denotes that, when the current state is  and the decision maker adopts the decision ; in the next decision time, the state would transfer to  and transition time is .Decision maker gains the instantaneous reward  1 (, , ) at the beginning of transition.In the process of transition, decision maker gains reward  3 (, , ) at the transition finishing time point ( = ); it gains the instantaneous reward  2 (, , ). means criterion function of SMDP model.
We adopt the total reward discount criterion in our SMDP model, where time continuously changes and the discount factor is a nonnegative real number (denoted by ).It means that, at time , the unit reward is only equivalent to  − times of time 0. Towards (, ) ∈ Γ,  ∈ ,  ≥ 0,  > 0, we have Equation ( 2) means if the current state is (, ), the next state would be in .In such case, under the condition which the sojourn time is , decision maker would gain the reward which is shown by the following equation: When the decision maker is in the th decision cycle, the reward should be counted from the beginning of th cycle; it is denoted by   (  , Δ  ,  +1 ,   ).Furthermore, when time goes from the beginning of th to the end (0 point), the reward would be denoted by  −    (  , Δ  ,  +1 ,   ).As for any strategy  and state  ∈ , in case the decision maker adopts strategy  and in the state , we can conclude the expected reward from the beginning to the end time point of th cycle.It is denoted by International Journal of Distributed Sensor Networks Thus, we conclude that, under the strategy , the expected discount total reward of  stages starting from the initial state  is shown by The optimal function of expected discount total reward of  stages is shown by  , () = sup { , (, )  ∈ Π} . (5)

Optimal Model of Postman Mobility Trajectory.
Since users in mobile social networks are always located in the specific communities which depend on their living styles or the personal hobbies, the guaranteed delivery means that the packet is distributed within TTL, and we introduce postman to forward packets between different communities.In our work, to avoid the additional cost caused by the postmen, we need to control the number of postmen and their buffer sizes in a limited level.In such case, it is difficult to guarantee the immediate delivery service by a postman when a packet is just generated.We assume that the postmen are working for pursuing maximized rewards.First of all, before a postman takes packet, it needs to ensure the packet could reach the destination community within TTL.Otherwise, they cannot obtain the reward.Also, there exists linear relationship between reward and TTL, which means the more residual time is spent, the higher reward will be obtained.In this way, by maximizing the reward of postman, we conclude the minimum packet transmission delay and also optimize the packet ferry trajectory of the postman.The semi-Markov Decision Process includes two steps.Firstly, when a postman is meeting the gateway of a specific community, the number of packets which are waiting to be delivered is larger than the residual buffer size of the postman; the postman needs to select which packets it should take.The decision is based on the destination and residual alive time of the packet.Secondly, since packets have their individual destinations, the postman needs to optimize its moving trajectory by the use of semi-Markov Decision Process.
To make the optimizing process more clearly, we choose one postman to express our semi-Markov Decision Process.We assume this postman has taken  units packets and the initial buffer size is  ( > ).It is located at  0 .The attributes of  packets are denoted by  1 ,  2 , . . .,   , respectively.Here,   means the attribute vector (  ,   ) of th packet,   is the destination community of packet  and   is the residual alive time of packet .Regarding the gateway of  0 , there are  candidate packets in its buffer and their attributes are denoted by  1 ,  2 , . . .,   .Here,   means the attribute vector (  ,    ) of th packet and   is the destination community of packet ,    is the residual alive time of packet .By combining attributes of postman and gateway, we define the state vector as (, , ,  0 ,  1 ,  2 , . . .,   ,  1 ,  2 , . . .,   ) for our semi-Markov Decision Process.Each state corresponds to a vector; all the state vector are included in set .We denote the parameter  of state  as  → .
In our model, each decision step leads the postman to transfer from the current state; we define  := (, ) as one decision.Also, let () denote all of the decisions coming from .Towards the transfer probability   (), in case the subscript of  and  is one to one correspondence with the two components of ,   () = 1; otherwise   () = 0. Towards time distribution function (⋅ | , , ),  corresponds to  and .Therefore, (⋅ | , , ) represents the time interval for the postman to move from  to .We assume the velocity of postman is constant; then, (⋅ | , , ) is only related to  0 .As mentioned in previous section, reward function (, , , , ) is composed by three terms.In our decision model, the reward is only payed in the time point when packet reached destination.It is shown by Furthermore, we have Substitute ( 7) into ( 4) and ( 5), respectively; we have the following two substitution equations: Here,   is the sojourn time of th decision;   = ∑ −1 =1   .We use  , () as the decision criterion function for our model.Since the transfer probability is 1, we have In our model, sojourn time is the moving time between two gateways of postman.Due to the moving velocity is a constant, we assume the velocity of postman is .In such case, the moving time between  →  0 and  →  0 is the sojourn time when the postman is at : When the postman is moving among  0 ,  1 ,  2 , . . .,   continuously, we conclude the total sojourn time; it is shown by As we mentioned previously, if  = , (, ) = 1.Otherwise, if  ̸ = , (, ) = 0. We have International Journal of Distributed Sensor Networks 5 Here,  2 (  , Δ  ,  +1 ) > 0.Then, we conclude [  →   − ((( +1 →  0 ) − (  →  0 ))/)] > 0. In this section, we introduce the packet choosing strategy.We assume a postman has taken  units packets.In a specific gateway, there are  candidate packets that are waiting for forwarding.Currently, the postman is in state .In case,  < , where  is the initial buffer size, the postman would try to take each candidate packet sequentially.When the postman is trying to take th packet, we calculate the maximum expected discounted total reward as In this time, we assume the postman has only taken   and the current state is  0 .According to specific order, the packets will be forwarded to the different destinations and the state sequence is  1 , We let all the candidate packets fitting to be taken and calculate every maximum expected discounted total reward, they are shown by  +1, () 1 ,  +1, () 2 , . . .,  +1, ()  .
If every value of the given  +1, ()  is 0, the postman cannot choose any candidate packet.Otherwise, the postman chooses the packet   which corresponds to the maximum  +1, ()  to be taken.In this time, the postman has taken  + 1 units packets.We change the order of  1 and   in the state vector; the state vector is shown by (, , ,  0 ,  1 ,  2 , . . .,   ,  1 ,  2 , . . .,   ) and also  plus 1.
If  = , the packet choosing process is done.Otherwise, the postman repeats the choosing process in the rest of the candidate packets.
When the postman finishes the packet choosing process, it has taken  packets and the state is shown by  1 ,  2 , . . .,   .We substitute them into ∑  =0 { −(  +  )  2 (  , Δ  ,  +1 )} according to the specific order when they are forwarded to the destination.If this specific order can obtain the ordered expected discounted total reward  1 , the postman ergodic all the orders to calculate the effective ordered expected discounted total reward  1 ,  2 , . . .,   and further obtain the maximum value   as the optimal ordered expected discounted total reward to adjust state vector (, , ,  0 ,  1 ,  2 , . . .,   ,  1 ,  2 , . . .,   ) to match the specific order to obtain   .In this way, we determine order of the packets which are taken by the postman.From the packet point of view, this order is the forwarding priority.From the postman point of view, this order is the optimal moving trajectory for the packet ferrying.

Optimal Number for Multiple Postmen Working Together
As we know, the capability (e.g., buffer size and bandwidth) of each postman is limited, and in the given time, it only can forward the fixed number of packets by using its maximum capability.Therefore, when large number of nodes distributed in the sparse wireless networks, or the packet generation ratio is too high of each node, single postman is hard to guarantee the effective packet forwarding.In such case, multiple postmen should be implemented into the networks.
Based on this aspect, under the scenario of given network scale and parameters, how to conclude the optimal number of postmen is an important issue for multiple postmen working in the same area.By using the optimal number of postmen, every postman can work under the condition of optimal packet forwarding load.
As for the given sparse network scale, we define the following necessary parameters for calculating the optimal number of postmen.We set the network running time as  and the TTL packet as .The moving velocity of postman is  and the initial buffer size is .There are  communities in our network model and  nodes are distributed in the different communities.We denoted by   the th node and by  the set which includes all nodes.  is the th community and also denoted the set of nodes which belonged to community   . is the set which including all communities.We denoted (  ,   ) the shortest path from   to   , especially when  =  and (  ,   ) = 0. Towards for all   ∈   ,   ∈   , we have the following: In order to describe the different scenarios of shortest path existing, we have the following: In equation ( 16), in case  =  or there are other communities between the shortest path of   to   , we have (  ,   ) = 0. Otherwise, in case  ̸ =  and there is no other community between the shortest path of   to   , we have (  ,   ) = 1.As for all   ∈   ,   ∈   , we have (  ,   ) = (  ,   ).
Here, we assume that   is the  algebra of .As for all  ∈   , || denotes the number of nodes of .In , we assume one arbitrary node   , it generates one packet.Then the probability of this packet is (  ,   ), which the destination is   .() is the sparseness measure of field .We have In our work, we consider the packet generation time interval of each node according to poisson distribution.In the network, node   generates packet according to poisson distribution with the intensity (  ).We consider   as the packet generation intensity for node   .In network International Journal of Distributed Sensor Networks field , we conclude that within system running time , the mathematical expectation of total number of packet generation is shown by the following equation: Especially, as for all , , ,  ∈ {1, . . ., },   =  = .
Since (, ) = ||, we assume in field  the probability of arbitrary node   generates the packet whose destination is   is (  ,   ).Within time interval , the total number of packet generation is shown by the following equation: Especially, when  is the complete set of .We have Equation ( 20) denoted the total working load within time interval .We also conclude the average update number of hops for each packet and it is shown by the following equation: As for each packet, the average transmission delay is shown by Further, we have the packet carrying time and it is denoted by   = ( −   − )/2; the packet carrying redundancy is   = /  .In the running time interval , the maximum ferrying capability of postman is   =     V  .In such case, in network field , the optimal number of postmen is shown by the following equation: Especially, during the above process, when  is always the complete set of ,   = /  is the perfect state of optimal number of postmen.We substitute (23), we conclude the unary function whose unknown number is   .In such case, by solving the   , we can conclude the optimal number of postmen in our proposed network.The expression is shown by In ( 24),   is the number of postmen and   is the expected buffer occupation of postman.In the ideal state, we assume that and under the situation of optimal number of postmen working in the given network field, each postman would work with full load.We have   = .However, most of the time, postman cannot work under the condition of full load; in such case, we set a tolerable space occupancy rate and it is denoted by 0 <  < 1 and   =   .Based on these descriptions, we have the following equation to show the result of optimal number of postmen: . (25)

Performance Evaluation
In this section, we compare our proposed solution with other three existing packet ferry forwarding protocols.In Section 2, we have overviewed the existing packet ferry protocols which we compared with our proposed solution.In order to obtain the simulation results which are close to the real application scenario, we use the Reality Mining which comes from MIT as our simulation dataset [20].Furthermore, we use the ONE [21] as our platform for simulation.The ONE is a simulation environment that is capable of generating node movement using different movement models, routing messages between nodes with various DTN routing algorithms and sender and receiver types, and visualizing both mobility and message passing in real time in its graphical user interface.In our simulations, we focus on delivery ratio and the average delivery delay as the key metrics to evaluate the proposed packet-ferrying solution.We define the delivery ratio as the ratio of the number of delivered packets to the total number of packets in our simulation process.

Reality Mining Data Analysis.
Reality Mining comes from MIT Media Laboratory which collected data from 94 volunteers.The dataset contains the following items.Call logs, bluetooth devices (the distance between any two close devices is 5 meters), cell tower IDs, application usage, and phone status.The Reality Mining was collected using mobile phones preinstalled with several pieces of software that recorded and sent the researcher data during the months between September 2004 and June 2005.
Since our main focus is on the scenario in which the nodes have different belonging communities and how to make the ferry forwards packets more effectively, we filter the encountering time and cellular tower IDs which are recorded by subjects between all cellular towers and subjects.Through the location of cellular towers, we can obtain the location information of subjects.Unfortunately, in Reality Mining only the cellular towers that are associated with MIT have location information.Therefore, we choose the areas which are covered by the cellular towers and these areas location information is known for our work.

Simulation Parameter Setting.
In MIT Reality Mining, our simulation runs for 24 hours to collect data.We choose 50 subjects which have the complete information and typical community character as the normal mobile nodes among all 94 subjects.According to the locations of cellular towers in campus map, we divided the whole map into 7 communities.By using the information of contacts with cellular towers of Reality Mining, we obtain the belonging relationship for different communities in the given time period.In our simulations, we set one gateway for each community and the buffer size of gateway has no limitation.We put 5 ferries working in the network to forward packets between 7 isolated communities.Since the moving activity is unknown in community for us, we assume that the normal node is adopted by the Random Way point model as its moving rule.When normal nodes encounter the gateway, they send their packets to the gateway.If some nodes move to another community, they execute the same packet sending action after determining the community belonging.The packets are generated randomly, and the destinations of packets are also randomly assigned.The total simulation time is 24 hours (86900 seconds).We set the initial 400 seconds as the warming-up time period and the last 500 seconds as the terminal time period.In these two special time periods, we do not collect data for final simulation results.The detailed simulation parameters are shown as follows: the velocity of normal node is 5 meter/second; the velocity of ferry node is 15 meter/second; the communication range of normal node, ferry, and gateway is 150 meter.Firstly, we simulate all the protocols under the condition in which the buffer size is 10 units and the packet expired time is 60 minutes.Secondly, based on the different buffer size and packet expired time, different packets distribution model, we compared the performance of all packet forwarding protocols.

Impacts of Different Packet Generation Rate.
In order to observe the different performance under the condition of different packet generation rate, we simulate all packet forwarding protocols in which the number of packet is from 100 to 2000 packets and the packet generation interval is uniform.The simulation results are shown by Figures 1 and  2. In these two figures, since our proposed protocol and HRC protocol are all based on the social characteristic and the distribution of nodes also corresponds to the social networks, from Figure 1, we can see that, under the condition of different packet generation rate, our proposed protocol and HRC show better performance of packet delivery ratio than that of DRR.When the number of packets is larger than 400, our proposed protocol and HRC are all better than FIMF in terms of packet delivery ratio.Furthermore, when the number of packets is larger than 600, the performance of our proposed protocol is also better than that of HRC, and according to the increasing of packet generation ratio, our protocol shows better performance evidently.The main reason is that our proposed protocol optimizes the trajectory of postman for packet ferrying.On the contrary, the trajectory of ferry node of HRC is moving according to the fixed routine.This is also the reason why our protocol shows better performance than that of others in terms of packet delivery delay in Figure 2. In Figure 2, we can see that the packet delivery delay is the highest compared with other three protocols.This is because DRR prefers to provide service for the nodes which have the larger packet generation ratio instead of the nodes whose buffers have more packets.Since the ferry node of HRC protocol moves according to the fixed trajectory, the movement cycle is fixed.In such case, the influence of packet generation ratio is lower in terms of packet delivery delay for HRC protocol.It leads to the result that when the number of packet is less than 500, packet delivery delay of HRC is higher than that of FIMF.On the contrary, when the number of packet is larger than 500, HRC is lower than FIMF.In the traditional scenario, packet delivery delay should increase according to the packet generation ratio increasingly.For example, in Figure 2, the curves of DRR and FIMF are obtained under the condition that, when the number of packet is less than 600.However, in Figure 2, besides our proposed protocol, the packet delivery delay of other three compared protocols is going down according to the packet generation ratio increasingly when the number of packets is larger than 700.This is because when we count up the average delivery delay, we only consider the packet delivery delay which is successful forward to the destination.However, when the number of packet is larger than 700, delivery ratio of other three compared protocols have decreased rapidly according to the increase in packets.It leads to the results that as for the packets which have the predominance of space and time, they can be forwarded by lower delivery delay.On the contrary, the packets which have no predominance would expire before the TTL and cannot be counted.services for the whole community.Therefore, the increase in packet generation would not impact the delivery delay evidently.

Impacts of Buffer Size.
In Figure 1, we can see that, when the number of packets is less than 500, the delivery ratio of all the four simulated protocols is stable.In order to obtain the comprehensive result of buffer size influence, we choose 600 as the number of packets to simulate the impacts under different buffer size scenarios.We set the buffer size as changing from 5 to 14 units and also, 1 unit means one packet buffer occupation.Figures 3 and 4 show the performance of delivery ratio and delay, respectively, under the changing of buffer size.From these two figures, we can see that, when the number of packets is 600, as for our proposed protocol, the delivery ratio is the highest compared with other ferrying protocols.When buffer size is less than 10 units, the delivery ratio of other three protocols becomes dropping down evidently.The delivery ratio of FIMF is lower than those of HRC and DRR.Since as for FIMF, the ferry node provides forwarding service until normal nodes collect enough packets.In this way, if the buffer size of ferry node is small, the delivery ratio of FIMF is becoming lower.Towards HRC and DRR, they provide forwarding service based on the periodic mode; therefore, their dropping down magnitude is almost the same.Specially, since HRC provides forwarding service based on community structure, its delivery ratio is higher than that of DRR protocol.
From Figure 3, we can see when buffer size of postman is larger than 10 units, besides our proposed protocol, delivery ratio of other three protocols is becoming stable.Meanwhile   in Figure 4, the average delivery delay of these three protocols is also becoming stable.It means that besides our proposed protocol, when buffer size is 10, these three compared protocols are in the buffer saturation status.However, as for our proposed protocol, when the buffer size is 4 units, it has fall in the saturation status and enough buffer for packet forwarding.

Impacts of Packet Expired Time (TTL).
From Figure 3, we can see that when buffer size is larger than 9 units, all protocols are becoming stable in terms of delivery ratio.In order to show the influence of packet expired time (TTL) more clearly, we set the buffer size as 8 units and the number of packets as 600.we simulate all protocols under the condition of TTL to be 30 minutes to 120 minutes to show the performance in terms of packet delivery ratio and delivery delay; the results are shown in Figures 5 and 6.
In Figure 5, we can see that our proposed protocol and HRC show better performance since they are designed based on social community.When TTL is less than 50 minutes, the delivery ratio is in the worst case for these two socialbased protocols.In our proposed protocol, we optimize the trajectory of postman; it makes better performance compared with HRC in terms of delivery ratio under the different TTL.As for FIMF and DRR protocol, when TTL is lower than 100 minutes and 70 minutes, respectively, the delivery ratio of them is becoming lower.Meanwhile, when TTL is larger than 70 minutes, DRR shows better performance than FIMF.This is because FIMF needs to wait for normal nodes to collect enough packets to start the forwarding process.
From Figure 6, we observe that as for DRR protocol, under the different TTL, it always in the higher delivery delay.And our proposed protocol is still lower than the other three compared protocols.Furthermore, the TTL changing from 30 to 120 minutes almost cannot impact the performance of our proposed protocol.

Impacts of the Distribution for Packet Destination.
In order to make our simulation results much closer to the real application scenario, we make the destination of packet obey the normal distribution and according to the changing of parameter  to simulate the proposed protocols.In the simulation process, we set the parameter  changing from 1 to 10.According to the probability density function of normal distribution, we know that if  is smaller, the destination of packets is more concentrated.The simulation results are shown by Figures 7 and 8.
In Figure 7, we can observe that parameter  almost cannot impact the performance of our proposed protocol in terms of packet delivery ratio.When  is larger than 6, delivery ratio of FIMF is becoming lower according to the increase in .This is because FIMF provides forwarding service for normal node; when there are several nodes which are located in the network and have much more packets than other normal nodes, FIMF prefers to provide all forwarding services to these special nodes.This also is the reason why DRR has the lower delivery ratio when  is larger than 7.As for HRC protocol, when  is less than 4, its delivery ratio increases according to the increase in .When  is larger than 4, the delivery ratio of HRC is tending to be stable.This is because the postman of HRC is moving according to the periodic mode.Towards our proposed protocol, we optimize the trajectory of postman; it   leads to the results that before the moving activity, postman determines the optimal traveling trajectory.Therefore, the distribution parameter  has hard impact on the delivery ratio performance of our protocol.
From Figure 8, we observe that as for all four compared protocols, the packet delivery delay is hard to be impacted  by distribution parameter .DRR protocol still has the highest delivery delay.Our proposed protocol shows the best performance in terms of delivery delay.However, when  is less than 4, since the destination of packet is too concentrated, it makes the delivery delay higher according to the decrease in .

Conclusion
Packet routing and forwarding is one of the most important issues for opportunistic social-based M2M networks.In this paper, we focus on the scenario that nodes are distributed in the sparse area.This scenario is a real application case for social-based M2M networks.By analyzing the moving behavior of supernode (called postman in this paper), we optimize the moving trajectory of postman for opportunistic social-based M2M networks.We formulate the optimization issue as a semi-Markov Decision Process model to produce the delivery sequence and conclude the optimal moving trajectory of postman.We combine the pursuing reward attribute of postman and the TTL of packet into one reward function.We achieve the goal of minimizing delivery delay while improving the delivery ratio of packets.Simulation results show our ferrying solution performs better than other existing schemes in opportunistic social-based M2M networks.

Figure 1 :
Figure 1: Comparison of delivery ratio under different message number.

Figure 2 :
Figure 2: Comparison of average delay under different message number.

Figure 3 :
Figure 3: Comparison of delivery ratio under different buffer size.

Figure 4 :
Figure 4: Comparison of average delay under different buffer size.

Figure 5 :
Figure 5: Comparison of delivery ratio under different TTL.

Figure 6 :
Figure 6: Comparison of average delay under different TTL.

InternationalFigure 7 :
Figure 7: Comparison of delivery ratio under different parameter .

Figure 8 :
Figure 8: Comparison of average delay under different parameter .
2 , . . .,  +1 .Towards the total reward function, if each term is greater than 0, we define this expected reward as effective.Meanwhile, we conclude one expected discounted total reward  ,1 .Then, we change the packet forwarding order to calculate the expected reward for the second time.If this order is also effective, we have the expected discounted total reward  ,2 .According to this ergodic rule, we calculate the correspondence expected reward of  effective order,  ,1 ,  ,2 , . . .,  , .Then we have +1, ()  = max { ,1 ,  ,2 , . . .,  , } .
Towards our proposed protocol and HRC, postman provides forwarding International Journal of Distributed Sensor Networks