[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Random Variables in ns (2)



Sorry I forgot to include this information:

I am using ns 2.1b8a
My operating system is:
Linux afc 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown 

I attach the letter where I explain my doubts:

Hi,

I am a student of Telecommunications Engineering and I am using ns for
simulating internet traffic sources. I need to implement a Weibull
distribution and a Gamma distribution random variable generators. I have
been researching how ns implements its random variables (exponential,
pareto, lognormal,...) but I have some doubts about this. Please, I would
like to know:

Which files are involved in the implementation of random variables in ns?
I think that they are: random.cc  .h, ranvar.cc  .h, rng.cc  .h
I tried to develope a Weibull distribution but the constructor failed, so I
think that it's necessary to modify some other files, so I would be very
gratefull if someone told me some instructions for developing new random
variables into ns source.

Besides, Which format file is used for developing empiricals random
variables from cdf?
I read that the empirical random variable extracts a line from a
determinated file, that you choose, but I don't know the format is needed
for this file. The instruction for reading the file is:
    sscanf(file,"%1f %*f %1f", &variable1, &varialbe2);
I am sorry but I cannot guess the format of the file that it is needed for
defining empirical random variables.

Thank you in advance,
Miguel Angel Alvarez Lechuga
[email protected]