Class ElementsOpticsDiffConstraint
- java.lang.Object
-
- cern.accsoft.steering.aloha.plugin.xxx.sensitivity.ElementsOpticsDiffConstraint
-
- All Implemented Interfaces:
OpticsConstraint
public class ElementsOpticsDiffConstraint extends java.lang.Object implements OpticsConstraint
represents a constraint between two elements in the optics. It has a value and a target value. This is used then in the Ti8OpticsConstraintsContributor to implement phase constraints between two elements.
-
-
Constructor Summary
Constructors Constructor Description ElementsOpticsDiffConstraint(java.lang.String firstElementName, java.lang.String secondElementName, cern.accsoft.steering.jmad.domain.var.enums.MadxTwissVariable twissVariable, double targetValue)the constructor to set all the values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecalcValue(cern.accsoft.steering.jmad.domain.optics.Optic optic)calculates the difference of the madx-variable between the two points.doublegetTargetValue()
-
-
-
Constructor Detail
-
ElementsOpticsDiffConstraint
public ElementsOpticsDiffConstraint(java.lang.String firstElementName, java.lang.String secondElementName, cern.accsoft.steering.jmad.domain.var.enums.MadxTwissVariable twissVariable, double targetValue)the constructor to set all the values- Parameters:
firstElementName-secondElementName-twissVariable-targetValue-
-
-
Method Detail
-
calcValue
public double calcValue(cern.accsoft.steering.jmad.domain.optics.Optic optic)
calculates the difference of the madx-variable between the two points.- Specified by:
calcValuein interfaceOpticsConstraint- Parameters:
optic- the optics for which to calculate the value- Returns:
- the calculated difference
-
getTargetValue
public double getTargetValue()
- Specified by:
getTargetValuein interfaceOpticsConstraint
-
-