Skip to main content
Log in

Improved filtering for the bin-packing with cardinality constraint

  • Published:
Constraints Aims and scope Submit manuscript

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

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

Similar content being viewed by others

Notes

  1. For simplicity, we use in the remaining of this paper items weights as a way to identify items

  2. which itself subsumes SimpleBPC

  3. 3i. e. item i 0will be assigned to bin j after cancelation of the cycle

  4. 4Note that u and v can be confounded with i 0, k 0, i 1or k 1,which does not change the proof.

  5. the worst case being a complete graph

  6. A small variation of this algorithm, where the dichotomic search is replaced by a linear one, leading to a complexity of \(\mathcal {O}(m^{3}+m^{2}n^{2})\), was also implemented. Its performances are very close to its dichotomic counterpart.

References

  1. Bessiere, C. (2006). Constraint propagation. Foundations of Artificial Intelligence, 2, 29–83.

    Article  Google Scholar 

  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.

  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.

  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.

    Article  MATH  Google Scholar 

  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.

    MATH  Google Scholar 

  6. Goldberg, A.V., & Tarjan, R.E. (1989). Finding minimum-cost circulations by canceling negative cycles. J. ACM, 36(4), 873–886.

    Article  MathSciNet  MATH  Google Scholar 

  7. Labbé, M., Laporte, G., & Martello, S. (1995). An exact algorithm for the dual bin packing problem. Operations Research Letters, 17(1), 9–18. http://www.sciencedirect.com/science/article/pii/016763779400060J.

    Article  MathSciNet  MATH  Google Scholar 

  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. http://www.sciencedirect.com/science/article/pii/S0377221702004666.

    Article  MathSciNet  MATH  Google Scholar 

  9. Lodi, A., Martello, S., & Vigo, D. (2002). Recent advances on two-dimensional bin packing problems. Discrete Applied Mathematics, 123(1), 379–396. http://www.sciencedirect.com/science/article/pii/S0166218X0100347X.

    Article  MathSciNet  MATH  Google Scholar 

  10. Martello, S., & Toth, P. (1990). Lower bounds and reduction procedures for the bin packing problem. Discrete Applied Mathematics, 28(1), 59–70. http://www.sciencedirect.com/science/article/pii/0166218X9090094S.

    Article  MathSciNet  MATH  Google Scholar 

  11. Martello, S., & Vigo, D. (1998). Exact solution of the two-dimensional finite bin packing problem. Management science, 44(3), 388–399.

    Article  MATH  Google Scholar 

  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. https://hal.inria.fr/inria-00548479 .

  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.

  14. OscaR Team. OscaR: Scala in OR (2012). Available from https://bitbucket.org/oscarlib/oscar.

  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.

  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. http://www.aaai.org/ocs/index.php/WS/AAAIW11/paper/view/3817.

  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.

  18. Schaus, P. (2009). Solving balancing and bin-packing problems with constraint programming. These de doctorat: Université catholique de Louvain.

    Google Scholar 

  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.

  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.

  21. Shaw, P. (2004). A constraint for bin packing. In International Conference on Principles and Practice of Constraint Programming, pp. 648–662. Springer.

  22. Van Cauwelaert, S., Lombardi, M., & Schaus, P. (2017). How efficient is a global constraint in practice Constraints.

Download references

Acknowledgements

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

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Guillaume Derval.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Derval, G., Régin, JC. & Schaus, P. Improved filtering for the bin-packing with cardinality constraint. Constraints 23, 251–271 (2018). https://doi.org/10.1007/s10601-017-9278-x

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10601-017-9278-x

Keywords

Navigation