RndExpF Random Type (exponential distribution)

Action

Declares a random variable of type RndExpF. With each access, such a variable contains a floating-point value that is generated following an exponential distribution. The parameter of the RndExpF function constitutes the mean value of the exponential distribution.

Syntax

RndExpF( in fMean : float ): float;

Return value

float

Parameter Description
fMean Mean value of the exponential distribution

Example

dclrand
  rEvent1, rEvent2 : RndBin(0.25);
  rTime1 : RndExpF(5.5); /* waiting period in seconds */
  ... 

dcltrans
  transaction t1
  begin
    if rEvent1 then ... end;
    wait rTime1;

    while not rEvent2 do ... end;
  end t1;
Note: The example shows a random variable rTime1 with exponential distribution with a mean value of 5.5. rTime1 is used in a wait statement of a transaction for simulation of a random waiting period.

Sample scripts

OraSample.bdf, DBApi01.bdf