multiprocess if in simulation