Class FastModeAutomaticOC
java.lang.Object
org.scictrl.mp.orbitcorrect.correction.automatic.AbstractAutomaticOCModel
org.scictrl.mp.orbitcorrect.correction.automatic.FastModeAutomaticOC
- All Implemented Interfaces:
IAutomaticOCModel
,IConfigurable
FastModeAutomaticOC class.
- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
ConstantAOC_FASTMODE_E_MIN_H="aoc.fastmode.energyMin.h"
static final String
ConstantAOC_FASTMODE_E_MIN_V="aoc.fastmode.energyMin.v"
static final String
ConstantAOC_FASTMODE_MAX_RELAXATION_BPM="aoc.fastmode.maxRelaxationBPM"
static final String
ConstantAOC_FASTMODE_MAX_RELAXATION_RMS="aoc.fastmode.maxRelaxationRMS"
static final String
ConstantAOC_FASTMODE_MIN_CORRECTION_RMS="aoc.fastmode.minCorrectionRMS"
static final String
ConstantAOC_FASTMODE_MIN_CORRECTOR="aoc.fastmode.minCorrector"
static final String
ConstantAOC_FASTMODE_MIN_WAIT_TIME="aoc.fastmode.minWaitTime"
protected boolean
If RMS should be checked before start.protected final double[]
Minimal energy, below which corresponding correction is skipped.protected double
If orbit BPM position changes during relaxation for more than this value, the correction will kick in.protected double
If orbit RMS changes during relaxation for more than this value, the correction will kick in.protected double
If after correction RMS changed less than this minimal, next correction will be skipped until relaxation conditions are right.protected double
If calculated corrector changes in mrad are lower than this, then correction is skipped and goes into relaxation.protected long
Minimum time in milliseconds that loop waits in relaxation wait mode.protected Thread
Execution thread.Fields inherited from class org.scictrl.mp.orbitcorrect.correction.automatic.AbstractAutomaticOCModel
log, name, NOT_READY_ABORT_MESSAGE, NOT_READY_MESSAGE, timestampTimeout
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(org.apache.commons.configuration.Configuration conf) configure.protected boolean
executeCorectionStep
(Orientation ori, AutomaticOrbitCorrectionOperator operator, boolean dryRun) executeCorectionStep.protected void
executeLoop
(AutomaticOrbitCorrectionOperator operator, int count, boolean dryRun) Executes single correction loop, which is doing correcting until no optimization is necessary.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.double
getEnergyMin
(Orientation ori) Getter for the fieldenergyMin
.long
Getter for the fieldminWaitTime
.boolean
isCheckRMSOnStartEnabled.void
setCheckRMSOnStartEnabled
(boolean newCheckRMSOnStartEnabled) Setter for the fieldcheckRMSOnStartEnabled
.void
setEnergyMin
(double energyMinH, double energyMinV) Setter for the fieldenergyMin
.void
setEnergyMin
(Orientation ori, double energyMin) Setter for the fieldenergyMin
.void
setMaxRelaxationBPMChange
(double ch) Setter for the fieldmaxRelaxationBPMChange
.void
setMaxRelaxationRMSChange
(double ch) Setter for the fieldmaxRelaxationRMSChange
.void
setMinCorrectionRMSChange
(double ch) Setter for the fieldminCorrectionRMSChange
.void
setMinCorrectorChange
(double ch) Setter for the fieldminCorrectorChange
.void
setMinWaitTime
(long minWaitTime) Setter for the fieldminWaitTime
.protected void
waitForNextLoop.Methods inherited from class org.scictrl.mp.orbitcorrect.correction.automatic.AbstractAutomaticOCModel
executeContinuous, executeSingleLoop, getName, prepareOnStart, setName, toString
-
Field Details
-
AOC_FASTMODE_MIN_WAIT_TIME
ConstantAOC_FASTMODE_MIN_WAIT_TIME="aoc.fastmode.minWaitTime"
- See Also:
-
AOC_FASTMODE_MIN_CORRECTOR
ConstantAOC_FASTMODE_MIN_CORRECTOR="aoc.fastmode.minCorrector"
- See Also:
-
AOC_FASTMODE_MIN_CORRECTION_RMS
ConstantAOC_FASTMODE_MIN_CORRECTION_RMS="aoc.fastmode.minCorrectionRMS"
- See Also:
-
AOC_FASTMODE_MAX_RELAXATION_RMS
ConstantAOC_FASTMODE_MAX_RELAXATION_RMS="aoc.fastmode.maxRelaxationRMS"
- See Also:
-
AOC_FASTMODE_MAX_RELAXATION_BPM
ConstantAOC_FASTMODE_MAX_RELAXATION_BPM="aoc.fastmode.maxRelaxationBPM"
- See Also:
-
AOC_FASTMODE_E_MIN_H
ConstantAOC_FASTMODE_E_MIN_H="aoc.fastmode.energyMin.h"
- See Also:
-
AOC_FASTMODE_E_MIN_V
ConstantAOC_FASTMODE_E_MIN_V="aoc.fastmode.energyMin.v"
- See Also:
-
thread
Execution thread. -
checkRMSOnStartEnabled
protected boolean checkRMSOnStartEnabledIf RMS should be checked before start. -
minCorrectionRMSChange
protected double minCorrectionRMSChangeIf after correction RMS changed less than this minimal, next correction will be skipped until relaxation conditions are right. -
maxRelaxationRMSChange
protected double maxRelaxationRMSChangeIf orbit RMS changes during relaxation for more than this value, the correction will kick in. -
maxRelaxationBPMChange
protected double maxRelaxationBPMChangeIf orbit BPM position changes during relaxation for more than this value, the correction will kick in. -
minCorrectorChange
protected double minCorrectorChangeIf calculated corrector changes in mrad are lower than this, then correction is skipped and goes into relaxation. -
energyMin
protected final double[] energyMinMinimal energy, below which corresponding correction is skipped. -
minWaitTime
protected long minWaitTimeMinimum 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 processcount
- 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
- aOrientation
objectoperator
- aAutomaticOrbitCorrectionOperator
objectdryRun
- a boolean- Returns:
- a boolean
-
executeLoop
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 classAbstractAutomaticOCModel
- Parameters:
operator
- the operator visitorcount
- a intdryRun
- 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
waitForNextLoop.
- Specified by:
waitForNextLoop
in classAbstractAutomaticOCModel
- Parameters:
operator
- aAutomaticOrbitCorrectionOperator
object
-
setEnergyMin
public void setEnergyMin(double energyMinH, double energyMinV) Setter for the field
energyMin
.- Parameters:
energyMinH
- a doubleenergyMinV
- a double
-
setEnergyMin
Setter for the field
energyMin
.- Parameters:
ori
- aOrientation
objectenergyMin
- a double
-
getEnergyMin
Getter for the field
energyMin
.- Parameters:
ori
- aOrientation
object- Returns:
- a double
-
configure
public void configure(org.apache.commons.configuration.Configuration conf) configure.
- Specified by:
configure
in interfaceIConfigurable
- Overrides:
configure
in classAbstractAutomaticOCModel
- Parameters:
conf
- aConfiguration
object
-