Class StaticLtmNetworkLoadingConvergenceAnalyser
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.loading.StaticLtmNetworkLoadingConvergenceAnalyser
-
public class StaticLtmNetworkLoadingConvergenceAnalyser extends Object
Analyser that based on various inputs such as the iteration and previous gaps determines if the loading is converging or not using its configurable criteria- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_ITERATION_OFFSETDefault value to usestatic intDEFAULT_MAX_ITERATION_THRESHOLDDefault value to usestatic doubleDEFAULT_MAX_SINGLE_WORSENING_THRESHOLDDefault value to usestatic doubleDEFAULT_MIN_AVERAGE_IMPROVEMENT_THRESHOLDDefault value to usestatic intDEFAULT_MIN_ITERATION_THRESHOLDDefault value to use
-
Constructor Summary
Constructors Constructor Description StaticLtmNetworkLoadingConvergenceAnalyser()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetIterationOffset()Currently set iteration offset beyond which the analyser is appliedintgetMinIterationThreshold()Get the minimum iteration threshold to use before we can classify as non-improvingintgetRegisteredIterations()Number of registered iterationsbooleanisImproving()Verify if the convergence is improving or not given the settings and data provided to the analyservoidlogGapsSince(long runId, int referenceIteration)Log gaps since iteration providedvoidregisterIterationGap(double gap)Register the found gap for the iterationvoidreset()Reset to initial statevoidsetIterationOffset(int iterationOffset)Set the offset to usevoidsetMinIterationThreshold(int minIterationThreshold)Set the minimum iteration threshold to use before we can classify as non-improving
-
-
-
Field Detail
-
DEFAULT_ITERATION_OFFSET
public static int DEFAULT_ITERATION_OFFSET
Default value to use
-
DEFAULT_MIN_ITERATION_THRESHOLD
public static int DEFAULT_MIN_ITERATION_THRESHOLD
Default value to use
-
DEFAULT_MAX_ITERATION_THRESHOLD
public static int DEFAULT_MAX_ITERATION_THRESHOLD
Default value to use
-
DEFAULT_MIN_AVERAGE_IMPROVEMENT_THRESHOLD
public static double DEFAULT_MIN_AVERAGE_IMPROVEMENT_THRESHOLD
Default value to use
-
DEFAULT_MAX_SINGLE_WORSENING_THRESHOLD
public static double DEFAULT_MAX_SINGLE_WORSENING_THRESHOLD
Default value to use
-
-
Method Detail
-
isImproving
public boolean isImproving()
Verify if the convergence is improving or not given the settings and data provided to the analyser- Returns:
- true is potentially improving, false it is not
-
registerIterationGap
public void registerIterationGap(double gap)
Register the found gap for the iteration- Parameters:
gap- to log
-
getRegisteredIterations
public int getRegisteredIterations()
Number of registered iterations- Returns:
- iterations
-
getIterationOffset
public int getIterationOffset()
Currently set iteration offset beyond which the analyser is applied- Returns:
- iteration offset index
-
setIterationOffset
public void setIterationOffset(int iterationOffset)
Set the offset to use- Parameters:
iterationOffset- to use
-
getMinIterationThreshold
public int getMinIterationThreshold()
Get the minimum iteration threshold to use before we can classify as non-improving- Returns:
- current threshold
-
setMinIterationThreshold
public void setMinIterationThreshold(int minIterationThreshold)
Set the minimum iteration threshold to use before we can classify as non-improving- Parameters:
minIterationThreshold- to set
-
logGapsSince
public void logGapsSince(long runId, int referenceIteration)Log gaps since iteration provided- Parameters:
runId- to log forreferenceIteration- starting iteration to log until most recent
-
reset
public void reset()
Reset to initial state
-
-