public static decimal GetHarmonicTactTime(FabStep step, List <FabAoEquipment> assignedEqps, string productID) { if (assignedEqps == null) { return(0); } float tactSum = 0; foreach (var eqp in assignedEqps) { StepTime st = step.GetStepTime(eqp.EqpID, productID); if (st == null) { continue; } float tact = (1f / st.TactTime); tactSum += tact; } if (tactSum == 0) { return(0); } return(Convert.ToDecimal(1f / tactSum)); }
public static decimal GetAvgTactTimeForEqps(FabStep step, FabProduct product, List <FabAoEquipment> workingEqps) { Decimal defaultTactTime = (decimal)SiteConfigHelper.GetDefaultTactTime().TotalSeconds; if (workingEqps == null) { return(defaultTactTime); } int n = workingEqps.Count; decimal s = 0; foreach (var eqp in workingEqps) { string eqpID = eqp.EqpID; StepTime tactTime = step.GetStepTime(eqpID, product.ProductID); if (tactTime == null || tactTime.TactTime <= 0) { continue; } s += Convert.ToDecimal(1d / tactTime.TactTime); } if (s > 0m) { return(n / s); } else { return(defaultTactTime); } }
public static decimal GetAvgProcTime(FabStep step, FabProduct prod, string productVersion) { if (step.AvgFlowTime < 0) { List <string> list = EqpArrangeMaster.GetLoadableEqpList(step.StdStep, prod.ProductID, productVersion); if (list == null) { StepTat tat = step.GetTat(prod.ProductID, true); if (tat != null) { step.AvgFlowTime = Convert.ToDecimal(tat.TAT * 60); } return(step.AvgFlowTime); } decimal n = list.Count; decimal s = 0; foreach (string eqpID in list) { StepTime st = step.GetStepTime(eqpID, prod.ProductID); if (st == null || st.ProcTime <= 0) { continue; } s = s + Convert.ToDecimal(1d / st.ProcTime); } if (s > 0m) { step.AvgFlowTime = Math.Round(n / (decimal)s, 2); } else { step.AvgFlowTime = (decimal)SiteConfigHelper.GetDefaultFlowTime().TotalSeconds; } } return(step.AvgFlowTime); }
public static decimal GetAvgTactTime(FabStep step, FabProduct prod, string productVersion) { if (step.AvgTactTime < 0) { List <string> eqps = EqpArrangeMaster.GetLoadableEqpList(step.StdStep, prod.ProductID, productVersion); if (eqps == null) { step.AvgTactTime = 0; return(step.AvgTactTime); } int n = eqps == null ? 0 : eqps.Count; decimal s = 0; foreach (string eqpID in eqps) { StepTime tactTime = step.GetStepTime(eqpID, prod.ProductID); if (tactTime == null || tactTime.TactTime <= 0) { continue; } s += Convert.ToDecimal(1d / tactTime.TactTime); } if (s > 0m) { step.AvgTactTime = n / s; } else { step.AvgTactTime = (decimal)SiteConfigHelper.GetDefaultTactTime().TotalSeconds; } } return(step.AvgTactTime); }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public ProcTimeInfo GET_PROCESS_TIME0(AoEquipment aeqp, IHandlingBatch hb, ref bool handled, ProcTimeInfo prevReturnValue) { FabStep step = hb.CurrentStep as FabStep; FabEqp eqp = aeqp.Target as FabEqp; FabLot lot = hb.Sample as FabLot; StepTime st = step.GetStepTime(eqp.EqpID, lot.CurrentProductID); float mixRunRatio = 1; if (aeqp.IsParallelChamber) { if (eqp.IsMixRunning()) { mixRunRatio = lot.CurrentFabStep.StdStep.MixCriteria; } if (mixRunRatio == 0) { mixRunRatio = 1; } } ProcTimeInfo time = new ProcTimeInfo(); if (st != null) { time.FlowTime = TimeSpan.FromSeconds(st.ProcTime * mixRunRatio); time.TactTime = TimeSpan.FromSeconds(st.TactTime * mixRunRatio); } else { time.FlowTime = TimeSpan.FromMinutes(10); time.TactTime = TimeSpan.FromMinutes(10); } return(time); }