Optimizing train loading operations in innovative and automated container terminals