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