public void ProcessCapability_Indices_Incremental() { ProcessCapability target = new ProcessCapability(0, 20, 10) { 4, 6 }; Assert.AreEqual(5, target.Mean); Assert.AreEqual(1.41421, Math.Round(target.StDev, 5)); Assert.AreEqual(2.35702, Math.Round(target.Cp, 5)); Assert.AreEqual(1.17851, Math.Round(target.CpLower, 5)); Assert.AreEqual(3.53553, Math.Round(target.CpUpper, 5)); Assert.AreEqual(1.17851, Math.Round(target.Cpk, 5)); Assert.AreEqual(0.64150, Math.Round(target.Cpm, 5)); Assert.AreEqual(0.32075, Math.Round(target.Cpkm, 5)); target.Add(8); target.Add(10); Assert.AreEqual(7, target.Mean); Assert.AreEqual(2.58199, Math.Round(target.StDev, 5)); Assert.AreEqual(1.29099, Math.Round(target.Cp, 5)); Assert.AreEqual(0.90370, Math.Round(target.CpLower, 5)); Assert.AreEqual(1.67829, Math.Round(target.CpUpper, 5)); Assert.AreEqual(0.90370, Math.Round(target.Cpk, 5)); Assert.AreEqual(0.84215, Math.Round(target.Cpm, 5)); Assert.AreEqual(0.58951, Math.Round(target.Cpkm, 5)); }
public void ProcessCapability_MeanAndStDev_Basic_3() { ProcessCapability target = new ProcessCapability(); target.UseBesselCorrection = false; target.Add(6); target.Add(6); target.Add(8); target.Add(8); Assert.AreEqual(7, target.Mean); Assert.AreEqual(1, target.StDev); Assert.AreEqual(6, target.Minimum); Assert.AreEqual(8, target.Maximum); }
public void ProcessCapability_MeanAndStDev_Basic_2() { ProcessCapability target = new ProcessCapability { UseBesselCorrection = false }; target.Add(0); target.Add(6); target.Add(8); target.Add(14); Assert.AreEqual(7, target.Mean); Assert.AreEqual(5, target.StDev); Assert.AreEqual(0, target.Minimum); Assert.AreEqual(14, target.Maximum); }
public void ProcessCapability_Indices_NaN() { ProcessCapability target = new ProcessCapability(); target.Add(0); target.Add(0); target.Add(14); target.Add(14); Assert.AreEqual(7, target.Mean); Assert.AreEqual(8.08290, Math.Round(target.StDev, 5)); Assert.AreEqual(double.NaN, target.Cp); Assert.AreEqual(double.NaN, Math.Round(target.CpLower, 5)); Assert.AreEqual(double.NaN, Math.Round(target.CpUpper, 5)); Assert.AreEqual(double.NaN, Math.Round(target.Cpk, 5)); Assert.AreEqual(double.NaN, Math.Round(target.Cpm, 5)); Assert.AreEqual(double.NaN, Math.Round(target.Cpkm, 5)); }
public void ProcessCapability_Indices_3() { ProcessCapability target = new ProcessCapability(2, 12, 7); target.Add(6); target.Add(6); target.Add(8); target.Add(8); Assert.AreEqual(7, target.Mean); Assert.AreEqual(1.15470, Math.Round(target.StDev, 5)); Assert.AreEqual(1.44338, Math.Round(target.Cp, 5)); Assert.AreEqual(1.44338, Math.Round(target.CpLower, 5)); Assert.AreEqual(1.44338, Math.Round(target.CpUpper, 5)); Assert.AreEqual(1.44338, Math.Round(target.Cpk, 5)); Assert.AreEqual(1.44338, Math.Round(target.Cpm, 5)); Assert.AreEqual(1.44338, Math.Round(target.Cpkm, 5)); }
public void ProcessCapability_Indices_2() { ProcessCapability target = new ProcessCapability(5, 15, 10); target.Add(0); target.Add(0); target.Add(14); target.Add(14); Assert.AreEqual(7, target.Mean); Assert.AreEqual(8.08290, Math.Round(target.StDev, 5)); Assert.AreEqual(0.20620, Math.Round(target.Cp, 5)); Assert.AreEqual(0.08248, Math.Round(target.CpLower, 5)); Assert.AreEqual(0.32991, Math.Round(target.CpUpper, 5)); Assert.AreEqual(0.08248, Math.Round(target.Cpk, 5)); Assert.AreEqual(0.19331, Math.Round(target.Cpm, 5)); Assert.AreEqual(0.07732, Math.Round(target.Cpkm, 5)); }
public void ProcessCapability_Indices_1() { ProcessCapability target = new ProcessCapability(0, 20, 10); target.Add(0); target.Add(0); target.Add(14); target.Add(14); Assert.AreEqual(7, target.Mean); Assert.AreEqual(8.08290, Math.Round(target.StDev, 5)); Assert.AreEqual(0.41239, Math.Round(target.Cp, 5)); Assert.AreEqual(0.28868, Math.Round(target.CpLower, 5)); Assert.AreEqual(0.53611, Math.Round(target.CpUpper, 5)); Assert.AreEqual(0.28868, Math.Round(target.Cpk, 5)); Assert.AreEqual(0.38662, Math.Round(target.Cpm, 5)); Assert.AreEqual(0.27064, Math.Round(target.Cpkm, 5)); }
public virtual bool SwitchCapability(ProcessCapability capability) { _currentTool = Tools.First(t => t.Capability == capability); return true; }
public virtual bool CanApply(ProcessCapability capability) { return Tools.First(t => t.Capability == capability).CanApply(); }
public override bool SwitchCapability(ProcessCapability capability) { _currentTool = Choose(Tools); return true; }
public override bool CanApply(ProcessCapability capability) => false;
public virtual bool CanApply(ProcessCapability capability) { return(Tools.First(t => t.Capability == capability).CanApply()); }
public override bool SwitchCapability(ProcessCapability capability) { _currentTool = Choose(Tools); return(true); }
public Tool(ProcessCapability capability) { Capability = capability; }
public virtual bool SwitchCapability(ProcessCapability capability) { _currentTool = Tools.First(t => t.Capability == capability); return(true); }
private void btnOk_Click(object sender, EventArgs e) { //Guardar Datos var v = 0.65; double[] dblArray = new double[30]; dblArray[NDatos - 1] = Convert.ToDouble(entry1.Text); NDatos = NDatos - 1; lb_Falta.Text = "Faltan " + NDatos + " datos"; if (NDatos == 0) { CenterSpace.NMath.Core.DoubleVector data = new CenterSpace.NMath.Core.DoubleVector(dblArray); int size = 30; double LSL = v - 0.05; double USL = v + 0.05; double target = v; var pc = new ProcessCapability(data, size, LSL, USL, target); var CPK = -1 * (pc.Cpk); Console.Write(CPK); const string connectionString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=spcprojectdb.cxmd6kjxslqw.us-west-1.rds.amazonaws.com)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=ORCL))); User Id=kyann;Password=Gakd0132;"; OracleConnection connection = new OracleConnection(connectionString); // OracleCommand cmd; connection.Close(); //Asignar a una variable que sea un commando OracleCommand user1 = new OracleCommand("AGREGAR_ENTRADA"); //Al comando agregarle la conexion con la base de datos user1.Connection = connection; //Declarar que es un Procedure guardado user1.CommandType = System.Data.CommandType.StoredProcedure; //Declarar cuales son los parametros y si son entradas o salidas user1.Parameters.Add("ID_USER_", OracleDbType.Varchar2).Direction = System.Data.ParameterDirection.Input; user1.Parameters.Add("ID_MATERIAL_", OracleDbType.Varchar2).Direction = System.Data.ParameterDirection.Input; user1.Parameters.Add("ID_MAQUINA_", OracleDbType.Varchar2).Direction = System.Data.ParameterDirection.Input; user1.Parameters.Add("ID_MEDICION_", OracleDbType.Varchar2).Direction = System.Data.ParameterDirection.Input; user1.Parameters.Add("DATOS_", OracleDbType.Varchar2).Direction = System.Data.ParameterDirection.Input; //Declarar los valores user1.Parameters["ID_USER_"].Value = Us_; user1.Parameters["ID_MATERIAL_"].Value = mat_; user1.Parameters["ID_MAQUINA_"].Value = maq_; user1.Parameters["ID_MEDICION_"].Value = med_; user1.Parameters["DATOS_"].Value = CPK.ToString("##.##"); connection.Open(); //Ejecutar user1.ExecuteScalar(); connection.Close(); SPC.RealizarOtra R = new SPC.RealizarOtra(Principal, Anterior); this.Hide(); } }