public class ViolationThresholdComparator<S extends Solution<?>> extends Object implements ConstraintViolationComparator<S>
| Constructor and Description |
|---|
ViolationThresholdComparator()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(S solution1,
S solution2)
Compares two solutions.
|
double |
feasibilityRatio(List<S> solutionSet)
Computes the feasibility ratio
Return the ratio of feasible solutions
|
double |
meanOverallViolation(List<S> solutionSet)
Computes the feasibility ratio
Return the ratio of feasible solutions
|
boolean |
needToCompare(S solution1,
S solution2)
Returns true if solutions s1 and/or s2 have an overall constraint
violation with value less than 0
|
void |
updateThreshold(List<S> set)
Updates the threshold value using the population
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic int compare(S solution1, S solution2)
compare in interface Comparator<S extends Solution<?>>compare in interface ConstraintViolationComparator<S extends Solution<?>>solution1 - Object representing the first Solution.solution2 - Object representing the second Solution.public boolean needToCompare(S solution1, S solution2)
public double feasibilityRatio(List<S> solutionSet)
public double meanOverallViolation(List<S> solutionSet)
Copyright © 2015. All rights reserved.