21/11/2020                                                       UOR_7.1.
             Example 8: Triangular PDF
             A hospital is located at the center of a district I- by 1-mile square.
             Travel is parallel to the sides of the square, and emergency patient
             demands are distributed uniformly over the square. We wish to
             generate sample values of the total distance between an emergency
             patient and the hospital. The pdf for the total distance D = D~ + D, is
             shown in Figure 7.11.
             2. If we decide to search for a relationship between random variable X
                and some other random variable(s), we should be able to note
                immediately that the pdf fx(x) is identical to the one that would
                have resulted from the definition
                where Y1 and Y2 are independent, identically distributed random
                variables with uniform distributions in [0, 1). (Readers should
                convince themselves that this is so.) Therefore, a very simple
                method for generating random observations of X is to use
                where r1 and r2 are the usual random numbers obtained through the
                random-number generator. This is equivalent to generating samples
https://web.mit.edu/urban_or_book/www/book/chapter7/7.1.3.html                         9/10