T - public class MOSA<T extends Chromosome> extends AbstractMOSA<T>
| Modifier and Type | Field and Description |
|---|---|
protected Map<FitnessFunction<T>,T> |
archive
Map used to store the covered test goals (keys of the map) and the corresponding covering test cases (values of the map)
|
protected CrowdingDistance<T> |
distance |
protected Set<FitnessFunction<T>> |
uncoveredGoals
Boolean vector to indicate whether each test goal is covered or not.
|
ranking, selectionFunction, suiteFitnessbloatControl, chromosomeFactory, crossoverFunction, currentIteration, fitnessFunctions, listeners, localObjective, localSearchProbability, population, populationLimit, stoppingConditions| Constructor and Description |
|---|
MOSA(ChromosomeFactory<T> factory)
Constructor based on the abstract class
AbstractMOSA |
| Modifier and Type | Method and Description |
|---|---|
protected void |
calculateFitness(T c)
This method computes the fitness scores only for the current goals
|
protected void |
evolve()
Generate one new generation
|
void |
generateSolution()
Generate solution
|
protected List<T> |
getArchive() |
T |
getBestIndividual()
This method is used by the Progress Monitor at the and of each generation to show the totol coverage reached by the algorithm.
|
Set<FitnessFunction<T>> |
getCoveredGoals()
This method return the test goals covered by the test cases stored in the current archive
|
protected List<T> |
getFinalTestSuite() |
protected double |
numberOfCoveredTargets() |
areEqual, breedNextGeneration, calculateFitness, clearCachedResults, getBestIndividuals, getNonDominatedSolutions, initializePopulation, notifyEvaluation, removeUnusedVariablesaddBloatControl, addFitnessFunction, addFitnessFunctions, addListener, addStoppingCondition, applyLocalSearch, calculateFitnessAndSortPopulation, clearPopulation, disableFirstSecondaryCriterion, elitism, enableFirstSecondaryCriterion, generateInitialPopulation, generateRandomPopulation, getAge, getBudgetString, getFitnessFunction, getFitnessFunctions, getNumberOfFitnessFunctions, getPopulation, getPopulationSize, getSelectionFunction, getStoppingConditions, isBetterOrEqual, isFinished, isNextPopulationFull, isTooLong, notifyIteration, notifyMutation, notifySearchFinished, notifySearchStarted, printBudget, randomism, removeListener, removeStoppingCondition, resetStoppingConditions, setArchive, setBloatControl, setChromosomeFactory, setCrossOverFunction, setPopulationLimit, setSelectionFunction, setStoppingCondition, setStoppingConditionLimit, shouldApplyLocalSearch, sortPopulation, starveByFitness, starveRandomly, starveToLimit, toString, updateBestIndividualFromArchive, updateFitnessFunctionsAndValues, updateProbability, updateSecondaryCriterion, writeIndividualsprotected Map<FitnessFunction<T extends Chromosome>,T extends Chromosome> archive
protected Set<FitnessFunction<T extends Chromosome>> uncoveredGoals
protected CrowdingDistance<T extends Chromosome> distance
public MOSA(ChromosomeFactory<T> factory)
AbstractMOSAfactory - protected void evolve()
evolve in class GeneticAlgorithm<T extends Chromosome>protected void calculateFitness(T c)
calculateFitness in class AbstractMOSA<T extends Chromosome>c - chromosomepublic void generateSolution()
generateSolution in interface SearchAlgorithmgenerateSolution in class GeneticAlgorithm<T extends Chromosome>public Set<FitnessFunction<T>> getCoveredGoals()
getCoveredGoals in class AbstractMOSA<T extends Chromosome>protected List<T> getArchive()
getArchive in class AbstractMOSA<T extends Chromosome>protected List<T> getFinalTestSuite()
getFinalTestSuite in class AbstractMOSA<T extends Chromosome>public T getBestIndividual()
AbstractMOSA.suiteFitness)
as the union of all test cases stored in archive.
The coverage score of the "SuiteChromosome" is given by the percentage of test goals covered (goals in archive)
onto the total number of goals this.fitnessFunctions (see GeneticAlgorithm).getBestIndividual in class GeneticAlgorithm<T extends Chromosome>protected double numberOfCoveredTargets()
numberOfCoveredTargets in class AbstractMOSA<T extends Chromosome>Copyright © 2010–2017 EvoSuite. All rights reserved.