public void BuildStepRouteInfo(string productVer) { List <string> eqps = EqpArrangeMaster.GetLoadableEqpList(this.StdStep, this.ProductID, productVer); if (eqps != null) { this.LoadableEqps.AddRange(eqps); AddLoadableAoEqp(AoFactory.Current.Equipments); } //CHECK : jung : LoadableEqp 수량 중복으로 계산함.바로 위에도 있고 해당 함수안에도 있음. this.TactSec = TimeHelper.GetAvgTactTime(this.Step, this.Product, productVer); this.RunTAT = TimeHelper.GetAvgProcTime(this.Step, this.Product, productVer); //step.LeadTime Hour --> Sec 변환 var tatInfo = this.Step.GetTat(this.ProductID, true); if (tatInfo != null) { this.WaitTAT = Convert.ToDecimal(tatInfo.TAT * 60) - this.RunTAT; } if (this.WaitTAT < 0) { this.WaitTAT = 600; } }
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); }