<div dir="ltr">On 19 March 2013 14:44, NZach <span dir="ltr"><<a href="mailto:nickzacharatos@gmail.com" target="_blank">nickzacharatos@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>

The new code : <a href="http://codeviewer.org/view/code:30da" target="_blank">http://codeviewer.org/view/code:30da</a><br>
<br>
i print the Rnd.expovariate(ArrivalClass.ArvRate).<br>
<br>
The output i get be executing the above code is the following :<br>
---<br>
0.134729071364<br>
0.00255530717358<br>
<a href="tel:0.0886834413113" value="+886834413113">0.0886834413113</a><br>
<br>
Result =  0.0571622124959<br>
0.134729071364<br>
0.00255530717358<br>
<a href="tel:0.0886834413113" value="+886834413113">0.0886834413113</a><br>
<br>
Result =  0.0453791550084<br>
---<br>
<br>
<br>
So, the problem is probably with time (which is what @Stev mentioned before).<br>
<br>
But i still cant understand the reason. From the SimPy documentation : <a href="http://simpy.sourceforge.net/SimPyDocs/Manuals/SManual.html" target="_blank">http://simpy.sourceforge.net/SimPyDocs/Manuals/SManual.html</a><br>

it says for the initialize(): "The initialize statement initialises global simulation variables and sets the software clock to 0.0. It must appear in your program before any SimPy process objects are activated."<br>

<br>
Any idea why that happens <br></blockquote><div><br></div><div style>I am guessing it's because now gives you the current clock value. Yes, initialise sets it to 0.0, but on execution now will change to the time since initialise(), so you will get varying values. That's my best guess</div>
</div><div><br></div>-- <br>./Sven
</div></div>