choco.cp.solver.constraints.global.pack
Interface IPackSConstraint

All Known Implementing Classes:
PackSConstraint

public interface IPackSConstraint

Since:
5 déc. 2008 version 2.0.1
Version:
2.0.3
Author:
Arnaud Malapert

Method Summary
 void fail()
           
 void fireAvailableBins()
           
 IStateIntVector getAvailableBins()
           
 IntDomainVar[] getBins()
           
 IntDomainVar[] getLoads()
           
 int getNbBins()
           
 int getNbItems()
           
 int[] getSizes()
           
 NoSumList getStatus(int bin)
           
 boolean pack(int item, int bin)
          Pack an item into a bin
 boolean remove(int item, int bin)
          Remove a possible assignment of an item into a bin.
 boolean updateInfLoad(int bin, int load)
          Update the minimal load of a given bin.
 boolean updateNbNonEmpty(int min, int max)
          update the number of non empty bins.
 boolean updateSupLoad(int bin, int load)
          Update the maximal load of a given bin.
 

Method Detail

getNbBins

int getNbBins()

getNbItems

int getNbItems()

getBins

IntDomainVar[] getBins()

getLoads

IntDomainVar[] getLoads()

getSizes

int[] getSizes()

fail

void fail()
          throws ContradictionException
Throws:
ContradictionException

getStatus

NoSumList getStatus(int bin)

getAvailableBins

IStateIntVector getAvailableBins()

fireAvailableBins

void fireAvailableBins()

updateInfLoad

boolean updateInfLoad(int bin,
                      int load)
                      throws ContradictionException
Update the minimal load of a given bin.

Parameters:
bin - the index of bin
load - the new load
Throws:
ContradictionException - the contradiction exception

updateSupLoad

boolean updateSupLoad(int bin,
                      int load)
                      throws ContradictionException
Update the maximal load of a given bin.

Parameters:
bin - the index of bin
load - the new load
Throws:
ContradictionException - the contradiction exception

updateNbNonEmpty

boolean updateNbNonEmpty(int min,
                         int max)
                         throws ContradictionException
update the number of non empty bins.

Throws:
ContradictionException

pack

boolean pack(int item,
             int bin)
             throws ContradictionException
Pack an item into a bin

Returns:
true, if successful
Throws:
ContradictionException - the contradiction exception

remove

boolean remove(int item,
               int bin)
               throws ContradictionException
Remove a possible assignment of an item into a bin.

Returns:
true, if successful
Throws:
ContradictionException - the contradiction exception


Copyright © 2012. All Rights Reserved.