- Function Weibull(Shape, Lowerbound, Scale)
Weibull
The function Weibull
draws a random value from a Weibull
distribution.
Weibull(
Shape, ! (input) numerical expression
Lowerbound, ! (optional) numerical expression
Scale ! (optional) numerical expression
)
Arguments
- Shape
A scalar numerical expression \(> 0\).
- Lowerbound
A scalar numerical expression.
- Scale
A scalar numerical expression \(> 0\).
Return Value
The function
Weibull
returns a random value drawn from a Weibull distribution with shape Shape lower bound Lowerbound, and scale Scale.
Note
The prototype of this function has changed with the introduction of
AIMMS 3.4. In order to run models that still use the original prototype,
the option Distribution_compatibility
should be set to
Aimms_3_0
. In the original function Weibull
(Lowerbound,
Shape, Scale), the arguments were ordered differently.
Graph
A graph with:
a histogram for 100 experiments of drawing from distribution
Weibull(5,0,5)
, andthe
DistributionDensity
forWeibull(5,0,5)
Example
The code:
option seed := 1234 ;
_p_draw := Weibull( 0.3, 0, 100 ) ;
_p_pointDensity := DistributionDensity( Weibull( 0.3, 0, 100 ), 20 );
block where listing_number_precision := 6 ;
display _p_draw, _p_pointDensity ;
endblock ;
will produce
_p_draw := 5.483940 ;
_p_pointDensity := 0.004994 ;
in the listing file.
References
The
Weibull
distribution is discussed in full detail in Continuous Distributions of the Language Reference.