Added map to dynamic model and handlig for invalid particles