@@ -44,6 +44,10 @@ class RandomNumberGenerator(object):
elif(self.distributionType=="Exp"):#if the distribution is Exponential
returnG.Rnd.expovariate(1.0/(self.avg))
elif(self.distributionType=="Normal"):#if the distribution is Normal
ifself.max<self.min:
raiseValueError("Normal distribution for %s uses wrong "
"parameters. max (%s) > min (%s)"%(
self.obj.id,self.max,self.min))
while1:
number=G.Rnd.normalvariate(self.avg,self.stdev)
ifnumber>self.maxornumber<self.minandmax!=0:#if the number is out of bounds repeat the process #if max=0 this means that we did not have time "time" bounds