optimal line switching maneuvers