/* * @(#)DeliveryCentralityReport.java * * Copyright 2010 by University of Pittsburgh, released under GPLv3. * */ package report; import java.util.*; import core.*; /** *
Computes the Delivery Centrality of each node in the simulation where * Delivery Centrality is defined as an integer counting the number of times a * given node lies on the shortest path between two other communicating nodes. * For each delivered message (on its first delivery), a count is incremented * for each nodes listed in the message's list of hops.
* *This report is really intended to be used with Epidemic Routing since it * (usually) finds the shortest path from a sender to a destination.
* *The report generated list each node's name on its own line followed by the * count of how many times it acted as a relay on the path of a delivered * message.
* *This report follows the idea of Betweenness Centrality mentioned in * BUBBLE Rap: Social-based Forwarding in Delay Tolerant Networks by * Pan Hui et al. (MobiHoc '08).
* * * @author PJ Dillon, University of Pittsburgh * */ public class DeliveryCentralityReport extends Report implements MessageListener { /** Count of times each node lies on shortest path of a delivered message */ protected Map