be.cetic.ddolibscala.examples.layered.knapsack
Members list
Type members
Classlikes
Example of KnapSack resolution with DDO Solver.
Example of KnapSack resolution with DDO Solver.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
KnapSachDdoMain.type
Represents an instance of the Knapsack Problem as a be.cetic.ddolibscala.layered.modeling.Problem.
Represents an instance of the Knapsack Problem as a be.cetic.ddolibscala.layered.modeling.Problem.
The problem consists of choosing a subset of items to maximize total profit without exceeding a fixed capacity. Each item can either be taken or left out.
The state of the problem is represented by an Int indicating the remaining capacity.
Value parameters
- capa
-
the total capacity of the knapsack
- profit
-
the profit of each item
- weight
-
the weight of each item
Attributes
- Companion
- object
- Supertypes
Compute a be.cetic.ddolibscala.layered.modeling.FastLowerBound for the KnapSack Problem.
Compute a be.cetic.ddolibscala.layered.modeling.FastLowerBound for the KnapSack Problem.
Value parameters
- problem
-
the associated KnapSack problem instance
Attributes
- Supertypes
Implements a ranking strategy for states in the KnapSack Problem.
Implements a ranking strategy for states in the KnapSack Problem.
The ranking is based on the fact that low capacity offers lower payoff
Attributes
- Supertypes
-
trait StateRanking[Int]trait StateRanking[Int]trait Comparator[Int]class Objecttrait Matchableclass AnyShow all
Relaxation operators for the Knapsack Problem.
Relaxation operators for the Knapsack Problem.
Merging takes the maximum remaining capacity among the merged states, so that no feasible decision is ever lost: any item that fit in one of the original states still fits in the merged one.
The cost of an edge redirected to a merged node does not need to be adjusted.
Attributes
- Supertypes