The increase in efficiency of container terminals is addressed via an approach based on the optimisation of logistics operations. Toward this end, a discrete-time dynamic model of the various flows of containers that are inter-modally routed from arriving carriers to carriers ready for departure is proposed. On the basis of such a model, the decisions on the allocation of the available handling resources inside a container terminal are made according to the predictive-control approach by minimising a performance cost function over a forward horizon from the current time instant. Since both the dynamic equations and the cost function are in general nonlinear and since binary variables are used to model the departure or stay of a carrier, such decisions result from the on-line solution of a mixed-integer nonlinear programming problem at each time step. To solve this problem, two techniques are proposed that have to deal explicitly with the binary variables and with the nonlinearities of the model and the cost function. The first relies on the application of a standard branch-and-bound algorithm. The second is based on the idea of treating the decisions associated with the binary variables as step functions. Simulation results are reported to illustrate the pros and cons of such methodologies in a case study. Maritime Economics & Logistics (2009) 11, 58–76. doi:10.1057/mel.2008.24