Two-stage time-optimal formation reconfiguration strategy