method for simulating a compound poisson process