Beispiel #1
0
        /// <summary>
        /// </summary>
        /// <param name="task"/>
        /// <param name="context"/>
        /// <param name="handled"/>
        public void SETUP_QUERY_ARGS1(ModelTask task, ModelContext context, ref bool handled)
        {
            FactoryConfiguration.Current.Initialize();

            string runServer   = LcdHelper.GetArguments(task.Context.Arguments, "RunServer", string.Empty);;
            string varsionDate = context.StartTime.SplitDate().ToString("yyyyMMdd");

            DateTime planStartTime   = context.StartTime;
            DateTime planEndTime     = context.EndTime;
            DateTime planStartOfDayT = ShopCalendar.StartTimeOfDayT(planStartTime);

            string actStartTime = LcdHelper.DbToString(planStartOfDayT.AddDays(-1));
            string actEndTime   = LcdHelper.DbToString(planStartTime);

            var args = context.QueryArgs;

            args["ARG_RUN_SERVER"]       = runServer;
            args["ARG_VERSION_DATE"]     = varsionDate;
            args["ARG_VERSION_NO"]       = task.Context.VersionNo;
            args["ARG_TARGET_SHOP_LIST"] = LcdHelper.GetTargetShopList();
            args["ARG_ACT_START_TIME"]   = actStartTime;
            args["ARG_ACT_END_TIME"]     = actEndTime;

            args["ARG_PLAN_START_TIME"] = LcdHelper.DbToString(planStartTime);
            args["ARG_PLAN_END_TIME"]   = LcdHelper.DbToString(planEndTime);

            args["ARG_ACT_FIXED_DATE"] = LcdHelper.DbToString(LcdHelper.GetActFixedDate_Default());
        }
Beispiel #2
0
        /// <summary>
        /// </summary>
        /// <param name="task"/>
        /// <param name="name"/>
        /// <param name="runTime"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public VersionInfo SETUP_VERSION1(ModelTask task, string name, DateTime runTime, ref bool handled, VersionInfo prevReturnValue)
        {
            var args = task.Context.Arguments;

            DateTime startTime = LcdHelper.Trim(runTime, "mm");

            if (args.ContainsKey("start-time"))
            {
                startTime = LcdHelper.Trim(LcdHelper.GetArguments(args, "start-time", runTime), "mm");
            }

            args["start-time"] = startTime;
            Logger.MonitorInfo("Reset start_time : {0}", runTime.ToString("yyyy-MM-dd HH:mm:ss"));

            string prefix  = LcdHelper.GetParameter(args, "versionType", LcdHelper.DEFAULT_VERSION_TYPE);
            string postfix = LcdHelper.GetParameter(args, "versionPostFix", "");

            VersionInfo info = new VersionInfo(prefix, startTime);

            string versionNo = LcdHelper.GetArguments(args, "versionNo", string.Empty);

            if (string.IsNullOrEmpty(versionNo))
            {
                versionNo = GetVersionInfo(prefix, startTime, postfix);
            }

            info.VersionNo = versionNo;

            task.TaskContext.Arguments["versionNo"] = versionNo;
            Logger.MonitorInfo("Reset versionNo : {0}", versionNo);

            return(info);
        }
Beispiel #3
0
        private bool IsMatched_UnpredictWip(ICollection <UnpredictWip> list, string shopID, string checkValue)
        {
            if (list == null || list.Count == 0)
            {
                return(false);
            }

            foreach (var it in list)
            {
                if (it.SHOP_ID != shopID)
                {
                    continue;
                }

                string pattern = it.PATTERN;

                if (string.IsNullOrEmpty(pattern) || LcdHelper.Equals(pattern, "EMPTY"))
                {
                    if (string.IsNullOrEmpty(checkValue) || LcdHelper.IsEmptyID(pattern))
                    {
                        return(true);
                    }
                }
                else
                {
                    if (LcdHelper.Like(checkValue, pattern))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Beispiel #4
0
        private void SetAvailableTime(FabWipInfo wip)
        {
            if (wip.IsSubStepWip)
            {
                string holdCode = wip.HoldCode;

                DateTime holdStartTime = LcdHelper.Max(wip.LastTrackInTime, wip.LastTrackOutTime);

                wip.AvailableTime = GetAvailableTime(wip, holdCode, holdStartTime, true);

                CheckWipStateByHoldInfo(wip, holdCode);

                return;
            }

            if (wip.IsHold)
            {
                string holdCode = wip.HoldCode;
                wip.HoldEndTime      = GetAvailableTime(wip, holdCode, wip.HoldTime);
                wip.SheetIDEndTime   = GetAvailableTime(wip, holdCode, wip.SheetIDTime);
                wip.InspSheetEndTime = GetAvailableTime(wip, holdCode, wip.InspSheetIDTime);

                List <Tuple <string, DateTime> > list = new List <Tuple <string, DateTime> >();
                list.Add(Tuple.Create <string, DateTime>("HOLD", wip.HoldEndTime));
                list.Add(Tuple.Create <string, DateTime>("SHEET_ID", wip.SheetIDEndTime));
                list.Add(Tuple.Create <string, DateTime>("INSP_SHEET_ID", wip.InspSheetEndTime));

                list.Sort(new CompareHelper.WipHoldInfoCompare());

                wip.AvailableTime = list[0].Item2;

                CheckWipStateByHoldInfo(wip, list[0].Item1);
            }
        }
Beispiel #5
0
        /// <summary>
        /// </summary>
        /// <param name="aeqp"/>
        /// <param name="fs"/>
        /// <param name="det"/>
        /// <param name="handled"/>
        public void ON_PMEVENT3(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.DataModel.PMSchedule fs, Mozart.SeePlan.Simulation.DownEventType det, ref bool handled)
        {
            FabAoEquipment eqp = aeqp.ToFabAoEquipment();

            if (eqp.SetParallelChamberPM(fs, det))
            {
                if (det == DownEventType.Start)
                {
                    eqp.OnStateChanged(LoadingStates.PM);
                }

                return;
            }

            if (det == DownEventType.Start)
            {
                ResHelper.SetLastLoadingInfo(aeqp, null);

                aeqp.Loader.Block();
                aeqp.WriteHistory(LoadingStates.PM);

                FabPMSchedule pm = fs as FabPMSchedule;

                DownMaster.AdjustAheadPMProcessing(eqp, pm);

                //PM의 경우 OnStateChange 함수를 별도로 호출 필요함.
                LoadingStates state = GetPMLoadingState(pm.Type);
                eqp.OnStateChanged(state);

                FabLoadInfo loadInfo = eqp.LoadInfos.Last();

                if (loadInfo.State == LoadingStates.PM)
                {
                    if (pm.Type == ScheduleType.RENT)
                    {
                        loadInfo.StateInfo = "RENT";
                    }

                    if (loadInfo.StateInfo != "AHEAD" && LcdHelper.IsEmptyID(pm.Description) == false)
                    {
                        loadInfo.StateInfo = pm.Description;
                    }
                }
            }
            else
            {
                aeqp.Loader.Unblock();
                aeqp.WriteHistoryAfterBreak();
                aeqp.SetModified();
                eqp.OnStateChanged(LoadingStates.IDLE);

                eqp.AvailablePMTime = DateTime.MaxValue;
            }
        }
Beispiel #6
0
        private bool IsPhotoStep(Dictionary <string, string> photoStep, FabStdStep stdStep)
        {
            string steps;

            photoStep.TryGetValue(stdStep.ShopID, out steps);

            if (LcdHelper.IsEmptyID(steps))
            {
                return(false);
            }

            return(steps.Contains(stdStep.StepID));
        }
Beispiel #7
0
        public object GET_LOT_GROUP_KEY0(DispatchingAgent da, IHandlingBatch hb, ref bool handled, object prevReturnValue)
        {
            if (InputMart.Instance.GlobalParameters.ApplyLotGroupDispatching == false)
            {
                return(null);
            }

            FabLot  lot  = hb.ToFabLot();
            FabStep step = lot.CurrentFabStep;

            string stepID    = step.StepID;
            string productID = lot.CurrentProductID;
            string prodVer   = step.NeedVerCheck ? lot.CurrentProductVersion : Constants.NULL_ID;
            string onwerType = lot.OwnerType;
            string onwerID   = lot.OwnerID;

            return(LcdHelper.CreateKey(stepID, productID, prodVer, onwerType, onwerID));
        }
Beispiel #8
0
        /// <summary>
        /// </summary>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public IList <Mozart.SeePlan.Simulation.IHandlingBatch> GET_WIPS0(ref bool handled, IList <Mozart.SeePlan.Simulation.IHandlingBatch> prevReturnValue)
        {
            List <IHandlingBatch> list = new List <IHandlingBatch>();

            foreach (FabWipInfo wip in InputMart.Instance.FabWipInfo.Values)
            {
                FabStep step = wip.InitialStep as FabStep;

                if (SimHelper.IsTftRunning && step.IsCellShop)
                {
                    continue;
                }
                else if (SimHelper.IsCellRunning && step.IsCellShop == false)
                {
                    continue;
                }

                FabLot lot = CreateHelper.CreateLot(wip, LotState.WIP);
                list.Add(lot);

                if (wip.IsRun)
                {
                    string eqpID = wip.WipEqpID ?? string.Empty;

                    FabEqp eqp;
                    InputMart.Instance.FabEqp.TryGetValue(eqpID, out eqp);
                    if (eqp != null)
                    {
                        eqp.InitRunWips.AddSort(lot, CompareHelper.RunWipComparer.Default);
                    }
                }

                if (SimHelper.IsTftRunning)
                {
                    WipCollector.AddProductByVersion(lot);
                }
            }

            //TODO :  임시로직, CF에 있는 Array제품 버전문제
            if (SimHelper.IsTftRunning)
            {
                foreach (FabLot lot in list)
                {
                    FabProduct prod = lot.FabProduct;


                    if (BopHelper.IsCfShop(lot.Wip.ShopID) && prod.IsArrayShopProduct())
                    {
                        string version = WipCollector.GetVersion(prod.ProductID);

                        if (LcdHelper.IsEmptyID(version) == false)
                        {
                            lot.OrigProductVersion = version;
                        }
                        else
                        {
                            Console.WriteLine();
                        }
                    }
                }
            }

            return(list);
        }
Beispiel #9
0
 /// <summary>
 /// </summary>
 /// <param name="task"/>
 /// <param name="context"/>
 /// <param name="handled"/>
 public void SETUP_QUERY_ARGS1(Mozart.Task.Execution.ModelTask task, Mozart.Task.Execution.ModelContext context, ref bool handled)
 {
     context.QueryArgs["ARG_VERSION_NO"]   = ModelContext.Current.VersionNo;
     context.QueryArgs["ARG_VERSION_DATE"] = LcdHelper.DbToString(Mozart.SeePlan.ShopCalendar.SplitDate(context.StartTime));
 }
Beispiel #10
0
        private void SetDashboard()
        {
            var dashboard = InputMart.Instance.Dashboard;

            dashboard.RunType = LcdHelper.GetRunType();
        }