Class ExecutionControl

java.lang.Object
org.drip.function.r1tor1solver.ExecutionControl

public class ExecutionControl
extends java.lang.Object
ExecutionControl implements the core fixed point search execution control and customization functionality.

ExecutionControl is used for a) calculating the absolute tolerance, and b) determining whether the OF has reached the goal.

ExecutionControl determines the execution termination using its ExecutionControlParams instance.

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    ExecutionControl​(R1ToR1 of, ExecutionControlParams ecp)
    ExecutionControl constructor
  • Method Summary

    Modifier and Type Method Description
    double calcAbsoluteOFTolerance​(double dblOFInitial)
    Calculate the absolute OF tolerance using the initial OF value
    double calcAbsoluteVariateConvergence​(double dblInitialVariate)
    Calculate the absolute variate convergence amount using the initial variate
    int getNumIterations()
    Retrieve the Number of Iterations
    boolean hasOFReachedGoal​(double dblAbsoluteTolerance, double dblOF, double dblOFGoal)
    Check to see if the OF has reached the goal
    boolean isVariateConvergenceCheckEnabled()
    Indicate if the variate convergence check has been turned on

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExecutionControl

      public ExecutionControl​(R1ToR1 of, ExecutionControlParams ecp) throws java.lang.Exception
      ExecutionControl constructor
      Parameters:
      of - Objective Function
      ecp - Execution Control Parameters
      Throws:
      java.lang.Exception - Thrown if inputs are invalid
  • Method Details

    • getNumIterations

      public int getNumIterations()
      Retrieve the Number of Iterations
      Returns:
      Number of solver iterations
    • calcAbsoluteOFTolerance

      public double calcAbsoluteOFTolerance​(double dblOFInitial) throws java.lang.Exception
      Calculate the absolute OF tolerance using the initial OF value
      Parameters:
      dblOFInitial - Initial OF Value
      Returns:
      The absolute OF Tolerance
      Throws:
      java.lang.Exception - Thrown if absolute tolerance cannot be calculated
    • calcAbsoluteVariateConvergence

      public double calcAbsoluteVariateConvergence​(double dblInitialVariate) throws java.lang.Exception
      Calculate the absolute variate convergence amount using the initial variate
      Parameters:
      dblInitialVariate - Initial Variate
      Returns:
      The Absolute Variate Convergence Amount
      Throws:
      java.lang.Exception - Thrown if Absolute Variate Convergence Amount cannot be calculated
    • hasOFReachedGoal

      public boolean hasOFReachedGoal​(double dblAbsoluteTolerance, double dblOF, double dblOFGoal) throws java.lang.Exception
      Check to see if the OF has reached the goal
      Parameters:
      dblAbsoluteTolerance - Absolute Tolerance
      dblOF - OF Value
      dblOFGoal - OF Goal
      Returns:
      TRUE - If the OF has reached the goal
      Throws:
      java.lang.Exception - Thrown if the inputs are invalid
    • isVariateConvergenceCheckEnabled

      public boolean isVariateConvergenceCheckEnabled()
      Indicate if the variate convergence check has been turned on
      Returns:
      TRUE - Variate convergence check has been turned on