Mathematical models and heuristic algorithms for pallet building problems with practical constraints