Package org.moeaframework.util.progress
Class ProgressEvent
java.lang.Object
org.moeaframework.util.progress.ProgressEvent
A progress report, including the percent complete, elapsed time, and remaining time. These reports are generated by
ProgressHelper
.-
Constructor Summary
ConstructorDescriptionProgressEvent
(Executor executor, Algorithm algorithm, int currentSeed, int totalSeeds, boolean isSeedFinished, int currentNFE, int maxNFE, double percentComplete, double elapsedTime, double remainingTime, double maxTime) Constructs a new progress report with the given values. -
Method Summary
Modifier and TypeMethodDescriptionReturns the algorithm that is currently runningint
Returns the current number of objective function evaluations for the current seed.int
Returns the current seed being evaluated, starting at 1.double
Returns the elapsed time in seconds.Returns the executor from which these progress reports originate.int
Returns the maximum number of objective function evaluations per seed, or-1
if not set.double
Returns the maximum elapsed time per seed, or-1
if not set.double
Returns the percent complete as a fraction between0
and1
.double
Returns the estimated remaining time in seconds.int
Returns the total number of seeds to be evaluated.boolean
Returnstrue
if this event was created in response to a seed finishing;false
otherwise.
-
Constructor Details
-
ProgressEvent
public ProgressEvent(Executor executor, Algorithm algorithm, int currentSeed, int totalSeeds, boolean isSeedFinished, int currentNFE, int maxNFE, double percentComplete, double elapsedTime, double remainingTime, double maxTime) Constructs a new progress report with the given values.- Parameters:
executor
- the executor from which these progress reports originatealgorithm
- the current algorithm the executor is runningcurrentSeed
- the current seed being evaluated, starting at 1totalSeeds
- the total number of seeds to be evaluatedisSeedFinished
-true
if this event was created in response to a seed finishing;false
otherwisecurrentNFE
- the current number of objective function evaluations for the current seed.maxNFE
- the maximum number of objective function evaluations per seed, or-1
if not setpercentComplete
- the percent complete as a fraction between0
and1
elapsedTime
- the elapsed time in secondsremainingTime
- the estimated remaining time in secondsmaxTime
- the maximum elapsed time per seed in seconds, or-1
if not set
-
-
Method Details
-
getExecutor
Returns the executor from which these progress reports originate.- Returns:
- the executor from which these progress reports originate
-
getCurrentAlgorithm
Returns the algorithm that is currently running- Returns:
- the algorithm currently running
-
getCurrentSeed
public int getCurrentSeed()Returns the current seed being evaluated, starting at 1. Note that after the last seed completes, this value will return1 + getTotalSeeds()
.- Returns:
- the current seed being evaluated, starting at 1
-
getTotalSeeds
public int getTotalSeeds()Returns the total number of seeds to be evaluated.- Returns:
- the total number of seeds to be evaluated
-
isSeedFinished
public boolean isSeedFinished()Returnstrue
if this event was created in response to a seed finishing;false
otherwise. This indicates that new results are available in the executor.- Returns:
true
if this event was created in response to a seed finishing;false
otherwise
-
getCurrentNFE
public int getCurrentNFE()Returns the current number of objective function evaluations for the current seed.- Returns:
- the current number of objective function evaluations for the current seed
-
getMaxNFE
public int getMaxNFE()Returns the maximum number of objective function evaluations per seed, or-1
if not set.- Returns:
- the maximum number of objective function evaluations per seed
-
getPercentComplete
public double getPercentComplete()Returns the percent complete as a fraction between0
and1
.- Returns:
- the percent complete as a fraction between
0
and1
-
getElapsedTime
public double getElapsedTime()Returns the elapsed time in seconds.- Returns:
- the elapsed time in seconds
-
getRemainingTime
public double getRemainingTime()Returns the estimated remaining time in seconds.- Returns:
- the estimated remaining time in seconds
-
getMaxTime
public double getMaxTime()Returns the maximum elapsed time per seed, or-1
if not set.- Returns:
- the maximum elapsed time per seed
-