Nonlinear model predictive control for resource allocation in the management of intermodal container terminals