batch_simulation function

Perform a batch simulation.