Randomly select nodes from network

190 views
Skip to first unread message

Alex Berger

unread,
May 15, 2013, 8:30:35 AM5/15/13
to omn...@googlegroups.com
Dear all

Is there an option to randomly select a specific number of nodes from a network?
Scenario: network with 1000 nodes and a fixed number of these nodes, e.g. 10 nodes, should be sender and the rest receiver.

Is it possible to randomly select these 10 nodes out of the 1000?

Possible workarounds may be:
1. every node randomly decides for itself in the initialization phase with probability 1% to be a sender and else be a receiver. The disadvantage is that there may be variations in the exact number of selected nodes (not exactly 10).
2. set in omnetpp.ini which nodes/hosts are sender and the rest is receiver. Advantage: constant group size possible, disadvantage: always same node Ids as senders.

Therefore, is it possible to randomly select exactly 10 nodes out of 1000 with changing node Ids?

I guess in case of mobility, option 2 may be ok since each node position and movement may change with different seed/run-number. Is that right?

 

Alfonso Ariza Quintana

unread,
May 15, 2013, 9:24:31 AM5/15/13
to omn...@googlegroups.com

If the position change randomly you can use always the same nodes like sources (for example 0 to 9)

 

Every time that you change the seed the position of these nodes will change and the adjacencies will be others

--
--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 
---
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/groups/opt_out.
 
 

Alex Berger

unread,
May 16, 2013, 3:00:45 AM5/16/13
to omn...@googlegroups.com, aari...@hotmail.com
Thank you for the response.
So, this means as long as I have a random number generator for the mobility module, the adjacencies are different (as long as the seed is different, which will be automatically the case with cMersenneTwister in different runs). Is this correct?

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.

Alfonso Ariza Quintana

unread,
May 16, 2013, 4:03:55 AM5/16/13
to omn...@googlegroups.com

Yes it’s, if the position of the nodes are chosen randomly, in every simulation the position and adjacencies will be different

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/groups/opt_out.
 
 

--

--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 
---
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.

Alex Berger

unread,
May 16, 2013, 5:04:38 AM5/16/13
to omn...@googlegroups.com, aari...@hotmail.com
Perfect, thank you for the clarification.

To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 
---
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+unsubscribe@googlegroups.com.

N.omar

unread,
May 18, 2013, 6:18:02 AM5/18/13
to omn...@googlegroups.com
What If I need to choose the sources randomly each time ( not the same for each number of nodes ) i.e for 10 nodes randomly assign 3 sources and other three as distinations. But in case of 20 nodes i want randomly others destinations and sources assigned ! 

I don't know if it is clear !!! 

Ivo Calado

unread,
May 26, 2013, 8:18:26 AM5/26/13
to omn...@googlegroups.com
Hi fellows,
I have a similar problem (ie randomly select nodes). Nevertheless,
my topology is fixed so I really need to select a random node in the
config file. I tried this

**.host[${intuniform(0,79)}].appl.dstAddr = <sink address>

Whit this configuration (in a network with 80 nodes), no node is
select. Why this behavior?

Best regards,
Ivo
> --
> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp
>
> ---
> 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/groups/opt_out.
>
>
>


--
Ivo Augusto Andrade Rocha Calado
PhD candidate in Electrical Engineering
Embedded Systems and Pervasive Computing Lab - http://embedded.ufcg.edu.br
Electrical Engineering Department - http://dee.ufcg.edu.br/
Electrical Engineering and Informatics Center - http://www.ceei.ufcg.edu.br
Federal University of Campina Grande - http://www.ufcg.edu.br

PGP: 0xD7C3860A pgp.mit.edu
Putt's Law:
Technology is dominated by two types of people:
Those who understand what they do not manage.
Those who manage what they do not understand.
Reply all
Reply to author
Forward
0 new messages