An event-triggered receding-horizon scheme for planning rail operations in maritime terminals