Class TotalRankSolverRankingWeightFactory
- java.lang.Object
-
- org.optaplanner.benchmark.impl.ranking.TotalRankSolverRankingWeightFactory
-
- All Implemented Interfaces:
SolverRankingWeightFactory
public class TotalRankSolverRankingWeightFactory extends Object implements SolverRankingWeightFactory
ThisSolverRankingWeightFactoryorders aSolverBenchmarkResultby how many times each of itsSingleBenchmarkResults beatSingleBenchmarkResults of the otherSolverBenchmarkResult. It maximizes the overall ranking.When the inputSolutions differ greatly in size or difficulty, this often produces a difference in
Scoremagnitude between eachPlanningSolution. For example: score 10 for dataset A versus 1000 for dataset B. In such cases, this ranking is more fair thanTotalScoreSolverRankingComparator, because in this ranking, dataset B wouldn't marginalize dataset A.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTotalRankSolverRankingWeightFactory.TotalRankSolverRankingWeight
-
Constructor Summary
Constructors Constructor Description TotalRankSolverRankingWeightFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComparablecreateRankingWeight(List<SolverBenchmarkResult> solverBenchmarkResultList, SolverBenchmarkResult solverBenchmarkResult)The ranking function.
-
-
-
Method Detail
-
createRankingWeight
public Comparable createRankingWeight(List<SolverBenchmarkResult> solverBenchmarkResultList, SolverBenchmarkResult solverBenchmarkResult)
Description copied from interface:SolverRankingWeightFactoryThe ranking function. Takes the provided solverBenchmarkResultList and ranks them.- Specified by:
createRankingWeightin interfaceSolverRankingWeightFactory- Parameters:
solverBenchmarkResultList- never nullsolverBenchmarkResult- never null- Returns:
- never null
-
-