@@ -0,0 +1,3141 @@
+package org.uma.jmetal.algorithm.multiobjective.abyss;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.List;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.uma.jmetal.algorithm.Algorithm;%0Aimport org.uma.jmetal.operator.CrossoverOperator;%0Aimport org.uma.jmetal.operator.LocalSearchOperator;%0Aimport org.uma.jmetal.operator.MutationOperator;%0Aimport org.uma.jmetal.operator.impl.crossover.SBXCrossover;%0Aimport org.uma.jmetal.operator.impl.localsearch.ArchiveMutationLocalSearch;%0Aimport org.uma.jmetal.operator.impl.mutation.PolynomialMutation;%0Aimport org.uma.jmetal.problem.DoubleProblem;%0Aimport org.uma.jmetal.problem.multiobjective.Tanaka;%0Aimport org.uma.jmetal.problem.multiobjective.zdt.ZDT4;%0Aimport org.uma.jmetal.qualityindicator.QualityIndicator;%0Aimport org.uma.jmetal.qualityindicator.impl.hypervolume.PISAHypervolume;%0Aimport org.uma.jmetal.solution.DoubleSolution;%0Aimport org.uma.jmetal.util.AlgorithmRunner;%0Aimport org.uma.jmetal.util.archive.Archive;%0Aimport org.uma.jmetal.util.archive.impl.CrowdingDistanceArchive;%0A%0A/**%0A * Created by ajnebro on 11/6/15.%0A */%0Apublic class ABYSSConstrainedProblemIT %7B%0A  Algorithm%3CList%3CDoubleSolution%3E%3E algorithm;%0A  DoubleProblem problem ;%0A  CrossoverOperator%3CDoubleSolution%3E crossover;%0A  MutationOperator%3CDoubleSolution%3E mutation;%0A  LocalSearchOperator%3CDoubleSolution%3E localSearchOperator ;%0A  Archive%3CDoubleSolution%3E archive ;%0A%0A  @Before%0A  public void setup() %7B%0A    problem = new Tanaka() ;%0A%0A    double crossoverProbability = 1.0 ;%0A    double crossoverDistributionIndex = 20.0 ;%0A    crossover = new SBXCrossover(crossoverProbability, crossoverDistributionIndex) ;%0A%0A    double mutationProbability = 1.0 / problem.getNumberOfVariables() ;%0A    double mutationDistributionIndex = 20.0 ;%0A    mutation = new PolynomialMutation(mutationProbability, mutationDistributionIndex) ;%0A%0A    archive = new CrowdingDistanceArchive%3C%3E(100) ;%0A%0A    localSearchOperator = new ArchiveMutationLocalSearch%3C%3E(1, mutation, archive, problem) ;%0A  %7D%0A%0A  @Test%0A  public void shouldTheAlgorithmReturnANumberOfSolutionsWhenSolvingAConstrainedProblem() %7B%0A    problem = new Tanaka() ;%0A    algorithm = new ABYSSBuilder(problem, archive)%0A        .build();%0A%0A    new AlgorithmRunner.Executor(algorithm).execute();%0A%0A    List%3CDoubleSolution%3E population = algorithm.getResult();%0A%0A    /*%0A    Rationale: the default problem is Tanaka, and AbYSS, configured with standard settings, should%0A    return more than 98 solutions%0A    */%0A    assertTrue(population.size() %3E= 98) ;%0A  %7D%0A%0A  @Test%0A  public void shouldTheHypervolumeHaveAMinimumValue() throws Exception %7B%0A    algorithm = new ABYSSBuilder(problem, archive)%0A        .build();%0A%0A    new AlgorithmRunner.Executor(algorithm).execute();%0A%0A    List%3CDoubleSolution%3E population = algorithm.getResult();%0A%0A    QualityIndicator%3CList%3CDoubleSolution%3E, Double%3E hypervolume = new PISAHypervolume%3C%3E(%22/referenceFronts/ZDT1.pf%22) ;%0A%0A    // Rationale: the default problem is Tanaka, and AbYSS, configured with standard settings, should%0A    // return find a front with a hypervolume value higher than 0.22%0A%0A    double hv = hypervolume.evaluate(population) ;%0A%0A    assertTrue(hv %3E 0.22) ;%0A  %7D%0A%7D%0A

Add class ABYSSConstrainedProblemIT