using System; using System.Collections.Generic; using System.Linq; using System.Text; using ExcelNORMSDIST; namespace ProcessPerformance4 { /// <summary> /// Process Performance from Z-Transformation Result class /// </summary> public class ProcessPerformanceFrZResult { /// <summary> /// Default constructor /// </summary> public ProcessPerformanceFrZResult() { } /// <summary> /// Expected % > USL /// </summary> public double PercentMoreThanUSL; /// <summary> /// Expected % < LSL /// </summary> public double PercentLessThanLSL; /// <summary> /// Expected yield (overall) % /// </summary> public double PercentYieldOverall; } /// <summary> /// Determine Process Performance from Z /// </summary> public class ProcessPerformanceFrZ { private double xBar = 0; private double s = 0; private double LSL = 0; private double USL = 0; private double percentMoreThanUSL = 0; private double percentLessThanLSL = 0; private double percentYieldOverall = 0; /// <summary> /// ProcessPerformanceFrZ Result /// </summary> public ProcessPerformanceFrZResult Result = new ProcessPerformanceFrZResult(); #region constructor /// <summary> /// ProcessPerformanceFrZ default constructor /// </summary> public ProcessPerformanceFrZ() { }//default empty constructor #endregion//constructor /// <summary> /// Write only property: Mean /// </summary> public double XBar { set { xBar = value; } } /// <summary> /// Write only property: Std Dev /// </summary> public double StdDev { set { s = value; } } /// <summary> /// Write only property: Lower Spec Limit /// </summary> public double LowerSpecLimit { set { LSL = value; } } /// <summary> /// Write only property: Upper Spec Limit /// </summary> public double UpperSpecLimit { set { USL = value; } } /// <summary> /// Calculate the Process Performance from Z /// </summary> public void Analyze() { percentMoreThanUSL = 100 * (1 - Excel.NORMSDIST((USL-xBar)/s)); percentLessThanLSL = 100 * (Excel.NORMSDIST((LSL-xBar)/s)); percentYieldOverall = 100 - percentMoreThanUSL - percentLessThanLSL; //Results Result.PercentMoreThanUSL = percentMoreThanUSL; Result.PercentLessThanLSL = percentLessThanLSL; Result.PercentYieldOverall = percentYieldOverall; } }//end class ProcessPerformanceFrZ }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)