Пример #1
0
        public static decimal GetAvgTactTimeForEqps(FabStep step, FabProduct product, List <FabAoEquipment> workingEqps)
        {
            Decimal defaultTactTime = (decimal)SiteConfigHelper.GetDefaultTactTime().TotalSeconds;

            if (workingEqps == null)
            {
                return(defaultTactTime);
            }

            int n = workingEqps.Count;

            decimal s = 0;

            foreach (var eqp in workingEqps)
            {
                string   eqpID    = eqp.EqpID;
                StepTime tactTime = step.GetStepTime(eqpID, product.ProductID);

                if (tactTime == null || tactTime.TactTime <= 0)
                {
                    continue;
                }

                s += Convert.ToDecimal(1d / tactTime.TactTime);
            }

            if (s > 0m)
            {
                return(n / s);
            }
            else
            {
                return(defaultTactTime);
            }
        }
Пример #2
0
        private static bool AllowAheadPM(FabPMSchedule pm, Time idleTime)
        {
            if (pm == null)
            {
                return(false);
            }

            if (idleTime.TotalMinutes <= 0)
            {
                return(false);
            }

            var pmTime = pm.EndTime - pm.StartTime;

            if (idleTime.TotalMinutes > (pmTime.TotalMinutes / 2))
            {
                return(true);
            }

            if (pm.StartTime < AoFactory.Current.NowDT.AddDays(1))
            {
                Time allowIdleTime = SiteConfigHelper.GetAllowAdjustPMIdleTime();
                if (idleTime.TotalMinutes > allowIdleTime)
                {
                    return(true);
                }
            }
            return(false);
        }
Пример #3
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);
        }
Пример #4
0
        public static StepTat GetDefaultTAT(this FabStep step)
        {
            if (step.DefaultTAT == null)
            {
                StepTat tat = new StepTat();
                tat.WaitTat = (float)SiteConfigHelper.GetDefaultWaitTAT().TotalMinutes;
                tat.RunTat  = (float)SiteConfigHelper.GetDefaultRunTAT().TotalMinutes;
                tat.TAT     = tat.WaitTat + tat.RunTat;

                step.DefaultTAT = tat;
            }

            return(step.DefaultTAT);
        }
Пример #5
0
        internal static bool IsLoadable(this BranchStepInfo info, string productID, string ownerType)
        {
            string defaultOwnerType = SiteConfigHelper.GetDefaultOwnerType();

            if (ownerType != defaultOwnerType)
            {
                return(false);
            }

            if (info.IsAllProduct || info.IsMatched(productID))
            {
                return(true);
            }

            return(false);
        }
Пример #6
0
        private static Time GetTransferTime(string from, string to)
        {
            //TimeSpan defaultTime = TimeSpan.FromMinutes(InputMart.Instance.GetConfigParameters(string.Empty).DefaultTransferTime);
            Time defaultTime = SiteConfigHelper.GetDefaultTransferTime();

            if (LcdHelper.IsEmptyID(from) || LcdHelper.IsEmptyID(to))
            {
                return(defaultTime);
            }

            EqpMoveTime time = InputMart.Instance.EqpMoveTimeView.FindRows(from, to).FirstOrDefault();

            if (time != null)
            {
                return(Time.FromMinutes(time.TRANSFER_TIME));
            }

            return(defaultTime);
        }
Пример #7
0
        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);
        }
Пример #8
0
        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);
        }
Пример #9
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);
        }