, Volume 23, Issue 3, pp 251–271 | Cite as

Improved filtering for the bin-packing with cardinality constraint

  • Guillaume Derval
  • Jean-Charles Régin
  • Pierre Schaus


Previous research shows that a cardinality reasoning can improve the pruning of the bin-packing constraint. We first introduce a new algorithm, called BPCFlow, that filters both load and cardinality bounds on the bins, using a flow reasoning similar to the Global Cardinality Constraint. Moreover, we detect impossible assignments of items by combining the load and cardinality of the bins, using a method to detect items that are either ”too-big” or ”too-small”. This method is adapted to two previously existing filtering techniques along with BPCFlow, creating three new propagators. We then experiment the four new algorithms on Balanced Academic Curriculum Problem and Tank Allocation Problem instances. BPCFlow is shown to be stronger than previously existing filtering, and more computationally intensive. We show that the new filtering is useful on a small number of hard instances, while being too expensive for general use. Our results show that the introduced ”too-big/too-small” filtering can most of the time drastically reduce the size of the search tree and the computation time. This method is profitable in 88% of the tested instances.


Bin-packing Cardinality Flows Constraints 



We thank the anonymous reviewer for suggesting the idea of using a dichotomic search in Algorithm 3.


  1. 1.
    Bessiere, C. (2006). Constraint propagation. Foundations of Artificial Intelligence, 2, 29–83.CrossRefGoogle Scholar
  2. 2.
    Cambazard, H., & O’Sullivan, B. (2010). Propagating the bin packing constraint using linear programming. In Cohen, D. (Ed.) International Conference on Principles and Practice of Constraint Programming (pp. 129–136). Berlin: Springer.Google Scholar
  3. 3.
    Dupuis, J., Schaus, P., & Deville, Y. (2010). Consistency check for the bin packing constraint revisited. In International Conference on Integration of Artificial Intelligence (AI) and Operations Research (OR) Techniques in Constraint Programming, pp. 117–122. Springer.Google Scholar
  4. 4.
    Edmonds, J., & Karp, R.M. (1972). Theoretical improvements in algorithmic efficiency for network flow problems. Journal of the ACM (JACM), 19(2), 248–264.CrossRefMATHGoogle Scholar
  5. 5.
    Ford, L.R., & Fulkerson, D.R. (1955). A simple algorithm for finding maximal network flows and an application to the Hitchcock problem. DTIC Document: Tech. rep.MATHGoogle Scholar
  6. 6.
    Goldberg, A.V., & Tarjan, R.E. (1989). Finding minimum-cost circulations by canceling negative cycles. J. ACM, 36(4), 873–886.MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Labbé, M., Laporte, G., & Martello, S. (1995). An exact algorithm for the dual bin packing problem. Operations Research Letters, 17(1), 9–18. Scholar
  8. 8.
    Labbé, M., Laporte, G., & Martello, S. (2003). Upper bounds and algorithms for the maximum cardinality bin packing problem. European Journal of Operational Research, 149(3), 490–498. Scholar
  9. 9.
    Lodi, A., Martello, S., & Vigo, D. (2002). Recent advances on two-dimensional bin packing problems. Discrete Applied Mathematics, 123(1), 379–396. Scholar
  10. 10.
    Martello, S., & Toth, P. (1990). Lower bounds and reduction procedures for the bin packing problem. Discrete Applied Mathematics, 28(1), 59–70. Scholar
  11. 11.
    Martello, S., & Vigo, D. (1998). Exact solution of the two-dimensional finite bin packing problem. Management science, 44(3), 388–399.CrossRefMATHGoogle Scholar
  12. 12.
    Mohr, R., & Masini, G. (1988). Good Old Discrete Relaxation. In Kodratoff, Y. (Ed.) 8th European Conference on Artificial Intelligence (ECAI ’88)(pp. 651–656). Munich: Pitmann Publishing. .
  13. 13.
    Monette, J.-N., Schaus, P., Zampelli, S., Deville, Y., & Dupont, P. (2007). A CP approach to the balanced academic curriculum problem. In Seventh International Workshop on Symmetry and Constraint Satisfaction Problems, vol. 7.Google Scholar
  14. 14.
    OscaR Team. OscaR: Scala in OR (2012). Available from
  15. 15.
    Pelsser, F., Schaus, P., & Régin, J.-C. (2013). Revisiting the cardinality reasoning for binpacking constraint. In International Conference on Principles and Practice of Constraint Programming, pp. 578–586. Springer.Google Scholar
  16. 16.
    Rėgin, J., & Rezgui, M. (2011). Discussion about constraint programming bin packing models. In AI for Data Center Management and Cloud Computing, Papers from the 2011 AAAI Workshop, San Francisco, California, USA, August 7, 2011.
  17. 17.
    Régin, J.-C. (1996). Generalized arc consistency for global cardinality constraint. In Proceedings of the thirteenth national conference on Artificial intelligence-Volume 1, pp. 209–215. AAAI Press.Google Scholar
  18. 18.
    Schaus, P. (2009). Solving balancing and bin-packing problems with constraint programming. These de doctorat: Université catholique de Louvain.Google Scholar
  19. 19.
    Schaus, P., Régin, J.-C., Schaeren, R.V., Dullaert, W., & Raa, B. (2012). Cardinality reasoning for bin-packing constraint. application to a tank allocation problem. In International Conference on Principles and Practice of Constraint Programming.Google Scholar
  20. 20.
    Schaus, P., Régin, J.-C., Van Schaeren, R., Dullaert, W., & Raa, B. (2012). Cardinality reasoning for bin-packing constraint: application to a tank allocation problem. In International Conference on Principles and Practice of Constraint Programming, pp. 815–822. Springer.Google Scholar
  21. 21.
    Shaw, P. (2004). A constraint for bin packing. In International Conference on Principles and Practice of Constraint Programming, pp. 648–662. Springer.Google Scholar
  22. 22.
    Van Cauwelaert, S., Lombardi, M., & Schaus, P. (2017). How efficient is a global constraint in practice Constraints.Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2017

Authors and Affiliations

  1. 1.UCLouvainLouvain-la-NeuveBelgium
  2. 2.University of Nice Sophia-AntipolisNiceFrance

Personalised recommendations