public class MaxGenerationStoppingCondition extends StoppingConditionImpl
| Modifier and Type | Field and Description |
|---|---|
protected long |
currentIteration
Maximum number of iterations
|
protected long |
maxIterations
Maximum number of iterations
|
| Constructor and Description |
|---|
MaxGenerationStoppingCondition() |
| 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 |
searchFinished(GeneticAlgorithm<?> algorithm)
Called after the last iteration
|
void |
setLimit(long limit)
Set new upper limit of resources
|
void |
setMaxIterations(int max)
setMaxIterations
|
fitnessEvaluation, getType, getValueString, modification, searchStarted, toStringprotected long maxIterations
protected long currentIteration
public void setMaxIterations(int max)
setMaxIterations
max - a int.public void iteration(GeneticAlgorithm<?> algorithm)
iteration in interface SearchListeneriteration in class StoppingConditionImplalgorithm - a GeneticAlgorithm object.public boolean isFinished()
isFinished
Stop search after a number of iterationspublic void searchFinished(GeneticAlgorithm<?> algorithm)
searchFinished in interface SearchListenersearchFinished in class StoppingConditionImplalgorithm - a GeneticAlgorithm object.public void reset()
public void setLimit(long limit)
limit - a long.public long getLimit()
public long getCurrentValue()
public void forceCurrentValue(long value)
value - The new amount of used up budget for this StoppingConditionCopyright © 2010–2017 EvoSuite. All rights reserved.