public class FixedElapsedTime extends Object implements StoppingCondition
The first time isSatisfied(Population) is invoked, the end time of
the evolution is determined based on the provided maxTime value.
Once the elapsed time reaches the configured maxTime value,
isSatisfied(Population) returns true.
| Constructor and Description |
|---|
FixedElapsedTime(long maxTime)
Create a new
FixedElapsedTime instance. |
FixedElapsedTime(long maxTime,
TimeUnit unit)
Create a new
FixedElapsedTime instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isSatisfied(Population population)
Determine whether or not the maximum allowed time has passed.
|
public FixedElapsedTime(long maxTime)
throws MathIllegalArgumentException
FixedElapsedTime instance.maxTime - maximum number of seconds generations are allowed to evolveMathIllegalArgumentException - if the provided time is < 0public FixedElapsedTime(long maxTime,
TimeUnit unit)
throws MathIllegalArgumentException
FixedElapsedTime instance.maxTime - maximum time generations are allowed to evolveunit - TimeUnit of the maxTime argumentMathIllegalArgumentException - if the provided time is < 0public boolean isSatisfied(Population population)
isSatisfied in interface StoppingConditionpopulation - ignored (no impact on result)true IFF the maximum allowed time period has elapsedCopyright © 2016 Hipparchus.org. All rights reserved.