If a subject is event-free at time \(s < t\), then the conditional
probability is
$$F_{T | s}(t | s) = P(T \le t | T > s) = \frac{F(t) - F(s)}{1 - F(s)}$$
where \(F(\cdot)\) is the cumulative distribution function of the
piecewise exponential (PWE) distribution. Equivalently,
\(F(t) = 1 - S(t)\), where S(t) is the survival function. If
\(U \sim Unif(0, 1)\), then we can generate an event time (conditional on
being event free up until \(s\)) as
$$F^{-1}(U(1 - F(s)) + F(s))$$
If \(s = 0\), this is equivalent to a direct unconditional sample from
the PWE distribution.
PWEALL represents the generating hazard with pieces closed on the left and
open on the right. Its cumulative distribution is continuous at every
cutpoint, so this endpoint choice does not affect imputation. For assigning
realized event times to analysis intervals, goldilocks uses the survival
counting-process convention, open on the left and closed on the right; an
event exactly at a cutpoint belongs to the interval ending there.