Algorithm for time-delay interferometry numerical simulation and sensitivity investigation