In this paper we face the train loading problem (TLP) at seaport terminals by proposing a general purpose Lagrangian heuristic. The TLP consists of assigning import containers to the trains departing from the terminal, maximizing the utilization of trains, minimizing the distance travelled by containers from their locations in the storage area to the wagons, as well as the number of needed unpr…