Package org.opt4j.benchmarks.knapsack
Class KnapsackOverloadEvaluator
java.lang.Object
org.opt4j.benchmarks.knapsack.KnapsackOverloadEvaluator
- All Implemented Interfaces:
Evaluator<ItemSelection>
The
KnapsackOverloadEvaluator
evaluates a given ItemSelection
using one Objective
to sum up all knapsack overloads and one
Objective
for the profit of each knapsack.-
Constructor Summary
ConstructorDescriptionKnapsackOverloadEvaluator
(KnapsackProblem problem) Creates a newKnapsackOverloadEvaluator
. -
Method Summary
Modifier and TypeMethodDescriptionevaluate
(ItemSelection itemSelection) Evaluates a phenotypeObject
and returns the results in theObjectives
.
-
Constructor Details
-
KnapsackOverloadEvaluator
Creates a newKnapsackOverloadEvaluator
.- Parameters:
problem
- the problem instance
-
-
Method Details
-
evaluate
Description copied from interface:Evaluator
Evaluates a phenotypeObject
and returns the results in theObjectives
.- Specified by:
evaluate
in interfaceEvaluator<ItemSelection>
- Parameters:
itemSelection
- the phenotype to be evaluated- Returns:
- the results in the objectives
-