|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.constraints.global.pack.PackFiltering
public final class PackFiltering
The Class PackFiltering
is implements filtering rules for one-dimensional bin packing constraint.
In fact, all variables are not given. So, the constraint used an interface IPackSConstraint
to get informations.
This class is a global constraint inspired from the 1BP constraint proposed by
[1].
Field Summary | |
---|---|
IPackSConstraint |
cstr
|
protected BitMask |
flags
|
protected IntDomainVar[] |
loads
The loads of the bins. |
protected choco.cp.solver.constraints.global.pack.PackFiltering.SumDataStruct |
loadSum
|
protected int[] |
sizes
The sizes of the items. |
Constructor Summary | |
---|---|
PackFiltering(IPackSConstraint cstr,
BitMask flags)
Instantiates a new 1BP constraint. |
Method Summary | |
---|---|
protected void |
cardAndItemsCoherence(int bin)
|
protected void |
cardMaintenance(int bin)
|
protected void |
loadAndSizeCoherence(int bin)
The minimum and maximum load of each bin loads is maintained according to the domains of the bin assignment variables. |
protected void |
loadMaintenance(int bin)
The minimum and maximum load of each bin loads is maintained according to the domains of the bin assignment variables. |
protected void |
noSumBinLoads(NoSumList nosum,
int bin)
Update the load of a given bin with no sum algorithm |
protected void |
noSumItemEliminationAndCommitment(NoSumList nosum,
int bin)
use no sum algorithm to pack into or remove from. |
protected void |
noSumPruningRule(NoSumList nosum,
int bin)
Feasibility test on the load of a given bin using no sum algorothm. |
protected void |
pack(int item,
int bin)
Do not update status |
void |
propagate()
|
protected void |
remove(int item,
int bin)
Do not update status |
protected void |
singleItemEliminationAndCommitment(int bin)
Single item elimination and commitment. |
protected void |
singleItemEliminationAndCommitmentAndFill(int bin)
|
protected void |
updateInfLoad(int bin,
int load)
Update the minimal load of a given bin. |
protected void |
updateSupLoad(int bin,
int load)
Update the maximal load of a given bin. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final IPackSConstraint cstr
protected final BitMask flags
protected final int[] sizes
protected final IntDomainVar[] loads
protected final choco.cp.solver.constraints.global.pack.PackFiltering.SumDataStruct loadSum
Constructor Detail |
---|
public PackFiltering(IPackSConstraint cstr, BitMask flags)
environment
- Method Detail |
---|
protected final void updateInfLoad(int bin, int load) throws ContradictionException
bin
- the index of binload
- the new load
ContradictionException
- the contradiction exceptionprotected final void updateSupLoad(int bin, int load) throws ContradictionException
bin
- the index of binload
- the new load
ContradictionException
- the contradiction exceptionprotected final void pack(int item, int bin) throws ContradictionException
ContradictionException
protected final void remove(int item, int bin) throws ContradictionException
ContradictionException
protected final void loadAndSizeCoherence(int bin) throws ContradictionException
loads
is maintained according to the domains of the bin assignment variables.
bin
- the bin
ContradictionException
- the contradiction exceptionprotected final void cardAndItemsCoherence(int bin) throws ContradictionException
ContradictionException
protected final void loadMaintenance(int bin) throws ContradictionException
loads
is maintained according to the domains of the bin assignment variables.
bin
- the index of the bin
ContradictionException
- the contradiction exceptionprotected final void cardMaintenance(int bin) throws ContradictionException
ContradictionException
protected final void singleItemEliminationAndCommitment(int bin) throws ContradictionException
bin
- the bin
ContradictionException
- the contradiction exceptionprotected final void singleItemEliminationAndCommitmentAndFill(int bin) throws ContradictionException
bin
- the bin
ContradictionException
- the contradiction exceptionprotected final void noSumPruningRule(NoSumList nosum, int bin) throws ContradictionException
ContradictionException
- the contradiction exceptionprotected final void noSumBinLoads(NoSumList nosum, int bin) throws ContradictionException
ContradictionException
- the contradiction exceptionprotected final void noSumItemEliminationAndCommitment(NoSumList nosum, int bin) throws ContradictionException
ContradictionException
- the contradiction exceptionpublic void propagate() throws ContradictionException
ContradictionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |