| Package | Description |
|---|---|
| org.jacop.constraints.knapsack |
| Modifier and Type | Field and Description |
|---|---|
KnapsackItem[] |
Knapsack.items
The array of items present in the knapsack constraint.
|
| Modifier and Type | Method and Description |
|---|---|
int |
KnapsackItem.compareTo(KnapsackItem that)
Method used in the sorting of the items, we use profit and weight to know
the less efficient item without using division.
|
| Constructor and Description |
|---|
Knapsack(KnapsackItem[] items,
IntVar knapsackCapacity,
IntVar knapsackProfit)
It constructs an knapsack constraint.
|
Tree(KnapsackItem[] items,
HashMap<IntVar,TreeLeaf> varPositionMaping,
TreeLeaf[] leaves,
IntVar zero)
It constructs a tree out of the list of items and creates
proper supporting structures.
|
Copyright © 2016. All rights reserved.