Ejemplo n.º 1
0
        public static void AddDebugTime(AoFactory aoFactory)
        {
            if (GlobalParameters.Instance.ApplyDebug == false)
            {
                return;
            }

            DateTime planStartTime = ModelContext.Current.StartTime;
            DateTime planEndTime   = ModelContext.Current.EndTime;

            DateTime debugTime = GlobalParameters.Instance.DebugTime;

            if (debugTime < planStartTime || debugTime >= planEndTime)
            {
                return;
            }

            Time delay = debugTime - planStartTime;

            //StepWip
            if (delay > 0)
            {
                aoFactory.AddTimeout(delay, DebugHelper.OnWriteStepWip);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="aoFactory"/>
        /// <param name="handled"/>
        public void ON_BEGIN_INITIALIZE0(AoFactory aoFactory, ref bool handled)
        {
            OutCollector.OnStart();

            //DebugTime에 이벤트 예약
            DebugHelper.AddDebugTime(aoFactory);
        }
Ejemplo n.º 3
0
 public void ON_BEGIN_INIT0(AoFactory factory, IList <IHandlingBatch> wips, ref bool handled)
 {
     foreach (var hb in wips)
     {
         var lots = hb.ToList();
         QTimeMaster.SetWipStayHours(lots);
     }
 }
Ejemplo n.º 4
0
        public static void InitConstruct(AoFactory factory)
        {
            Factory = factory;

            CreateFabManager();

            BuildEqpStates();
            BuildFabManager();
        }
Ejemplo n.º 5
0
        public static void OnDone(AoFactory aoFactory)
        {
            foreach (var mask in _jigs.Values)
            {
                if (mask.WorkInfos.Count == 0 && mask.LoadInfos.Count > 0)
                {
                    var last = mask.LastPlan;

                    mask.AddLoadInfo(last.EqpID, null);
                }
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Batch Input으로 처음들어오는 곳
        /// </summary>
        /// <param name="factory"/>
        /// <param name="hb"/>
        /// <param name="handled"/>
        public void ON_RELEASE0(AoFactory factory, IHandlingBatch hb, ref bool handled)
        {
            hb.MoveFirst(factory.NowDT);

            FabLot lot = hb.ToFabLot();

            if (lot.ReleasePlan != null)
            {
                lot.ReleasePlan.IsRelease = true;
            }

            InFlowMaster.ChangeWipLocation(hb, EventType.Release);

            OutCollector.CollectInputLot(lot);
            OutCollector.WriteInputLotLog(lot, factory.NowDT);
        }
Ejemplo n.º 7
0
        public static void OnDone(AoFactory aoFactory)
        {
            if (SimHelper.IsCellRunning)
            {
                return;
            }

            foreach (var mask in InputMart.Instance.FabMask.Values)
            {
                if (mask.WorkInfos.Count == 0 && mask.LoadInfos.Count > 0)
                {
                    var last = mask.LastPlan;

                    if (mask.EqpID != last.EqpID)
                    {
                        AddLoadInfo(mask, last.EqpID, null);
                    }
                }
            }
        }
Ejemplo n.º 8
0
        private bool InitInPortWip(AoFactory factory, IHandlingBatch hb)
        {
            FabLot lot = hb.ToFabLot();

            //if (lot.LotID == "TH961377N00")
            //	Console.WriteLine();

            if (lot.IsInPortWip == false)
            {
                return(false);
            }

            var    wipInitiator = ServiceLocator.Resolve <WipInitiator>();
            string eqpID        = wipInitiator.GetLoadingEquipment(hb);

            AoEquipment eqp;

            if (string.IsNullOrEmpty(eqpID) || factory.Equipments.TryGetValue(eqpID, out eqp) == false)
            {
                Logger.Warn("Can't Locate InportWip to Eqp {0}, check input data!", eqpID ?? "-");

                #region Write ErrorHistory
                ErrHist.WriteIf(string.Format("LocateInportWip{0}", lot.LotID),
                                ErrCategory.SIMULATION,
                                ErrLevel.INFO,
                                lot.CurrentFactoryID,
                                lot.CurrentShopID,
                                lot.LotID,
                                lot.CurrentProductID,
                                lot.CurrentProductVersion ?? lot.Wip.ProductVersion,
                                lot.CurrentProcessID,
                                eqpID,
                                lot.CurrentStepID,
                                "NOT FOUND EQP",
                                "Can't Locate InportWip");
                #endregion

                return(false);
            }
            else
            {
                FabAoEquipment feqp = eqp.ToFabAoEquipment();

                //Inport Wip (M잔여 수량 체크 X)
                if (EqpArrangeMaster.IsLoadable(feqp, lot, false) == false)
                {
                    #region Write ErrorHistory
                    ErrHist.WriteIf(string.Format("LocateInportWip{0}", lot.LotID),
                                    ErrCategory.SIMULATION,
                                    ErrLevel.INFO,
                                    lot.CurrentFactoryID,
                                    lot.CurrentShopID,
                                    lot.LotID,
                                    lot.CurrentProductID,
                                    lot.CurrentProductVersion ?? lot.Wip.ProductVersion,
                                    lot.CurrentProcessID,
                                    eqpID,
                                    lot.CurrentStepID,
                                    "NOT FOUND EQP_ARRANGE",
                                    "Can't Locate InportWip");
                    #endregion

                    return(false);
                }

                if (feqp.InitInPortWips == null)
                {
                    feqp.InitInPortWips = new List <IHandlingBatch>();
                }

                feqp.InitInPortWips.Add(hb);

                InFlowMaster.ChangeWipLocation(hb, EventType.StartTOWait);

                return(true);
            }
        }
Ejemplo n.º 9
0
 /// <summary>
 /// </summary>
 /// <param name="factory"/>
 /// <param name="handled"/>
 /// <param name="prevReturnValue"/>
 /// <returns/>
 public IEnumerable <Mozart.SeePlan.DataModel.WeightPreset> GET_WEIGHT_PRESETS0(AoFactory factory, ref bool handled, IEnumerable <Mozart.SeePlan.DataModel.WeightPreset> prevReturnValue)
 {
     return(InputMart.Instance.FabWeightPreset.Values.ToList());
 }