Commit c160fcdc authored by Georgios Dagkakis's avatar Georgios Dagkakis

RandomNumberGenerator update to support uniform distribution

parent 658df807
......@@ -55,7 +55,8 @@ class RandomNumberGenerator(object):
return number
elif self.distributionType=="Erlang": #if the distribution is erlang
return G.Rnd.gammavariate(self.alpha, self.beta)
elif(self.distributionType=="Uniform"): #if the distribution is uniform
return G.Rnd.uniform(self.min, self.max)
else:
raise ValueError("Unknown distribution %r used in %s %s" %
(self.distributionType, self.obj.__class__, self.obj.id))
(self.distributionType, self.obj.__class__, self.obj.id))
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment