On simulating and predicting pedestrian trajectories in a crowd