Class FastModeAutomaticOC

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

public class FastModeAutomaticOC extends AbstractAutomaticOCModel

FastModeAutomaticOC class.

Author:
igor@scictrl.com
  • Field Details

    • AOC_FASTMODE_MIN_WAIT_TIME

      public static final String AOC_FASTMODE_MIN_WAIT_TIME
      Constant AOC_FASTMODE_MIN_WAIT_TIME="aoc.fastmode.minWaitTime"
      See Also:
    • AOC_FASTMODE_MIN_CORRECTOR

      public static final String AOC_FASTMODE_MIN_CORRECTOR
      Constant AOC_FASTMODE_MIN_CORRECTOR="aoc.fastmode.minCorrector"
      See Also:
    • AOC_FASTMODE_MIN_CORRECTION_RMS

      public static final String AOC_FASTMODE_MIN_CORRECTION_RMS
      Constant AOC_FASTMODE_MIN_CORRECTION_RMS="aoc.fastmode.minCorrectionRMS"
      See Also:
    • AOC_FASTMODE_MAX_RELAXATION_RMS

      public static final String AOC_FASTMODE_MAX_RELAXATION_RMS
      Constant AOC_FASTMODE_MAX_RELAXATION_RMS="aoc.fastmode.maxRelaxationRMS"
      See Also:
    • AOC_FASTMODE_MAX_RELAXATION_BPM

      public static final String AOC_FASTMODE_MAX_RELAXATION_BPM
      Constant AOC_FASTMODE_MAX_RELAXATION_BPM="aoc.fastmode.maxRelaxationBPM"
      See Also:
    • AOC_FASTMODE_E_MIN_H

      public static final String AOC_FASTMODE_E_MIN_H
      Constant AOC_FASTMODE_E_MIN_H="aoc.fastmode.energyMin.h"
      See Also:
    • AOC_FASTMODE_E_MIN_V

      public static final String AOC_FASTMODE_E_MIN_V
      Constant AOC_FASTMODE_E_MIN_V="aoc.fastmode.energyMin.v"
      See Also:
    • thread

      protected Thread thread
      Execution thread.
    • checkRMSOnStartEnabled

      protected boolean checkRMSOnStartEnabled
      If RMS should be checked before start.
    • minCorrectionRMSChange

      protected double minCorrectionRMSChange
      If after correction RMS changed less than this minimal, next correction will be skipped until relaxation conditions are right.
    • maxRelaxationRMSChange

      protected double maxRelaxationRMSChange
      If orbit RMS changes during relaxation for more than this value, the correction will kick in.
    • maxRelaxationBPMChange

      protected double maxRelaxationBPMChange
      If orbit BPM position changes during relaxation for more than this value, the correction will kick in.
    • minCorrectorChange

      protected double minCorrectorChange
      If calculated corrector changes in mrad are lower than this, then correction is skipped and goes into relaxation.
    • energyMin

      protected final double[] energyMin
      Minimal energy, below which corresponding correction is skipped.
    • minWaitTime

      protected long minWaitTime
      Minimum time in milliseconds that loop waits in relaxation wait mode.
  • Constructor Details

    • FastModeAutomaticOC

      public FastModeAutomaticOC()
      TimeBasedAutomaticOC constructor comment.
  • Method Details

    • executeLoopStep

      protected void executeLoopStep(AutomaticOrbitCorrectionOperator operator, int count, boolean dryRun)
      Implementing method, which executes correction for specified orientation until new rms is not worse or equal.
      Parameters:
      operator - the operator for this process
      count - controls how deep this recursion goes. If less then 0, then there is no limit, if more than 0, then can go deeper for given count.
      dryRun - a boolean
    • executeCorectionStep

      protected boolean executeCorectionStep(Orientation ori, AutomaticOrbitCorrectionOperator operator, boolean dryRun)

      executeCorectionStep.

      Parameters:
      ori - a Orientation object
      operator - a AutomaticOrbitCorrectionOperator object
      dryRun - a boolean
      Returns:
      a boolean
    • executeLoop

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

      public boolean isCheckRMSOnStartEnabled()

      isCheckRMSOnStartEnabled.

      Returns:
      boolean
    • setCheckRMSOnStartEnabled

      public void setCheckRMSOnStartEnabled(boolean newCheckRMSOnStartEnabled)

      Setter for the field checkRMSOnStartEnabled.

      Parameters:
      newCheckRMSOnStartEnabled - boolean
    • setMinCorrectionRMSChange

      public void setMinCorrectionRMSChange(double ch)

      Setter for the field minCorrectionRMSChange.

      Parameters:
      ch - a double
    • setMinCorrectorChange

      public void setMinCorrectorChange(double ch)

      Setter for the field minCorrectorChange.

      Parameters:
      ch - a double
    • setMaxRelaxationRMSChange

      public void setMaxRelaxationRMSChange(double ch)

      Setter for the field maxRelaxationRMSChange.

      Parameters:
      ch - a double
    • setMaxRelaxationBPMChange

      public void setMaxRelaxationBPMChange(double ch)

      Setter for the field maxRelaxationBPMChange.

      Parameters:
      ch - a double
    • getMinWaitTime

      public long getMinWaitTime()

      Getter for the field minWaitTime.

      Returns:
      a long
    • setMinWaitTime

      public void setMinWaitTime(long minWaitTime)

      Setter for the field minWaitTime.

      Parameters:
      minWaitTime - a long
    • waitForNextLoop

      protected void waitForNextLoop(AutomaticOrbitCorrectionOperator operator)

      waitForNextLoop.

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

      public void setEnergyMin(double energyMinH, double energyMinV)

      Setter for the field energyMin.

      Parameters:
      energyMinH - a double
      energyMinV - a double
    • setEnergyMin

      public void setEnergyMin(Orientation ori, double energyMin)

      Setter for the field energyMin.

      Parameters:
      ori - a Orientation object
      energyMin - a double
    • getEnergyMin

      public double getEnergyMin(Orientation ori)

      Getter for the field energyMin.

      Parameters:
      ori - a Orientation object
      Returns:
      a double
    • configure

      public void configure(org.apache.commons.configuration.Configuration conf)

      configure.

      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class AbstractAutomaticOCModel
      Parameters:
      conf - a Configuration object