Class KnobVariationParameter
- java.lang.Object
-
- cern.accsoft.steering.aloha.calc.variation.AbstractVariationParameter
-
- cern.accsoft.steering.aloha.calc.variation.KnobVariationParameter
-
- All Implemented Interfaces:
VariationParameter
public class KnobVariationParameter extends AbstractVariationParameter implements VariationParameter
This class encapsulates the functionality to vary parameters of the madx-model by aAlgorithm. It encapsulates aKnobof a model. The class then provides a possibility to set these variable with a new value and to reset it afterwards. NOTE: no direct reference to the knob is stored, since the knob has to be applied to all models.
-
-
Field Summary
-
Fields inherited from class cern.accsoft.steering.aloha.calc.variation.AbstractVariationParameter
DEFAULT_DELTA, lastOffset
-
-
Constructor Summary
Constructors Constructor Description KnobVariationParameter(ModelDelegateManager modelDelegateManager, cern.accsoft.steering.jmad.domain.knob.Knob knob)KnobVariationParameter(ModelDelegateManager modelDelegateManager, cern.accsoft.steering.jmad.domain.knob.KnobType type, java.lang.String knobKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapply()transports the actual value to the knob.static java.lang.StringcreateKey(cern.accsoft.steering.jmad.domain.knob.Knob knob)composes a key for the knob depending on its type and its model-internal key.static java.lang.StringcreateKey(cern.accsoft.steering.jmad.domain.knob.KnobType type, java.lang.String knobKey)composes a key for a knob depending on its model-internal key and its type.java.lang.DoublegetActiveMeasurementAbsoluteValue()java.lang.DoublegetActiveMeasurementInitialValue()java.lang.DoublegetActiveMeasurementRelativeChange()cern.accsoft.steering.jmad.domain.knob.KnobgetKnob(cern.accsoft.steering.jmad.model.JMadModel model)return the Knob which corresponds to parameter in the given model.doublegetOffsetChange()-
Methods inherited from class cern.accsoft.steering.aloha.calc.variation.AbstractVariationParameter
addDelta, addValueScaled, getActualOffset, getDelta, getError, getInitialOffset, getKey, getName, getSensitivity, getUpdateFactor, init, reset, setActualOffset, setDelta, setError, setInitialOffset, setSensitivity, setUpdateFactor, undo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cern.accsoft.steering.aloha.calc.variation.VariationParameter
addDelta, addValueScaled, getActualOffset, getDelta, getError, getInitialOffset, getKey, getName, getSensitivity, getUpdateFactor, reset, setActualOffset, setDelta, setError, setInitialOffset, setSensitivity, setUpdateFactor, undo
-
-
-
-
Constructor Detail
-
KnobVariationParameter
public KnobVariationParameter(ModelDelegateManager modelDelegateManager, cern.accsoft.steering.jmad.domain.knob.Knob knob)
-
KnobVariationParameter
public KnobVariationParameter(ModelDelegateManager modelDelegateManager, cern.accsoft.steering.jmad.domain.knob.KnobType type, java.lang.String knobKey)
-
-
Method Detail
-
apply
protected void apply()
transports the actual value to the knob.- Specified by:
applyin classAbstractVariationParameter
-
getKnob
public final cern.accsoft.steering.jmad.domain.knob.Knob getKnob(cern.accsoft.steering.jmad.model.JMadModel model)
return the Knob which corresponds to parameter in the given model.- Parameters:
model- the model for which to get the knob- Returns:
- the Knob
-
createKey
public static java.lang.String createKey(cern.accsoft.steering.jmad.domain.knob.Knob knob)
composes a key for the knob depending on its type and its model-internal key.- Parameters:
knob- the Knob for which to create the key- Returns:
- the key
-
createKey
public static java.lang.String createKey(cern.accsoft.steering.jmad.domain.knob.KnobType type, java.lang.String knobKey)composes a key for a knob depending on its model-internal key and its type.- Parameters:
type- the type of the knobknobKey- the model internal key of the knob- Returns:
- the key
-
getActiveMeasurementAbsoluteValue
public java.lang.Double getActiveMeasurementAbsoluteValue()
- Specified by:
getActiveMeasurementAbsoluteValuein interfaceVariationParameter- Returns:
- the total value for the actively selected measurement
-
getActiveMeasurementInitialValue
public java.lang.Double getActiveMeasurementInitialValue()
- Specified by:
getActiveMeasurementInitialValuein interfaceVariationParameter
-
getActiveMeasurementRelativeChange
public java.lang.Double getActiveMeasurementRelativeChange()
- Specified by:
getActiveMeasurementRelativeChangein interfaceVariationParameter
-
getOffsetChange
public double getOffsetChange()
- Specified by:
getOffsetChangein interfaceVariationParameter
-
-