Text this: Optimal Manoeuvres of Underactuated Linear Mechanical Systems: The Case of Controlling Gantry Crane Operations