def simulate(self, parameters, times):
        """ See :meth:`pints.ForwardModel.simulate()`. """
        times = np.asarray(times)
        if np.any(times < 0):
            raise ValueError('Negative times are not allowed.')
        if self._n0 == 0:
            return np.zeros(times.shape)

        # run Gillespie
        time, pop_size = self._simulate_raw(parameters)

        # interpolate
        values = self._interpolate_values(time, pop_size, times, parameters)
        return values