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
ConstructorsConstructorDescriptionKnapsackOverloadEvaluator(KnapsackProblem problem) Creates a newKnapsackOverloadEvaluator. -
Method Summary
Modifier and TypeMethodDescriptionevaluate(ItemSelection itemSelection) Evaluates a phenotypeObjectand returns the results in theObjectives.
-
Constructor Details
-
KnapsackOverloadEvaluator
Creates a newKnapsackOverloadEvaluator.- Parameters:
problem- the problem instance
-
-
Method Details
-
evaluate
Description copied from interface:EvaluatorEvaluates a phenotypeObjectand returns the results in theObjectives.- Specified by:
evaluatein interfaceEvaluator<ItemSelection>- Parameters:
itemSelection- the phenotype to be evaluated- Returns:
- the results in the objectives
-