Beispiel #1
0
        public static List <EqpArrangeSet> GetArrangeSet(FabStdStep stdStep, string productID, string productVer)
        {
            List <EqpArrangeSet> list = new List <EqpArrangeSet>();

            if (stdStep == null)
            {
                return(list);
            }

            var eqps = stdStep.AllEqps;

            if (eqps == null || eqps.Count == 0)
            {
                return(list);
            }

            foreach (var eqp in eqps)
            {
                var setInfo = GetEqpArrangeSet(eqp.EqpID, eqp, stdStep, productID, productVer);

                list.Add(setInfo);
            }

            return(list);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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;
                }
            }
        }
Beispiel #4
0
        public static bool AvailableChangeProductVer(FabStdStep stdStep, string productVer)
        {
            string shopID = stdStep.ShopID;
            string stepID = stdStep.StepID;

            //1300 이전 공정 이면서 Ver에 X가 없는 Version은 변경 투입 가능함.
            if (BopHelper.IsArrayShop(shopID))
            {
                if (IsProductVer_X(productVer) == false)
                {
                    if (LcdHelper.Equals(Constants.GATE_PHOTO_STEP, stepID))
                    {
                        return(true);
                    }

                    //1300 이전 공정은 ProductVersion 변경가능 함.
                    var fromStep = BopHelper.FindStdStep(Constants.ArrayShop, Constants.GATE_PHOTO_STEP);
                    if (fromStep != null)
                    {
                        if (stdStep.StepSeq <= fromStep.StepSeq)
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Beispiel #5
0
        public static bool IsFixedProductVer(FabStdStep stdStep, string productVer)
        {
            string shopID = stdStep.ShopID;

            //Ver는 Array Shop에서만 유효
            if (BopHelper.IsArrayShop(shopID) == false)
            {
                return(false);
            }

            //1300 ~ 5300 공정까지만 ProductVersion 유효(2020.01.13 - by.liujian(유건))
            //5300 이후 ProductVersion 무시
            var toStep = BopHelper.FindStdStep(Constants.ArrayShop, Constants.ITO_PHOTO_STEP);

            if (toStep != null)
            {
                if (stdStep.StepSeq > toStep.StepSeq)
                {
                    return(false);
                }
            }

            //1300 이전 공정 이면서 Ver에 X가 없는 Version은 변경 투입 가능함.
            if (AvailableChangeProductVer(stdStep, productVer))
            {
                return(false);
            }

            if (LcdHelper.IsEmptyID(productVer))
            {
                return(false);
            }

            return(true);
        }
Beispiel #6
0
        public static List <string> GetLoadableEqpList(FabStdStep stdStep, string productID, string productVer)
        {
            List <string> list = new List <string>();

            if (stdStep == null)
            {
                return(list);
            }

            var eqps = stdStep.AllEqps;

            if (eqps == null || eqps.Count == 0)
            {
                return(list);
            }

            foreach (var eqp in eqps)
            {
                var setInfo = GetEqpArrangeSet(eqp.EqpID, eqp, stdStep, productID, productVer);

                if (setInfo.IsLoadable())
                {
                    list.Add(eqp.EqpID);
                }
            }

            return(list);
        }
Beispiel #7
0
        internal static bool IsMaskConst(FabStdStep step)
        {
            if (InputMart.Instance.GlobalParameters.ApplySecondResource && step.IsUseMask)
            {
                return(true);
            }

            return(false);
        }
Beispiel #8
0
        internal static void AddBaseEqp(this FabStdStep step, FabEqp eqp)
        {
            if (step.BaseEqps == null)
            {
                step.BaseEqps = new List <string>();
            }

            step.BaseEqps.Add(eqp.EqpID);
        }
Beispiel #9
0
        internal static bool IsBaseEqp(this FabStdStep step, string eqpID)
        {
            if (step.BaseEqps == null)
            {
                return(false);
            }

            return(step.BaseEqps.Contains(eqpID));
        }
Beispiel #10
0
        public static List <FabAoEquipment> GetWorkingEqpList(this FabStdStep stdStep, FabLot lot, bool checkProductVersion = true)
        {
            string productID      = lot.CurrentProductID;
            string productVersion = lot.CurrentProductVersion;
            string ownerType      = lot.OwnerType;
            string ownerID        = lot.OwnerID;

            return(GetWorkingEqpList(stdStep, productID, productVersion, ownerType, ownerID, checkProductVersion));
        }
Beispiel #11
0
        internal static void AddToolArrange(FabStdStep stdStep, MaskArrange arr)
        {
            List <MaskArrange> list;

            if (stdStep.JigArrange.TryGetValue(arr.EqpID, arr.ProductID, out list) == false)
            {
                stdStep.JigArrange.Add(arr.EqpID, arr.ProductID, list = new List <MaskArrange>());
            }

            list.Add(arr);
        }
Beispiel #12
0
        internal static void AddEqp(this FabStdStep stdStep, FabEqp eqp)
        {
            if (stdStep.AllEqps == null)
            {
                stdStep.AllEqps = new List <FabEqp>();
            }

            if (stdStep.AllEqps.Contains(eqp) == false)
            {
                stdStep.AllEqps.Add(eqp);
            }
        }
Beispiel #13
0
        private bool IsPhotoStep(Dictionary <string, string> photoStep, FabStdStep stdStep)
        {
            string steps;

            photoStep.TryGetValue(stdStep.ShopID, out steps);

            if (LcdHelper.IsEmptyID(steps))
            {
                return(false);
            }

            return(steps.Contains(stdStep.StepID));
        }
Beispiel #14
0
        private static void CheckOtherSubEqpGroup(this FabEqp targetEqp, FabSubEqp subEqp, FabStdStep targetStdStep, out bool isIdle, out bool isAvailableMixRun)
        {
            isIdle            = true;
            isAvailableMixRun = true;

            var groupList = targetEqp.SubEqpGroups;

            foreach (var group in groupList)
            {
                //동일 Group 체크 X
                if (group == subEqp.SubEqpGroup)
                {
                    continue;
                }

                var sampleSubEqp = group.SubEqps.Values.FirstOrDefault();
                if (sampleSubEqp == null)
                {
                    continue;
                }

                if (sampleSubEqp.Current != null)
                {
                    isIdle = false;
                }

                if (sampleSubEqp.IsMixRunStep == false)
                {
                    isAvailableMixRun = false;
                }
                else
                {
                    if (sampleSubEqp.CurrentStepID == targetStdStep.StepID)
                    {
                        continue;
                    }

                    FabStdStep stdStep = sampleSubEqp.CurrentStep.StdStep;
                    if (stdStep.MixRunPairSteps.Contains(targetStdStep) == false)
                    {
                        isAvailableMixRun = false;
                    }
                }
            }

            //모두 IDLE인 경우는 isAvailableMixRun = false 상태이므로
            if (isIdle && isAvailableMixRun)
            {
                isAvailableMixRun = false;
            }
        }
Beispiel #15
0
        public static int GetWorkingEqpCount(this FabStdStep stdStep, JobFilterInfo info, bool checkProductVersion = true, bool onlyParent = true)
        {
            if (info == null)
            {
                return(0);
            }

            string productID = info.ProductID;
            string prodVer   = info.ProductVersion;
            string ownerType = info.OwnerType;
            string ownerID   = info.OwnerID;

            return(GetWorkingEqpCount(stdStep, productID, prodVer, ownerType, ownerID, checkProductVersion, onlyParent));
        }
Beispiel #16
0
        public static int GetWorkingEqpCount(this FabStdStep stdStep, FabLot lot, bool checkProductVersion = true, bool onlyParent = true)
        {
            if (lot == null)
            {
                return(0);
            }

            string productID = lot.CurrentProductID;
            string prodVer   = lot.OrigProductVersion;
            string ownerType = lot.OwnerType;
            string ownerID   = lot.OwnerID;

            return(GetWorkingEqpCount(stdStep, productID, prodVer, ownerType, ownerID, checkProductVersion, onlyParent));
        }
Beispiel #17
0
        public static void AddStdStep(this Layer layer, FabStdStep stdStep)
        {
            if (layer.Steps == null)
            {
                layer.Steps = new List <FabStdStep>();
            }

            int idx = layer.Steps.BinarySearch(stdStep, CompareHelper.FabStdStepComparer.Default);

            if (idx < 0)
            {
                idx = ~idx;
            }
            layer.Steps.Insert(idx, stdStep);
        }
Beispiel #18
0
        internal static void AddDspEqpGroup(FabStdStep stdStep)
        {
            if (string.IsNullOrEmpty(stdStep.DspEqpGroup))
            {
                return;
            }

            List <FabStdStep> list;

            if (_dspEqpGroup.TryGetValue(stdStep.DspEqpGroup, out list) == false)
            {
                _dspEqpGroup.Add(stdStep.DspEqpGroup, list = new List <FabStdStep>());
            }

            list.Add(stdStep);
        }
Beispiel #19
0
        internal static List <FabAoEquipment> GetLoadableEqpList(this FabStdStep stdStep)
        {
            List <FabAoEquipment> list = new List <FabAoEquipment>();

            foreach (var item in stdStep.AllEqps)
            {
                var eqp = AoFactory.Current.GetEquipment(item.EqpID) as FabAoEquipment;
                if (eqp == null)
                {
                    continue;
                }

                list.Add(eqp);
            }

            return(list);
        }
Beispiel #20
0
        public static List <string> GetProdVerList(FabStdStep stdStep, string productID, string productVer)
        {
            List <EqpArrangeSet> arrSet = GetArrangeSet(stdStep, productID, productVer);

            HashSet <string> list = new HashSet <string>();

            foreach (var set in arrSet)
            {
                foreach (var arr in set.DefaultGroups.Values)
                {
                    foreach (var item in arr)
                    {
                        list.Add(item.ProductVer);
                    }
                }
            }

            return(list.ToList());
        }
Beispiel #21
0
        public static int GetWorkingEqpCount(this FabStdStep stdStep,
                                             string productID, string productVersion, string ownerType, string ownerID, bool checkProductVersion = true, bool onlyParent = true)
        {
            var list = GetLoadableEqpList(stdStep);

            if (list == null)
            {
                return(0);
            }

            string shopID = stdStep.ShopID;
            string stepID = stdStep.StepID;

            int cnt = 0;

            foreach (var eqp in list)
            {
                if (eqp.IsParallelChamber)
                {
                    foreach (var subEqp in eqp.SubEqps)
                    {
                        if (subEqp.IsLastPlan(shopID, stepID, productID, productVersion, ownerType, ownerID, checkProductVersion))
                        {
                            cnt++;

                            if (onlyParent)
                            {
                                break;
                            }
                        }
                    }
                }
                else
                {
                    if (eqp.IsLastPlan(shopID, stepID, productID, productVersion, ownerType, ownerID, checkProductVersion))
                    {
                        cnt++;
                    }
                }
            }

            return(cnt);
        }
Beispiel #22
0
        internal static FabStep CreateDummyStep(string factoryID, string shopID, string stepID)
        {
            FabStep step = new FabStep(stepID);

            step.FactoryID = factoryID;
            step.ShopID    = shopID;
            step.StepType  = "DUMMY";
            step.IsDummy   = true;

            FabStdStep stdStep = new FabStdStep();

            stdStep.FactoryID = factoryID;
            stdStep.AreaID    = shopID;
            stdStep.StepID    = stepID;

            step.StdStep = stdStep;

            return(step);
        }
Beispiel #23
0
        public static int GetStepWipQty(FabStdStep stdStep, WipType type)
        {
            int qty = 0;

            foreach (var item in InFlowMaster.JobStateDic.Values)
            {
                foreach (var step in item.StepWips.Keys)
                {
                    if (step.StdStep != stdStep)
                    {
                        continue;
                    }

                    qty += item.StepWips[step].GetWips(type, Constants.NULL_ID);
                }
            }

            return(qty);
        }
Beispiel #24
0
        private static List <MaskArrange> GetMatchedMaskList(this FabStdStep stdStep, FabEqp eqp, FabLot lot, ToolType toolType)
        {
            string eqpID     = eqp.EqpID;
            string productID = lot.CurrentProductID;

            var toolArrange = toolType == ToolType.MASK ? stdStep.ToolArrange : stdStep.JigArrange;
            List <MaskArrange> list;

            if (toolArrange.TryGetValue(eqpID, productID, out list) == false)
            {
                return(null);
            }

            string productVersion = lot.CurrentProductVersion;

            List <MaskArrange> matchList = new List <MaskArrange>();

            foreach (MaskArrange maskArr in list)
            {
                if (stdStep.IsArrayShop)
                {
                    bool existX = productVersion.Contains("X") || maskArr.ProductVersion.Contains("X");
                    if (stdStep.IsGatePhoto == false || existX)
                    {
                        if (maskArr.ProductVersion != productVersion)
                        {
                            continue;
                        }
                    }
                }

                matchList.Add(maskArr);
            }

            if (matchList == null)
            {
                return(null);
            }

            return(matchList);
        }
Beispiel #25
0
        public static List <FabAoEquipment> GetWorkingEqpList(this FabStdStep stdStep,
                                                              string productID, string productVersion, string ownerType, string ownerID, bool checkProductVersion = true)
        {
            string shopID = stdStep.ShopID;
            string stepID = stdStep.StepID;

            List <FabAoEquipment> result = new List <FabAoEquipment>();

            var list = GetLoadableEqpList(stdStep);

            if (list == null)
            {
                return(result);
            }

            foreach (var eqp in list)
            {
                if (eqp.IsParallelChamber)
                {
                    foreach (var subEqp in eqp.SubEqps)
                    {
                        if (subEqp.IsLastPlan(shopID, stepID, productID, productVersion, ownerType, ownerID, checkProductVersion))
                        {
                            result.Add(eqp);
                            break;
                        }
                    }
                }
                else
                {
                    if (eqp.IsLastPlan(shopID, stepID, productID, productVersion, ownerType, ownerID, checkProductVersion))
                    {
                        result.Add(eqp);
                    }
                }
            }

            return(result);
        }
Beispiel #26
0
        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;
                    }
                }
            }
        }
Beispiel #27
0
        public LayerStats(FabAoEquipment eqp)
        {
            var factor = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_LAYER_BALANCE_PRIORITY);

            if (factor == null)
            {
                return;
            }

            string            dspEqpGroupID = eqp.DspEqpGroupID;
            List <FabStdStep> steps         = SimHelper.GetDspEqpSteps(dspEqpGroupID);

            for (int i = 0; i < steps.Count; i++)
            {
                FabStdStep step = steps[i];

                int qty = InFlowMaster.GetStepWipQtyforLayerBalance(step.BalanceSteps);

                StepWipStat stat;
                if (dic.TryGetValue(step.StepID, out stat) == false)
                {
                    stat = new StepWipStat(this, step);
                    dic.Add(step.StepID, stat);
                }

                stat.AddQty(qty);
            }


            this.MinQty = decimal.MaxValue;
            this.MaxQty = decimal.MinValue;

            foreach (StepWipStat stat in dic.Values)
            {
                this.MinQty = Math.Min(stat.GapQty, this.MinQty);
                this.MaxQty = Math.Max(stat.GapQty, this.MaxQty);
            }
        }
Beispiel #28
0
            //public Dictionary<string, decimal> ProductInfo = new Dictionary<string, decimal>();

            public StepWipStat(LayerStats parent, FabStdStep stdStep)
            {
                this.parent  = parent;
                this.StdStep = stdStep;
            }
Beispiel #29
0
        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;
                }
            }
        }
Beispiel #30
0
        public static FabStdStep FindStdStep(string shopID, string stepID)
        {
            FabStdStep stdStep = InputMart.Instance.FabStdStep.Rows.Find(shopID, stepID);

            return(stdStep);
        }