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
Hi.
I think you are right. This code looks a little weird. Since this code is not written by myself, I need further investigation to make a statement, but my first thoughts on that are the same as yours.
If I get some spare time, I will try to evaluate this code and fix that if necessary.
Thank you for that hint!
Kind regards, Johannes
-------- Weitergeleitete Nachricht -------- Von: Carson Dunbar cdunbar@bucknell.edu An: Johannes Morgenroth morgenro@ibr.cs.tu-bs.de Kopie: ibr-dtn ibr-dtn@ibr.cs.tu-bs.de Betreff: PRoPHET on IBR-DTN Datum: Wed, 5 Dec 2012 16:10:44 -0500
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
participants (2)
-
Carson Dunbar
-
Johannes Morgenroth