Class TimeBasedAutomaticOC
java.lang.Object
org.scictrl.mp.orbitcorrect.correction.automatic.AbstractAutomaticOCModel
org.scictrl.mp.orbitcorrect.correction.automatic.TimeBasedAutomaticOC
- All Implemented Interfaces:
IAutomaticOCModel
,IConfigurable
TimeBasedAutomaticOC class.
- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Check RMS before start.protected boolean
Correct in horizontal.protected boolean
Correct in vertical.protected int
Time wait between correction loops, in secondsprotected double[]
Last RMS change.protected double
Minimal beam RMS change to trigger correction.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 TypeMethodDescriptionprotected void
executeCorectionStep
(Orientation ori, JProgressBar prog, AutomaticOrbitCorrectionOperator operator) executeCorectionStep.protected void
executeCorrectionLoop
(Orientation ori, AutomaticOrbitCorrectionOperator operator) Implementing method, which executes correction for specified orientation until new rms is not worse or equal.protected void
executeLoop
(AutomaticOrbitCorrectionOperator operator, int steps, boolean dryRun) Executes single correction loop, which is doing correcting until no optimization is necessary.int
Idle time wait between correction loops, in seconds.double
Getter for the fieldminimalRMSChange
.boolean
isCheckRMSOnStartEnabled.boolean
isCorrectHorizontal.boolean
isCorrectVertical.protected void
This method is called once when automatic model is started, implementator migth override this method to add own initialization.void
setCheckRMSOnStartEnabled
(boolean newCheckRMSOnStartEnabled) Setter for the fieldcheckRMSOnStartEnabled
.void
setCorrectHorizontal
(boolean newCorrectHorizontal) Setter for the fieldcorrectHorizontal
.void
setCorrectVertical
(boolean newCorrectVertical) Setter for the fieldcorrectVertical
.void
setIdleTime
(int newIdleTime) Idle time wait between correction loops, in seconds.void
setMinimalRMSChange
(double newMinimalRMSChange) Setter for the fieldminimalRMSChange
.protected void
waitForNextLoop.Methods inherited from class org.scictrl.mp.orbitcorrect.correction.automatic.AbstractAutomaticOCModel
configure, executeContinuous, executeSingleLoop, getName, setName, toString
-
Field Details
-
thread
Execution thread. -
idleTime
protected int idleTimeTime wait between correction loops, in seconds -
correctHorizontal
protected boolean correctHorizontalCorrect in horizontal. -
correctVertical
protected boolean correctVerticalCorrect in vertical. -
minimalRMSChange
protected double minimalRMSChangeMinimal beam RMS change to trigger correction. -
lastRMS
protected double[] lastRMSLast RMS change. -
checkRMSOnStartEnabled
protected boolean checkRMSOnStartEnabledCheck RMS before start.
-
-
Constructor Details
-
TimeBasedAutomaticOC
public TimeBasedAutomaticOC()TimeBasedAutomaticOC constructor comment.
-
-
Method Details
-
executeCorectionStep
protected void executeCorectionStep(Orientation ori, JProgressBar prog, AutomaticOrbitCorrectionOperator operator) throws InconsistentDataException, DataBushPackedException, ControlSystemException executeCorectionStep.
- Parameters:
ori
- aOrientation
objectprog
- aJProgressBar
objectoperator
- aAutomaticOrbitCorrectionOperator
object- Throws:
InconsistentDataException
- if any.DataBushPackedException
- if any.ControlSystemException
- if any.
-
executeCorrectionLoop
Implementing method, which executes correction for specified orientation until new rms is not worse or equal.- Parameters:
ori
- aOrientation
objectoperator
- aAutomaticOrbitCorrectionOperator
object
-
executeLoop
Executes single correction loop, which is doing correcting until no optimization is necessary.- Specified by:
executeLoop
in classAbstractAutomaticOCModel
- Parameters:
operator
- the operator visitorsteps
- a intdryRun
- 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
This method is called once when automatic model is started, implementator migth override this method to add own initialization.- Overrides:
prepareOnStart
in classAbstractAutomaticOCModel
- Parameters:
operator
- aAutomaticOrbitCorrectionOperator
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
waitForNextLoop.
- Specified by:
waitForNextLoop
in classAbstractAutomaticOCModel
- Parameters:
operator
- aAutomaticOrbitCorrectionOperator
object
-