Class ProgressEvent

java.lang.Object
org.moeaframework.util.progress.ProgressEvent

public class ProgressEvent extends Object
A progress report, including the percent complete, elapsed time, and remaining time. These reports are generated by ProgressHelper.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the algorithm that is currently running
    int
    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 between 0 and 1.
    double
    Returns the estimated remaining time in seconds.
    int
    Returns the total number of seeds to be evaluated.
    boolean
    Returns true if this event was created in response to a seed finishing; false otherwise.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 originate
      algorithm - the current algorithm the executor is running
      currentSeed - the current seed being evaluated, starting at 1
      totalSeeds - the total number of seeds to be evaluated
      isSeedFinished - true if this event was created in response to a seed finishing; false otherwise
      currentNFE - 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 set
      percentComplete - the percent complete as a fraction between 0 and 1
      elapsedTime - the elapsed time in seconds
      remainingTime - the estimated remaining time in seconds
      maxTime - the maximum elapsed time per seed in seconds, or -1 if not set
  • Method Details

    • getExecutor

      public Executor getExecutor()
      Returns the executor from which these progress reports originate.
      Returns:
      the executor from which these progress reports originate
    • getCurrentAlgorithm

      public Algorithm 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 return 1 + 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()
      Returns true 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 between 0 and 1.
      Returns:
      the percent complete as a fraction between 0 and 1
    • 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