Coordinating the motion of multiple AGVs in automatic warehouses