예제 #1
0
        internal static float GetSetupTime(this FabSubEqp subEqp, string shopID, string stepID,
                                           string productID, string prodVer, string ownerType, string ownerID)
        {
            var setupTime = SetupMaster.GetSetupTime(subEqp,
                                                     shopID,
                                                     stepID,
                                                     productID,
                                                     prodVer,
                                                     ownerType,
                                                     ownerID);

            return(setupTime);
        }
예제 #2
0
        public static void SetSetupTime(this JobFilterInfo info, AoEquipment aeqp)
        {
            FabLot lot = info.Sample;

            if (lot == null)
            {
                return;
            }

            info.SetupTime = SetupMaster.GetSetupTime(aeqp, lot);

            var eqp = aeqp.ToFabAoEquipment();
        }
예제 #3
0
        public static float CheckAheadSetupTime(this FabAoEquipment eqp, float setupTime, FabLot lot)
        {
            DateTime now = eqp.NowDT;
            float    addIdleSetupTime = 0f;

            string stepID    = lot.CurrentStepID;
            string productID = lot.CurrentProductID;

            if (setupTime > 0 && eqp.AvailableSetupTime < now)
            {
                DateTime availableTime   = GetAvailableSetupTime(eqp, now);
                DateTime aheadSetupStart = LcdHelper.Max(availableTime, (now.AddMinutes(-setupTime)));

                //IDLE에 따른 추가 Setup시간 반영 (AheadSetup에 따라 Idle 시간이 판단됨, 추가 IDLE_SETUP TIME은 Ahead미반영)
                addIdleSetupTime = SetupMaster.GetAdditionalSetupTime(eqp, stepID, productID, aheadSetupStart);
                if (addIdleSetupTime > 0)
                {
                    lot.CurrentFabPlan.IsIdleSetup = true;
                }

                if (aheadSetupStart < now)
                {
                    setupTime = setupTime - (float)(now - aheadSetupStart).TotalMinutes;
                    eqp.AvailableSetupTime = aheadSetupStart;

                    if (setupTime == 0 && addIdleSetupTime == 0)
                    {
                        eqp.OnStateChanged(LoadingStates.SETUP, lot);
                    }
                }
                else
                {
                    eqp.AvailableSetupTime = DateTime.MaxValue;
                }

                return(setupTime + addIdleSetupTime);
            }

            //AheadSetup이 아닐 경우(또는 Setup시간이 0 이지만 추가 Setup이 있을 경우 Setup을 함)
            //기존: Setup이 필요하지만 Setup시간이 0이면 Setup을 하지 않음
            //변경 : Setup이 필요하지만 Setup시간이 0 이어도 추가 Setup 정보가 있을 경우 Setup을 함.
            addIdleSetupTime = SetupMaster.GetAdditionalSetupTime(eqp, stepID, productID, now);
            if (addIdleSetupTime > 0)
            {
                lot.CurrentFabPlan.IsIdleSetup = true;
            }

            setupTime += addIdleSetupTime;

            return(setupTime);
        }
예제 #4
0
        private static bool IsNeedSetup(this FabAoEquipment eqp, string shopID, string stepID,
                                        string productID, string prodVer, string ownerType, string ownerID)
        {
            var setupTime = SetupMaster.GetSetupTime(eqp,
                                                     shopID,
                                                     stepID,
                                                     productID,
                                                     prodVer,
                                                     ownerType,
                                                     ownerID);

            if (setupTime > 0)
            {
                return(true);
            }

            return(false);
        }
예제 #5
0
        private static bool IsSomeOneDummyWait(FabAoEquipment eqp, FabPlanInfo last)
        {
            //var list = last.FabStep.StdStep.GetWorkingEqpList(last.ProductID, last.ProductVersion, last.OwnerType, last.OwnerID);
            var list = ResHelper.GetEqpsByDspEqpGroup(eqp.DspEqpGroupID);

            if (list == null)
            {
                return(false);
            }

            //var waitEqps = list.FindAll(x => x.IsDummyWait && x.EqpID != eqp.EqpID);

            var waitEqps = new List <FabAoEquipment>();

            foreach (FabAoEquipment item in list)
            {
                if (item.EqpID == eqp.EqpID)
                {
                    continue;
                }

                if (item.IsDummyWait == false)
                {
                    continue;
                }

                float setupTime = SetupMaster.GetSetupTime(item, last.ShopID, last.StepID, last.ProductID, last.ProductVersion, last.OwnerType, last.OwnerID);
                if (setupTime > 0)
                {
                    continue;
                }

                waitEqps.Add(item);
            }

            if (waitEqps.Count > 0)
            {
                return(true);
            }

            return(false);
        }
예제 #6
0
        private static Tuple <object, object> GetMinMax_SetupTime(AoEquipment eqp, List <JobFilterInfo> joblist)
        {
            float minVaule = float.MaxValue;
            float maxVaule = float.MinValue;

            foreach (JobFilterInfo it in joblist)
            {
                var sample = it.Sample;
                if (sample == null)
                {
                    continue;
                }

                float setupTime = SetupMaster.GetSetupTime(eqp, sample);

                minVaule = Math.Min(setupTime, minVaule);
                maxVaule = Math.Max(setupTime, maxVaule);
            }

            return(new Tuple <object, object>(minVaule, maxVaule));
        }
예제 #7
0
        internal static List <FabLot> WaitForPrevStepWip_Dummy(IDispatchContext ctx, FabAoEquipment eqp)
        {
            List <JobFilterInfo> jobList = ctx.Get <List <JobFilterInfo> >(Constants.JobGroup, null);

            if (jobList == null)
            {
                return(null);
            }

            FabPlanInfo last = eqp.GetLastPlan();             //eqp.LastPlan as FabPlanInfo;

            if (last == null)
            {
                return(null);
            }

            //if (eqp.EqpID == "THWEM200" && LcdHelper.StringToDateTime("20191021235617") <= eqp.NowDT)
            //	Console.WriteLine();

            JobState state = InFlowMaster.GetJobState(last.ProductID, last.OwnerType);

            if (state == null)
            {
                return(null);
            }

            var holdWips   = state.GetHoldWipList(last.FabStep, last.ProductVersion);
            var prvRunWips = state.GetPrevStepRunWipList(last.FabStep, last.ProductVersion);

            JobFilterInfo        minSetupJobFilter     = null;
            List <JobFilterInfo> filteredList          = new List <JobFilterInfo>();
            Dictionary <string, JobFilterInfo> current = new Dictionary <string, JobFilterInfo>();

            foreach (var info in jobList)
            {
                if (info.IsEmpty)
                {
                    continue;
                }

                string key = FilterHelper.GetJobFilterKey(info);
                current.Add(key, info);

                if (FilterHelper.CheckIsRunning(eqp, info))
                {
                    filteredList.Add(info);
                    continue;
                }

                if (info.FilterType != DispatchFilter.None)
                {
                    filteredList.Add(info);
                    continue;
                }

                if (info.SetupTime == 0)
                {
                    continue;
                }

                if (minSetupJobFilter == null)
                {
                    minSetupJobFilter = info;
                }

                if (minSetupJobFilter.SetupTime > info.SetupTime)
                {
                    minSetupJobFilter = info;
                }
            }

            if (minSetupJobFilter == null)
            {
                return(null);
            }

            Dictionary <string, FabLot> avableLots = new Dictionary <string, FabLot>();

            foreach (var lot in holdWips)
            {
                if (eqp.IsLastPlan(lot.CurrentShopID, last.StepID, lot.CurrentProductID, lot.CurrentProductVersion, lot.OwnerType, lot.OwnerID))
                {
                    continue;
                }

                string key = FilterHelper.GetJobFilterKey(lot.CurrentShopID, last.StepID, lot.CurrentProductID, lot.CurrentProductVersion, lot.OwnerType);
                if (current.ContainsKey(key))
                {
                    continue;
                }

                Time  remainHold = lot.HoldTime - (eqp.NowDT - lot.HoldStartTime);
                float setupTime  = SetupMaster.GetSetupTime(eqp, lot);

                if (remainHold.TotalMinutes + setupTime < minSetupJobFilter.SetupTime)
                {
                    if (avableLots.ContainsKey(key) == false)
                    {
                        avableLots.Add(key, lot);
                    }
                }
            }

            foreach (var lot in prvRunWips)
            {
                string lastShopID         = last.ShopID;
                string lastStepID         = last.StepID;
                string currProductID      = lot.CurrentProductID;
                string origProductVersion = lot.OrigProductVersion;
                string ownerType          = lot.OwnerType;
                string ownerID            = lot.OwnerID;

                //TODO : bong - product version ??
                if (eqp.IsLastPlan(lastShopID, lastStepID, currProductID, origProductVersion, ownerType, ownerID))
                {
                    continue;
                }

                string key = FilterHelper.GetJobFilterKey(lastShopID, lastStepID, currProductID, origProductVersion, ownerType);
                if (current.ContainsKey(key))
                {
                    continue;
                }

                Time tranferTime = TransferMaster.GetTransferTime(lot, eqp);
                Time setupTime   = SetupMaster.GetSetupTime(eqp, lastShopID, lastStepID, currProductID, origProductVersion, ownerType, ownerID);

                if (tranferTime + setupTime < minSetupJobFilter.SetupTime)
                {
                    if (avableLots.ContainsKey(key) == false)
                    {
                        avableLots.Add(key, lot);
                    }
                }
            }

            Dictionary <string, List <FabAoEquipment> > workingEqps = ResHelper.GetWorkingEqpInfos(eqp, true);

            List <FabLot> list = new List <FabLot>();

            foreach (var lot in avableLots.Values)
            {
                FabPlanInfo plan  = EntityControl.Instance.CreateLoadInfo(lot, last.Step) as FabPlanInfo;
                FabLot      dummy = CreateHelper.CreateDispatchDummyLot(last.FabStep, plan);
                dummy.LotID = "DUMMY_PREVSTEP";

                JobFilterInfo jobfilter = CreateHelper.CreateDispatchFilterInfo(last.Step as FabStep, lot.CurrentProductID, lot.OrigProductVersion, lot.OwnerType, lot.OwnerID);
                jobfilter.InitJobFilterInfo(eqp, workingEqps);
                jobfilter.LotList.Add(dummy);
                dummy.DispatchFilterInfo = jobfilter;

                list.Add(dummy);
            }

            return(list);
        }