Real-time motion planning and simulation of cranes in construction