public class PlusCDSCalculation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEVIATION_N
Calculate standard deviation with an N divisor
|
static int |
DEVIATION_N_MINUS_1
Calculate standard deviation with an N - 1 divisor
|
static int |
INPUT_FROM
constant to get input from value
|
static int |
INPUT_TO
constant to get input to value
|
static int |
MAXFRACTION |
static int |
OUTPUT_FROM
constant to get output from value
|
static int |
OUTPUT_TO
constant to get output to value
|
Constructor and Description |
---|
PlusCDSCalculation(java.util.HashMap dsConfig)
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
calcPointRangeLimits(PlusCMboRemote mboRemote)
Calculate the calibration points range limits based on the Nominal Input and the Range limits
defined o the Asset Function.
|
boolean |
calculateAveragesAndStdDevs(PlusCMboRemote[] groupPoints,
PlusCMboRemote groupAveragePoint,
java.lang.String fieldName)
Calculates the averages and standard deviations for the given group of
repeated calibration points.
|
boolean |
calculateToleranceRangeSquared(PlusCMboRemote owner,
java.lang.String fieldName)
Calculate the Tolerance ranges based on squared equations for each formula:
- EU
-%SPAN
-%URV
-%READING
Squared Calculation for Reverse Flow Calibration - Issue # 07-10511
|
boolean |
calculateToleranceRangeSquareRoot(PlusCMboRemote owner,
java.lang.String fieldName)
Calculate the Tolerance ranges based on square root equations for each formula:
- EU
-%SPAN
-%URV
-%READING
|
java.lang.String |
checkAndAdjustFldValueSize(java.lang.String value,
java.text.DecimalFormatSymbols df,
int minFraction,
java.util.Locale locale) |
java.lang.String |
checkAndAdjustFldValueSize(java.lang.String value,
java.text.DecimalFormatSymbols df,
java.util.Locale locale,
boolean shouldRound)
If the given value exceeds the field's length, reduces it's precision to
make it fit.
|
static double[] |
directionCheck(PlusCMboRemote owner,
java.util.Locale locale)
This method makes the check direction of data
|
boolean |
doUpdateErrorValues(PlusCMboRemote mboRemote,
java.lang.String asFoundOrLeft,
boolean bShowOutOfTolMsg)
Check if tolerance is exceded
|
void |
doUpdateOutputValue(PlusCMboRemote mboRemote,
boolean bValidateWhenSetting)
This method updates the output values in mboRemote
|
void |
doUpdateRonValues(PlusCMboRemote mboRemote)
This method updates ron values
|
boolean |
doUpdateTolValues(PlusCMboRemote mboRemote,
java.lang.String fieldName)
This method updates tolerances values
|
java.lang.String |
doWOUpdateOutputValue(PlusCMboRemote owner,
java.lang.String sPrefix) |
int |
getAssetError()
Gets the PLUSCDSCONFIG.ASSETERROR value
|
int |
getAssetNPlaces()
Gets the PLUSCDSCONFIG.ASSETNPLACES value
|
int |
getAssetPrecision(int minOutputPrecision,
int actualOutputPrecision,
int actualInputPrecision)
Defines the right precision to be used for asset and process errors.
|
boolean |
getAssetTruncate()
Gets the PLUSCDSCONFIG.ASSETTRUNCATE value
|
boolean |
getDesiredOutputTruncate()
Gets the PLUSCDSCONFIG.OUTPUTTRUNCATE value
|
boolean |
getRangeLimitsTruncate()
Gets the PLUSCDSCONFIG.RANGETRUNCATE value
|
int |
getStdDeviationType()
Gets the standard deviation type configuration option.
|
int |
getTolError()
Gets the PLUSCDSCONFIG.TOLERROR value
|
int |
getTolNPlaces()
Gets the PLUSCDSCONFIG.TOLNPLACES value
|
int |
getTolPrecision(int minOutputPrecision,
int actualOutputPrecision,
int actualInputPrecision)
Defines the right precision to be used for tolerance limits and errors.
|
boolean |
getTolTruncate()
Gets the PLUSCDSCONFIG.TOLTRUNCATE value
|
java.lang.String |
squaredDesiredOutputValue(PlusCMboRemote owner)
Squared Calculation for Reverse Flow Calibration - Issue # 07-10511
|
static java.lang.String |
squaredOutputValue(java.util.Locale locale,
java.lang.String instrcalrangefrom,
java.lang.String instrcalrangeto,
java.lang.String instroutrangefrom,
java.lang.String instrOutputSpan,
java.lang.String invalue,
double sign,
int precision)
Calculates desired output for squared instruments.
|
static java.lang.String |
squaredOutputValueNegative(java.util.Locale locale,
java.lang.String instrcalrangefrom,
java.lang.String instrcalrangeto,
java.lang.String instroutrangefrom,
java.lang.String instrOutputSpan,
java.lang.String invalue,
int precision)
Calculates desired output for squared instruments with negative inputs.
|
java.lang.String |
squareRootDesiredOutputValue(PlusCMboRemote owner)
Calculate the desired output value for calibration points that uses
Square Root of input.
|
static java.lang.String |
squareRootOutputValueNegative(java.util.Locale locale,
java.lang.String instrcalrangeto,
java.lang.String instroutrangefrom,
java.lang.String instrOutputSpan,
java.lang.String invalue)
Calculates desired output for square root instruments with negative inputs.
|
boolean |
summedToleranceEquations(PlusCMboRemote owner,
java.lang.String fieldName,
int tol,
boolean[] summedCalcTypes)
Calculate the Tolerance Range Values based on the summed range values entered.
|
double[] |
summedToleranceEquationsTightesWidest(PlusCMboRemote owner,
java.lang.String fieldName,
int tol,
boolean[] summedCalcTypes)
TIGHTEST to WIDEST used equstion just to calculate the tigh to widest rule on summed equations, remove this code on next patch
and include a call to the existing method.
|
public static int MAXFRACTION
public static final int INPUT_FROM
public static final int INPUT_TO
public static final int OUTPUT_FROM
public static final int OUTPUT_TO
public static final int DEVIATION_N
public static final int DEVIATION_N_MINUS_1
public PlusCDSCalculation(java.util.HashMap dsConfig)
public int getTolPrecision(int minOutputPrecision, int actualOutputPrecision, int actualInputPrecision)
minOutputPrecision
- Input Min Field Resolution (PLUSCDSINSTR.INPUTPRECISION)actualOutputPrecision
- Precision of tha actual entered output valueactualInputPrecision
- Precision of tha actual entered input valuepublic int getAssetPrecision(int minOutputPrecision, int actualOutputPrecision, int actualInputPrecision)
minOutputPrecision
- Input Min Field Resolution (PLUSCDSINSTR.INPUTPRECISION)actualOutputPrecision
- Precision of tha actual entered output valueactualInputPrecision
- Precision of tha actual entered input valuepublic int getTolError()
public int getAssetError()
public int getTolNPlaces()
public int getAssetNPlaces()
public boolean getTolTruncate()
public boolean getAssetTruncate()
public boolean getDesiredOutputTruncate()
public int getStdDeviationType()
DEVIATION_N
or DEVIATION_N_MINUS_1
public double[] summedToleranceEquationsTightesWidest(PlusCMboRemote owner, java.lang.String fieldName, int tol, boolean[] summedCalcTypes)
mboRemote
- fieldName
- tol
- - int counter used in the equations method to loop through the tolerances.public java.lang.String squaredDesiredOutputValue(PlusCMboRemote owner)
public java.lang.String squareRootDesiredOutputValue(PlusCMboRemote owner)
mboRemote
- public static java.lang.String squareRootOutputValueNegative(java.util.Locale locale, java.lang.String instrcalrangeto, java.lang.String instroutrangefrom, java.lang.String instrOutputSpan, java.lang.String invalue)
locale
- Locale for parsing of numbersinstrcalrangeto
- input range upper limitinstroutrangefrom
- output range lower limitinstrOutputSpan
- output range spaninvalue
- input value: nominal or actualpublic static java.lang.String squaredOutputValueNegative(java.util.Locale locale, java.lang.String instrcalrangefrom, java.lang.String instrcalrangeto, java.lang.String instroutrangefrom, java.lang.String instrOutputSpan, java.lang.String invalue, int precision)
locale
- Locale for parsing of numbersinstrcalrangefrom
- input range lower limitinstrcalrangeto
- input range upper limitinstroutrangefrom
- output range lower limitinstrOutputSpan
- output range spaninvalue
- input value: nominal or actualprecision
- precisionpublic static java.lang.String squaredOutputValue(java.util.Locale locale, java.lang.String instrcalrangefrom, java.lang.String instrcalrangeto, java.lang.String instroutrangefrom, java.lang.String instrOutputSpan, java.lang.String invalue, double sign, int precision)
locale
- Locale for parsing of numbersinstrcalrangefrom
- input range lower limitinstrcalrangeto
- input range upper limitinstroutrangefrom
- output range lower limitinstrOutputSpan
- output range spaninvalue
- input value: nominal or actualsign
- sign of input (-1 for negative or 1 for positive)precision
- precisionpublic boolean calculateToleranceRangeSquareRoot(PlusCMboRemote owner, java.lang.String fieldName)
mboRemote
- public boolean calculateToleranceRangeSquared(PlusCMboRemote owner, java.lang.String fieldName)
mboRemote
- public void calcPointRangeLimits(PlusCMboRemote mboRemote)
mboRemote
- public boolean getRangeLimitsTruncate()
public boolean summedToleranceEquations(PlusCMboRemote owner, java.lang.String fieldName, int tol, boolean[] summedCalcTypes)
mboRemote
- fieldName
- tol
- - int counter used in the equations method to loop through the tolerances.public static double[] directionCheck(PlusCMboRemote owner, java.util.Locale locale)
owner
- locale
- public void doUpdateOutputValue(PlusCMboRemote mboRemote, boolean bValidateWhenSetting)
mboRemote
- bValidateWhenSetting
- public java.lang.String doWOUpdateOutputValue(PlusCMboRemote owner, java.lang.String sPrefix)
mboRemote
- sPrefix
- public void doUpdateRonValues(PlusCMboRemote mboRemote)
mboRemote
- public boolean doUpdateTolValues(PlusCMboRemote mboRemote, java.lang.String fieldName)
mboRemote
- fieldName
- public boolean doUpdateErrorValues(PlusCMboRemote mboRemote, java.lang.String asFoundOrLeft, boolean bShowOutOfTolMsg)
mboRemote
- asFoundOrLeft
- bShowOutOfTolMsg
- public java.lang.String checkAndAdjustFldValueSize(java.lang.String value, java.text.DecimalFormatSymbols df, int minFraction, java.util.Locale locale)
public java.lang.String checkAndAdjustFldValueSize(java.lang.String value, java.text.DecimalFormatSymbols df, java.util.Locale locale, boolean shouldRound)
value
- value to be checkeddf
- DecimalFormatSymbols for parsing the valuelocale
- Locale for parsing and formatting the valueshouldRound
- whether the number should be rounded (truncate if false)public boolean calculateAveragesAndStdDevs(PlusCMboRemote[] groupPoints, PlusCMboRemote groupAveragePoint, java.lang.String fieldName)
groupPoints
- group of points whose averages and std devs will be calculatedgroupAveragePoint
- the point where the resulting values will be storedfieldName
- name of the attribute for which the values will be calculatedtrue
if all data needed for the calculation was available, false
otherwise