Using simulation to solve problems