[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] About pareto.cc
> Random::pareto(scale,shape) returns scale / (u ^ (1 / shape)) where u is
a
> uniformly distributed random variable (see rng.h). So dividing scale by
> interval_ is identical to dividing the random value by interval_. It makes
> no difference. Or am I misunderstanding what you're saying ?
It's me who was wrong to think that time resolution was spoiled.
But I still don't get what pareto really does. While calculating p1_,
both the avg and shape are taken into consideration. After setting
p1_ to burstlen_*(shape_ - 1.0)/shape_ and generating a pareto rv,
its mean is burstlen_, and there's a pursuing rounding-off. What I
think reasonable is setting p1_ to ontime_*(shape_ - 1.0)/shape_,
generating a rv, rem_=rv/interval_ ,and no rounding-off.
Are they basically the same? And that's what confuses me.
> Once again, next_interval is called just before a packet is sent,
> and rem_ = 0 means that there is still one packet to be sent in the
current
> burst of packets.
Yep! I missed this final point you said all the time, though I read
that source code before.
Thank you!!
All the best,
M. Jiang