Class TimeBasedAutomaticOC

java.lang.Object
org.scictrl.mp.orbitcorrect.correction.automatic.AbstractAutomaticOCModel
org.scictrl.mp.orbitcorrect.correction.automatic.TimeBasedAutomaticOC
All Implemented Interfaces:
IAutomaticOCModel, IConfigurable

public class TimeBasedAutomaticOC extends AbstractAutomaticOCModel

TimeBasedAutomaticOC class.

Author:
igor@scictrl.com
  • Field Details

    • thread

      protected Thread thread
      Execution thread.
    • idleTime

      protected int idleTime
      Time wait between correction loops, in seconds
    • correctHorizontal

      protected boolean correctHorizontal
      Correct in horizontal.
    • correctVertical

      protected boolean correctVertical
      Correct in vertical.
    • minimalRMSChange

      protected double minimalRMSChange
      Minimal beam RMS change to trigger correction.
    • lastRMS

      protected double[] lastRMS
      Last RMS change.
    • checkRMSOnStartEnabled

      protected boolean checkRMSOnStartEnabled
      Check RMS before start.
  • Constructor Details

    • TimeBasedAutomaticOC

      public TimeBasedAutomaticOC()
      TimeBasedAutomaticOC constructor comment.
  • Method Details

    • executeCorectionStep

      executeCorectionStep.

      Parameters:
      ori - a Orientation object
      prog - a JProgressBar object
      operator - a AutomaticOrbitCorrectionOperator object
      Throws:
      InconsistentDataException - if any.
      DataBushPackedException - if any.
      ControlSystemException - if any.
    • executeCorrectionLoop

      protected void executeCorrectionLoop(Orientation ori, AutomaticOrbitCorrectionOperator operator)
      Implementing method, which executes correction for specified orientation until new rms is not worse or equal.
      Parameters:
      ori - a Orientation object
      operator - a AutomaticOrbitCorrectionOperator object
    • executeLoop

      protected void executeLoop(AutomaticOrbitCorrectionOperator operator, int steps, boolean dryRun)
      Executes single correction loop, which is doing correcting until no optimization is necessary.
      Specified by:
      executeLoop in class AbstractAutomaticOCModel
      Parameters:
      operator - the operator visitor
      steps - a int
      dryRun - a boolean
    • getIdleTime

      public int getIdleTime()
      Idle time wait between correction loops, in seconds.
      Returns:
      idle time wait between correction loops, in seconds
    • getMinimalRMSChange

      public double getMinimalRMSChange()

      Getter for the field minimalRMSChange.

      Returns:
      double
    • isCheckRMSOnStartEnabled

      public boolean isCheckRMSOnStartEnabled()

      isCheckRMSOnStartEnabled.

      Returns:
      boolean
    • isCorrectHorizontal

      public boolean isCorrectHorizontal()

      isCorrectHorizontal.

      Returns:
      boolean
    • isCorrectVertical

      public boolean isCorrectVertical()

      isCorrectVertical.

      Returns:
      boolean
    • prepareOnStart

      protected void prepareOnStart(AutomaticOrbitCorrectionOperator operator)
      This method is called once when automatic model is started, implementator migth override this method to add own initialization.
      Overrides:
      prepareOnStart in class AbstractAutomaticOCModel
      Parameters:
      operator - a AutomaticOrbitCorrectionOperator object
    • setCheckRMSOnStartEnabled

      public void setCheckRMSOnStartEnabled(boolean newCheckRMSOnStartEnabled)

      Setter for the field checkRMSOnStartEnabled.

      Parameters:
      newCheckRMSOnStartEnabled - boolean
    • setCorrectHorizontal

      public void setCorrectHorizontal(boolean newCorrectHorizontal)

      Setter for the field correctHorizontal.

      Parameters:
      newCorrectHorizontal - boolean
    • setCorrectVertical

      public void setCorrectVertical(boolean newCorrectVertical)

      Setter for the field correctVertical.

      Parameters:
      newCorrectVertical - boolean
    • setIdleTime

      public void setIdleTime(int newIdleTime)
      Idle time wait between correction loops, in seconds.
      Parameters:
      newIdleTime - time wait between correction loops, in seconds
    • setMinimalRMSChange

      public void setMinimalRMSChange(double newMinimalRMSChange)

      Setter for the field minimalRMSChange.

      Parameters:
      newMinimalRMSChange - a double
    • waitForNextLoop

      protected void waitForNextLoop(AutomaticOrbitCorrectionOperator operator)

      waitForNextLoop.

      Specified by:
      waitForNextLoop in class AbstractAutomaticOCModel
      Parameters:
      operator - a AutomaticOrbitCorrectionOperator object