WILLINGNESS in OLSR

82 views
Skip to first unread message

Adam Kraśniewski

unread,
Oct 20, 2014, 10:02:40 AM10/20/14
to omn...@googlegroups.com
 Hello;

I would like to run simulation using OLSR protocol, which allows to choose the path according to WILLINGNES value for each node. For this reason I've built a simple net:

     B
   /     \
A       D
  \      /
     C

In this scenario node A should send traffic to D via B if willingness(B) > willingness(C), and via C otherwise.

But it doesn't happen. I've set WILLINGNESS = 1 for A and 7 for B, and the path is via A.

Could sb check my code and tell me, what is wrong and what should I correct?

Thank you for your help.


Best regards, 
Adam
omnetpp (2).ini

Alfonso Ariza Quintana

unread,
Oct 20, 2014, 10:18:46 AM10/20/14
to omn...@googlegroups.com

You have a confusion, willingness does reference to the desirability of a node could be selected like MPR, this doesn’t imply that the node must be included in a route.

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Kraśniewski

unread,
Oct 20, 2014, 11:00:54 AM10/20/14
to omn...@googlegroups.com, aari...@hotmail.com
You are right. But if node with higher WILLINGNESS is chosen as MPR, it also should reflect on the route. Am I wrong? Could you give me an example which shows me how MPR choose works? Thank you for your response. All best, Adam

Alfonso Ariza Quintana

unread,
Oct 20, 2014, 11:15:58 AM10/20/14
to omn...@googlegroups.com

In theory no, MPRs are only special nodes that distribute TC packets. It is possible to modify dijkstra and to extract the nodes from the stack using the willingness like second criteria (the first is the number of hops).

Adam Kraśniewski

unread,
Oct 20, 2014, 11:53:04 AM10/20/14
to omn...@googlegroups.com
I've read RFC 3626 and there is written: 
   "The willingness of a node may be set to any integer value from 0 to
   7, and specifies how willing a node is to be forwarding traffic on
   behalf of other nodes.  Nodes will, by default, have a willingness
   WILL_DEFAULT.  WILL_NEVER indicates a node which does not wish to
   carry traffic for other nodes, for example due to resource
   constraints (like being low on battery).  WILL_ALWAYS indicates that
   a node always should be selected to carry traffic on behalf of other
   nodes, for example due to resource abundance (like permanent power
   supply, high capacity interfaces to other nodes)."

Taking into account this words, the route should depend of WILLINGNESS. For example, when UDP traffic is running, it should be carry traffic by node with higher WILLINGNESS (in case when the number of hops is the same). 
Is my understanding proper?

--
You received this message because you are subscribed to a topic in the Google Groups "omnetpp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/8TvnQq0JVuo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

Alfonso Ariza Quintana

unread,
Oct 20, 2014, 12:26:22 PM10/20/14
to omn...@googlegroups.com

With WILL_NEVER the node should be excluded, in the code the nodes with WILL_NEVER are excluded.

Adam Kraśniewski

unread,
Oct 20, 2014, 12:35:14 PM10/20/14
to omn...@googlegroups.com

Yes, exactly. This I tried and it works properly. But what about the other values of WILLINGNESS?

Alfonso Ariza Quintana

unread,
Oct 20, 2014, 12:36:56 PM10/20/14
to omn...@googlegroups.com

They only affect in the computation of the MPR nodes

Alfonso Ariza Quintana

unread,
Oct 20, 2014, 1:16:42 PM10/20/14
to omn...@googlegroups.com

This should solve the question, and select nodes with better willingness

 

https://github.com/aarizaq/inetmanet-2.0/commit/9b5e3c846a5bf6b23fec698f0bd7271c170f425f

 

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de Adam Krasniewski
Enviado el: lunes, 20 de octubre de 2014 18:35
Para: omn...@googlegroups.com; omn...@googlegroups.com
Asunto: RE: [Omnetpp-l] WILLINGNESS in OLSR

 

Yes, exactly. This I tried and it works properly. But what about the other values of WILLINGNESS?

Adam Kraśniewski

unread,
Oct 21, 2014, 2:49:16 AM10/21/14
to omnetpp
Thank you very much for your help;

I've changed the code and now the simulation doesn't work. After few moments after beginning of the simulation, the program is suspended.

All the best
Adam

Alfonso Ariza Quintana

unread,
Oct 21, 2014, 5:28:10 AM10/21/14
to omn...@googlegroups.com

I have fixed the problem, you can download the modification from github

Adam Kraśniewski

unread,
Oct 21, 2014, 8:49:12 AM10/21/14
to omnetpp
Now, it works :) Thank you very much once again.

Adam Kraśniewski

unread,
Oct 21, 2014, 11:08:53 AM10/21/14
to omnetpp
I've another issue. Unfortunately routes doesn't react according to WILLINGNESS values which are set for each node during the simulation. When I set WILLINGNESS values for nodes in ini file, then routes are calculated, and when I change the WILLINGNESS value using:

cModule *wlan = getParentModule();
    cModule *host = wlan->getParentModule();
    const char * name = "manetrouting";
    cModule *targetModule = host->getSubmodule(name);
    if(targetModule != NULL) {
        targetModule->par("Willingness") = willingness;

The WILLINGNESS value is changing but the routes unfortunately are according to WILLINGNESS which is taken at the begginning of simulation during initialization.

What could be the reason?

Alfonso Ariza Quintana

unread,
Oct 21, 2014, 11:43:57 AM10/21/14
to omn...@googlegroups.com

The value is stored in an internal variable

 

This avoid the problem

https://github.com/aarizaq/inetmanet-2.0/commit/89e9fb4ed9f8d8853a02cd2804f02483eb42d8b6

Adam Kraśniewski

unread,
Oct 23, 2014, 1:15:29 PM10/23/14
to omnetpp
Everything works. Thank you so much for your assistance. You really helped me.

Wish you all the best,
Adam

Reply all
Reply to author
Forward
0 new messages