Click here to Skip to main content
12,500,937 members (53,836 online)
Click here to Skip to main content

Tagged as

Stats

8K views
143 downloads
7 bookmarked
Posted

Process Performance Determination in C#: Part 2

, 14 Jun 2012 CPOL
The program presented here provides a simple way to obtain process performance through PPM.
ProcessPerformance2
Local.testsettings
ProcessPerformance2
ProcessPerformance2.vsmdi
bin
Debug
ProcessPerformance2.dll
Release
ProcessPerformance2.csproj.user
Properties
TestResults
Sitt_JANAKA-PC 2012-06-13 11_14_54
Sitt_JANAKA-PC 2012-06-13 11_14_54.trx
In
JANAKA-PC
Out
AgentRestart.dat
Sitt_JANAKA-PC 2012-06-13 11_17_53
Sitt_JANAKA-PC 2012-06-13 11_17_53.trx
In
JANAKA-PC
Out
AgentRestart.dat
Sitt_JANAKA-PC 2012-06-13 11_18_31
Sitt_JANAKA-PC 2012-06-13 11_18_31.trx
In
JANAKA-PC
Out
AgentRestart.dat
Sitt_JANAKA-PC 2012-06-13 11_21_26.trx
Sitt_JANAKA-PC 2012-06-13 12_13_04.trx
TraceAndTestImpact.testsettings
UnitTestPerformance2
bin
Debug
ProcessPerformance2.dll
UnitTestPerformance2.dll
Release
Properties
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProcessPerformance2
{
    /// <summary>
    /// Process Performance from PPM (Part per Million) Result class
    /// </summary>
    public class ProcessPerformanceFrPPMResult
    {
        /// <summary>
        /// Default constructor
        /// </summary>
        public ProcessPerformanceFrPPMResult() { }
        /// <summary>
        /// Defect Per Unit
        /// </summary>
        public double DPU;
        /// <summary>
        /// Part Per Million
        /// </summary>
        public double PPM;        
        /// <summary>
        /// Yield in Percent
        /// </summary>
        public double YieldInPercent;
    }

    /// <summary>
    /// Determine Process Performance from PPM
    /// </summary>
    public class ProcessPerformanceFrPPM
    {
        private int N = 0;
        private int D = 0;
        private double dpu = 0;
        private double ppm = 0;
        private double yieldInPercent = 0;
        
        /// <summary>
        /// ProcessPerformanceFrPPM Result
        /// </summary>
        public ProcessPerformanceFrPPMResult Result = new ProcessPerformanceFrPPMResult();

        #region Constructors
        /// <summary>
        /// Process performace from PPM constructor
        /// </summary>
        public ProcessPerformanceFrPPM() { } //default empty constructor

        #endregion //Constructors

        /// <summary>
        /// Write only property: total number of units
        /// </summary>
        public int NumOfUnitProcessed
        {
            set { N = value; }
        }

        /// <summary>
        /// Write only property: total number of defective parts
        /// </summary>
        public int NumOfDefectivePart
        {
            set { D = value; }
        }

        /// <summary>
        /// Calculate the Process Performance from PPM
        /// </summary>
        public void Analyze()
        {
            dpu = (double)D / N;
            ppm = (double)D / N * 1000000;
            yieldInPercent = (1 - ppm / 1000000) * 100;
            //Result
            Result.DPU = dpu;
            Result.PPM = ppm;
            Result.YieldInPercent = yieldInPercent;            
        }

    }//end class ProcessPerformanceFrPPM
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sitt Chee Keen
Foundasoft.com
Malaysia Malaysia
Consultant

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160919.1 | Last Updated 14 Jun 2012
Article Copyright 2012 by Sitt Chee Keen
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid