commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] [Updated] (MATH-654) ValueServer not deterministic for a fixed random number seed
Date Tue, 30 Aug 2011 19:01:37 GMT


Phil Steitz updated MATH-654:

    Affects Version/s: 1.1
        Fix Version/s: 3.0

Thanks for reporting this.  I assume you are using DIGEST_MODE.  If this is the case and you
are comfortable compiling the code in trunk, the fix for MATH-634 enables a workaround for
this.  Using the reseed method added to EmpiricalDistributionImpl in trunk, you can use ValueServer's
getEmpiricalDistribution to get the distribution and then invoke reseed.  Unfortunately, this
method does not exist in any released version yet.

The problem is that ValueServer#getNextDigest (what it does for getNext in DIGEST_MODE) delegates
to EmpiricalDistributionImpl#getNextValue.  EmpiricalDistributionImpl has its own RandomData
instance.  To fix this issue, EmpiricalDistirbutionImpl should add a constructor taking a
RandomData and ValueServer should provide this.

> ValueServer not deterministic for a fixed random number seed
> ------------------------------------------------------------
>                 Key: MATH-654
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 1.1, 1.2, 2.0, 2.1, 2.2
>            Reporter: David James
>            Assignee: Phil Steitz
>             Fix For: 3.0
> I have built an agent-based model using the Apache Commons Math library, which has come
in handy.
> The ValueServer seemed particularly helpful, as explained at:
> My simulation needs repeatable randomness, so I used this form of the ValueServer constructor:
>     ValueServer(RandomData randomData) 
>     Construct a ValueServer instance using a RandomData as its source of random data.
>     //
> However, in my simulation, I found that the ValueServer did not act deterministically
if I supplied the same random number seed.
> I have not inspected the source code, but I suspect that the ValueServer is not using
the `randomData` generator correctly. If it was, then it should be deterministic.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message