  We present a numerical method to produce stochastic dynamics according to the
generalized Langevin equation with a non-stationary memory kernel. This type of
dynamics occurs when a microscopic system with an explicitly time-dependent
Liouvillian is coarse-grained by means of a projection operator formalism. We
show how to replace the deterministic fluctuating force in the generalized
Langevin equation by a stochastic process, such that the distributions of the
observables are reproduced up to moments of a given order. Thus, in combination
with a method to extract the memory kernel from simulation data of the
underlying microscopic model, the method introduced here allows to construct
and simulate a coarse-grained model for a driven process.
