Hello, Below is some code from the prophet router that we're having an issue with.
bool EProphetRoutingExtension::ForwardingStrategy::neighborDPIsGreater(const dtn::data::EID& neighbor, const dtn::data::EID& destination) const { bool ret = false; const DeliveryPredictabilityMap& dp_map = _EProphet_router->_deliveryPredictabilityMap;
DeliveryPredictabilityMap::const_iterator neighborIT = dp_map.find(neighbor); DeliveryPredictabilityMap::const_iterator destinationIT = dp_map.find(destination);
if(destinationIT == dp_map.end()) { ret = true; } else { float neighbor_dp = _EProphet_router->_p_first_threshold; if(neighborIT != dp_map.end()) { neighbor_dp = neighborIT->second; } ret = (neighbor_dp > destinationIT->second); } return ret; }
From what we can see, it looks like we're comparing the probability of
delivering to the neighbor to the probability of delivering to the destination. Shouldn't it be that we're comparing probability of the neighbor delivering to the destination and the current node's probability of delivering to the destination?
More explicitly, let P(A,B) be the node A's DPI value for destination node B. Suppose node A has a bundle addressed to node C, and that it encounters node B. The comparison I think we want to make is: P(B,C) > P(A,C)? Then fwd the bundle to B.
The comparison the code seems to be making is: P(A,B) > P(A,C)?
Besides that, if node A encounters node C, it will make the comparison P(A,C) > P(A,C)? Which will always be false. I guess the neighbor router can take over in that case, though.
Thanks, Carson