public class MaxTimeStoppingCondition extends StoppingConditionImpl
| Modifier and Type | Field and Description |
|---|---|
protected long |
maxSeconds
Maximum number of seconds
|
protected long |
startTime |
| Constructor and Description |
|---|
MaxTimeStoppingCondition() |
| 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 |
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, iteration, modification, searchFinished, toStringprotected long maxSeconds
protected long startTime
public void searchStarted(GeneticAlgorithm<?> algorithm)
searchStarted in interface SearchListenersearchStarted in class StoppingConditionImplalgorithm - a GeneticAlgorithm object.public boolean isFinished()
isFinished
We are finished when the time is uppublic 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.