7.1.4 Simulating Event Times from a Time-Dependent Poisson ProcessSuppose that, as in Section 4.11, we have demands for an urban service which are generated in a Poisson manner but with an average rate, , which is a function of time. This is a most common case for urban service systems. We would, therefore, like to be able to simulate this type of demand accurately and efficiently for any given time interval [0, T]. In the following it will be assumed that the average demand rate is known for all t (0 ‹/= t ‹/= T). A typical pattern for is shown in Figure 7.12. The most obvious approach is to use (7.5), substituting for We begin at time t = 0 and generate the first demand using for in (7.5). Assume that the first demand occurs at time t_{1}. We then use (7.5) with to generate the time for the second demand, t_{2}. We proceed in the same way, using, ... successively in (7.5) until eventually a demand's time of occurrence falls outside the interval T, at which point we can stop. On second thought, however, this procedure turns out to be faulty. To
see why, consider the case when a demand is simulated to occur at time
t*, as shown in Figure 7.12. To generate the next demand we would then
use=
with (7.5). But because
is small, the simulated interval until the next demand will tend to be a
long one (its expected value is
and thus
we may "skip" (without generating any new demands) a good part of the
period of time that follows t*, when there is an increase (a "hump") in
demand. In the extreme case when
is close to 0, we may in fact "jump" all the way to the end of the
interval T.
The following four-step procedure overcomes these problems:
The procedure presented above is somewhat inefficient because it makes two passes over T: once to generate k and a second time to generate the time instants, A single-pass procedure is developed in Problem 7.3. We also note that an efficient sorting algorithm that can be useful for Step 4 is described in Section 7.2.1. |