Esempio n. 1
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);
        }
Esempio n. 2
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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 7
0
        private static bool IsWaitSmallSizeLot(AoEquipment aeqp, JobFilterInfo info, FabLot lot, double waitQty, double setupTime, double ratio, StepTime st)
        {
            var step = lot.CurrentFabStep;

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

            var stdStep = step.StdStep;

            if (stdStep == null || stdStep.IsInputStep)
            {
                return(false);
            }

            FabAoEquipment eqp = aeqp.ToFabAoEquipment();

            TimeSpan firstInflowTime = TimeSpan.FromMinutes(setupTime);
            decimal  allowTime       = 3m;

            WeightFactor wf;

            WeightHelper.TryGetEqpWeightFactor(eqp, Constants.WF_ALLOW_RUN_DOWN_TIME, out wf);
            if (wf != null)
            {
                allowTime = (decimal)wf.Criteria[0];
            }

            double inflowQty1 = Convert.ToDouble(InFlowAgent.GetInflowQty(info, aeqp, (decimal)firstInflowTime.TotalHours, 0));
            double inflowQty2 = Convert.ToDouble(InFlowAgent.GetInflowQty(info, aeqp, allowTime, 0));

            double waitQty1 = waitQty + inflowQty1;
            double waitQty2 = waitQty + inflowQty2;

            //Setup 시간 이내에 유입이 있나?
            if (LcdHelper.IsIncludeInRange(waitQty, waitQty1 * 0.95d, waitQty1 * 1.05d))
            {
                //지정된 시간내에 유입재공이 있나?
                if (LcdHelper.IsIncludeInRange(waitQty, waitQty2 * 0.95d, waitQty2 * 1.05d))
                {
                    double requiredSec = st.TactTime * waitQty2;

                    bool isSmall = requiredSec < setupTime * 60 * ratio;

                    return(isSmall);
                }
            }

            return(false);
        }
Esempio n. 8
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);
        }
Esempio n. 9
0
        private static bool IsStepSmallLot(AoEquipment aeqp, FabLot lot)
        {
            WeightFactor wf;

            WeightHelper.TryGetEqpWeightFactor(aeqp, Constants.WF_ALLOW_SMALL_LOT_FILTER, out wf);

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

            decimal inflowHour = (decimal)wf.Criteria[0];
            decimal inflowQty  = InFlowAgent.GetInflowQty(lot, aeqp, inflowHour, 1);

            if (inflowQty == 0)
            {
                return(true);
            }

            return(false);
        }
Esempio n. 10
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);
            }
        }
Esempio n. 11
0
        public static FabWeightPreset GetDebugPreset(string presetID)
        {
            if (GlobalParameters.Instance.ApplyDebug == false)
            {
                return(null);
            }

            string debugPreset = InputMart.Instance.GlobalParameters.DebugPreset;

            if (string.IsNullOrEmpty(debugPreset) == false && LcdHelper.IsEmptyID(debugPreset) == false)
            {
                int index = presetID.IndexOf("_");
                if (index >= 0)
                {
                    string testPresetID = LcdHelper.Concat(debugPreset, presetID.Substring(index));
                    var    preset       = WeightHelper.GetWeightPreset(testPresetID);

                    return(preset);
                }
            }

            return(null);
        }
Esempio n. 12
0
        private static bool IsFilterInflowMoreThenRemainArrMtype(this JobFilterInfo info, FabAoEquipment eqp)
        {
            if (InputMart.Instance.GlobalParameters.ApplyArrangeMType == false)
            {
                return(false);
            }

            WeightFactor wf;

            WeightHelper.TryGetEqpWeightFactor(eqp, Constants.WF_MIN_MOVEQTY_PRIORITY, out wf);

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

            FabLot lot = info.Sample;

            if (info.IsRunning)
            {
                return(false);
            }

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

            var list = lot.CurrentEqpArrange.EqpArrrangeSet.Items.FindAll(x => x.ActivateType == ActivateType.M);

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

            float minMoveQty = (int)wf.Criteria[0] / 2;

            float tactTime = (float)SiteConfigHelper.GetDefaultTactTime().TotalSeconds;

            StepTime st = info.Step.GetStepTime(eqp.EqpID, info.ProductID);

            if (st != null)
            {
                tactTime = st.TactTime;
            }

            Time inflowTime = Time.FromSeconds(minMoveQty * tactTime);

            decimal inflowQty = InFlowAgent.GetInflowQty(lot, eqp, (decimal)inflowTime.TotalHours, 0);

            Time endTime           = eqp.Now + inflowTime;
            bool isContinueNextDay = ShopCalendar.StartTimeOfNextDay(eqp.NowDT) <= endTime;

            foreach (var item in list)
            {
                int remainQty = item.RemainQty;
                if (isContinueNextDay && item.IsDailyMode)
                {
                    remainQty += item.LimitQty;
                }

                //limit(M) 잔여 수량이 MIN_MOVEQTY의 1 / 2 이상인 경우 체크 제외.
                if (remainQty >= minMoveQty)
                {
                    continue;
                }

                if (remainQty < inflowQty)
                {
                    info.FilterReason = string.Format("Remain:{0} < Inflow:{1}", remainQty, inflowQty);
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 13
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);
        }
Esempio n. 14
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);
        }
Esempio n. 15
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);
        }