{ Analytica Model Hubbard_HDR_Library, encoding="UTF-8" }
SoftwareVersion 5.3.3
LinkLibrary Hubbard_HDR_Library
Title: Hubbard HDR Library
Description: Doug Hubbard introduced a simple, open-source, pseudo-random number generating algorithm called HDR. The initials match his company: ~
~
Hubbard Decision Research~
2 South 410 Canterbury Ct~
Glen Ellyn, Illinois 60137~
www.hubbardresearch.com~
~
In benchmarks for quality (measures on apparent randomness) conducted by Hubbard Decision Research, the HDR performed similarly to the Mersenne Twister, the best pseudo-random number generator, but is much simpler, and is meant to be standardized.~
~
The HDR is endorced by ProbabilityManagement.org as a standard for the exchange of random Monte Carlo simulation samples. As such, it provides a method for concisely exchanging samples from parametric distributions -- i.e., just exchange the seed values for HDR and the distribution parameters. In combination with the Keelin distribution. the two provide a concise way to exchange exact samples from arbitrary distributions concisely.
Author: Doug Hubbard of Hubbard Decision Research (author of the algorithm)~
~
Lonnie Chrisman, of Lumina Decision System -- encoded as Analytica functions.
Date: Thu, Aug 6, 2020 4:33 PM
DiagState: 2,0,0,709,200,17
WindState: 2,639,69,720,517
FontStyle: Arial,15
FileInfo: 0,LinkLibrary Hubbard_HDR_Library,2,2,0,0,W:\TestModels\Hubbard HDR.ana
Function Hubbard_HDR(trial : positive ; seed1 : positive=1; seed2, seed3, seed4 : nonNegative=0)
Title: Hubbard HDR
Description: Doug Hubbard's simple pseudo random number generator, from Hubbard Decision Research. It generates numbers from a U(0,1) distribution when any single parameter (usually «trial») is altered.~
~
The distribution has up to 4 integer seeds, which can be within the following ranges:~
1 ≤ seed1 ≤ 100M~
0 ≤ seed2 ≤ 100M ~
0 ≤ seed3 ≤ 10M ~
0 ≤ seed4 ≤ 10M ~
~
When using an HDR to share simulations with other organizations, «seed2» must be a unique "entity ID" which is assigned by an external coordinating authority (presumed to be Hubbard Decision Research). ~
~
The HDR is an open source standard that is intended to be used when sharing Monte Carlo simulation results between different groups or models. By providing the distribution type and parameters, along with the seed values, the other party can reproduce precisely the same Monte Carlo values, hence correlations can be preserved relative to other simulations, etc.~
~
To expand a distribution from within an Analytica model, use HDR_U as the first parameter to the cumulative inverse probability function for your distribution of choice.
Definition: ( MOD(( MOD( MOD( 999999999999989, MOD( trial*2499997 + seed1*1800451 + seed2*2000371 + seed3*1796777 + seed4*2299603, 7450589 ) * 4658 + 7450581 ) * 383, 99991 ) * 7440893 + MOD( MOD( 999999999999989, MOD( trial*2246527 + seed1*2399993 + seed2*2100869 + seed3*1918303 + seed4*1624729, 7450987 ) * 7580 + 7560584 ) * 17669, 7440893 )) * 1343, 4294967296 ) + 0.5 ) / 4294967296
NodeLocation: 144,88,1
NodeSize: 48,24
WindState: 2,418,64,712,613
Function HDR_U(seed1 : positive=1; seed2, seed3, seed4 : nonNegative=0 ; ~
singleSampleMethod : optional atomic hidden numeric )
Title: HDR_U
Description: The Hubbard Uniform(0,1) distribution function. ~
~
Returns 0.5 in Mid mode, or a uniformly distributed Distributed Monte Carlo sample, where the samples are deterministic for any specific combination of the 4 seed parameters.~
~
This function is intended to be used as the first parameter to Cumulative inverse probability functions. For example, to generate a Normal(5, 2.5) distribution from seeds 1,2,3,4 use:~
~
CumNormalInv( HDR_U(1,2,3,4), 5, 2.5 )~
~
The distribution has up to 4 integer seeds, which can be within the following ranges:~
1 ≤ seed1 ≤ 100M~
0 ≤ seed2 ≤ 100M ~
0 ≤ seed3 ≤ 10M ~
0 ≤ seed4 ≤ 10M ~
~
When using an HDR to share simulations with other organizations, «seed2» must be a unique "entity ID" which is assigned by an external coordinating authority (presumed to be Hubbard Decision Research). ~
~
The HDR is an open source standard that is intended to be used when sharing Monte Carlo simulation results between different groups or models. By providing the distribution type and parameters, along with the seed values, the other party can reproduce precisely the same Monte Carlo values, hence correlations can be preserved relative to other simulations, etc.~
Definition: IF IsSampleEvalMode THEN ~
Hubbard_HDR(Run,seed1,seed2,seed3,seed4)~
ELSE { Mid-value with all the indexes of the seeds }~
Local (s1[],s2[],s3[],s4[]) := _(seed1,seed2,seed3,seed4) Do 0.5
NodeLocation: 264,88,1
NodeSize: 48,24
WindState: 2,624,122,743,429
Close Hubbard_HDR_Library
{!-40499|MsgBox("This Analytica model file contains text characters encoded in UTF-8 (Unicode) format, not ASCII. It was saved from Analytica release 5.3. You need to upgrade to Analytica 5.3 to read the model correctly. If you use it with this release, the Unicode characters may look strange and parts of the model may not work.",16,"Analytica 5.3 required")}