Example #1
0
        private static bool IsFilterDummyWaitEqp(this JobFilterInfo info, FabAoEquipment eqp, List <FabAoEquipment> eqpList)
        {
            if (eqpList == null)
            {
                return(false);
            }

            WeightFactor wf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_DUMMY_WAIT_EQP_FILTER);

            if (wf == null || wf.Factor == 0)
            {
                return(false);
            }

            //연속진행인 경우
            if (info.IsRunning)
            {
                return(false);
            }

            var waitEqps = eqpList.FindAll(x => x.IsDummyWait);

            bool isFilter = waitEqps.Count > 0;

            return(isFilter);
        }
Example #2
0
        internal static Dictionary <string, WaitingWipInfo> SetWatingWipInfo(AoEquipment eqp, List <JobFilterInfo> joblist)
        {
            WeightFactor wf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_ONGOING_PRODUCT_WIP_PRIORITY);

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

            Dictionary <string, WaitingWipInfo> waiting = new Dictionary <string, WaitingWipInfo>();

            foreach (var job in joblist)
            {
                var fps = (job.Step.Process as FabProcess).FirstPhotoStep;
                if (fps == null)
                {
                    continue;
                }

                string stepKey = fps.StepKey;

                if (waiting.ContainsKey(stepKey))
                {
                    continue;
                }

                WaitingWipInfo info = ResHelper.GetTargetStepWaitingWip(stepKey);
                waiting.Add(stepKey, info);
            }

            return(waiting);
        }
Example #3
0
        private static bool HasFilterInfo(AoEquipment eqp, FabLot lot)
        {
            if (lot.DispatchFilterInfo == null)
            {
                return(false);
            }

            if (lot.DispatchFilterInfo.FilterType == DispatchFilter.None)
            {
                return(false);
            }

            WeightFactor wf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_PREVENT_SMALL_LOT_FILTER);

            if (wf == null || wf.Factor == 0)
            {
                //자신의 초기 Step일 경우에 Lot Priority 가 1,2,3 일 경우 필터하지 않음
                if (lot.CurrentStep == lot.Wip.InitialStep)
                {
                    if (lot.Wip.Priority == 1 || lot.Wip.Priority == 2 || lot.Wip.Priority == 3)
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
Example #4
0
        private static bool ExistInflowWip(FabAoEquipment eqp, JobFilterInfo info)
        {
            var wf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_ALLOW_RUN_DOWN_TIME);

            if (wf == null || wf.Factor == 0)
            {
                return(false);
            }

            decimal inflowHour = (decimal)wf.Criteria[0];

            if (inflowHour <= 0)
            {
                return(false);
            }

            var     idleTime   = eqp.GetIdleRunTime();
            decimal adjustHour = inflowHour - Convert.ToDecimal(idleTime.TotalHours);

            if (adjustHour <= 0)
            {
                return(false);
            }

            var inflowQty = InFlowMaster.GetAllowRunDownWip(eqp, info.ProductID, info.ProductVersion, info.OwnerType, info.Step, adjustHour);

            return(inflowQty > 0);
        }
Example #5
0
        private static bool IsFilterRunMode(this JobFilterInfo info, FabAoEquipment eqp, List <JobFilterInfo> jobList)
        {
            WeightFactor wf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_RUN_MODE_FILTER);

            if (wf == null || wf.Factor == 0)
            {
                return(false);
            }

            //연속진행인 경우
            if (info.IsRunning)
            {
                return(false);
            }

            string eqpGroup = eqp.TargetEqp.EqpGroup;
            string runMode  = eqp.GetCurrentRunMode();

            var branchStep = BranchStepMaster.GetBranchStep(eqpGroup, runMode);

            if (branchStep == null)
            {
                return(false);
            }

            if (branchStep.IsAllProduct)
            {
                return(false);
            }

            var productList = branchStep.ProductList;

            if (productList == null || productList.Count == 0)
            {
                return(false);
            }

            string productID = info.ProductID;
            string ownerType = info.OwnerType;

            bool isFilter = true;

            if (branchStep.IsLoadable(productID, ownerType))
            {
                isFilter = false;
            }

            if (isFilter)
            {
                string defaultOwnerType = SiteConfigHelper.GetDefaultOwnerType();
                if (ExistRemainWip(jobList, productList, defaultOwnerType) == false)
                {
                    isFilter = false;
                }
            }

            return(isFilter);
        }
Example #6
0
        public static bool TryGetEqpWeightFactor(AoEquipment aeqp, string factorName, out WeightFactor wf)
        {
            wf = WeightHelper.GetWeightFactor(aeqp.Target.Preset, factorName);

            if (wf == null || wf.Factor == 0)
            {
                return(false);
            }

            return(true);
        }
Example #7
0
        public static bool IsFilterPreventLayerChange(AoEquipment aeqp, FabLot lot)
        {
            var eqp = aeqp.ToFabAoEquipment();

            //if (eqp.EqpID == "THCVDC00" && eqp.NowDT >= LcdHelper.StringToDateTime("20200108 090229"))
            //	Console.WriteLine("B");

            WeightFactor wf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_PREVENT_LAYER_CHANGE_FILTER);

            if (wf == null || wf.Factor == 0)
            {
                return(false);
            }

            var step = lot.CurrentFabStep;

            if (IsLastRunStep(eqp, step))
            {
                return(false);
            }

            var stepList = SimHelper.GetDspEqpSteps(eqp.DspEqpGroupID);

            if (stepList == null || stepList.Count <= 1)
            {
                return(false);
            }

            var last = eqp.GetLastPlan();

            if (last == null)
            {
                return(false);
            }

            bool isFilter = ExistRunEqpByDspEqpGroup(eqp, last.FabStep) == false;

            //if (isFilter)
            //	info.FilterReason = string.Format("");

            return(isFilter);
        }
Example #8
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);
            }
        }
Example #9
0
        private static bool IsFilterSetup(this JobFilterInfo info, AoEquipment aeqp)
        {
            WeightFactor wf = WeightHelper.GetWeightFactor(aeqp.Target.Preset, Constants.WF_SETUP_FILTERING);

            if (wf == null || wf.Factor == 0)
            {
                return(false);
            }

            FabLot lot = info.Sample;

            if (lot == null)
            {
                return(false);
            }

            FabAoEquipment eqp  = aeqp.ToFabAoEquipment();
            var            step = info.Step;

            //if (eqp.EqpID == "CHPIL300" && eqp.NowDT >= LcdHelper.StringToDateTime("20200119 105032")
            //	&& lot.CurrentProductID == "CW42512AB000")
            //	Console.WriteLine("B");

            if (eqp.IsLastPlan(lot))
            {
                return(false);
            }

            double setupTime = info.SetupTime;

            if (setupTime <= 0)
            {
                return(false);
            }

            double ratio = Convert.ToDouble(wf.Criteria[0]);

            double continuousQty = info.WaitSum;

            if (continuousQty > 0)
            {
                continuousQty += InFlowMaster.GetContinuousQty(lot, step);
            }

            if (eqp.IsParallelChamber)
            {
                continuousQty = continuousQty / eqp.GetChamberCapacity();
            }

            var st = step.GetStepTime(aeqp.EqpID, info.ProductID);

            if (st == null)
            {
                return(false);
            }

            double tactTime = st.TactTime;
            double workSec  = Math.Round(continuousQty * tactTime, 2);
            double setupSec = Math.Round(setupTime * 60 * ratio, 2);

            bool isFilter = workSec < setupSec;

            if (isFilter == false)
            {
                return(false);
            }

            //단순 Setup > Tact Time 일 경우 Inflow를 고려
            //다른 곳에서 진행중인가? Yes : 필터, No: 소량검사
            if (SimHelper.IsAnyWorking(eqp, lot) == false)
            {
                //기다려도 오지 않는 작은 Lot인가? Yes : 필터하지 않음. No : 필터
                if (IsWaitSmallSizeLot(aeqp, info, lot, continuousQty, setupTime, ratio, st))
                {
                    isFilter = false;
                }
            }

            if (isFilter)
            {
                info.FilterReason = string.Format("SetupTime:{0} > {1}(Qty:{2} * Tact:{3})", setupSec, workSec, continuousQty, st.TactTime);
            }

            return(isFilter);
        }
Example #10
0
        private static bool IsFilterNewEqpAssign(this JobFilterInfo info, FabAoEquipment eqp, List <FabAoEquipment> workingEqpList)
        {
            WeightFactor wf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_NEW_EQP_ASSIGN_FILTERING);

            if (wf == null || wf.Factor == 0)
            {
                return(false);
            }

            //연속진행인 경우
            if (info.IsRunning)
            {
                return(false);
            }

            //Setup이 필요없는 제품의 경우 Filter 제외(2019.12.16 - by.liujian(유건))
            if (eqp.IsParallelChamber == false)
            {
                var setupTime = info.SetupTime;
                if (setupTime <= 0)
                {
                    return(false);
                }
            }

            ////NoAssign 제품의 경우는 IsFilterSetup로 체크(bong - J/C 증가로 제외)
            //if (info.IsNoAssign)
            //    return false;

            //if (eqp.EqpID == "FHMPH100" && eqp.NowDT >= LcdHelper.StringToDateTime("20200113 203008"))
            //	Console.WriteLine("B");

            double param1 = (double)wf.Criteria[0];
            double param2 = (double)wf.Criteria[1];

            //if (info.IsNoAssign)
            //{
            //	WeightFactor awf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_ALLOW_RUN_DOWN_TIME);
            //	if (awf != null && awf.Factor != 0)
            //		param1 = param1 + Convert.ToDouble(awf.Criteria[0]);
            //}

            int workCnt = workingEqpList != null ? workingEqpList.Count : 0;

            //param1
            string reason;
            bool   isFilter = IsFilterNewEqpAssign(info, eqp, param1, workCnt, out reason);

            //param2
            if (isFilter == false && workCnt > 0)
            {
                if (param2 > param1)
                {
                    isFilter = IsFilterNewEqpAssign(info, eqp, param2, workCnt, out reason);
                }
            }

            if (isFilter)
            {
                info.FilterReason = reason;
            }

            return(isFilter);
        }
Example #11
0
        private static bool IsCfPhotoTargetLine(AoEquipment aeqp, FabLot lot)
        {
            var eqp = aeqp.ToFabAoEquipment();

            WeightFactor wf = WeightHelper.GetWeightFactor(eqp.Target.Preset, Constants.WF_CF_PHOTO_TARGET_LINE_FILTER);

            if (wf == null || wf.Factor == 0)
            {
                return(true);
            }

            //if(eqp.EqpID == "FHRPH100" && eqp.NowDT >= LcdHelper.StringToDateTime("20200115 073000")
            //	&& lot.CurrentProductID == "TH645A1AB100")
            //	Console.WriteLine("B");

            var lineType = eqp.GetLineType();

            if (lineType == LineType.NONE)
            {
                return(true);
            }

            bool isPegged = lot.CurrentFabPlan.IsPegged;

            if (isPegged == false)
            {
                if (eqp.IsLastPlan(lot))
                {
                    return(true);
                }
                else
                {
                    if (lineType == LineType.SUB)
                    {
                        return(false);
                    }
                    else
                    {
                        return(true);
                    }
                }
            }

            var stepTarget = lot.CurrentFabPlan.MainTarget;

            if (stepTarget == null || stepTarget.Mo == null)
            {
                return(true);
            }

            var targetLine = stepTarget.Mo.LineType;

            if (lineType != targetLine)
            {
                if (ExistRemainStepPlan(lot, lineType) == false)
                {
                    return(false);
                }
            }

            return(true);
        }