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,
Map<IntVar,TreeLeaf> varPositionMaping,
TreeLeaf[] leaves,
IntVar zero)
It constructs a tree out of the list of items and creates
proper supporting structures.
|
Copyright © 2022. All rights reserved.