A DTN routing strategy based on neural networks for urban bus transportation system

A DTN routing strategy based on neural networks for urban bus transportation system

Author’s Accepted Manuscript A DTN Routing Strategy Based on Neural Networks for Urban Bus Transportation System Fabio Rafael Segundo, Eraldo Silveira...

946KB Sizes 0 Downloads 52 Views

Author’s Accepted Manuscript A DTN Routing Strategy Based on Neural Networks for Urban Bus Transportation System Fabio Rafael Segundo, Eraldo Silveira e Silva, Jean-Marie Farines www.elsevier.com/locate/jnca

PII: DOI: Reference:

S1084-8045(16)00076-X http://dx.doi.org/10.1016/j.jnca.2016.02.002 YJNCA1573

To appear in: Journal of Network and Computer Applications Received date: 31 March 2015 Revised date: 12 November 2015 Accepted date: 5 February 2016 Cite this article as: Fabio Rafael Segundo, Eraldo Silveira e Silva and Jean-Marie Farines, A DTN Routing Strategy Based on Neural Networks for Urban Bus Transportation System, Journal of Network and Computer Applications, http://dx.doi.org/10.1016/j.jnca.2016.02.002 This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting galley proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

A DTN Routing Strategy Based on Neural Networks for Urban Bus Transportation System Fabio Rafael Segundoa , Eraldo Silveira e Silvab , Jean-Marie Farinesa a Departament

of Automation e Systems (DAS), Federal University of Santa Catarina (UFSC), Florian´opolis/SC, Brazil . Institute of Technological Education of Santa Catarina (IFSC), S˜ao Jos´e/SC, Brazil.

b Federal

Abstract Routing in Delay/Disruption Tolerant Networks (DTNs) is a challenge because it must deal with possible unconnected end-to-end paths at the time of sending a message to a destination. An efficient selection of a contact node to forward a message is a key in the routing process. Prediction techniques can be used to assist in routing decisions. In this work we present a multi-copy routing strategy for a DTN built on the top of an Urban Bus Transportation System (UBTS). Using the buses as nodes, the contact history of nodes can be used to improve the DTN communication. The strategy relies on a journey predictor to build a multi-graph of predicted journeys to the destinations. It calls a next node contact predictor based on Artificial Neural Networks(ANN) to compute each vertex of the multi-graph. A minimal delay criteria is applied to select the best journey. A copy control algorithm is used to improve the performance of the system. Experiments were carried out with real contacts of a quasi-opportunist scenario. The proposal outperformed the MaxProp strategy in the most cases considering the number of delivered messages, the delivery delay and the delivery cost. Keywords: Disruption/Delay-Tolerant Networks, Opportunistic Routing, Journey Prediction, Artificial Neural Networks

1. Introduction Routing in Delay/Disruption Tolerant Network (DTN) is an active area of research given the challenges associated with the end-to-end communication over intermittent connections. These intermittencies are caused by nodes movements toward outside the communication area, interference of other nodes and nodes failures. Store-Carry-and-Forward (SCF) is a general strategy to forward messages in DTNs. Messages are stored in a buffer of a mobile node until it contacts another one with better conditions to forward the message to its destination, The DTN concepts was initially used for Inter-Planetary Networks (IPN) and it was extended to Vehicular Networks (VANETs), Sensor Networks, Military Ad Hoc Networks and Networks in catastrophic scenarios, Pocket Switched Networks (PSN) and Under-Water Networks (UWN). Routing computations and methods for contact prediction are open issues, specially for opportunist contacts. A DTN built on the top of an Urban Bus Transportation System (UBTS) can be considered a network with quasi-opportunistic contacts [1] due to the regularity of itineraries and schedule timetables, but with contacts sensible to small variations of bus movements which can cause huge impacts in their occurrences. We have explored historical data to train an Artificial Neural Network (ANN) to predict contacts in UBTS. Some works use probabilistic methods, markovian processes or methods of machine learning to improve the routing performance. In our work we built an Artificial Neural Network (ANN) to predict contacts ∗ DAS/CTC/UFSC - C. P. 476 - Florian´ opolis - 88040-900 - Brazil. E-mail: [email protected] or [email protected]

Preprint submitted to Journal of Network and Computer Applications

in UBTS. ANNs are suitable to deal with imprecise data, and scenarios resulting in too many states. The ANN contact predictor is part of a fast and efficient solution for message routing, allowing a better handling of hidden patterns in the contact occurrences. Historical contact data were used to train the ANN. In a previous work, this ANN contact predictor was successfully applied in a message forwarding schema without replication of messages [2]. The strategy aims to reduce resources consumption as well as on-line computation time and to improve the rate of messages delivered. In this paper we propose a multi-copy routing strategy that uses an improved version of the ANN contact predictor. It is invoked by a journey predictor to build a multi-graph representing possible journeys to a destination. A journey selection criteria that minimizes the message delay is applied to select the best journey. A controlled copy procedure of relayed messages was used to improve the system performance without compromising network resources. A metric of cost per delivered message is also proposed to facilitate future comparisons with other works.

This paper is organized as follows. Section II provides an overview of DTN routing and briefly reviews the main related works. Section III presents the routing problem for quasiopportunistic contacts. Section IV describes the proposal, with its main algorithms and methods used in the multi-copy routing based on ANN. Section V presents the methodology to achieve ANN structures based on data analyses. An evaluation of the proposal is presented in the Section VI. The integration of the contact and journey predictors is discussed in Section VII. Finally, Section VIII concludes the paper. February 12, 2016

2. DTN Routing Overview

on an utility function, is proposed. Messages are separated into classes. Each class has a message queue and messages are scheduled according to their priorities. MaxProp [7] is a probabilistic approach to support message routing. The main strategy is to forward a copy of the message to the node owning the maximum probability path to the destination. It is computed using the probability matrix built from the frequency of contact for each node. This strategy presents good results when no other information is available and when the contacts occur repetitively. In [8] the DTN routing is modelled as a probabilistic timespace graph from historical contact information or prior knowledge about the network. It proposes a new delivery probability metric, the expected minimum delay (EMD), derived from a Markov decision process. Unfortunately, the application of Markov processes suffers from the combinatorial explosion of states in the case of a large amount of nodes. A DTN routing strategy can also take advantage of timetables and network maps in UBTS application. In [9] a routing-graph stores contacts between vehicles and determines different paths for a message from a source to a destination. The best path is selected based on probabilities and it is stored in the message. The forwarding strategy is parametrized based on data from a real bus system. Delivery rate and low latency can be already reduced through copies of the messages on the network sent to the n best paths. In [10] a framework for routing decisions based on bayesian classification is used to increase the routing performance in a DTN. It integrates knowledge of the network characteristics and the mobility patterns to improve the routing process. The space is divided in square areas and the time is organized in time-slots. Some works have applied ANNs on routing in MANETs communication. Using historical information, they perform predictions of movements [11] and contacts [12]. Most of these works have used multi-layer feedforward ANNs. In a previous work [2] we have applied ANNs in a message forwarder (without message replication) in the context of an UBTS, improving the performance when compared to MaxProp. ANNs are suitable for scenarios with imprecise or hidden pattern data. We exploit correlated information about the instant of contact and the last and next node of contact. All nodes have the same ANN. In a variant of this approach, a node can have several ANNs using only information about the related node. In this work we present a multi-copy routing strategy based on an enhanced ANN contact predictor.

DTN routing cannot be performed as in conventional networks, such as Internet. The major challenge is the lack of communication continuity between end points without full endto-end connectivity [3]. The message forwarding method used in DTNs is the Store-Carry-and-Forward (SCF). A message can remain stored in a buffer of a node until it contacts another one with better chances to forward the message to its destination. Routing strategies provide information for the forwarding process to select the next carrier node. The routing strategy impacts on the overall communication performance. A DTN routing approach should consider the way in which the contacts are established. A network scenario can have deterministic or opportunistic contacts or some degree between both. Good achievements in the routing are particularly hard in face of the randomness imposed by opportunistic contacts. In general, routing strategies for opportunistic contacts must store a previous knowledge of the network. Several information can be used, such as contact frequency, sequence of contacts, social behaviour of a node and time window for the presence of a contact node. Routing strategies can use single copy or multiple copies approach. In single copy, a node transfer the message to another node until it reaches destination. Only the original message exists in the network. Multiple copies strategies allow a node to transfer a message to another node but it can keep a copy of the message. It can use flooding or a controlled copy approach to limit the number of message copies. Several methods were proposed to perform DTN routing in opportunistic contacts scenario. They differ in the routing strategy, performance metrics, resource utilization and information to support forwarding decisions. As far as we known none of them has applied neural networks in context of a DTN in Bus Transportation System. One of the most known DTN routing strategy is the Epidemic [4]. It is based on flooding method. Epidemic can be used when bandwidth, energy and buffer utilization are not a concern. A node copies all messages stored in its buffer to every contacted node. The Epidemic with unlimited resources is the best case of the number of delivered messages and delivery delay, and the worst case of resource consumption in terms of bandwidth and size of buffer. It is widely used as a reference for comparisons. Some works have modified the Epidemic strategy to reduce the number of replicated messages and consequently the use of bandwidth and storage [5, 6], whereas others exploit information to find the best path from the current node to the destination, minimizing the number of replicated messages. A copy control mechanism can be applied in both cases to deal with the message delivery and the resources use. In the Spray and Wait scheme [5], a source node spreads L copies of a message to a set of relay nodes, keeping this message in its buffer. When it reaches the allowed number of message copies the node switches to direct delivery mode. At each contact L is divided by 2. The size of L can be computed to achieve specific objectives, for example, to reduce delivery delay. In [6] an asymmetric Spray mechanism where L is based

3. DTN routing for an UBTS application In the following, we present the problem of routing on a DTN built on top of an UBTS. This kind of DTN will be characterized as a quasi-opportunistic contacts network. 3.1. Problem statement In a DTN built on top of a public urban transportation system (UBTS), a bus is a node of the DTN. It is equipped with a short range omnidirectional wireless communication device. A 2

contact occurs when a radio connection is established between nodes. A node has a unique identifier and it can send a message to any other node in a SCF basis. In this scenario, a node moves according to a fixed itinerary and it starts and ends at the same place. A subset of nodes can be allocated to accomplish the same itinerary. Each node follows a predefined schedule to arrive at and depart from the stop points. There is no dynamic insertion and removal of nodes in the system. It is also supposed that there is a low density of nodes over a large area. Although the UBTS using the timetable and route information, the itineraries are not followed rigidly, since nodes can suffer failures, delays and advances. Contacts between mobile nodes in this scenario occurs in quasi-opportunist mode, since several conditions will determine whether a contact will or not occurs before or after a determined time and place. There are situations promoting changes on the nodes movements, such as the dwell time in the bus stop points, waiting time in the semaphores, transit congestion, car crashes and failures in the buses. These situations vary on the days and they impose changes on the buses movement. Due to these changes, contacts become very difficult to be determined and a mechanism to help the message routing is also complex to determine. Furthermore, several factors, such as communication issues, imprecise clocks in the nodes, human operations and modifications in the pre-defined route and depart time generate imprecise information in the registered contact occurrence. ANN is a suitable approach to deal with imprecise data, hidden patterns and to handle a lot of states. These ANN features, not present in probabilistic methods, facilitate to deal with contacts occurrences in the UBTS context. In this work we focus in how to route in such a described DTN using ANN contact prediction and a limited number of message copies. We will suppose there is no positional information (GPS) available in a node. However, the history of past contacts is accessible by the routing system. Historical data is the set of past cycles, where a cycle can be a contact registration of a complete work day.

Consider J(u,v) to be the set of all possible journeys j(u,v) between u and v obtained from a set of cycles. A problem to solve is how to find the shortest journey in terms of number of hops from u to v, jmin s = arg ju,v min{| ju,v | : ju,v ∈ J(u,v) }. A problem variation is to find the lowest delivery time journey, that is, a journey with lower tn obtained in the last hop of the journey ((·, v), tn ) and defined from jmin t = arg ju,v min{tn : ((·, v), tn ) ∈ J(u,v) }. In the following sections we present a solution to the stated problem using a Neural Network based contact predictor and a multiple copy approach.

4. A Multi-copy DTN routing strategy In [2], we presented a single copy DTN established on an UBTS and we briefly review here. It uses a journey predictor based on an ANN next contact predictor. In this work we extended this solution to a multiple copies to improve the overall system performance. We added a replicator that implements a message copy controller algorithm. The ANN contact predictor was also enhanced. The complete solutions is described in the following and a detailed vision of the ANN contact predictor is explored in the next session. 4.1. Review of the single copy solution In the single copy solution for a DTN in UBTS, messages generated from the applications are forwarded to their destinations following a single journey. Only a single copy of a message exists in the network. When a node contacts another node, both need to decide if every message in their buffers must be forwarded or not. At that moment, two lists of costs to the destinations based on predicted journeys are built: one taking as reference the contacted node and another from the node that holds the message. The node presenting the lowest cost to the destination is chosen to forward the message. Each node has a predictor of journeys which should receive the last and current contact information and return a graph of predicted journeys. This predictor applies successively a next contact predictor in such a way to obtain a set of contacts for the journeys. The best journeys to the destinations are extracted from the graph of predicted journeys and they are selected based on a target criterion by using an algorithm to find least cost paths in this graph. The next contact predictor used in the journeys predictor was defined in [1]. It is based on ANNs and it explores correlations in past information. Using historical information, it can be trained to predict the next contacted node and the time of this contact. For that, it must be provided with (i) the reference (or current) node, (ii) the last node in contact to the reference node and (ii) the relative time of this last contacted node related to the beginning of a cycle. The routing process to determine journeys is dynamic because the journey can be changed according to the last contact and current contact information.

3.2. DTN Model and Problem Notation A DTN can be modelled as a Time Varying Graph (TVG) [13] noted G(t) = (V(t), E(t)), where t ∈ R, V(t) is the set of all nodes in the network and E(t) = {(u, v) : u, v ∈ V(t)} is the set of all edges connecting pairs of nodes at the time t. The path that a message can potentially follow to reach the destination is called journey. On a journey, a hop occurs when a message is transferred between a pair of nodes of the network. A hop s can be represented by (e, t) with e ∈ E(t). A journey consists of a crescent sequence of hops ordered on t. A journey j(u,v) from the node u to v can be shown as a ordered sequence of hops ((e0 , t0 ), (e1 , t1 ), ..., (en , tn )), with e0 = (u, ·) and en = (·, v), where n ∈ N is the sequence number of the hop sn = (en , tn ). Note that t0 ≤ t1 ≤ ... ≤ tn ∈ R are the hops instants, e0 = (u, w0 ) ∈ E(t0 ), e1 = (w0 , w1 ) ∈ E(t1 ), ..., en = (wn , v) ∈ E(tn ), are pairs of nodes connected at consecutive instants t0 , t1 , ... , tn forming the sequence of hops of the journey, starting in u, through w0 to wn and ending in v. 3

6), resulting the graph Gˆ nlast . The function minimizeDelay(·) receives a graph of predicted journeys and returns the vector of costs (n.costsT o, nlast .costsT o) from n or nlast to each destination, based on the minimum delay (lines 7-8). This function implements a algorithm to find least cost paths, following a Dijkstra approach. Finally, for each message of the buffer (line 9) the MessageForwarding(·) procedure (Algorithm 3 described later) is invoked: the decision of transference or replication must be taken and the message copy control is performed (line 10). The message buffer must be processed until its end or the occurrence of an event, such as the end of the connection, interrupting the messages processing in the buffer. In the following, we give details of the journey predictor, the function of minimum delay and the message copy controller. The improved contact predictor is described in the next section, as we consider it the core of the system.

4.2. The multiple copies solution As in the single copy solution, the multiple copies approach for the UBTS DTN uses the journey predictor and the ANN next contact predictor. However, we can clearly distinguish the roles of a forwarder and a replicator. When a node is contacted, the number of remaining message copies is used to indicate if it is possible to replicate or not the message. If it is not possible, the ANN router is used in its forwarder role; otherwise, if the target node is found in the graph of the predicted journeys from the contacted node, the message is copied to this node. In this case the router is used as replicator. Both forwarder and replicator processes share all contact prediction procedure and the journeys builder procedure. Note that applying a method to control the quantity of message copies, the consumption of network resources are reduced when related to a flooding process. When a node contacts other, it must to take a decision to forward or replicate the messages of its buffer for each different destination. At that moment, for each message, two graphs of potential journeys to the destinations are built: one taking as reference the contacted node (nlast ) and another from the node that holds the message (n). The best journey is extracted from those graphs according to a target criterion. In this work, the chosen criterion is the lowest delivery delay. A message copy control is defined in the forwarding process. The Algorithm 1 implements the message buffer processing. It is called every time that two nodes contacts each other and it is the start point of the routing process. The parameters n and nlast are objects representing the current node and the contacted node. The parameter t is the time of contact.

4.3. The Journey Predictor For Multi-Copy Routing The BuildPredictedJourneys procedure (Algorithm 2) has an iterative algorithm that applies successively a contact predictor in such a way to obtain a graph of possible journeys. This procedure is inspired on a depth-first search algorithm and it builds a set of predicted journeys ( Jˆ(n,·) ) from a reference node n to other nodes. The variable depth controls the search depth and timeS lice, the next time interval for searching. The maxT ime is a limit for tlast . The function ANN predictContact(·) is based on Neural Networks and it implements the next contact prediction as stated in the Equation 1: ((n, nˆ next ), tˆnext ) = PH ((nlast , n), tlast )

Algorithm 1: MessageBufferProcessing Input: n, nlast , t 1 directDelivery(n, nlast , t);

10

if n.messageQueue.size() == 0 then return; n.costsT o ← highestCosts(); nlast .costsT o ← highestCosts(); Gˆ n ← BuildPredictedJourneys(depth, n, nlast , t); Gˆ nlast ← BuildPredictedJourneys(depth, nlast , n, t); n.costsT o ← minimizeDelay(Gˆ n ); nlast .costsT o ← minimizeDelay(Gˆ nlast ); for each m f rom n.messageQueue do MessageForwarding(m, n, nlast );

11

return;

2 3 4 5 6 7 8 9

(1)

where nlast is the last contacted node by n, tlast is the instant of last contact, nˆ next is the next contact predicted of n and tˆnext is the predicted moment of this next contact. This algorithm performs the control of three situations in the forwarding process from the perspective of a node: • the searching for contact opportunities: this searching is implemented in the main loop of the algorithm. It aims to look for contact opportunities from the tlast until the maxT ime. After check a contact opportunity, the algorithm increments tlast with timeS lice to search for contacts opportunities taking as reference a new instant of the time; • the exploiting of a contact opportunity: after a predicted contact be validated by isValidOutput, the BuildPredictedJourneys is called recursively (line 7) with a new reference node and last contact information. The new predicted contact will be inserted into the graph (lines 9-10).

The first task executed is a call to the procedure directDelivery(·) to deliver messages addressed to the contacted node (line 1). Thereafter, if there are still messages in the buffer, the dynamic routing algorithm must be executed. The vectors of costs to the destinations from n (n.costsT o) and from nlast (nlast .costsT o) must to be initialized with the highest value allowed (lines 3-4). The procedure BuildPredictedJourneys(·) (Algorithm 2 described later) is responsible to build the graph with possible journeys to a destination. It is called twice: (i) considering n as the reference node (line 5), resulting the graph Gˆ n ; and (ii) considering nlast (line

• the invalid contact prediction: if the predicted next contact is evaluated as invalid by the isValidOutput, it is ignored and the searching continues. If the predicted next node is valid but it is a previously predicted node, the tlast is updated with the predicted time of the next contact (line 13) and the searching goes on. 4

Algorithm 2: BuildPredictedJourneys Input: depth, n, nlast , tlast ˆ E) ˆ Output: Gˆ = (V, ˆ then Vˆ ← Vˆ ∪ {n}; 1 if n < V 2 ; 3 4 5 6 7 8

9 10 11

12 13 14 15

Algorithm 3: MessageForwarding Input: m, n, nlast

5

if m.L > 1 then if m.destination ∈ nlast .listO f NodesContacted then newL ← d m.L e; 2 messageCopy(m, nlast , L − newL); m.L ← newL;

6

else

1 2 3

while tlast < (maxT ime − timeS lice) do (nnext , tnext ) ← ANN predictContact(n, nlast , tlast ); if isValidOutput(n, nlast , tlast , nnext , tnext ) then if nlast , nnext then if depth > 1 then (V 0 , E 0 ) ← BuildPredictedJourneys ((depth − 1), nnext , n, tnext ); if V 0 , ∅ then Vˆ ← Vˆ ∪ V 0 ; Eˆ ← Eˆ ∪ E 0 ;

4

7

8 9

if (nlast .costsT o[m.destination] < n.costsT o[m.destination]) then messageT rans f er(m, nlast ); return;

The message is transferred to the node nlast only if the cost of the journey from nlast is the minimum (lines 7-8). If the cost is the same and the replication is not possible, the message remains in the current node n.

else tlast ← tnext ; tlast ← tlast + timeS lice; ˆ E) ˆ ; return Gˆ = (V,

5. ANN Model For Contact Prediction The proposed routing strategy employs a journey predictor based on a contact predictor. The contact predictor implements the Equation 1 using an approach based on ANN.

4.4. Minimum Delay To obtain the journey of the lowest delay to the destination j(u,v)min t , a variation of the Dijkstra algorithm was implemented in the function minimizeDelay. It processes the graph Gˆ computed in the journey prediction and it returns the least cost path from u to v. Since the absolute time of the contact is used as weight of the edge, a simplification for determining j(u,v)min t can be done looking for the lowest weight for the edge connecting the destination in the edge set E, sparing the computation of a entire journey. Depending on the properties of the edges, other metrics can be used for selection of journeys, such as the adjusted time until the expiration of message TTL, least consumption of power and highest bandwidth. This work focuses on the minimal delivery delay and the highest messages delivery.

5.1. Artificial Neural Networks The ANNs are mathematical models attempting to simulate the biological neurons. Each neuron has one or more inputs receiving stimulus (as values) from other neurons or from an external input. Those input stimulus generate an output stimulus on the neuron which is connected to the neurons of the next layer of neurons or to an external output. The neurons which receive external inputs compose the input layer. The neurons of the output layer send stimulus to external outputs. Intermediate neurons between the input and output layers are organized in one or more hidden layers. To connect the output from other neurons, a neuron has weighted inputs (synapses) and the weighted sum of these inputs is applied to the activation function of the neuron. The activation function uses an activation threshold to adjust the output of the neuron. This computation happens into each neuron while the stimulus from the input until the output layer is forwarded. In a feedforward ANN, the output of a neuron is always connected to the input of a neuron of the next layer. An ANN must be trained to return feasible values. For supervised learning, an algorithm updates the weights of the neurons according the comparison of predicted outputs and respective desired outputs obtained from training examples. A cycle or epoch of training is performed each time in which a set of examples is presented to the ANN. The difference between the ANN output and the desired output is the training error. The validation error is obtained with examples commonly not used in the training, neither previously known [15]. A fast algorithm to perform learning in ANN is the Resilient-Propagation.

4.5. Control of Message Copies In order to control the maximum number of replicas of a message, we implemented the same solution as described in [14]. Each message has an attribute to control its allowed number of copies. The number of copies L for a determined message is divided by 2 in the current node when a node without a copy of this message is contacted and can receive it. The contacted node receives b L2 c copies of the message. When the number of copies is equal to 1, no more replication is allowed and the router goes to the forwarder mode. This procedures is shown in the Algorithm 3. Considering m a message, if its limit of copies m.L is sufficient to copy the message (line 1) and the destination node is in the list of contacted nodes of the node nlast (line 2), the message is copied (lines 3-5). Otherwise, the algorithm forwards without copy. 5

The selection of the data set must be done according the definition of the prediction function. Due difficulties to obtain certain information, it can be necessary to come back to the previous stage to redefine the prediction function and/or change the data set.

In order to build the ANN contact predictor we defined the following stages: A) Definition of the prediction function; B) Selection of the data set;

5.4. Generation of the training data The chosen data set needs to be preprocessed before used by the ANN. Usually, the stage of pre-processing is important for works adopting machine learning methods and can be decisive to decide about its use. The preprocessing must begin by analysing the available data through tests for frequency, data correlation, shifted correlation, classification, clustering, data significance and other ones. These analyses aim to classify the importance of each data, correlations and treatments on the dataset in order to design a model of ANN to get suitable outcomes. Conventional techniques using graphical visualization were not enough to find patterns or correlated information in the dataset. An useful tool in the data analysing domain is the software Weka1 [18] which helps to find evidences of correlations to be exploited. In our work, part of the data preprocessing is performed in the same way as in [19] allowing to find better correlations for the bus line. In this preprocessing, symmetry in the recorded contacts is created. If a lack in the record of the contact in one direction occurs, this contact is recorded with the same duration in the opposite direction. After that, in the same node, the contacts during a short time interval were only grouped in one contact with start and end time, respectively equal to the minimum and maximum time in the grouped contacts. Each record in contact history contains the following information: current node (or reference node), contacted node, start and end time of the contact, duration and bytes transferred. The time of the last contact and the last contacted node are included for each register, aiming to create shift correlations based on the time of the contacts and on the sequence of contacts in the reference node: the reference node, the last contacted node with the reference node and the next contact node with the reference node. The selected and organized information must be suitable to obtain a satisfactory ANN operation. When difficulties to obtain important correlated information are found, it is necessary to come back to the previous stage and redefine the data set or the prediction function.

C) Generation of the training data; D) Definition of the ANN structure; E) Training of the ANNs; F) Evaluation of the performance; G) Feedback to the previous stages. 5.2. Definition of the prediction function The inputs and outputs of the target prediction function were presented in the Equation 1. The objective of this prediction function is to obtain the next contact, more specifically the next node and the next instant of contact. We looked for behaviours and patterns that could be extracted from the scenario of UBTS to find a suitable model to represent the contacts opportunities and to provide information about the future topology of the network. We assume that the itineraries and timetables of the UBTS could bring patterns in the contact opportunities. To analyse the behaviours of the contacts in this context, we used registers of contacts from communication devices installed in buses of the UBTS. 5.3. Selection of the data set Historical data have to be used to train the ANN. A data set must be extracted from a specific scenario where the contact predictor will be applied, as we will show in the performance evaluation experiments. Repetitive contacts in a time cycle and a large time horizon are important requirements to design good predictors. In a first work [1], we created synthetic traces for the tests due to the difficult to find contact traces without corrupted data with the mentioned characteristics. The tests results have shown a slight advantage to ANN strategy related to MaxProb, since regular scenarios favour probabilistic routing strategies, such as in MaxProp proposal. In fact, for real UBTS applications, a lot of variables influences the occurrence of a contact which are suitable to be treated using an ANN based method. In this work we use real traces from DieselNet project [16] found in CRAWDAD [17], an archive of wireless communication data experiments. DieselNet traces are the unique data sets corresponding to a long time period (55 days), important for ANN training. We analysed also the possibility to use PSN scenarios, for instance from people carrying smartphones in routes during work days. Despite the similar characteristics of some PSN scenarios to the UBTS, the use of PSN data sets is not interesting in our work, due to its huge contact variation and weak regularity to be exploited for ANNs, in comparison with UBTS data.

5.5. Definition of the ANNs Structures The contact prediction function created in this work was modelled as a Multi Layer Perceptron (MLP) Feedforward Network (FN) [1]. The ANN structure was modified to create individual ANNs per output information and per node as presented in the Figure 1. In this version of the contact prediction function the computation is performed by two ANNs: (i) one for the 1 Waikato Environment for http://www.cs.waikato.ac.nz/ ml/weka/

6

Knowledge

Analysis.

predicted next node (ˆnnext ); and (ii) other one for the predicted next moment of contact (ˆnnext ). Time is coded with one neuron and nodes in a variable number of neurons, depending on training data. Since the ANN are also isolated by the reference node, to inform the notification of the value of current node n to the ANNs is not necessary. The first ANN have to receive tlast as input value and return nˆ next as presented in the Equation 2. The second ANN have to receive nlast and nˆ next and return tˆnext as defined in the Equation 3.    X  X (2) xm j ϕ1 (im ) ok = ϕ3  w jk ϕ2 

5.6. Training of the ANNs We have defined the use of the supervised learning method. The ANN training must be sufficient to model the patterns in the data and we must avoid: • underfitting the training data, conducting the ANN to find patterns where there are not patterns; • overfitting the training data, conducting the ANN to do not generalize the examples, getting outcomes exactly as the learned examples; • an excessive training time, more important when the application needs fast updates of the ANN weights. If the update of the ANN is done when the bus is in service, it is desirable getting a fast training;

m

j

where: - ok are the output values from the neurons in the output layer. They are a codification representing the value of the predicted next contact node (ˆnnext );

• a hight training error, showing great differences in the modelled ANN to the used examples;

- m, j and k index the neurons on each layer (from the input to the output layer). A bias neuron is expected on each layer (except the output layer);

• a hight validation error, showing great differences in the ANN and in the values used in the training to represent different situations than the examples used in the training;

- ϕ1 , ..., ϕ3 are the threshold activation functions for the neurons in each layer. In the input and hidden layers is used a hyperbolic tangent function and in the output layer is used a linear function;

Avoiding these situations in the training can be a hard or impossible job depending on the available examples. Usually, the training is controlled to treat these situations applying criteria to stop it when a suitable condition is reached. An objective and simple criterion to stop training is the maximum number of training cycles or epochs, but it disregards the training performance. Another possible criterion is to obtain a low training error, but it may be difficult to define a suitable value because it depends on the training data and ANN structure. The separation of examples for training, validation and tests is a relevant approach. The examples for validation are not be used as examples for training. In this case the evaluation of the validation can be used as criterion to stop the training. The quantity of learning is a interesting criterion to be also applied for trainings. It is the quantity of improvement on the training error compared to the last training error. If this quantity not decrease after a certain number of cycles the training can be stopped. The training of the ANN in this work is stopped by three criteria:

- w jk and xm j are the weights for the neurons inputs in output layer and hidden layer respectively. The historical data in the time interval [τ1 , τ2 ] are used in the training to define the values of these weights; - im is the codification of the last instant of contact tlast ;    X  X   o = ϕ3  w j ϕ2  xm j ϕ1 (im ) (3) j

m

where: - o is the output value from the neuron in the output layer. It is a codification of the value of the predicted instant of the next contact (tˆnext ); - w j and xm j are the weights for the neurons inputs in output layer and hidden layer respectively; - im are the codifications of the predicted next contact node nlast provided from ok in the Equation 2 and the last instant of contact tlast .

1. when the training error does not vary more than 10−4 into 100 cycles of training;

The precise number of neurons on the input layer is defined by the codification applied for the input data. The same happens for the output layer. We designed one hidden layer for the ANN topology in the contact predictor. One hidden layer is commonly enough to solve the linearly separable problems and some non-linearly separable. More than one hidden layers are usually used to solve non-linearly separable problems. It is important to increase the number of the hidden layers carefully because the propagated error in the training process has little influence to adjust the training error as each layer is more distant from the output layer.

2. when the training error is lower than 10−3 ; 3. when the training reaches 700 training cycles. This value is obtained from the observation of several trainings. The criteria 1 and 2 are used to limit the duration of the training and avoid the overfitting. The criterion 3 aims to limit the training in the case of a slow learning or instabilities during the training. In addition, the training have to reset until 6 times when the training error is greater than 15% or 25% (for the next 7

Figure 1: ANNs topology for the contact prediction function of this work.

The results of all tests carried out can be used to adjust the ANN. The analyses of these adjusts lead to come back to the previous stages.

contact node and next moment of contact respectively) after 700 training cycles. We observed that the convergence occurs in approximately ninety nine percent of trainings. For the defined conditions to stop the training, the convergence time varies from 5 to 25 seconds for each ANN in each node, using an Intel Core i5 processor and for a number of examples, upto 73. The examples for a test must not be present in the training and validation sets. If some example for the test is also in the training or validation sets, the learning about this example will interfere in the suitable result of the ANN. In the UBTS, the training could be executed in a centralized computer, usually located in the garage or on each node when it is not treating contacts. When a movement cycle ends, a new training can be executed for each node with recent contacts data. Finishing the training, we can perform the tests, evaluate the results and apply the needed adjusts.

5.8. Feedback to the previous stages We have found a complex variation of combinations in contacts data, represented by the quintuple: (i) current node, (ii) last contact node, (iii) last contact time, (iv) next contact node and (v) next contact time. We analyse it by using the software Weka [18]. To reduce the complexity, we have limited data combinations treated in the ANN, isolating the contact information about other nodes different than the current node. In this sense, we create one ANN for each node instead a single ANN. In this way, the ANN performs predictions using less information, however, getting less interference. We have simplified also the ANN structure detaching each output and creating independent ANNs for each one. Furthermore, from the evaluation of the tests we decide do not use the information of the node of the last contact. This information was not providing an useful relationship with the next contacted node considering the a reference node. However, we use the instant of the last contact. The exact number of neurons in the input and output layers are determined by the codification applied to the input and output data. We consider one neuron to represent time information, as a continuous value, and the node identification is considered to be variable depending on the training data. To find the number of layers and neurons in the hidden layer we leave the pruning method and we apply a computation using the number of possible combinations from the values of the training set in the input layer. The tests with this number of neurons show satisfactory results using only one hidden layer.

5.7. Evaluation of the performance For this work, as the usual, the initial weights of the ANN are defined randomly according to an uniform distribution. The training process can achieve different sets of weights depending on each training. For this reason, the tests were repeated five times and evaluated by the averaged outcome. The tests are performed in two levels: (i) in contact prediction; and (ii) in journey prediction. For the contact prediction the tests are based on the hit rate, comparing the desirable values obtained from the training with the values predicted by ANN. The tests for the journey prediction are evaluated from the capacity to predict journeys when performed in an unlimited epidemic routing or by the capacity to improve the message delivery or delivery delay. 8

In this way, the ANNs of this proposal are defined dynamically according to the training data before the training process. We have used the Resilient Propagation algorithm for supervised training in the ANNs. This algorithm decreases the training time when compared to other algorithms. We define criteria to stop the training for improving the learning. A well-known criterion is to stop the training when the training error is not decreased after a number of cycles.

6.2. Updating process: knowledge learning The updating process rebuilds the ANN used in the contact predictor. It uses the preprocessing routines and training methods already discussed in section 5. The Figure 3 illustrates details of this process.

6. Integration of Contact and Journey Predictors in the Multi Copy Strategy In this section we discuss the integration of the contact and journey predictors and present a practical overview of the multi copy strategy system. We can divide the system in two processes: (i) the operational process to forward the messages; and (ii) the updating process of the contact predictor neural network. Each node in the DTN execute both processes. In a implementation view, both processes can be executed in parallel although contact handling must be prioritized to deal with message copies and contact register.

Figure 3: Updating process.

The preprocessing retrieves raw data of contacts from the persistent storage to perform computations, transformations and filtering, generating training examples. In the dynamic creation of the ANNs the training examples are retrieved to get information to redefine the ANNs. Using the new ANN definitions, the training is performed with these training examples. Two approaches can be used to trigger the updating signalling. It can be started in the end of the day (end of the cycle), when nodes (buses) go to the parking, or a more dynamic approach can be used during the movement of the bus, triggering the updating when significant changes are detected in the historical database. The updating process have not priority to execute and can be suspended by other process. The new ANNs or trainings (weights) will be available to use by the operational process after the end of the entire updating process.

6.1. Operational Process: contact handling In the operational process the module MessagesBufferHandler is called at every new node contact. It access the message buffer to indicate the messages to be delivered and the destinations to be reached. It invokes the contact predictor to compute a set of journeys to the destination and it indicates to copy or not the message in the contacted node. New contacts are recorded in an history database. This database is used in the updating process of the neural networks for the contact predictor. The Figure 2 shows some aspects of the integration of contact predictor and journey predictor to deal with a new contact found by a node. In order to compute the possible journeys to a destination, the journey predictor invokes the contact predictor many time as necessary to construct the graph of predicted journeys. The contact predictor uses a trained ANN.

7. Multi-Copy ANN Strategy Evaluation We carried out several experiments to test the proposed solution. In this section we describe the most relevant experiments and results. We show that our solution outperforms some established routing strategies of the literature. 7.1. The experiments To evaluate the performance of our approach we have carried out tests using real contacts data from DieselNet project [16]. DieselNet investigates the communication between buses equipped with a wireless radio device in a public transportation network. We compare this proposal with routing strategies which could be applied in the scenario of this work and that require the same available information. We choose MaxProp [7] because it presents better performance than Spray&Wait[14] and

Figure 2: Operational Process.

9

PROPHET [20]. In order to evaluate limits of performance, we make comparisons with the Epidemic [4] strategy without limitations, considered as the optimum case, and the Direct Delivery (wait/without transfers) strategy considered as the lower limit of performance. For the tests we implement the MaxProp strategy with the same control of the number of copies used in our strategy. We take into account in experiments for both MaxProp and ANN strategies, the occurrence of a previous information exchange about 54 days of contacts, performed by the nodes. We consider that the buses can swap extensive information in the garage or in the terminals. Furthermore, we focus on the knowledge about the contacts history, for testing the different strategies. We develop an event based simulator to rebuild the contacts over the time. It allows to compute the message transfer and message delivery over all implemented routing strategies for evaluations. This simulator records also the number of delivered messages, messages in buffer, comparisons to the optimum journeys and decisions, execution time and other informations for posterior analysis. All ANN implementations were programmed using the Encog framework [21]. We evaluate the proposal using different numbers of message copies without resources limitation. We investigate the influence of the contact duration and of the different sizes of the buffer. Information from the timetable is not used due the buses do not follow it to the letter; small variations of speed and dwell time in stop points result different contacts opportunities.

a report about the number of generated messages, delivered messages, messages in buffers, execution time, forwarding decisions compared to the unlimited Epidemic, statistics among others informations. 7.3. Parameters and Methodology Historical data from 33 buses conducted by 10 routes in 32 bus lines through 55 days from 7 am to 10 am was used for the tests. We choose nine of these days to be tested. The historical data of the tested day was not used in the ANN training or validation, as previously mentioned, neither in the probability matrix of the MaxProp. The results of the tests were obtained with Epidemic strategy, Direct Delivery, MaxProp and ANN, for every day. For each test, each node generates one message to each other node at the same time in intervals of 15 minutes (900 seconds). The whole simulation runs in the time interval from 7 am to 10 am (duration of 3 hours) in order to ensure that all the buses in the history become active. In this way, each of 32 nodes generates 31 messages, one for each other one, 12 times in the whole simulation, resulting 11,904 messages generated by the application. The number of copies of the message in the network is defined from one to four, except for the unlimited epidemic with unlimited message copies and the direct delivery without message copy. For some evaluations it is not desirable to process the duration of the contacts and the messages buffer size. The effect of the duration of the contact is evaluated and based on the real contact duration in DieselNet. Results for different sizes of the messages buffers are also evaluated in these simulations. For a fair comparison, the building journey algorithm is configured with depth of 4 and time slice of 1137 seconds. Furthermore, MaxProp is configured with 33 entries as maximum size of the probability matrix and alpha equals to 1, representing the better amount of delivered messages during the tests. The experiments allow to evaluate the quantity of delivered messages, the delivery rate, the delivery delay, the number of generated messages and the proposed metric to determine cost in terms of messages on network per delivered messages. The Epidemic with unlimited resources (UE), including unlimited quantity of message copies, and Direct Delivery without message copy (DD) are used as identifiers of limits for comparisons. For the strategy based on ANN, the results are obtained from five consecutive trainings. The strategy of the MaxProp is compared with the minimum and maximum values from the proposed ANN strategy.

7.2. Simulation Arrangements This simulator has a file containing the following contacts information: (i) current node; (ii) contacted node; (iii) starting time of the contact on the day; and (iv) contact duration. It is an event-based simulator, in which the contact information is provided in time ordering. The following parameters are provided to the simulator: (i) the maximum number of network nodes, (ii) the absolute time instant that simulation starts, (iii) the final time that simulation ends, (iv) the depth for predicted contacts and (v) the size of the time slice in seconds used by the algorithm for building journeys, (vi) the maximum message life time, (vii) the maximum allowed number of message copies in the network, (viii) the size of the messages buffer on the nodes in bytes and (ix) the default bandwidth. The simulator was validated through values that generates known outcomes for known inputs. The validation was done configuring the same scenario and comparing the results from the ONE2 simulator [22]. The simulator command line provides parameters to define the file with contacts information to be tested, the day to be tested and the strategy to be executed: Epidemic, Direct Delivery, MaxProp and ANN. The outcome of the simulator shows

7.4. Number of Delivered Messages We carried out an experiment to verify the amount of delivered messages, the delivery rate and the total of messages in the network for each routing strategy. Figure 4 shows the quantity of delivered messages for all tested strategies. The DD and UE strategies have respectively the worst and the best results. The minimum value for the ANN strategy without message copies is slightly greater than MaxProp. The maximum value of delivered messages by the ANN

2 Opportunistic Network Environment simulator (ONE). Accessed in http://www.netlab.tkk.fi/tutkimus/dtn/theone/

10

strategy with 1 to 4 copies is always greater than that reached by MaxProp.

more messages than the other strategies and DD is the inferior limit.

Figure 4: Number of delivered messages varying the limits of message copies.

Figure 5: Number of generated and replicated messages in the network.

The percentage difference of delivered messages from the ANN min to MaxProp was 1.57% without message copies, 8.90%, 13.28%, 16.93% and 18,90% for 1, 2, 3 and 4 copies respectively. By increasing the number of copies, these results are ever more near of those obtained from the ANN max, 5.10%, 11.27%, 15.10%, 18.03% and 19,75%.

The ANN strategy without message copies replicates 0.14% less messages than MaxProp. With message copies, the ANN strategy replicates few messages more than MaxProp: 2.71% for 1 copy, 4.57% for 2 copies, 5.38% for 3 copies and 6.18% for 4 copies. Since the method for replication on both strategies is the same, that happens due to the costs computed by the strategies for the choices of transfer or copy messages.

7.5. Delivery Rate 7.7. Cost of Messages in the Network per Delivered Message

The delivery rate is obtained from the ratio between delivered messages and the generated messages (without considering replicas). In the Table 1 the delivery rate for all strategies is shown according to the number of message copies. We note that not all messages generated by the application (11,904 messages) are delivered in the optimum case (UE), resulting 71.71%. Considering the limit of 4 copies per message, we observe also that the difference from ANN to DD strategy is 29.89% and from MaxProp is 20.25%. In this case, the ANN has delivery rate 9,4% higher than Maxprop. The result for the same evaluation without copy is 1.07% higher than Maxprop.

We carried out a fair and simple comparison of network load for each routing strategy. In this sense, we computed the cost in terms of messages in the network for each delivered message. This approach permits clearly understanding if a routing strategy is more efficient than other one with regard to network load. The Figure 6 shows a graphic of delivery cost, according to the quantity of message copies permitted for each message. Just for comparison DD is plotted without message copies (31,54 copies per delivered message) and UE is plotted with unlimited message copies (40,88 copies per delivered message). UE and DD strategies presented the worst results with a slight advantage to DD. The MaxProp strategy is outperformed by the minimal and maximum values from the ANN strategy.

Table 1: Delivery rate considering different message copies

Copies/ Strategy ANN max ANN min MaxProp DD UE

0

1

2

3

4



33.77 32.64 32.13 28.54 -

46.95 45.95 42.20 -

52.64 51.81 45.73 -

56.87 56.34 48.19 -

58.43 58.01 48.79 -

71.71

The ANN strategy overcomes MaxProp in delivery rate evaluation for all number of allowed copies of the message evaluated. 7.6. Number of Messages in the Network

Figure 6: Delivery cost: messages generated per message delivered.

Another evaluated metric is the total number of generated and replicated messages on the network. Figure 5 presents this metric. We note the superior limit, UE, generates three times

As shown in the Figure 4, the proposed strategy delivers 19.33% more messages than MaxProp using 4 message copies 11

and it increases the number of replicated messages in 6.18% comparing to MaxProp. Even so, the cost of messages in the network per delivered messages shows in the Figure 6 decreases 1,12%, from 26,7 to 26,4 messages in the network per message delivered. In other hand, MaxProp increases this cost in 7,35%, from 27,7 to 29,9. The obtained results points the superiority of the proposed method for this scenario.

same taken by UE, otherwise it is a wrong decision. A wrong decision can be classified as wrong with message transfer or wrong without message transfer. The average results shown that the ANN has taken 13.75% less decisions than the MaxProp, as presented in Figure 8. We observe that ANN takes proportionally a greater number of right decisions and lesser number of wrong decisions than the MaxProp. The ANN strategy takes also a greater number of wrong decisions without messages transfer.

7.8. Delivery Delay The evaluation of the delivery delay was performed by comparing the number of the delivered messages according to delay ranges of 10 minutes. A greater amount of delivered messages in the early ranges means that the evaluated strategy deliver messages faster. The cumulative distribution function (CDF) of delivered messages with respect to the delivery delay is shown in the Figure 7. We observe, as expected, UE and DD strategies are the superior and inferior limits. UE is performed with unlimited number of copies and DD without replication. The inferior (without replication) and the superior (with 4 message copies) evaluation of delivery delay are represented by two lines for the ANN strategy and also for the MaxProp strategy (with and without message copy).

Figure 8: Forward decisions average in five new training.

In this way, the ANN strategy delivers a greater number of messages and takes lesser forwarding decisions. This is due to a wrong forwarding decision which keeps the message in the network and consequently it can be submitted to others decisions. Therefore, the number of decisions is increased. The proposed ANN strategy takes more wrong decisions without the message to be transferred to the contact node. We can say that it takes more conservative decisions. These ones are considered as a more attractive option than a transfer to a node with uncertain chances to deliver the message to the destination. We conclude that wrong transferences are very harmful to the routing performance in this context of contacts. In this way, losing a transfer opportunity and remaining in the same node is normally better than a wrong transference of a message.

Figure 7: CDF of message delivery in delay ranges.

Comparing the ANN and MaxProp strategies without replication (lower bound), the results show that the proposed strategy slightly overcomes MaxProp. In the earliest delay ranges the ANN strategy always deliver the greatest number of messages, up to reaching 50 minutes delay. With 4 copies of the message (upper bound) the ANN strategy is always better than MaxProp, delivering more messages with less delay. This experimentation supports the claim that the proposed approach reaches its objectives of optimization criteria, minimizing the delivery delay.

7.10. Messages Buffer All the previous experiments were carried out without limitations in order to isolate factors which cause interferences in the analyses of the routing strategies. However, it is also important to consider the effects of the conditions of a real operation on the evaluated strategies. In this way, more tests were performed with different buffer sizes and real duration of the contacts. These factors change the network performance because:

7.9. Forward Decisions We evaluated the quantity of right and wrong decisions taken by the strategies in each forwarding decision. To avoid interference of other conditions, we focus on the analyses of the forwarding without replication. When a contact occurs, we compare the best journey obtained from the unlimited epidemic (UE) with the journey in the ANN strategy. We classify a decision as right if it is the

• if the buffer is full, messages must be eliminated. Messages can be dropped if they are older, incoming or appointed by other criterion; • if the contact duration is not sufficient to transfer all messages. In this case, some messages will not be transferred, 12

copied or delivered, interfering in the routing strategy performance. An evaluation is performed varying the maximum size allowed for the buffer and using the limit of 4 copies. The Figure 9 shows the behaviour of the message delivery with buffer sizes of 100, 500, 1000, 2650 and 5300 KBytes. The size of each message is 1 KByte, for all experiments. The buffer is limited in the experiments with Direct Delivery and Unlimited Epidemic. Other unlimited conditions are kept in the Unlimited Epidemic.

Figure 10: Message delivery with real contact duration.

This result points to the superiority of the proposed strategy in a real scenario.

8. Conclusion In this paper we present a multi-copy strategy for routing messages in DTN built on the top of an Urban Bus Transportation System (UBTS). This approach uses a contact predictor based on neural network and a journey predictor. Its evaluation uses a simulation with real contact events from a history. In the UBTS context, the proposed multi-copy routing strategy outperforms the MaxProp strategy in terms of delivered messages, delivery rate, delivery delay, network load and cost of network messages per delivered message. When considering limitations like contacts duration and buffer size the proposed strategy also overcome the MaxProp and even the Epidemic strategy when some determined limits are considered. The results indicate potential advantages of the ANN strategy over other ones in a real scenario. The ANN routing strategy can take advantage from the patterns in the buses lines with quasi-opportunistic contacts. The use of a multi-copy strategy improves previous results without copy. A method to design ANNs for prediction was also described. The main guidelines provided from that method were used to support the design of the ANN architecture and the implementation of the automatic creation and training of the ANNs. For the proposed ANN routing strategy with 4 copies of the message, the cost of messages in the network per message delivered was lower than those obtained without replication. The results obtained for one copy of the message shown the most significant increase in message delivery and it reached the lowest cost for the experimented scenario. These results show limits of performance to be exploited. When the number of copies is increased, the worst (min) and the best (max) results from the ANN strategy were even closer. This condition is important to avoid a process for looking for trainings providing better results. In the next step we aim to implement the strategy in a router as a module (Bundle Router) for the DTN2 implementation of

Figure 9: Message delivery in different sizes of messages buffer.

For buffer sizes up to 1600 KBytes, the proposed strategy is better than all other evaluated strategies to deliver messages. After that, the Unlimited Epidemic strategy delivers more messages. In this way, we verify that the Unlimited Epidemic cannot transfer or copy all messages in the buffer. Because the greedy strategy of Epidemic and the limitation of the buffers, some messages are not transferred or copied, missing a contact opportunity that could be used to reach the message destination. A superior limit for the messages buffer size is also observed for each evaluated strategy. We note that the MaxProp needs a greater buffer size than the proposed strategy. We deduce a better performance of message delivery with less memory to store messages is possible by using the ANN strategy. 7.11. Contact Duration Another experiment was conducted to evaluate the strategies behaviour taking into account the real duration of the contacts from the DieselNet project. The limit of 4 message copies is kept. The buffer size is considered as unlimited to avoid interferences of other conditions. The bandwidth is set to allow a maximum transfer of 1 Mbps in each direction simultaneously. In this condition we can evaluate that the limited contact duration or limited bandwidth imply in a lesser quantity of messages delivered. In this evaluation we observe that the proposed strategy overcomes all evaluated strategies, including the Unlimited Epidemic in terms of limited contact duration, as shown in the Figure 10. We note also that in the Epidemic strategy many messages are not transferred or copied, as it happens in the reality. This is due to the excess of bandwidth which is necessary to transmit all messages from buffer to the contacted node. 13

the Internet Research Task Force (IRTF) and to apply it in a real routing experimentation.

[14] T. Spyropoulos, K. Psounis, C. S. Raghavendra, Spray and wait: An efficient routing scheme for intermittently connected mobile networks, in: Proceedings of the 2005 ACM SIGCOMM Workshop on Delay-tolerant Networking, WDTN ’05, ACM, New York, NY, USA, 2005, pp. 252– 259. doi:10.1145/1080139.1080143. URL http://doi.acm.org/10.1145/1080139.1080143 [15] S. Haykin, Neural Networks: A Comprehensive Foundation, Macmillan, NY, 1994. [16] J. Burgess, B. N. Levine, A. Balasubramanian, A. Venkataramani, Y. Zhou, B. Croft, N. Banerjee, M. Corner, D. Towsley, CRAWDAD data set umass/diesel (v. 2008-10-21), Downloaded from http://crawdad.org/umass/diesel/ (Oct. 2008). [17] D. Kotz, T. Henderson, I. Abyzov, CRAWDAD a community resource for archiving wireless data at dartmouth (2014). URL http://crawdad.org [18] M. Hall, E. Frank, G. Holmes, B. Pfahringer, P. Reutemann, I. H. Witten, The WEKA Data Mining Software: An Update, SIGKDD Explor. Newsl. 11 (1) (2009) 10–18. doi:10.1145/1656274.1656278. URL http://doi.acm.org/10.1145/1656274.1656278 [19] X. Zhang, J. Kurose, B. N. Levine, D. Towsley, H. Zhang, Study of a bus-based disruption-tolerant network: Mobility modeling and impact on routing, in: Proceedings of the 13th Annual ACM International Conference on Mobile Computing and Networking, MobiCom ’07, ACM, New York, NY, USA, 2007, pp. 195–206. doi:10.1145/1287853.1287876. URL http://doi.acm.org/10.1145/1287853.1287876 [20] A. Lindgren, A. Doria, O. Schel´en, Probabilistic routing in intermittently connected networks, in: SIGMOBILE Mobile Computing and Communication Review, Vol. 7, ACM, New York, NY, USA, 2003, pp. 19–20. doi:10.1145/961268.961272. URL http://doi.acm.org/10.1145/961268.961272 [21] R. I. Heaton, contributors, Encog Machine Learning Framework (2013). URL http://www.heatonresearch.com/encog [22] A. Ker¨anen, J. Ott, T. K¨arkk¨ainen, The one simulator for dtn protocol evaluation, in: Proceedings of the 2Nd International Conference on Simulation Tools and Techniques, Simutools ’09, ICST (Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering), ICST, Brussels, Belgium, Belgium, 2009, pp. 55:1–55:10. doi:10.4108/ICST.SIMUTOOLS2009.5674. URL http://dx.doi.org/10.4108/ICST.SIMUTOOLS2009.5674

Acknowledgements This research is sponsored in part by the public foundation Coordination for the Improvement of Higher Education Personnel (CAPES). References [1] F. Segundo, J.-M. Farines, E. Silveira e Silva, Quasi-opportunistic contact prediction in delay/disruption tolerant network, in: Global Information Infrastructure Symposium, 2013, 2013, pp. 1–6. doi:10.1109/GIIS.2013.6684382. [2] F. Segundo, E. Silveira e Silva, J.-M. Farines, Predicting journeys for dtn routing in a public transportation system, in: Wireless and Mobile Computing, Networking and Communications (WiMob), 2014 IEEE 10th International Conference on, 2014, pp. 494–499. doi:10.1109/WiMOB.2014.6962216. [3] K. Fall, A delay-tolerant network architecture for challenged internets, in: Proceedings of the 2003 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications, SIGCOMM ’03, ACM, New York, NY, USA, 2003, pp. 27–34. doi:10.1145/863955.863960. URL http://doi.acm.org/10.1145/863955.863960 [4] A. Vahdat, D. Becker, Epidemic Routing for Partially-Connected Ad Hoc Networks, Tech. rep., Duke University (Apr. 2000). URL http://issg.cs.duke.edu/epidemic/epidemic.pdf [5] T. Spyropoulos, K. Psounis, C. S. Raghavendra, Spray and focus: Efficient mobility-assisted routing for heterogeneous and correlated mobility, in: Proceedings of the Fifth IEEE International Conference on Pervasive Computing and Communications Workshops, PERCOMW ’07, IEEE Computer Society, Washington, DC, USA, 2007, pp. 79–85. doi:10.1109/PERCOMW.2007.108. URL http://dx.doi.org/10.1109/PERCOMW.2007.108 [6] Y. Cao, H. Cruickshank, Z. Sun, Asymmetric spray based routing for delay tolerant networks, in: Vehicular Technology Conference (VTC Spring), 2011 IEEE 73rd, 2011, pp. 1–5. doi:10.1109/VETECS.2011.5956511. [7] J. Burgess, B. Gallagher, D. Jensen, B. Levine, Maxprop: Routing for vehicle-based disruption-tolerant networks, in: INFOCOM 2006. 25th IEEE International Conference on Computer Communications. Proceedings, 2006, pp. 1–11. doi:10.1109/INFOCOM.2006.228. [8] C. Liu, J. Wu, Practical routing in a cyclic mobispace, IEEE/ACM Trans. Netw. 19 (2) (2011) 369–382. doi:10.1109/TNET.2010.2079944. URL http://dx.doi.org/10.1109/TNET.2010.2079944 [9] M. Doering, T. P¨ogel, L. Wolf, Dtn routing in urban public transport systems, in: Proceedings of the 5th ACM Workshop on Challenged Networks, CHANTS ’10, ACM, New York, NY, USA, 2010, pp. 55–62. doi:10.1145/1859934.1859947. URL http://doi.acm.org/10.1145/1859934.1859947 [10] S. Ahmed, S. Kanhere, A bayesian routing framework for delay tolerant networks, in: Wireless Communications and Networking Conference (WCNC), 2010 IEEE, 2010, pp. 1–6. doi:10.1109/WCNC.2010.5506368. [11] H. Kaaniche, F. Kamoun, Mobility prediction in wireless ad hoc networks using neural networks, Journal of Telecommunications 2 (2010) 95–101. URL http://dblp.uni-trier.de/db/journals/corr/ corr1004.html #abs-1004-4610 [12] N. P. Kotilainen, J. Kurhinen, A genetic-neural approach for mobility assisted routing in a mobile encounter, in: The 5th International Conference on Information Technology and Applications (ICITA), 2008, pp. 206– 210. [13] R. Ramanathan, P. Basu, R. Krishnan, Towards a formalism for routing in challenged networks, in: Proceedings of the Second ACM Workshop on Challenged Networks, CHANTS ’07, ACM, New York, NY, USA, 2007, pp. 3–10. doi:10.1145/1287791.1287794. URL http://doi.acm.org/10.1145/1287791.1287794

14