[ library(gfd) | Reference Manual | Alphabetic Index ]

bin_packing_g(+Items, ++ItemSizes, +BinLoads)

The one-dimensional bin packing constraint with loads, using native Gecode indexing
Items
A collection of M (domain) variables or integers (domain/value between 0 and N-1)
ItemSizes
A collection of M non-negative integers
BinLoads
A collection of N v(domain) ariables or non-negative integers

Description

This version of the constraint uses the native Gecode indexing, which starts from 0. This is different from normal ECLiPSe's indexing, which starts from 1.

This predicate maps more directly to Gecode's native implementation of the constraint, without the conversion between Gecode and ECLiPSe indexing of cumulatives_min/5. It may therefore be more efficient, but could also be incompatible with existing ECLiPSe code.

See bin_packing/3 for a more detailed description of this predicate.

See Also

bin_packing / 4, bin_packing / 3