Class EstimatedRuntime


  • public class EstimatedRuntime
    extends java.lang.Object
    Estimated Runtime.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected EstimatedRuntime​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element runtime)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCurrentERT()
      Returns the current estimated runtime.
      int getFixedValue()
      Returns the fixed value in seconds.
      int getIgnoreDiffMinRuns()
      Returns the number of past runs, which should be taken into account despite deviations.
      int getIgnoreDiffPercent()
      Returns the number of past runs, which should be taken into account despite deviations.
      int getLastRuns()
      Returns the number of past runs which are taken into account when calculating the ERT.
      int getLastRunsPercent()
      Returns the value in percent for an upward correction or the ERT.
      void ignoreDifferences​(int percent, int minRuns)
      Possible large deviations to be repressed for the estimated runtime.
      protected boolean isDirty()  
      boolean isDynamicMethodAdaptive()
      Returns true if the adaptive method is used.
      boolean isDynamicMethodAverage()
      Returns true if the Average method is used.
      boolean isDynamicMethodLinear()
      Returns true if the Linear regression method should be used.
      boolean isDynamicMethodMaxValue()
      Returns true if the Maximum method is used.
      boolean isIgnoreDifference()
      Returns true if differences should be ignored.
      boolean isMethodDefault()
      Returns true if "UC_CLIENT_SETTINGS" should be used.
      boolean isMethodDynamic()
      Returns true if a dynamic method is used to calculate the estimated runtime.
      boolean isMethodFixedValue()
      Returns true if a fixed value is selected for the estimated runtime.
      void setCurrentERT​(int currentERT)
      Sets the current estimated runtime.
      void setDynamicMethodAdaptive()
      Selects the adaptive method.
      void setDynamicMethodAverage()
      Selects the Average method.
      void setDynamicMethodLinear()
      Selects linear regression method.
      void setDynamicMethodMaxValue()
      Selects the maximum method.
      void setIgnoreDifference​(boolean value)
      If value is set to true the method ignoreDifferences can be used to ignore differences.
      void setLastRuns​(int runs)
      Sets the number of past runs which are taken into account when calculating the ERT.
      void setLastRunsPercent​(int percent)
      Sets the value in percent for an upward correction or the ERT.
      void setMethodDefault()
      Selects default (UC_CLIENT_SETTING).
      void setMethodDynamic()
      Selects dynamic Method: Average, linear regression, maximal value.
      void setMethodFixedValue​(int seconds)
      Sets a fixed value for the estimated runtime.
      protected void store​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element runtime)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EstimatedRuntime

        protected EstimatedRuntime​(com.uc4.util.XMLDocument doc,
                                   org.w3c.dom.Element runtime)
    • Method Detail

      • store

        protected void store​(com.uc4.util.XMLDocument doc,
                             org.w3c.dom.Element runtime)
      • isDynamicMethodLinear

        public boolean isDynamicMethodLinear()
        Returns true if the Linear regression method should be used.

        With this method, the increase or decrease of runtimes is emphasized. As with the average method, the number of runs and the specification of a correction factor may be specified in percent.

        Returns:
        Boolean which contains true if the linear regression method is selected
      • setDynamicMethodLinear

        public void setDynamicMethodLinear()
        Selects linear regression method.

        With this method, the increase or decrease of runtimes is emphasized. As with the average method, the number of runs and the specification of a correction factor may be specified in percent.

      • isDynamicMethodAverage

        public boolean isDynamicMethodAverage()
        Returns true if the Average method is used.

        The average value from the real runtimes is determined. The number of previous runs may be specified for calculating the average. Furthermore, a correction factor in percent may be set. This will be added to the calculated average value.

        Returns:
        Boolean which contains true if the average method is selected
      • setDynamicMethodAverage

        public void setDynamicMethodAverage()
        Selects the Average method.

        The average value from the real runtimes is determined. The number of previous runs may be specified for calculating the average. Furthermore, a correction factor in percent may be set. This will be added to the calculated average value.

      • isDynamicMethodAdaptive

        public boolean isDynamicMethodAdaptive()
        Returns true if the adaptive method is used.
        Returns:
        Boolean which contains true if the adaptive method is selected
      • setDynamicMethodAdaptive

        public void setDynamicMethodAdaptive()
        Selects the adaptive method.
      • isDynamicMethodMaxValue

        public boolean isDynamicMethodMaxValue()
        Returns true if the Maximum method is used.

        The longest saved value from the list of real runtimes is taken as the estimated runtime.

        Returns:
        Boolean which contains true if the maximum method is selected
      • setDynamicMethodMaxValue

        public void setDynamicMethodMaxValue()
        Selects the maximum method.

        The longest saved value from the list of real runtimes is taken as the estimated runtime.

      • isMethodDefault

        public boolean isMethodDefault()
        Returns true if "UC_CLIENT_SETTINGS" should be used.

        The client's settings in the Variable "UC_CLIENT_SETTINGS" are used for calculating the estimated runtime. If there are no settings, or only invalid ones, the default settings which apply to all clients are used.

        Returns:
        Boolean which contains true if "UC_CLIENT_SETTINGS" is used
      • isMethodFixedValue

        public boolean isMethodFixedValue()
        Returns true if a fixed value is selected for the estimated runtime.
        Returns:
        Boolean which contains true if a fixed value is used
      • isMethodDynamic

        public boolean isMethodDynamic()
        Returns true if a dynamic method is used to calculate the estimated runtime.
        Returns:
        Boolean which contains true if a dynamic method is used to calculate the estimated runtime
      • setMethodDynamic

        public void setMethodDynamic()
        Selects dynamic Method: Average, linear regression, maximal value.
      • getCurrentERT

        public int getCurrentERT()
        Returns the current estimated runtime.
        Returns:
        Estimated runtime in seconds
      • setCurrentERT

        public void setCurrentERT​(int currentERT)
        Sets the current estimated runtime.
        Parameters:
        currentERT - Runtime in seconds
      • setMethodDefault

        public void setMethodDefault()
        Selects default (UC_CLIENT_SETTING).
      • setMethodFixedValue

        public void setMethodFixedValue​(int seconds)
        Sets a fixed value for the estimated runtime.
        Parameters:
        seconds - Seconds
      • getFixedValue

        public int getFixedValue()
        Returns the fixed value in seconds.
        Returns:
        Integer containg the fixed value
      • setLastRuns

        public void setLastRuns​(int runs)
        Sets the number of past runs which are taken into account when calculating the ERT. Permitted values: 0 to 25.
        Parameters:
        runs - Number of runs
      • getLastRuns

        public int getLastRuns()
        Returns the number of past runs which are taken into account when calculating the ERT.
        Returns:
        Number of runs
      • setLastRunsPercent

        public void setLastRunsPercent​(int percent)
        Sets the value in percent for an upward correction or the ERT.
        Parameters:
        percent - Percent
      • getLastRunsPercent

        public int getLastRunsPercent()
        Returns the value in percent for an upward correction or the ERT.
        Returns:
        Percent
      • ignoreDifferences

        public void ignoreDifferences​(int percent,
                                      int minRuns)
        Possible large deviations to be repressed for the estimated runtime.
        Parameters:
        percent - Upper limit in percent, which the real runtime uses to calculate the estimated runtime
        minRuns - Number of past runs, which should be taken into account despite deviations. Permitted value: 0 to 25.
      • setIgnoreDifference

        public void setIgnoreDifference​(boolean value)
        If value is set to true the method ignoreDifferences can be used to ignore differences. If set to false the value which are set in ignoreDifferences are ignored.
        Parameters:
        value - Boolean value indicating if differences should be ignored
      • isIgnoreDifference

        public boolean isIgnoreDifference()
        Returns true if differences should be ignored.
        Returns:
        Boolean value indicating if differences should be ignored
      • getIgnoreDiffMinRuns

        public int getIgnoreDiffMinRuns()
        Returns the number of past runs, which should be taken into account despite deviations.
        Returns:
        Number of past runs, which should be taken into account despite deviations
      • getIgnoreDiffPercent

        public int getIgnoreDiffPercent()
        Returns the number of past runs, which should be taken into account despite deviations.
        Returns:
        number of past runs, which should be taken into account despite deviations.
      • isDirty

        protected boolean isDirty()