Re: Problem this random seed()

2013-03-19 Thread NZach
Τη Τρίτη, 19 Μαρτίου 2013 5:23:47 μ.μ. UTC+2, ο χρήστης NZach έγραψε: > Τη Τρίτη, 19 Μαρτίου 2013 3:57:30 π.μ. UTC+2, ο χρήστης NZach έγραψε: > > > Hello everyone, > > > > > > > > > > > > i am using the MMK.py example from a Si

Re: Problem this random seed()

2013-03-19 Thread NZach
Τη Τρίτη, 19 Μαρτίου 2013 3:57:30 π.μ. UTC+2, ο χρήστης NZach έγραψε: > Hello everyone, > > > > i am using the MMK.py example from a SimPy tutorial, which can be found here: > http://heather.cs.ucdavis.edu/~matloff/156/PLN/DESimIntro.pdf > > > > I have made v

Re: Problem this random seed()

2013-03-19 Thread NZach
OK, i changed the code again. Delete the G class (The purpose of G class was to refer to global variables). Add Rnd.seed(12345) in main() function. The new code : http://codeviewer.org/view/code:30da i print the Rnd.expovariate(ArrivalClass.ArvRate). The output i get be executing the above code

Re: Problem this random seed()

2013-03-19 Thread NZach
Probably a better code : http://codeviewer.org/view/code:30d9 I run the program once using comment in line 39 and then using comment in line 62. The results are not the same. The problem is with the Random. Although, i use seed value equal to 12345, i do not take the same results. :[ Any idea

Re: Problem this random seed()

2013-03-19 Thread NZach
Sorry, my previous reply was completely wrong. The time is initialized through the initialize() to 0. So, each time i call main() the simulation time is initialized to 0. I changed the code in order to print and check the values of G.Rnd.expovariate(MachineClass.SrvRate) and G.Rnd.expovariate

Re: Problem this random seed()

2013-03-19 Thread NZach
Thank you @sven ! I thought that the time was reset automatically after calling the second main. Yes, i checked the values and they are the same. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem this random seed()

2013-03-19 Thread NZach
@eli m : The problem is that i execute on lines 83 and 90 the main() and although the seed value is the same, equal to 12345, i receive different results from lines 85 and 92. @alex23: I changed the code, http://codeviewer.org/view/code:30d4, but i still receive have the same problem. The resul

Re: Problem this random seed()

2013-03-19 Thread NZach
@eli m : The problem is that i execute on lines 83 and 90 the main() and although the seed value is the same, equal to 12345, i receive different results from lines 85 and 92. @alex23: I changed the code, http://codeviewer.org/view/code:30d4, but i still receive have the same problem. The resul

Problem this random seed()

2013-03-18 Thread NZach
Hello everyone, i am using the MMK.py example from a SimPy tutorial, which can be found here: http://heather.cs.ucdavis.edu/~matloff/156/PLN/DESimIntro.pdf I have made very little changes to the code and i have upload it here: http://codeviewer.org/view/code:30d3 The problem is that i am execut