diff --git a/flatland/envs/schedule_generators.py b/flatland/envs/schedule_generators.py index 07f10cec7235eb027e00ea33b283c555a05b6dbe..4d783b8c34055e3eb24e1516f85c915a336a107c 100644 --- a/flatland/envs/schedule_generators.py +++ b/flatland/envs/schedule_generators.py @@ -87,7 +87,8 @@ def sparse_schedule_generator(speed_ratio_map: Mapping[float, float] = None) -> if not rail.check_path_exists(start[0], agent_orientation, target[0]): agent_orientation = (agent_orientation + 2) % 4 if not (rail.check_path_exists(start[0], agent_orientation, target[0])): - warnings.warn("Infeasible") + warnings.warn("Infeasible task: agent removed") + continue agents_position.append((start[0][0], start[0][1])) agents_target.append((target[0][0], target[0][1]))