Chapter 3 Random Variate Generation and Probability Modeling
Learning Objectives
- To be able to generate random variates using the Java Simulation Library (JSL)
To understand how to use the JSL for basic probability computations
The JSL has the capability to generate random variates from both
discrete and continuous distributions. The jsl.utilities.random.rvariable
package supports this functionality. The package has a set of Java interfaces
that define the behavior associated with random variables. Concrete
sub-classes of specific random variables are created by sub-classing
AbstractRVariable
. As shown in Figure 3.1, every random variable has
access to an object that implements the RNStreamIfc
interface. This
gives it the ability to generate pseudo-random numbers and to control
the streams. The GetValueIfc
interface is the key interface because in
this context it returns a random value from the random variable. For
example, if d
is a reference to an instance of a sub-class of type
AbstractRVariable
, then d.getValue()
generates a random value.