A simulation and online optimization approach for the real-time management of ambulances