Generated on Mon Sep 17 2012 22:20:49 for Gecode by doxygen 1.8.1.1
Bin packing constraints

Functions

void Gecode::binpacking (Home home, const IntVarArgs &l, const IntVarArgs &b, const IntArgs &s, IntConLevel icl=ICL_DEF)
 Post propagator for bin packing.

Detailed Description

Constraints for modeling bin packing problems. Propagation follows: Paul Shaw. A Constraint for Bin Packing. CP 2004.


Function Documentation

void Gecode::binpacking ( Home  home,
const IntVarArgs &  l,
const IntVarArgs &  b,
const IntArgs &  s,
IntConLevel  icl = ICL_DEF 
)

Post propagator for bin packing.

The variables in \a l are the loads for each bin, whereas the
variables in \a b define for each item into which bin it is packed.
The integer values \a s define the size of the items.

It is propagated that for each \form#271 with \form#272 the
constraint \form#273 holds and that
for each \form#0 with \form#274 the constraint

$0\leq b_i<|l|$ holds.

Throws the following exceptions:
 - Of type Int::ArgumentSizeMismatch if \a b and \a s are not of
   the same size.
 - Of type Int::ArgumentSame if \a l and \a b share unassigned variables.
 - Of type Int::OutOfLimits if \a s contains a non-positive number.

Definition at line 43 of file bin-packing.cpp.