jeudi 25 juin 2015

Trying to produce different random numbers every time a loop is executed

SRate = [5,5,5]
Bots = 120
NQueue = 3
TSim = 100
Exp = 2
DDistance = 1
Lambda = 40 # 120/3 = 40
import random

Elist=[]
AvgSRate = 5
def Initilization(AvgSRate,Lambda,Exp):
    return float((Lambda/(AvgSRate**Exp))*(1+(1/10)*(2*(np.random.seed(-28)) - 1)))

for a in range(1,361):
    Elist.append(Initilization)

I am trying to produce a set of randomly generated numbers between 0 and 1, so decimals for the initialization of a simulation, however It spits out the same values every time the loop is executed, so when I print Elist I get a list of all the same values. Also the list has <Function Initialization at "the number">, could someone help me eliminate that portion from the printed list to only have the numbers.




Aucun commentaire:

Enregistrer un commentaire