Implement simulation.