Managing loading and discharging operations at cross-docking terminals