Ejemplo n.º 1
0
        private static void WriteWeightPresetLog(FabWeightPreset preset)
        {
            if (preset == null)
            {
                return;
            }

            string presetID    = preset.Name;
            string mapPresetID = preset.MapPresetID;

            foreach (FabWeightFactor factor in preset.FactorList)
            {
                Outputs.WeightPresetLog row = new WeightPresetLog();

                row.VERSION_NO    = ModelContext.Current.VersionNo;
                row.PRESET_ID     = presetID;
                row.MAP_PRESET_ID = mapPresetID;
                row.FACTOR_ID     = factor.Name;
                row.FACTOR_TYPE   = factor.Type.ToString();
                row.FACTOR_WEIGHT = factor.Factor;
                row.FACTOR_NAME   = Constants.NULL_ID;
                row.SEQUENCE      = (int)factor.Sequence;
                row.ORDER_TYPE    = factor.OrderType.ToString();
                row.CRITERIA      = factor.OrigCriteria;
                row.ALLOW_FILTER  = LcdHelper.ToStringYN(factor.IsAllowFilter);

                OutputMart.Instance.WeightPresetLog.Add(row);
            }
        }
Ejemplo n.º 2
0
        public void Reset(string productID, FabStep targetStep, int loadedEqpCount, FabWeightPreset wp)
        {
            this.ProductID      = productID;
            this.TargetStep     = targetStep;
            this.LoadedEqpCount = loadedEqpCount;
            this._wpset         = wp;

            this.LastPt2D   = null;
            this.LastContPt = null;
            this.WipStepList.Clear();
        }
Ejemplo n.º 3
0
        public static FabWeightPreset GetSafeWeightPreset(string presetID)
        {
            if (LcdHelper.IsEmptyID(presetID))
            {
                return(null);
            }

            FabWeightPreset preset;

            if (InputMart.Instance.FabWeightPreset.TryGetValue(presetID, out preset) == false)
            {
                preset = new FabWeightPreset(presetID);
                InputMart.Instance.FabWeightPreset.Add(presetID, preset);
            }

            return(preset);
        }
Ejemplo n.º 4
0
        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;
            }
        }
Ejemplo n.º 5
0
        public WipProfile(string productID, FabStep targetStep, int loadedEqpCount, FabWeightPreset wp)
        {
            this.WipStepList = new List <WipStep>();

            Reset(productID, targetStep, loadedEqpCount, wp);
        }
Ejemplo n.º 6
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);
        }