Using Debug Mode to Refine the Simulation