Beispiel #1
0
        private void AddTargetWaitWip(WipProfile profile,
                                      List <JobState> jobList,
                                      FabStep step,
                                      string prodVer,
                                      int exCludeStepCnt,
                                      AoEquipment inputEqp,
                                      decimal allowRunDonwTime
                                      )
        {
            FabAoEquipment eqp  = inputEqp.ToFabAoEquipment();
            decimal        tact = GetAverageTactTime(step, prodVer);

            if (exCludeStepCnt > 0)             //자신의 Wait 제외시
            {
                WipStep ws = new WipStep(step, tact, 0);
                profile.AddWipStep(ws);
            }
            else
            {
                decimal stepWaitQty = GetCurrenStepWaitWipQty(eqp, step, prodVer, allowRunDonwTime);

                WipStep ws = new WipStep(step, tact, stepWaitQty);
                profile.AddWipStep(ws);
            }
        }
Beispiel #2
0
        public WipProfile CreateWipProfile(
            FabStep step,
            string productVersion,
            int exCludeStepCnt,
            FabWeightPreset wp,
            AoEquipment inputEqp,
            decimal allowRundonwTime,
            bool excludePreRun = false
            )
        {
            decimal         percent = 1;
            List <JobState> jobList = new List <JobState>(1);

            jobList.Add(this);

            string prodVer = GetProductVersion(step, productVersion);

            int loadedEqpCount = GetLoadedEqpCount(step, prodVer, false);

            WipProfile profile = new WipProfile(this.ProductID, step, loadedEqpCount, wp);

            AddTargetWaitWip(profile, jobList, step, prodVer, exCludeStepCnt, inputEqp, allowRundonwTime);

            int     stepCount = 1;
            FabStep firstStep = step;

            foreach (FabStep rStep in GetPrevSteps(step))
            {
                //if (step.IsCFShop)
                //    prodVer = Constants.NULL_ID;
                //else
                //    prodVer = GetProductVersion(rStep, prodVer);

                decimal qtyRun = 0, qtyWait = 0, tatRun = 0, tatWait = 0, tact = 0;

                bool isExclude = stepCount <= exCludeStepCnt;
                if (isExclude == false)
                {
                    if (stepCount == 1 && excludePreRun)
                    {
                        qtyRun = 0;
                    }
                    else
                    {
                        qtyRun = GetStepWips(jobList, rStep, WipType.Run, prodVer);
                    }

                    qtyWait = GetStepWips(jobList, rStep, WipType.Wait, prodVer);
                }

                tatRun  = GetAverageFlowTime(jobList, rStep, prodVer);
                tatWait = GetAverageWaitTAT(jobList, rStep, prodVer);

                tact = GetAverageTactTime(jobList, rStep, prodVer);
                int eqpCount = GetLoadedEqpCount(jobList, rStep, prodVer, false);
                if (eqpCount > 1)
                {
                    tact /= eqpCount;
                }

                if (rStep.HasStepTime == false)
                {
                    StepTat tat = rStep.GetTat(this.ProductID, true);
                    if (tat != null)
                    {
                        tatRun  = (decimal)tat.RunTat * 60;
                        tatWait = (decimal)tat.WaitTat * 60;
                        tact    = (decimal)(tat.TAT * 60) / SeeplanConfiguration.Instance.LotUnitSize;
                    }
                }

                decimal stayTime = 0;
                if (qtyWait > 0)
                {
                    stayTime = GetStayWaitTime(jobList, rStep, prodVer);
                }

                WipStep wipStep = new WipStep(rStep, tact, tatRun, tatWait, percent * qtyRun, percent * qtyWait, stayTime);
                profile.AddWipStep(wipStep);


                firstStep = step;
                stepCount++;
            }

            WipStep inPlanWipStep = new WipStep();

            inPlanWipStep.AddReleaePlan(this, firstStep, inputEqp);


            if (inPlanWipStep.Pts.Count > 0)
            {
                profile.AddWipStep(inPlanWipStep);
            }

            return(profile);
        }