Beispiel #1
0
        public decimal ArriveWithin(decimal hr)
        {
            decimal sec = (decimal)hr * 3600;

            WipStep prev = null;

            foreach (WipStep ws in this.WipStepList)
            {
                WipStep select = ws;

                if (ws.LastPt2D.X < sec)
                {
                    prev = ws;
                    continue;
                }

                if (ws.FirstPt2D.X > sec)
                {
                    select = prev;
                }

                if (select == null)
                {
                    return(0);
                }

                return(select.ArriveWithin(hr));
            }

            return(LastPt2D.Y);
        }
Beispiel #2
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 #3
0
        public void CalcProfile()
        {
            if (_isCalc)
            {
                return;
            }

            Pt2D pt = new Pt2D(0, 0);

            if (WipStepList.Count < 1)
            {
                LastPt2D = pt;
                return;
            }

            // -- tact time 설정
            WipStep wipStep = this.WipStepList.Count > 0 ? this.WipStepList[0] : null;

            if (wipStep != null)
            {
                this.Tact = wipStep.Tact;
            }

            // -- 누적 graph 전개
            List <Pt2D> pts = new List <Pt2D>();

            pts.Add(pt);

            foreach (WipStep ws in this.WipStepList)
            {
                ws.MovePts(pt);
                pts.AddRange(ws.Pts);
                pt = ws.LastPt2D;
            }

            LastPt2D = pt;

            if (_wpset == null)
            {
                return;
            }

            LastContPt = LastPt2D;

            _isCalc = true;
        }
Beispiel #4
0
 public void AddWipStep(WipStep wipStep)
 {
     this.WipStepList.Add(wipStep);
 }
Beispiel #5
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);
        }