DistPearson6
- class pydsol.core.distributions.DistPearson6(stream: StreamInterface, alpha1: float, alpha2: float, beta: float)[source]
Bases:
DistContinuous
The Pearson6 distribution with two shape parameters alpha1 and aplha2, and a scale parameter beta. For more information on this distribution see https://mathworld.wolfram.com/Pearson6Distribution.html.
- __init__(stream: StreamInterface, alpha1: float, alpha2: float, beta: float)[source]
Construct a new Pearson6 distribution with two shape parameters alpha1 and aplha2, and a scale parameter beta.
- Parameters:
stream (StreamInterface) – the random stream to use for this distribution
alpha1 (float) – the first shape parameter of the Pearson6 distribution
alpha2 (float) – the second shape parameter of the Pearson6 distribution
beta (float) – the scale parameter of the Pearson6 distribution
- Raises:
TypeError – when stream is not implementing StreamInterface:
TypeError – when alpha1 is not a float or int:
TypeError – when alpha2 is not a float or int:
TypeError – when beta is not a float or int:
ValueError – when alpha1 <= 0 or alpha2 <= 0 or beta <= 0:
- draw() float [source]
Draw a value from the Pearson6 distribution. Based on the algorithm in Law & Kelton, Simulation Modeling and Analysis, 1991, p. 494. But since dist1 and dist2 are both scaled by beta, the result is beta/beta = 1, without the scale parameter. So, in contrast with Law & Kelton and Banks (2000), a multiplication with beta is added.
- property alpha1: float
Return the parameter value alpha1
- property alpha2: float
Return the parameter value alpha2
- property beta: int
Return the parameter value beta
- property stream: StreamInterface
Return the current random stream for this distribution.