<div dir="ltr">On 19 March 2013 13:50, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">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.<br>

<br>
I changed the code in order to print and check the values of<br>
<br>
G.Rnd.expovariate(MachineClass.SrvRate) and G.Rnd.expovariate(ArrivalClass.ArvRate)<br>
<br>
here is the code and the changes i made : <a href="http://codeviewer.org/view/code:30d8" target="_blank">http://codeviewer.org/view/code:30d8</a><br>
<br>
The values are not the same.<br>
<br>
The result i take is the following:<br>
<br>
Result from main() call No. 1 is 0.0452927906737<br>
Result from main() call No. 2 is 0.0588336669949<br>
2<br>
First time Execution of Main Main<br>
[0.07267291894782457, 0.019146562687989536, 0.034780398625615376, 0.005528912370370478, 0.023636815811338075]<br>
[0.13472907136407936, 0.0025553071735785462, 0.08868344131130483, 0.05381286556098766, 0.044091180681591464]<br>
Second time Execution of Main<br>
[0.0335704752213292, 0.1321512230812724, 0.16025979406301488, 0.029210377271523574, 0.006680846943670858]<br>
[0.20642889529587374, 0.047894131266223446, 0.10958802111803392, 0.02393344456847461, 0.13280785022932287]<br></blockquote><div><br></div><div style>In the new code you are creating one instance of G which you seed with 1234 and then calling  expovariate on it each time you call main without reseeding. You're only seeding it once and reusing it, so you would get different values. What you had before, where you seeded G.Rnd in the main was fine.</div>
<div style><br></div><div style>I also suggest you change one thing at a time, rather than reworking large parts each iteration. All I was suggesting was a simple print statement in the Run method like you had it before</div>
</div><br clear="all"><div><br></div>-- <br>./Sven
</div></div>