2 * Description: For comparison of goodness in landscape with penalty method.
4 * @Applied domain: efficiently for ridge class feasible space (SF), such as
5 * the problem with eqaulity constraints
7 * @ Author Create/Modi Note
8 * Xiaofeng Xie May 29, 2004
12 * [1] Runarsson T P, Yao X. Stochastic ranking for constrained evolutionary
13 * optimization. IEEE Trans. on Evolutionary Computation. 2000, 4 (3): 284-294
17 package net
.adaptivebox
.goodness
;
19 import net
.adaptivebox
.global
.*;
21 public class PenaltyComparator
implements IGoodnessCompareEngine
{
24 public PenaltyComparator() {}
26 public PenaltyComparator(double rg
) {
30 public double calcPenaltyValue(double fit1
, double fit2
) {
34 * check the magnitude of two array, the frontial is more important
35 * Stoch ranking: array size = 2
37 public int compare(double[] fit1
, double[] fit2
) {
38 return GlobalCompare
.compare(calcPenaltyValue(fit1
[1], fit1
[0]), calcPenaltyValue(fit2
[1], fit2
[0]));