Update simulation.cpp