|
synchronized void | delete () |
|
| Pack (Solver s, IntVar[] vars, int number_of_bins) |
|
void | addWeightedSumLessOrEqualConstantDimension (long[] weights, long[] bounds) |
|
void | addWeightedSumLessOrEqualConstantDimension (LongUnaryOperator weights, long[] bounds) |
|
void | addWeightedSumLessOrEqualConstantDimension (LongBinaryOperator weights, long[] bounds) |
|
void | addWeightedSumEqualVarDimension (long[] weights, IntVar[] loads) |
|
void | addWeightedSumEqualVarDimension (LongBinaryOperator weights, IntVar[] loads) |
|
void | addSumVariableWeightsLessOrEqualConstantDimension (IntVar[] usage, long[] capacity) |
|
void | addWeightedSumOfAssignedDimension (long[] weights, IntVar cost_var) |
|
void | addCountUsedBinDimension (IntVar count_var) |
|
void | addCountAssignedItemsDimension (IntVar count_var) |
|
void | post () |
|
void | clearAll () |
|
void | propagateDelayed () |
|
void | initialPropagate () |
|
void | propagate () |
|
void | oneDomain (int var_index) |
|
String | toString () |
|
boolean | isUndecided (int var_index, int bin_index) |
|
void | setImpossible (int var_index, int bin_index) |
|
void | assign (int var_index, int bin_index) |
|
boolean | isAssignedStatusKnown (int var_index) |
|
boolean | isPossible (int var_index, int bin_index) |
|
IntVar | assignVar (int var_index, int bin_index) |
|
void | setAssigned (int var_index) |
|
void | setUnassigned (int var_index) |
|
void | removeAllPossibleFromBin (int bin_index) |
|
void | assignAllPossibleToBin (int bin_index) |
|
void | assignFirstPossibleToBin (int bin_index) |
|
void | assignAllRemainingItems () |
|
void | unassignAllRemainingItems () |
|
void | accept (ModelVisitor visitor) |
|
void | postAndPropagate () |
|
boolean | isCastConstraint () |
|
IntVar | var () |
|
| PropagationBaseObject (Solver s) |
|
Solver | solver () |
|
void | freezeQueue () |
|
void | unfreezeQueue () |
|
void | enqueueDelayedDemon (Demon d) |
|
void | enqueueVar (Demon d) |
|
void | reset_action_on_fail () |
|
void | set_variable_to_clean_on_fail (IntVar v) |
|
String | name () |
|
void | setName (String name) |
|
boolean | hasName () |
|
String | baseName () |
|
| BaseObject () |
|
Definition at line 18 of file Pack.java.
◆ Pack() [1/2]
com.google.ortools.constraintsolver.Pack.Pack |
( |
long | cPtr, |
|
|
boolean | cMemoryOwn ) |
|
protected |
◆ Pack() [2/2]
com.google.ortools.constraintsolver.Pack.Pack |
( |
Solver | s, |
|
|
IntVar[] | vars, |
|
|
int | number_of_bins ) |
◆ accept()
void com.google.ortools.constraintsolver.Pack.accept |
( |
ModelVisitor | visitor | ) |
|
◆ addCountAssignedItemsDimension()
void com.google.ortools.constraintsolver.Pack.addCountAssignedItemsDimension |
( |
IntVar | count_var | ) |
|
This dimension links 'count_var' to the actual number of items
assigned to a bin in the pack.
Definition at line 147 of file Pack.java.
◆ addCountUsedBinDimension()
void com.google.ortools.constraintsolver.Pack.addCountUsedBinDimension |
( |
IntVar | count_var | ) |
|
This dimension links 'count_var' to the actual number of bins used in the
pack.
Definition at line 139 of file Pack.java.
◆ addSumVariableWeightsLessOrEqualConstantDimension()
void com.google.ortools.constraintsolver.Pack.addSumVariableWeightsLessOrEqualConstantDimension |
( |
IntVar[] | usage, |
|
|
long[] | capacity ) |
This dimension imposes:
forall b in bins,
sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b]
where is_assigned(i, b) is true if and only if item i is assigned
to the bin b.
This can be used to model shapes of items by linking variables of
the same item on parallel dimensions with an allowed assignment
constraint.
Definition at line 123 of file Pack.java.
◆ addWeightedSumEqualVarDimension() [1/2]
void com.google.ortools.constraintsolver.Pack.addWeightedSumEqualVarDimension |
( |
long[] | weights, |
|
|
IntVar[] | loads ) |
This dimension imposes that for all bins b, the weighted sum
(weights[i]) of all objects i assigned to 'b' is equal to loads[b].
Definition at line 99 of file Pack.java.
◆ addWeightedSumEqualVarDimension() [2/2]
void com.google.ortools.constraintsolver.Pack.addWeightedSumEqualVarDimension |
( |
LongBinaryOperator | weights, |
|
|
IntVar[] | loads ) |
This dimension imposes that for all bins b, the weighted sum
(weights->Run(i, b)) of all objects i assigned to 'b' is equal to
loads[b].
Definition at line 108 of file Pack.java.
◆ addWeightedSumLessOrEqualConstantDimension() [1/3]
void com.google.ortools.constraintsolver.Pack.addWeightedSumLessOrEqualConstantDimension |
( |
long[] | weights, |
|
|
long[] | bounds ) |
Dimensions are additional constraints than can restrict what is
possible with the pack constraint. It can be used to set capacity
limits, to count objects per bin, to compute unassigned
penalties...
This dimension imposes that for all bins b, the weighted sum
(weights[i]) of all objects i assigned to 'b' is less or equal
'bounds[b]'.
Definition at line 71 of file Pack.java.
◆ addWeightedSumLessOrEqualConstantDimension() [2/3]
void com.google.ortools.constraintsolver.Pack.addWeightedSumLessOrEqualConstantDimension |
( |
LongBinaryOperator | weights, |
|
|
long[] | bounds ) |
This dimension imposes that for all bins b, the weighted sum
(weights->Run(i, b) of all objects i assigned to 'b' is less or
equal to 'bounds[b]'. Ownership of the callback is transferred to
the pack constraint.
Definition at line 91 of file Pack.java.
◆ addWeightedSumLessOrEqualConstantDimension() [3/3]
void com.google.ortools.constraintsolver.Pack.addWeightedSumLessOrEqualConstantDimension |
( |
LongUnaryOperator | weights, |
|
|
long[] | bounds ) |
This dimension imposes that for all bins b, the weighted sum
(weights->Run(i)) of all objects i assigned to 'b' is less or
equal to 'bounds[b]'. Ownership of the callback is transferred to
the pack constraint.
Definition at line 81 of file Pack.java.
◆ addWeightedSumOfAssignedDimension()
void com.google.ortools.constraintsolver.Pack.addWeightedSumOfAssignedDimension |
( |
long[] | weights, |
|
|
IntVar | cost_var ) |
This dimension enforces that cost_var == sum of weights[i] for
all objects 'i' assigned to a bin.
Definition at line 131 of file Pack.java.
◆ assign()
void com.google.ortools.constraintsolver.Pack.assign |
( |
int | var_index, |
|
|
int | bin_index ) |
◆ assignAllPossibleToBin()
void com.google.ortools.constraintsolver.Pack.assignAllPossibleToBin |
( |
int | bin_index | ) |
|
◆ assignAllRemainingItems()
void com.google.ortools.constraintsolver.Pack.assignAllRemainingItems |
( |
| ) |
|
◆ assignFirstPossibleToBin()
void com.google.ortools.constraintsolver.Pack.assignFirstPossibleToBin |
( |
int | bin_index | ) |
|
◆ assignVar()
IntVar com.google.ortools.constraintsolver.Pack.assignVar |
( |
int | var_index, |
|
|
int | bin_index ) |
◆ clearAll()
void com.google.ortools.constraintsolver.Pack.clearAll |
( |
| ) |
|
◆ delete()
synchronized void com.google.ortools.constraintsolver.Pack.delete |
( |
| ) |
|
◆ finalize()
void com.google.ortools.constraintsolver.Pack.finalize |
( |
| ) |
|
|
protected |
◆ getCPtr()
static long com.google.ortools.constraintsolver.Pack.getCPtr |
( |
Pack | obj | ) |
|
|
staticprotected |
◆ initialPropagate()
void com.google.ortools.constraintsolver.Pack.initialPropagate |
( |
| ) |
|
◆ isAssignedStatusKnown()
boolean com.google.ortools.constraintsolver.Pack.isAssignedStatusKnown |
( |
int | var_index | ) |
|
◆ isPossible()
boolean com.google.ortools.constraintsolver.Pack.isPossible |
( |
int | var_index, |
|
|
int | bin_index ) |
◆ isUndecided()
boolean com.google.ortools.constraintsolver.Pack.isUndecided |
( |
int | var_index, |
|
|
int | bin_index ) |
◆ oneDomain()
void com.google.ortools.constraintsolver.Pack.oneDomain |
( |
int | var_index | ) |
|
◆ post()
void com.google.ortools.constraintsolver.Pack.post |
( |
| ) |
|
◆ propagate()
void com.google.ortools.constraintsolver.Pack.propagate |
( |
| ) |
|
◆ propagateDelayed()
void com.google.ortools.constraintsolver.Pack.propagateDelayed |
( |
| ) |
|
◆ removeAllPossibleFromBin()
void com.google.ortools.constraintsolver.Pack.removeAllPossibleFromBin |
( |
int | bin_index | ) |
|
◆ setAssigned()
void com.google.ortools.constraintsolver.Pack.setAssigned |
( |
int | var_index | ) |
|
◆ setImpossible()
void com.google.ortools.constraintsolver.Pack.setImpossible |
( |
int | var_index, |
|
|
int | bin_index ) |
◆ setUnassigned()
void com.google.ortools.constraintsolver.Pack.setUnassigned |
( |
int | var_index | ) |
|
◆ swigRelease()
static long com.google.ortools.constraintsolver.Pack.swigRelease |
( |
Pack | obj | ) |
|
|
staticprotected |
◆ toString()
String com.google.ortools.constraintsolver.Pack.toString |
( |
| ) |
|
◆ unassignAllRemainingItems()
void com.google.ortools.constraintsolver.Pack.unassignAllRemainingItems |
( |
| ) |
|
The documentation for this class was generated from the following file:
- build/java/ortools-java/src/main/java/com/google/ortools/constraintsolver/Pack.java