示例#1
0
        /// <summary>
        /// </summary>
        /// <param name="db"/>
        /// <param name="aeqp"/>
        /// <param name="wips"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public IHandlingBatch[] SELECT0(Mozart.SeePlan.Simulation.DispatcherBase db, Mozart.SeePlan.Simulation.AoEquipment aeqp, IList <Mozart.SeePlan.Simulation.IHandlingBatch> wips, ref bool handled, Mozart.SeePlan.Simulation.IHandlingBatch[] prevReturnValue)
        {
            var eqp = aeqp.ToFabAoEquipment();

            if (wips == null || wips.Count == 0)
            {
                return(null);
            }

            var lot = wips[0].ToFabLot();

            //if (eqp.EqpID == "THCVD300" && eqp.NowDT >= LcdHelper.StringToDateTime("20191107 075929"))
            //	Console.WriteLine("B");

            if (lot.IsDummy)
            {
                eqp.IsDummyWait = true;
                return(null);
            }

            if (eqp.IsParallelChamber)
            {
                if (ChamberMaster.IsLoadable_ParallelChamber(eqp, lot) == false)
                {
                    return(null);
                }
            }

            eqp.IsDummyWait = false;

            return(new IHandlingBatch[] { lot });
        }
示例#2
0
        /// <summary>
        /// </summary>
        /// <param name="db"/>
        /// <param name="aeqp"/>
        /// <param name="wips"/>
        /// <param name="ctx"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public IHandlingBatch[] DO_SELECT0(Mozart.SeePlan.Simulation.DispatcherBase db, Mozart.SeePlan.Simulation.AoEquipment aeqp, IList <Mozart.SeePlan.Simulation.IHandlingBatch> wips, Mozart.SeePlan.Simulation.IDispatchContext ctx, ref bool handled, Mozart.SeePlan.Simulation.IHandlingBatch[] prevReturnValue)
        {
            WeightPreset   preset = aeqp.Target.Preset;
            FabAoEquipment eqp    = aeqp as FabAoEquipment;

            //InPort Wip 처리
            if (eqp.HasInPortWip)
            {
                //여러 Lot을 넘길 경우 첫번째 투입, 나머지는 설비의 Buffer에 넣음.
                IHandlingBatch[] list = eqp.InitInPortWips.ToArray();

                eqp.InitInPortWips.Clear();

                return(list);
            }

            IHandlingBatch[] selected = null;

            if (wips.Count > 0)
            {
                List <IHandlingBatch> newlist = new List <IHandlingBatch>(wips);
                var control = DispatchControl.Instance;

                //if (eqp.EqpID == "FHRPH100" && eqp.NowDT >= LcdHelper.StringToDateTime("20200113 073000"))
                //	Console.WriteLine("B");

                var dummy = WeightHelper.NeedAllowRunDown_Dummy(eqp, wips);
                if (dummy != null)
                {
                    newlist.Add(dummy);
                    dummy.DispatchFilterInfo = eqp.LastPlanFilterInfo;
                }

                var dummyList = FilterMaster.WaitForPrevStepWip_Dummy(ctx, eqp);
                if (dummyList != null && dummyList.Count > 0)
                {
                    newlist.AddRange(dummyList);
                }

                var lotList = control.Evaluate(db, newlist, ctx);
                selected = control.Select(db, eqp, lotList);

                if (control.IsWriteDispatchLog(eqp))
                {
                    DispatchLogHelper.AddDispatchInfo(eqp, lotList, selected, preset);
                    //eqp.EqpDispatchInfo.AddDispatchInfo(lotList, selected, preset);
                }
            }

            if (selected == null)
            {
                eqp.CheckAvailableSubEqps();
            }

            return(selected);
        }
示例#3
0
        /// <summary>
        /// </summary>
        /// <param name="db"/>
        /// <param name="wips"/>
        /// <param name="ctx"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public IList <IHandlingBatch> EVALUATE0(Mozart.SeePlan.Simulation.DispatcherBase db, IList <Mozart.SeePlan.Simulation.IHandlingBatch> wips, Mozart.SeePlan.Simulation.IDispatchContext ctx, ref bool handled, IList <Mozart.SeePlan.Simulation.IHandlingBatch> prevReturnValue)
        {
            if (db is FifoDispatcher)
            {
                return(wips);
            }

            if (db.Comparer == null)
            {
                return(wips);
            }

            var stepDic = new Dictionary <string, WeightInfo>();

            var list = new List <IHandlingBatch>(wips.Count);

            var eqp = db.Eqp.ToFabAoEquipment();

            if (eqp.Dispatcher is WeightSumDispatcher)
            {
                db.Comparer = new CompareHelper.WeightSumComparer(eqp);
            }

            foreach (IHandlingBatch hb in wips)
            {
                if (hb.Sample == null)
                {
                    continue;
                }

                var lot = hb.Sample;

                lot.WeightInfo = new WeightInfo();
                WeightInfo lotInfo = lot.WeightInfo;
                WeightInfo stepInfo;
                if (!stepDic.TryGetValue(lot.CurrentStep.StepID, out stepInfo))
                {
                    stepDic.Add(lot.CurrentStep.StepID, stepInfo = new WeightInfo());
                }


                bool hasMinusValue = false;

                if (db.FactorList != null)
                {
                    //Logger.Info(string.Format("<< {0} EVALUATE {1} >>");
                    foreach (var info in db.FactorList)
                    {
                        WeightValue     wval   = null;
                        FabWeightFactor factor = info.Factor as FabWeightFactor;

                        if (factor.Type == FactorType.FIXED)
                        {
                            wval = lotInfo.GetValueData(factor);
                            if (wval.IsMinValue)
                            {
                                wval = db.WeightEval.GetWeight(factor, info.Method, lot, ctx);
                            }
                        }
                        else if (factor.Type == FactorType.STEPTYPE)
                        {
                            wval = stepInfo.GetValueData(factor);
                            if (wval.IsMinValue)
                            {
                                wval = db.WeightEval.GetWeight(factor, info.Method, lot, ctx);
                            }

                            stepInfo.SetValueData(factor, wval);
                        }
                        else                         //LOTTYPE
                        {
                            wval = db.WeightEval.GetWeight(factor, info.Method, lot, ctx);

                            //Factor가 하나라도 음수를 가질 경우 해당 재공은 제외 (필터를 허용할 경우)
                            if (wval.Value < 0)
                            {
                                wval = new WeightValue(factor, 0, wval.Description);

                                if (factor.IsAllowFilter)
                                {
                                    lotInfo.SetValueData(factor, wval);
                                    hasMinusValue = true;

                                    db.Eqp.EqpDispatchInfo.AddFilteredWipInfo(hb, string.Format("Minus_Value:{0}, Desc:{1}", factor.Name, wval.Description));
                                }
                            }
                        }

                        lotInfo.SetValueData(factor, wval);
                    }
                }

                if (hasMinusValue == false)
                {
                    list.AddSort(hb, db.Comparer);
                }
            }

            return(list);
        }