Simulation of discrete-event stochastic systems