[ndnSIM] Shortest paths

Klaus Schneider klaus at cs.arizona.edu
Thu Sep 6 13:55:31 PDT 2018


If you use the AnnotatedTopologyReader, you can just set the metric to 
the same value as the delay.

Here's an example from http://ndnsim.net/current/examples.html

> 
> # link section defines point-to-point links between nodes and characteristics of these links
> link
> 
> # Each line should be in the following format (only first two are required, the rest can be omitted)
> # srcNode   dstNode     bandwidth   metric  delay   queue
> # bandwidth: link bandwidth
> # metric: routing metric
> # delay:  link delay
> # queue:  MaxPackets for transmission queue on the link (both directions)
> Node0       Node1       1Mbps       1       10ms    10
> Node0       Node3       1Mbps       1       10ms    10


Moreover, there's the GetAttribute() function: 
https://www.nsnam.org/docs/manual/html/attributes.html


Best regards,
Klaus



On 06/09/18 11:02, Chavoosh Ghasemi wrote:
> Is there any way to get the delay of links?
> It seems you cannot get it through PointToPointChannel as GetDelay 
> method is protected.
> 
> 
> P.S. The following code does not work
>      auto t = 
> dynamic_cast<ns3::PointToPointChannel*>(&(*(transport->GetNetDevice()->GetChannel())));
>      t->GetDelay();
> 
> 
> 
> On Wed, Sep 5, 2018 at 2:00 PM Alex Afanasyev <aa at cs.fiu.edu 
> <mailto:aa at cs.fiu.edu>> wrote:
> 
>     It calculates based on the Face "metric", which by default set to 1
>     for each Face (= incidentally, resulting in hop count).  If you
>     update Face metric with latency related metric represented as an
>     integert (unfortunately, we don't have anything that is already
>     available; patches welcome), you will get latency-based calculation
>     of routes.
> 
>     --
>     Alex
> 
>>     On Sep 5, 2018, at 4:47 PM, chavoosh ghasemi
>>     <chavoosh.ghasemi.off at gmail.com
>>     <mailto:chavoosh.ghasemi.off at gmail.com>> wrote:
>>
>>     Hi,
>>
>>     Apparently, ndnGlobalRoutingHelper::CalculateRoutes() uses *hop
>>     count* as a metric to compute the shortest paths (correct me if I
>>     am wrong).
>>     If that's the case, do we have any module (e.g. a helper) in
>>     ndnSIM that calculates shortest paths based on link latency?
>>
>>     Thanks,
>>     /- Chavoosh/
>>
>>     -- 
>>     /*Chavoosh Ghasemi*/
>>
>>     Ph.D. Student in Computer Networking
>>     University of Arizona - Computer Science Department*/
>>     /*
>>     */Address: Gould-Simpson 721B, /**/1040 E. 4th Street,
>>     /*
>>     */                 Tucson, AZ 85721
>>
>>     "The /quieter/ you become, the /more you can hear"//*
>>     _______________________________________________
>>     ndnSIM mailing list
>>     ndnSIM at lists.cs.ucla.edu <mailto:ndnSIM at lists.cs.ucla.edu>
>>     http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
> 
>     ______________
>     Alex Afanasyev
>     Assistant Professor, SCIS, Florida International University
>     11200 SW 8th Street, PG6 Room 140D, Miami, FL 33199
>     phone: +1.305.348.4960 (office); email: aa at cs.fiu.edu
>     <mailto:aa at cs.fiu.edu>
>     web: https://users.cs.fiu.edu/~afanasyev/
>     <https://users.cs.fiu.edu/%7Eafanasyev/>
> 
> 
> 
> 
> -- 
> /*Chavoosh Ghasemi*/
> 
> Ph.D. Student in Computer Networking
> University of Arizona - Computer Science Department*/
> /*
> */Address: Gould-Simpson 718, /**/1040 E. 4th Street,
> /*
> */                 Tucson, AZ 85721
> 
> "The /quieter/ you become, the /more you can hear"//*
> 
> 
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
> 


More information about the ndnSIM mailing list