public class LocalSearchBudget extends Object implements SearchListener, Serializable
This singleton class provides support for updating the amount of LS budget that was consumed during the current application of LS.
| Modifier and Type | Field and Description |
|---|---|
protected long |
endTime |
protected long |
executedStart |
protected int |
fitnessEvaluations |
protected GeneticAlgorithm<?> |
ga |
protected long |
startTime |
protected int |
suites |
protected int |
tests |
| Modifier and Type | Method and Description |
|---|---|
void |
countFitnessEvaluation()
Reports that a fitness evaluation was consumed
|
void |
countLocalSearchOnTest()
Reports that Local search on an specific test has been concluded.
|
void |
countLocalSearchOnTestSuite()
Reports that local search on a whole test suite has been finished.
|
void |
fitnessEvaluation(Chromosome individual)
Called after every single fitness evaluation
|
static LocalSearchBudget |
getInstance() |
boolean |
isFinished()
isFinished
|
void |
iteration(GeneticAlgorithm<?> algorithm)
Called after each iteration of the search
|
void |
localSearchStarted()
Indicates that the application of LS to the current population has started.
|
void |
modification(Chromosome individual)
Called before a chromosome is mutated
|
void |
searchFinished(GeneticAlgorithm<?> algorithm)
Called after the last iteration
|
void |
searchStarted(GeneticAlgorithm<?> algorithm)
Called when a new search is started
|
protected int fitnessEvaluations
protected int tests
protected long executedStart
protected int suites
protected long startTime
protected long endTime
protected GeneticAlgorithm<?> ga
public static LocalSearchBudget getInstance()
public boolean isFinished()
isFinished
public void countFitnessEvaluation()
public void countLocalSearchOnTest()
public void countLocalSearchOnTestSuite()
public void localSearchStarted()
public void searchStarted(GeneticAlgorithm<?> algorithm)
searchStarted in interface SearchListeneralgorithm - a GeneticAlgorithm object.public void iteration(GeneticAlgorithm<?> algorithm)
iteration in interface SearchListeneralgorithm - a GeneticAlgorithm object.public void searchFinished(GeneticAlgorithm<?> algorithm)
searchFinished in interface SearchListeneralgorithm - a GeneticAlgorithm object.public void fitnessEvaluation(Chromosome individual)
fitnessEvaluation in interface SearchListenerindividual - a Chromosome object.public void modification(Chromosome individual)
modification in interface SearchListenerindividual - a Chromosome object.Copyright © 2010–2017 EvoSuite. All rights reserved.