# Cardinality Reasoning for Bin-Packing Constraint: Application to a Tank Allocation Problem

2 Laboratoire d'Informatique, Signaux, et Systèmes de Sophia-Antipolis (I3S) / Equipe CEP
Laboratoire I3S - MDSC - Modèles Discrets pour les Systèmes Complexes
Abstract : Flow reasoning has been successfully used in CP for more than a decade. It was originally introduced by Régin in the well-known Alldifferent and Global Cardinality Constraint (GCC) available in most of the CP solvers. The BinPacking constraint was introduced by Shaw and mainly uses an independent knapsack reasoning in each bin to filter the possible bins for each item. This paper considers the use of a cardinal-ity/flow reasoning for improving the filtering of a bin-packing constraint. The idea is to use a GCC as a redundant constraint to the BinPacking that will count the number of items placed in each bin. The cardinality variables of the GCC are then dynamically updated during the propagation. The cardinality reasoning of the redundant GCC makes deductions that the bin-packing constraint cannot see since the placement of all items into every bin is considered at once rather than for each bin individually. This is particularly well suited when a minimum loading in each bin is specified in advance. We apply this idea on a Tank Allocation Problem (TAP). We detail our CP model and give experimental results on a real-life instance demonstrating the added value of the cardinality reasoning for the bin-packing constraint. This constraint enforces the relation L j = i (X i = j) · w i , ∀j. It makes the link between n weighted items (item i has a weight w i) and the m different capacitated bins in which they are to be put. Only the weights of the items are integers, the other arguments of the constraints are finite domain (f.d.) variables. Note that in this formulation, Lj is a variable which is bounded by the maximal capacity of the bin j. Without loss of generality we assume the item variables and their weights are sorted such that w i ≤ w i+1. Example: BinP acking([1, 4, 1, 2, 2], [2, 3, 3, 3, 4], [5, 7, 0, 3]).
Keywords :
Document type :
Conference papers

Cited literature [3 references]

https://hal.archives-ouvertes.fr/hal-01344066
Contributor : Jean-Charles Regin <>
Submitted on : Monday, July 11, 2016 - 12:09:15 PM
Last modification on : Monday, October 12, 2020 - 10:30:32 AM

### File

paper.pdf
Files produced by the author(s)

### Citation

Pierre Schaus, Jean-Charles Régin, Rowan van Schaeren, Wout Dullaert, Birger Raa. Cardinality Reasoning for Bin-Packing Constraint: Application to a Tank Allocation Problem. CP 2012, Oct 2012, Québec, Canada. ⟨10.1007/978-3-642-33558-7_58⟩. ⟨hal-01344066⟩

Record views