Beispiel #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);
            }
        }
Beispiel #2
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);
        }
Beispiel #3
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);
        }