Same seeds different results from the intuniform() distribution in OMNeT++ 4.1

417 views
Skip to first unread message

Luis_IT

unread,
Feb 3, 2011, 7:02:26 AM2/3/11
to omnetpp
Hello all,

I'm using the intuniform() function to generate integer numbers within
a certain interval.
I ported my code from the Mobility Framework (working in omnet++ 4.0)
to the MiXiM 2.0 (working in OMNeT++ 4.1).

When I replicated the simulations in MiXiM framework I was expecting
that the random numbers generated by the intuniform() function would
be the same in OMNeT++ 4.1 as in OMNeT++ 4.0. However, the random
numbers are completely different.

Why is this happening since the seeds are the same (the only thing
that changed was the version of OMNeT++)?

Regards,
Luis_IT

Jérôme Rousselot

unread,
Feb 3, 2011, 7:18:20 AM2/3/11
to omn...@googlegroups.com
the underlying physical layer, or the application layer, are probably
generating random numbers differently. So instead of taking the value
numbered 150 in the random stream, you get value 153.

Jerome

Le jeudi 03 fᅵvrier 2011 ᅵ 13:02 +0100, Luis_IT a ᅵcrit :

Luis_IT

unread,
Feb 4, 2011, 3:04:16 PM2/4/11
to omnetpp
Hello Jerome,

I'm having this doubt because of a previous post of mine where I
ported Mobility Framework with my MAC protocol from OMNeT++ 4.0 to
OMNeT++ 4.1.
With the same code, same seeds and configurations the results obtained
from the intuniform() function were completely different.

Here is the previous code link,

http://groups.google.com/group/omnetpp/browse_thread/thread/b2039ac083ae9995/dd4e4bce518f03cf?lnk=gst&q=different+seeds#dd4e4bce518f03cf


Best regards,
Luis


On 3 Fev, 12:18, Jérôme Rousselot <jerome.rousse...@csem.ch> wrote:
> the underlying physical layer, or the application layer, are probably
> generating random numbers differently. So instead of taking the value
> numbered 150 in the random stream, you get value 153.
>
> Jerome
>
> Le jeudi 03 f vrier 2011 13:02 +0100, Luis_IT a crit :
>
>
>
> > Hello all,
>
> > I'm using the intuniform() function to generate integer numbers within
> > a certain interval.
> >  I ported my code from the Mobility Framework (working in omnet++ 4.0)
> > to the MiXiM 2.0 (working in OMNeT++ 4.1).
>
> > When I replicated the simulations in MiXiM framework I was expecting
> > that the random numbers generated by the intuniform() function would
> > be the same in OMNeT++ 4.1 as in OMNeT++ 4.0. However, the random
> > numbers are completely different.
>
> > Why is this happening since the seeds are the same (the only thing
> > that changed was the version of OMNeT++)?
>
> > Regards,
> > Luis_IT- Ocultar texto citado -
>
> - Mostrar texto citado -

Luis_IT

unread,
Feb 5, 2011, 4:38:22 PM2/5/11
to omnetpp
Moreover, I ran simulations (with OMNeT++ 4.0 and 4.1) with the same
MAC protocol code in Mobility Framework and obtained these results:

In OMNeT++ 4.0 for the same simulation time my nodes call the
intuniform() function and the random numbers generated are different
sometimes.
However, in OMNeT++ 4.1 for the the same simulation time when my nodes
call the intuniform() function, all the random numbers generated are
equal.

The fact that I'm obtaining the same random numbers is because the
nodes are calling the intuniform() function at the same time?

Is there a way of obtaining the same behaviour as in OMNeT++ 4.0 but
for the OMNeT++ 4.1?


Best regards,
Luís

On 4 Fev, 20:04, Luis_IT <luismiguelbor...@gmail.com> wrote:
> Hello Jerome,
>
> I'm having this doubt because of a previous post of mine where I
> ported Mobility Framework with my MAC protocol from OMNeT++ 4.0 to
> OMNeT++ 4.1.
> With the same code, same seeds and configurations the results obtained
> from the intuniform() function were completely different.
>
> Here is the previous code link,
>
> http://groups.google.com/group/omnetpp/browse_thread/thread/b2039ac08...
>
> Best regards,
> Luis
>
> On 3 Fev, 12:18, Jérôme Rousselot <jerome.rousse...@csem.ch> wrote:
>
>
>
> > the underlying physical layer, or the application layer, are probably
> > generating random numbers differently. So instead of taking the value
> > numbered 150 in the random stream, you get value 153.
>
> > Jerome
>
> > Le jeudi 03 f vrier 2011 13:02 +0100, Luis_IT a crit :
>
> > > Hello all,
>
> > > I'm using the intuniform() function to generate integer numbers within
> > > a certain interval.
> > >  I ported my code from the Mobility Framework (working in omnet++ 4.0)
> > > to the MiXiM 2.0 (working in OMNeT++ 4.1).
>
> > > When I replicated the simulations in MiXiM framework I was expecting
> > > that the random numbers generated by the intuniform() function would
> > > be the same in OMNeT++ 4.1 as in OMNeT++ 4.0. However, the random
> > > numbers are completely different.
>
> > > Why is this happening since the seeds are the same (the only thing
> > > that changed was the version of OMNeT++)?
>
> > > Regards,
> > > Luis_IT- Ocultar texto citado -
>
> > - Mostrar texto citado -- Ocultar texto citado -

Luis_IT

unread,
Feb 15, 2011, 10:44:05 AM2/15/11
to omnetpp
Anyone has a commentary about this?

Best regards,
Reply all
Reply to author
Forward
0 new messages