OptaPlanner distribution 6.0.0.CR1

org.optaplanner.benchmark.impl.ranking
Class TotalScoreSolverBenchmarkRankingComparator

java.lang.Object
  extended by org.optaplanner.benchmark.impl.ranking.TotalScoreSolverBenchmarkRankingComparator
All Implemented Interfaces:
Serializable, Comparator<SolverBenchmark>

public class TotalScoreSolverBenchmarkRankingComparator
extends Object
implements Comparator<SolverBenchmark>, Serializable

This ranking Comparator orders a SolverBenchmark by its total Score. It maximize the overall score, so it minimizes the overall cost if all Solutions would be executed.

When the inputSolutions differ greatly in size or difficulty, this often results in a big difference in Score magnitude between each Solution. For example: score 10 for dataset A versus 1000 for dataset B. In such cases, dataset B would marginalize dataset A. To avoid that, use TotalRankSolverBenchmarkRankingWeightFactory.

See Also:
Serialized Form

Constructor Summary
TotalScoreSolverBenchmarkRankingComparator()
           
 
Method Summary
 int compare(SolverBenchmark a, SolverBenchmark b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

TotalScoreSolverBenchmarkRankingComparator

public TotalScoreSolverBenchmarkRankingComparator()
Method Detail

compare

public int compare(SolverBenchmark a,
                   SolverBenchmark b)
Specified by:
compare in interface Comparator<SolverBenchmark>

OptaPlanner distribution 6.0.0.CR1

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.