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);
            }
        }
Exemple #2
0
        public static decimal GetAllowRunDownWip(AoEquipment aeqp, string productID, string productVersion, string ownerType, FabStep step, decimal remainRundown)
        {
            var job = InFlowMaster.GetJobState(productID, ownerType);

            if (job == null)
            {
                return(0m);
            }

            //Wip Profile
            WipProfile iflow = job.CreateWipProfile(step, productVersion, 0, aeqp.Target.Preset as FabWeightPreset, aeqp, remainRundown, false);

            iflow.CalcProfile();
            var qty = job.GetInflowWip(iflow, remainRundown);

            ////자신 + 직전
            ////자신의 대기재공중 Load가능한 수량
            //qty += job.GetCurrenStepWaitWipQty(aeqp, step, productVersion, remainRundown);

            ////자신의 직전의 Run중 Load가능한 수량
            //DateTime targetTime = aeqp.NowDT.AddHours((double)-remainRundown);
            //qty += job.GetPrevStepRunWipQty(aeqp, step, productVersion, targetTime);

            return(qty);
        }
Exemple #3
0
        public decimal GetInflowWip(WipProfile profile, decimal flowHours)
        {
            if (profile == null || profile.LastContPt == null)
            {
                return(0);
            }

            decimal inFlowQty = (int)profile.ArriveWithin(flowHours);

            return(inFlowQty);
        }
Exemple #4
0
        public bool ConsumeWithin(WipProfile otherFlow, decimal hr, int additionalEqps)
        {
            // -- hr 시간동안 유입량과 유출량
            decimal inQty  = LastContPt != null ? LastContPt.Y : 0;
            decimal inQty2 = otherFlow.LastContPt != null ? otherFlow.LastContPt.Y : 0;

            decimal loadedEqpCount = otherFlow.LoadedEqpCount + LoadedEqpCount + additionalEqps;
            decimal outQty         = OutRate * loadedEqpCount * hr;

            return(inQty + inQty2 <= outQty);
        }
        public void CalcWipProfile(FabStep step, FabWeightPreset wp, AoEquipment inputEqp)
        {
            StepRouteInfo info = GetStepRouteInfo(step);

            if (info == null)
            {
                return;
            }


            foreach (var prodVer in info.VersionList)
            {
                string key = GetWipProfileKey(step, prodVer);

                WipProfile wipProfile = CreateWipProfile(step, prodVer, 0, wp, inputEqp, 0, false);
                _wipProfile[key] = wipProfile;
            }
        }
Exemple #6
0
        //CHECK : jung (버전별 프로파일 확인여부)
        public static decimal GetInflowQty(string productID, string productVer, string ownerType, FabStep step, AoEquipment aeqp, decimal inflowHour, int excludeStepCnt)
        {
            var job = InFlowMaster.GetJobState(productID, ownerType);

            if (job == null || step == null)
            {
                return(0);
            }

            WipProfile profile = job.GetWipProfile(step, productVer);

            if (profile == null)
            {
                profile = job.CreateWipProfile(step, productVer, excludeStepCnt, aeqp.Target.Preset as FabWeightPreset, aeqp, inflowHour);
                profile.CalcProfile();
            }

            return(job.GetInflowWip(profile, inflowHour));
        }
        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);
        }