Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'main()': 0.07; 'subject:()': 0.09; 'cc:addr:python-list': 0.10; '10:54,': 0.16; 'of\xa0': 0.16; 'subject:Problem': 0.16; 'subject:random': 0.16; 'wrote:': 0.17; 'skip:g 40': 0.17; 'url:view': 0.18; 'code,': 0.18; 'email addr:gmail.com>': 0.20; 'cc:2**0': 0.23; 'idea': 0.24; 'specifically': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'values': 0.26; 'message- id:@mail.gmail.com': 0.27; 'lines': 0.28; 'run': 0.28; 'inspect': 0.29; 'seed': 0.29; 'url:code': 0.29; "i'm": 0.29; 'related': 0.30; 'problem.': 0.32; 'print': 0.32; 'problem': 0.33; 'equal': 0.33; 'changed': 0.34; 'received:google.com': 0.34; 'but': 0.36; 'url:org': 0.36; 'skip:g 30': 0.36; 'should': 0.36; 'execute': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'bottom': 0.60; 'different': 0.63; 'results': 0.65; 'receive': 0.71; 'subject:this': 0.84; '2013': 0.84; 'different.': 0.84; 'same,': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=EMqzhJHpe1wWRzk3JZJhHMv9CwZJ/N5BEPDUFPWgjHk=; b=khdogqC8ixzggfueFfg0YJucQt9lUdyzL+C5d7Eadaz8PV72KTMmygWb/YIHFqTa5U BbQ4sI+xpVV3422JyEDaoFPnrTFUfvCDbqbKSAJGkO/4IK7MRhO6noApligYVA6FmEE0 eymgbwvbMCU6U8gqtndLtMZbygNWI2hjEawa/iJIVxrrYsYpLlRKGkq09w5UP3OWS0VF d0V0LvVvCpdnY8dnIR76PrG3stE2+NPix8SIQjHGfZgW9vwgUrvTkw0Mkt8jVer5YL4s pgzCzuinMLAeBSBoI7cUgOkARFPyUakOmnptkaeNE/nryGR2Q3r9DFv3ItI1pFrwGA56 l4qQ== MIME-Version: 1.0 X-Received: by 10.194.123.103 with SMTP id lz7mr2747175wjb.10.1363694361048; Tue, 19 Mar 2013 04:59:21 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 Mar 2013 11:59:20 +0000 Subject: Re: Problem this random seed() From: Sven To: NZach Content-Type: multipart/alternative; boundary=089e01228142f8fe9004d845d5dc Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 63 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363694370 news.xs4all.nl 6962 [2001:888:2000:d::a6]:60356 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41487 --089e01228142f8fe9004d845d5dc Content-Type: text/plain; charset=ISO-8859-1 On 19 March 2013 10:54, NZach wrote: > @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 results are different. > > Any idea please > have you actually tried printing out the return value of G.Rnd.expovariate(MachineClass.SrvRate) ? I'm not sure as I have not used SimPy before, but the values you are printing out at the bottom seem to be related to the timing, specifically now(), which would give you a different result each time. If you print out or inspect the result of expovariate, it should be the same each time you run main. -- ./Sven --089e01228142f8fe9004d845d5dc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 19 March 2013 10:54, NZach <nickzacharatos@gmai= l.com> wrote:
@eli m : The problem is that i execute o= n 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 results are different.

Any idea please

have you ac= tually tried printing out the return value of=A0

G= .Rnd.expovariate(MachineClass.SrvRate)

?

I'm not sure as I have not used SimPy before,= but the values you are printing out at the bottom seem to be related to th= e timing, specifically now(), which would give you a different result each = time.

If you print out or inspect the result of e= xpovariate, it should be the same each time you run main.
<= br>
--
./Sven
--089e01228142f8fe9004d845d5dc--