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 int
DEFAULT_ITERATION_OFFSET
Default value to usestatic int
DEFAULT_MAX_ITERATION_THRESHOLD
Default value to usestatic double
DEFAULT_MAX_SINGLE_WORSENING_THRESHOLD
Default value to usestatic double
DEFAULT_MIN_AVERAGE_IMPROVEMENT_THRESHOLD
Default value to usestatic int
DEFAULT_MIN_ITERATION_THRESHOLD
Default value to use
-
Constructor Summary
Constructors Constructor Description StaticLtmNetworkLoadingConvergenceAnalyser()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIterationOffset()
Currently set iteration offset beyond which the analyser is appliedint
getMinIterationThreshold()
Get the minimum iteration threshold to use before we can classify as non-improvingint
getRegisteredIterations()
Number of registered iterationsboolean
isImproving()
Verify if the convergence is improving or not given the settings and data provided to the analyservoid
logGapsSince(long runId, int referenceIteration)
Log gaps since iteration providedvoid
registerIterationGap(double gap)
Register the found gap for the iterationvoid
reset()
Reset to initial statevoid
setIterationOffset(int iterationOffset)
Set the offset to usevoid
setMinIterationThreshold(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
-
-