Optimization of container transfers in maritime terminals