Exemple #1
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);
        }
Exemple #2
0
        /// <summary>
        /// </summary>
        /// <param name="aoFactory"/>
        /// <param name="handled"/>
        public void ON_END_INITIALIZE0(Mozart.SeePlan.Simulation.AoFactory aoFactory, ref bool handled)
        {
            InFlowAgent.InitConstruct(aoFactory);

            OutCollector.WriteStepWip();
            WeightHelper.WriteWeightPresetLog();
        }
Exemple #3
0
        public static void OnDayChanged(DateTime now)
        {
            var list = InputMart.Instance.FabMask.Values;

            foreach (var mask in list)
            {
                if (mask.HasLimit() == false)
                {
                    continue;
                }

                foreach (var item in mask.Limits)
                {
                    if (item.ActivateType != ActivateType.M)
                    {
                        continue;
                    }

                    if (item.IsDailyMode == false)
                    {
                        OutCollector.WriteLimitMLog(item, null, null, now, "DAY_CHANGE");
                        continue;
                    }

                    item.MoveQty = 0;
                    item.Seq     = 0;

                    OutCollector.WriteLimitMLog(item, null, null, now, "RESET");
                }
            }
        }
Exemple #4
0
        private static void MoveQty(this FabMask mask, FabAoEquipment eqp, FabLot lot)
        {
            if (mask.HasLimit() == false)
            {
                return;
            }

            int qty = lot.UnitQty;

            if (qty <= 0)
            {
                return;
            }

            foreach (var item in mask.Limits)
            {
                if (item.ActivateType != ActivateType.M)
                {
                    continue;
                }

                item.MoveQty += qty;
                item.Seq++;

                OutCollector.WriteLimitMLog(item, eqp, lot, eqp.NowDT);
            }
        }
Exemple #5
0
        /// <summary>
        /// </summary>
        /// <param name="hb"/>
        /// <param name="ao"/>
        /// <param name="now"/>
        /// <param name="handled"/>
        public void ON_START_TASK0(Mozart.SeePlan.Simulation.IHandlingBatch hb, Mozart.Simulation.Engine.ActiveObject ao, DateTime now, ref bool handled)
        {
            FabLot lot = hb.ToFabLot();

            hb.Apply((x, y) => LoadHelper.OnStartTask(x as FabLot));

            InFlowMaster.ChangeWipLocation(hb, EventType.TrackIn);

            if (ao is AoEquipment)
            {
                FabAoEquipment eqp = ao as FabAoEquipment;

                MaskMaster.StartTask(lot, eqp);
                JigMaster.StartTask(lot, eqp);

                //TODO : 설비의 Property로 작성필요 (LastPlan의 Plan을 보고)
                if (lot.CurrentFabPlan.CurrentRecipeTime != null)
                {
                    eqp.IsEqpRecipeRun = true;
                }
                else
                {
                    eqp.IsEqpRecipeRun = false;
                }
            }

            OutCollector.Write_Rtd_LotUpkTracking(lot);
        }
        /// <summary>
        /// </summary>
        /// <param name="evt"/>
        /// <param name="cm"/>
        /// <returns/>
        public bool RUN(Mozart.SeePlan.Simulation.ICalendarEvent evt, ICalendarEventManager cm)
        {
            //double startMin = ModelContext.Current.StartTime.Minute;

            //if (SimHelper.firstFireAtOnHour && startMin != 30)
            //{
            //    int gap = cm.NowDT.Minute - ModelContext.Current.StartTime.Minute;

            //    if (startMin < 30)
            //        evt.Duration =  Time.FromMinutes(30 + startMin);
            //    else if(startMin > 30)
            //        evt.Duration = Time.FromMinutes(Math.Abs(gap));

            //    SimHelper.firstFireAtOnHour = false;

            //    return true;
            //}

            //evt.Duration = Time.FromMinutes(60);
            //SimHelper.firstFireAtOnHour = false;

            OutCollector.WriteStepWip();

            return(true);
        }
Exemple #7
0
        /// <summary>
        /// </summary>
        /// <param name="aoFactory"/>
        /// <param name="handled"/>
        public void ON_DONE0(Mozart.SeePlan.Simulation.AoFactory aoFactory, ref bool handled)
        {
            MaskMaster.OnDone(aoFactory);

            OutCollector.OnDone(aoFactory);

            InFlowMaster.Reset();
        }
Exemple #8
0
        public static void Main(string[] args)
        {
            var bindings = new List <IBinding <int> > {
                new BlobBinding <int>(), new QueueBinding <int>()
            };
            var inputCollector  = new InCollector <int>(default(int));
            var outputCollector = new OutCollector <int>(default(int));

            var binder = new Binder <int>(bindings);

            binder.Accept(inputCollector);
            binder.Accept(outputCollector);

            Console.ReadKey();
        }
Exemple #9
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);
        }
Exemple #10
0
        /// <summary>
        /// </summary>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public IEnumerable <Mozart.SeePlan.Simulation.ILot> INSTANCING0(ref bool handled, IEnumerable <Mozart.SeePlan.Simulation.ILot> prevReturnValue)
        {
            List <FabLot> list = new List <FabLot>();

            //if (SimHelper.IsTftRunning)
            //    list = GetFrontInLots();

            if (SimHelper.IsCellRunning)
            {
                InOutProfileMaster.GenerateCellInProfile();
                list = InOutProfileMaster.CreateCellInputLot();

                OutCollector.WriteRelasePlan_Cell(list);
            }

            return(list);
        }
Exemple #11
0
        private static void MoveQty(this EqpArrangeSet setInfo, FabAoEquipment eqp, FabLot lot)
        {
            if (setInfo.HasItems() == false)
            {
                return;
            }

            int qty = lot.UnitQty;

            if (qty <= 0)
            {
                return;
            }

            string productVersion = lot.CurrentProductVersion;
            var    mask           = lot.CurrentMask;

            var list = setInfo.Items;

            foreach (var item in list)
            {
                if (item.ActivateType != ActivateType.M)
                {
                    continue;
                }

                if (item.IsMatchedByProductVersion(productVersion) == false)
                {
                    continue;
                }

                if (item.IsMatchedByMask(mask) == false)
                {
                    continue;
                }

                item.MoveQty += qty;
                item.Seq++;

                OutCollector.WriteLimitMLog(item, eqp, lot, eqp.NowDT);
            }
        }
Exemple #12
0
        private void SetProductVersion(FabAoEquipment eqp, FabLot lot)
        {
            //if (eqp.EqpID == "THPHL100" && lot.LotID == "LARRAYI0021")
            //    Console.WriteLine("B");

            var    stdStep        = lot.CurrentFabStep.StdStep;
            string fromProductVer = lot.CurrentProductVersion;

            if (EqpArrangeMaster.AvailableChangeProductVer(stdStep, fromProductVer) == false)
            {
                return;
            }

            var currEqpArrange = lot.CurrentEqpArrange;

            if (currEqpArrange == null)
            {
                return;
            }

            string toProductVer = currEqpArrange.UsedMaskProductVersion;

            if (string.IsNullOrEmpty(toProductVer))
            {
                return;
            }

            if (fromProductVer == toProductVer)
            {
                return;
            }

            lot.OrigProductVersion    = toProductVer;
            lot.CurrentProductVersion = lot.OrigProductVersion;

            lot.CurrentFabPlan.ProductVersion = toProductVer;

            OutCollector.WriteLotVerChangeInfo(lot, eqp.Target as FabEqp, fromProductVer, toProductVer);
        }
Exemple #13
0
        public static void OnDayChanged(DateTime now)
        {
            foreach (var list in AllArrange.Values)
            {
                foreach (var item in list)
                {
                    if (item.ActivateType != ActivateType.M)
                    {
                        continue;
                    }

                    if (item.IsDailyMode == false)
                    {
                        OutCollector.WriteLimitMLog(item, null, null, now, "DAY_CHANGE");
                        continue;
                    }

                    item.MoveQty = 0;
                    item.Seq     = 0;

                    OutCollector.WriteLimitMLog(item, null, null, now, "RESET");
                }
            }
        }
Exemple #14
0
 private static void OnWriteStepWip(object sender, object args)
 {
     OutCollector.WriteStepWip();
 }