public class TimeDeltaStoppingCondition extends StoppingConditionImpl
| Modifier and Type | Field and Description |
|---|---|
protected double |
lastFitness
Best fitness value observed so far
|
protected long |
lastGeneration
Time at which the fitness value was last checked
|
protected long |
lastImprovement
Time at which the best fitness value was last improved
|
protected long |
startTime
Assume the search has not started until start_time != 0
|
| Constructor and Description |
|---|
TimeDeltaStoppingCondition() |
| Modifier and Type | Method and Description |
|---|---|
void |
forceCurrentValue(long value)
Force a specific amount of used up budget.
|
long |
getCurrentValue()
How much of the budget have we used up
|
long |
getLimit()
Get upper limit of resources
Mainly used for toString()
|
boolean |
isFinished()
isFinished
|
void |
iteration(GeneticAlgorithm<?> algorithm)
Called after each iteration of the search
|
void |
reset()
Reset everything
|
void |
searchStarted(GeneticAlgorithm<?> algorithm)
Called when a new search is started
|
void |
setLimit(long limit)
Set new upper limit of resources
|
fitnessEvaluation, getType, getValueString, modification, searchFinished, toStringprotected long startTime
protected long lastImprovement
protected long lastGeneration
protected double lastFitness
public void searchStarted(GeneticAlgorithm<?> algorithm)
searchStarted in interface SearchListenersearchStarted in class StoppingConditionImplalgorithm - a GeneticAlgorithm object.public void iteration(GeneticAlgorithm<?> algorithm)
StoppingConditionImpliteration in interface SearchListeneriteration in class StoppingConditionImplalgorithm - a GeneticAlgorithm object.public long getCurrentValue()
public boolean isFinished()
isFinished
public void reset()
public void setLimit(long limit)
limit - a long.public long getLimit()
public void forceCurrentValue(long value)
StoppingConditionvalue - The new amount of used up budget for this StoppingConditionCopyright © 2010–2017 EvoSuite. All rights reserved.