Skip to main content

A fast implementation for the 2D/3D box placement problem


The box placement problem involves finding a location to place a rectangular box into a container given n rectangular boxes that have already been placed. It commonly arises as a subproblem in many algorithms for cutting stock problems as well as 2D/3D packing problems. We show that the box placement problem is closely related to some well-studied problems in computational geometry, such as the maximum depth problem and Klee’s measure problem. This allows us to leverage on existing techniques for these problems to develop new algorithms for the box placement problem that are not only conceptually simpler but also asymptotically fastest for 2D and faster than existing approaches for 3D. Our implementations rely on augmenting the standard segment tree for 2D or quadtree for 3D, and can be directly incorporated as subroutines into many algorithms for cutting and packing problems.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13


  1. Ahmadinia, A., Bobda, C., Fekete, S., Teich, J., van der Veen, J.C.: Optimal free-space management and routing-conscious dynamic placement for reconfigurable devices. IEEE Trans. Comput. 56(5), 673–680 (2007). doi:10.1109/TC.2007.1028

    Article  MathSciNet  Google Scholar 

  2. Babu, A.R., Babu, N.R.: Effective nesting of rectangular parts in multiple rectangular sheets using genetic and heuristic algorithms. Int. J. Prod. Res. 37(7), 1625–1643 (1999). doi:10.1080/002075499191166

    Article  MATH  Google Scholar 

  3. Baker, B.S., Coffman, E.G., Rivest, R.L.: Orthogonal packings in two dimensions. SIAM J. Comput. 9(4), 846–855 (1980).

  4. Bennell, J., Song, X.: A beam search implementation for the irregular shape packing problem. J. Heuristics 16(2), 167–188 (2010). doi:10.1007/s10732-008-9095-x

    Article  MATH  Google Scholar 

  5. Burke, E.K., Hellier, R.S.R., Kendall, G., Whitwell, G.: Irregular packing using the line and arc no-fit polygon. Oper. Res. 58(4–Part–1), 948–970 (2010). doi:10.1287/opre.1090.0770

    Article  MATH  Google Scholar 

  6. Chan, T.M.: A (slightly) faster algorithm for Klee’s measure problem. Comput. Geom. (2009). doi:10.1016/j.comgeo.2009.01.007

  7. Chazelle, B.: The bottomn-left bin-packing heuristic: an efficient implementation. IEEE Trans. Comput. C–32(8), 697–707 (1983). doi:10.1109/TC.1983.1676307

    Article  Google Scholar 

  8. Chlebus, B.: On the Klee’s measure problem in small dimensions. In: Rovan, B. (ed.) SOFSEM’98: Theory and Practice of Informatics. Lecture Notes in Computer Science, vol. 1521, Chap. 22, pp. 304–311. Springer, Berlin (1998). doi:10.1007/3-540-49477-4_22

  9. de Berg, M., Cheong, O., van Kreveld, M., Overmars, M.: Computational Geometry: Algorithms and Applications, 3rd edn. Springer, Heidelberg (2008).

  10. Gendreau, M., Iori, M., Laporte, G., Martello, S.: A Tabu search algorithm for a routing and container loading problem. Transp. Sci. 40(3), 342–350 (2006). doi:10.1287/trsc.1050.0145

    Article  Google Scholar 

  11. Healy, P., Creavin, M., Kuusik, A.: An optimal algorithm for rectangle placement. Oper. Res. Lett. 24(1–2), 73–80 (1999). doi:10.1016/S0167-6377(98)00048-0,

  12. Hopper, E., Turton, B.C.H.: An empirical investigation of meta-heuristic and heuristic algorithms for a 2D packing problem. Eur. J. Oper. Res. 128(1), 34–57 (2001). doi:10.1016/s0377-2217(99)00357-4

    Article  MATH  Google Scholar 

  13. Jakobs, S.: On genetic algorithms for the packing of polygons. Eur. J. Oper. Res. 88(1), 165–181 (1996). doi:10.1016/0377-2217(94)00166-9

    Article  MATH  Google Scholar 

  14. Overmars, M.H., Yap, C.K.: New upper bounds in Klee’s measure problem. SIAM J. Comput. 20(6), 1034–1045 (1991). doi:10.1137/0220065

    Article  MathSciNet  MATH  Google Scholar 

  15. Vanleeuwen, J., Wood, D.: The measure problem for rectangular ranges in d-space. J. Algorithm. 2(3), 282–300 (1981). doi:10.1016/0196-6774(81)90027-4

    Article  MathSciNet  Google Scholar 

  16. Wu, Y.: An effective quasi-human based heuristic for solving the rectangle packing problem. Eur. J. Oper. Res. 141(2), 341–358 (2002). doi:10.1016/S0377-2217(02)00129-7

    Article  MATH  Google Scholar 

  17. Zhu, W., Lim, A.: A new iterative-doubling Greedy-Lookahead algorithm for the single container loading problem. Eur. J. Oper. Res. 222(3), 408–417 (2012). doi:10.1016/j.ejor.2012.04.036

    Article  MathSciNet  MATH  Google Scholar 

  18. Zhu, W., Oon, W.C., Lim, A., Weng, Y.: The six elements to block-building approaches for the single container loading problem. Appl. Intell. 37(3), 431–445 (2012). doi:10.1007/s10489-012-0337-0

    Article  Google Scholar 

  19. Zhu, W., Qin, H., Lim, A., Wang, L.: A two-stage Tabu Search Algorithm with enhanced packing heuristics for the 3L-CVRP and M3L-CVRP. Comput. Oper. Res. 39(9), 191–199 (2012). doi:10.1016/j.cor.2011.11.001

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Zhixing Luo.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Zhu, W., Luo, Z., Lim, A. et al. A fast implementation for the 2D/3D box placement problem. Comput Optim Appl 63, 585–612 (2016).

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI:


  • Packing
  • Cutting
  • Rectangle placement
  • Box placement
  • VLSI layout