Dorice Diane Ngueguia
unread,Dec 17, 2009, 4:51:31 AM12/17/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ns-3-...@googlegroups.com
Hi,
I am trying to simulate a network application that uses random values. I have 10 000 nodes and during the simulation, each node can generate up to 100 random integer values. I would like all my 1 000 000 (10 000 nodes * 100 values per node) random integers to be distinct trough the simulation. So this is what I did :
The application installed on each node has a uniform random value, 0..1 000 000
m_hit_generator = UniformVariable(0, 1000000);
To avoid collisions, I have divided my value space in 10 000 parts of 100 possible integer values. Each application has a parameter named HITRange ( = 0, 1, 2,...9999). So to have a random value from each application I do
m_tag_hit = m_hit_generator.GetInteger(m_hitRange*100,(m_hitRange+1)*100);
Can see that for the first node, range 0, I will be doing GetInteger(0, 100); for the second node GetInteger(100, 200); for the last GetInteger(9900, 10 000)
I thought it was sufficient to avoid collision, but I am still having redundancy.
Does someone know what I should do ?
Tank.