private void SetLayerBalance(Dictionary <FabStdStep, string> balance) { foreach (var item in balance) { FabStdStep step = item.Key; FabStdStep toStep = BopHelper.FindStdStep(step.ShopID, item.Value); if (toStep == null) { toStep = step.Layer.LastStep; } if (toStep == null) { continue; } step.BalanceToStep = toStep; var curr = step; while (curr != null) { step.BalanceSteps.Add(curr); if (curr == toStep) { break; } curr = curr.NexStep; } } }
private void PrePareTarget_Fab(MergedPegPart mpp) { if (InputMart.Instance.GlobalParameters.ApplyCellOutPlan == false) { mpp.Items.Clear(); foreach (var mm in InputMart.Instance.FabMoMaster.Values) { if (BopHelper.IsCellShop(mm.ShopID)) { continue; } FabPegPart pp = new FabPegPart(mm, mm.Product); foreach (FabMoPlan mo in mm.MoPlanList) { FabPegTarget pt = CreateHelper.CreateFabPegTarget(pp, mo); pp.AddPegTarget(pt); if (pp.SampleMs == null) { pp.SampleMs = pt; } } mpp.Merge(pp); } } }
private FabProcess CheckProcess(string factoryID, string shopID, string processID, string where, ref bool hasError) { FabProcess process = BopHelper.FindProcess(shopID, processID); if (process == null) { hasError = true; ErrHist.WriteIf(where + processID, ErrCategory.PERSIST, ErrLevel.WARNING, factoryID, shopID, Constants.NULL_ID, Constants.NULL_ID, Constants.NULL_ID, processID, Constants.NULL_ID, Constants.NULL_ID, "NOT FOUND PROCESS", string.Format("Table:{0}", where) ); } return(process); }
private FabStdStep CheckStdStep(string factoryID, string shopID, string stepID, string where, ref bool hasError) { FabStdStep step = BopHelper.FindStdStep(shopID, stepID); if (step == null) { hasError = true; ErrHist.WriteIf(where + stepID, ErrCategory.PERSIST, ErrLevel.WARNING, factoryID, shopID, Constants.NULL_ID, Constants.NULL_ID, Constants.NULL_ID, Constants.NULL_ID, Constants.NULL_ID, stepID, "NOT FOUND STD_STEP", string.Format("Table:{0}", where) ); } return(step); }
private string CheckMainProcessID(string factoryID, string shopID, string productID, string stepID, Wip wip, string where, ref bool hasError) { var proc = BopHelper.FindProcess2(productID, stepID); if (proc == null) { hasError = true; ErrHist.WriteIf(where + proc, ErrCategory.PERSIST, ErrLevel.WARNING, factoryID, shopID, Constants.NULL_ID, productID, Constants.NULL_ID, Constants.NULL_ID, Constants.NULL_ID, stepID, "NOT FOUND MAIN_PROCESS", string.Format("Table:{0}", where) ); return(null); } return(proc.ProcessID); }
/// <summary> /// </summary> /// <param name="context"/> /// <param name="handled"/> public void ON_INITIALIZE0(Mozart.Task.Execution.ModelContext context, ref bool handled) { ActivateDataItem(context); BopHelper.WriteProductRoute(); }
public WeightValue NEXT_STEP_RUN_PRIORITY(ISimEntity entity, DateTime now, ActiveObject target, WeightFactor factor, IDispatchContext ctx) { if (factor.Factor == 0) { return(new WeightValue(0)); } float criteria0 = WeightHelper.GetCriteria(factor, 0, 0.5f); FabAoEquipment eqp = target as FabAoEquipment; FabLot lot = entity as FabLot; FabStep nextStep = BopHelper.GetNextMandatoryStep(lot); float score = 0f; int workingCnt = 0; int adv = 0; if (nextStep != null && nextStep.IsMandatoryStep) { bool checkProductVersion = true; var workingEqps = nextStep.StdStep.GetWorkingEqpList(lot, checkProductVersion); //checkProductVersion = false if (workingEqps == null || workingEqps.Count == 0) { checkProductVersion = false; workingEqps = nextStep.StdStep.GetWorkingEqpList(lot, checkProductVersion); } workingCnt = workingEqps == null ? 0 : workingEqps.Count; if (workingCnt > 0) { score = checkProductVersion ? 1f : criteria0; } var hasDummy = workingEqps.Find(t => t.IsDummyWait) != null; if (hasDummy) { adv = 2; score *= adv; } } string nextStepID = nextStep != null ? nextStep.StepID : Constants.NULL_ID; string desc = string.Format("[Next:{0}, Working:{1}, Adv:{2}]", nextStepID, workingCnt, adv); return(new WeightValue(score * factor.Factor, desc)); }
public Step GETPREVPEGGINGSTEP(PegPart pegPart, Step currentStep) { if (InputMart.Instance.GlobalParameters.ApplyCellOutPlan == false) { return(null); } FabPegPart pp = pegPart.ToFabPegPart(); if (pp.Current.StepID == "0000") { string stepID = BopHelper.IsArrayShop(pp.FabProduct.ShopID) ? "9900" : "9990"; FabStep step = BopHelper.GetSafeDummyStep(pp.Current.FactoryID, pp.Current.ShopID, stepID); pp.AddCurrentPlan(pp.FabProduct, step); return(step); } return(null); }
private void LinkStdStep(Dictionary <string, List <FabStdStep> > dic) { foreach (List <FabStdStep> list in dic.Values) { bool isAfterCOA = false; FabStdStep prev = null; for (int i = 0; i < list.Count; i++) { FabStdStep step = list[i]; if (i == 0) { step.IsInputStep = true; } if (prev != null) { step.PrevStep = prev; } prev = step; if (i + 1 < list.Count) { step.NexStep = list[i + 1]; } if (step.LayerID == "COA") { isAfterCOA = true; } if (isAfterCOA && BopHelper.IsArrayShop(step.ShopID)) { step.IsAferCOA = true; } } } }
/// <summary> /// </summary> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public IList <Mozart.SeePlan.Simulation.IHandlingBatch> GET_WIPS0(ref bool handled, IList <Mozart.SeePlan.Simulation.IHandlingBatch> prevReturnValue) { List <IHandlingBatch> list = new List <IHandlingBatch>(); foreach (FabWipInfo wip in InputMart.Instance.FabWipInfo.Values) { FabStep step = wip.InitialStep as FabStep; if (SimHelper.IsTftRunning && step.IsCellShop) { continue; } else if (SimHelper.IsCellRunning && step.IsCellShop == false) { continue; } FabLot lot = CreateHelper.CreateLot(wip, LotState.WIP); list.Add(lot); if (wip.IsRun) { string eqpID = wip.WipEqpID ?? string.Empty; FabEqp eqp; InputMart.Instance.FabEqp.TryGetValue(eqpID, out eqp); if (eqp != null) { eqp.InitRunWips.AddSort(lot, CompareHelper.RunWipComparer.Default); } } if (SimHelper.IsTftRunning) { WipCollector.AddProductByVersion(lot); } } //TODO : 임시로직, CF에 있는 Array제품 버전문제 if (SimHelper.IsTftRunning) { foreach (FabLot lot in list) { FabProduct prod = lot.FabProduct; if (BopHelper.IsCfShop(lot.Wip.ShopID) && prod.IsArrayShopProduct()) { string version = WipCollector.GetVersion(prod.ProductID); if (LcdHelper.IsEmptyID(version) == false) { lot.OrigProductVersion = version; } else { Console.WriteLine(); } } } } return(list); }
private void SetMixRun() { ConfigGroup mixRuns = SiteConfigHelper.GetChamberMixRun(); ConfigGroup lossInfos = SiteConfigHelper.GetChamberMixRunLoss(); if (mixRuns == null) { return; } foreach (var item in mixRuns.Item.Values) { string[] steps = item.CodeValue.Split(','); if (steps.Length < 2) { continue; } List <FabStdStep> list = new List <FabStdStep>(); foreach (var stdStepID in steps) { FabStdStep step = BopHelper.FindStdStep(Constants.ArrayShop, stdStepID); if (step != null) { list.Add(step); } } if (list.Count < 2) { continue; } float lossValue = 1f; if (lossInfos != null) { ConfigInfo loss; lossInfos.Item.TryGetValue(item.CodeName, out loss); if (loss != null) { if (float.TryParse(loss.CodeValue, out lossValue) == false) { lossValue = 1f; } } } foreach (var step in list) { foreach (var otherStep in list) { if (step == otherStep) { continue; } if (step.MixRunPairSteps == null) { step.MixRunPairSteps = new List <FabStdStep>(); } step.MixRunPairSteps.Add(otherStep); } step.IsMixRunStep = true; step.MixCriteria = lossValue; } } }