  We present an algorithm to simulate genuine, measurement-conditioned quantum
trajectories for a class of non-Markovian systems, using a collision model for
the environment. We derive two versions of the algorithm, the first
corresponding to photodetection and the second to homodyne detection with a
finite local oscillator amplitude. We use the algorithm to simulate
trajectories for a system with delayed coherent feedback, as well as a system
with a continuous memory.
