Adaptive parallelization of multi-agent simulations with localized dynamics