3d matrice-based multi-unit full package optimization