コード例 #1
0
        /// <summary>
        /// </summary>
        /// <param name="factory"/>
        /// <param name="hb"/>
        /// <param name="handled"/>
        public void LOCATE_FOR_DISPATCH1(Mozart.SeePlan.Simulation.AoFactory factory, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled)
        {
            FabLot lot = hb.ToFabLot();

            if (CheckSimulationRunType(lot) == false)
            {
                return;
            }

            if (hb.IsFinished)
            {
                factory.Router.AddInitial((Entity)hb, hb.IsFinished);
            }
            else
            {
                //InPortWip 처리
                if (InitInPortWip(factory, hb))
                {
                    return;
                }

                var    router      = EntityControl.Instance;
                string dispatchKey = router.GetLotDispatchingKey(hb);

                DispatchingAgent da = factory.GetDispatchingAgent(dispatchKey);

                if (da == null)
                {
                    if (factory.DispatchingAgents.Count > 0)
                    {
                        ModelContext.Current.ErrorLister.Write("Entity/WipInit/LocateForDispatch", Mozart.DataActions.ErrorType.Warning, Strings.CAT_SIM_SECONDRESOURCE,
                                                               string.Format(Strings.WARN_INVALID_IMPLEMENTATION, "Entity/WipInit/LocateForDispatch"));
                        da = factory.DispatchingAgents.FirstOrDefault().Value;
                    }
                    else
                    {
                        throw new InvalidOperationException(Strings.EXCEPTION_NO_REGISTERED_DISPATCHINGAGENT);
                    }
                }

                InFlowMaster.ChangeWipLocation(hb, EventType.StartTOWait);

                da.Take(hb);
            }
        }
コード例 #2
0
        /// <summary>
        /// </summary>
        /// <param name="factory"/>
        /// <param name="hb"/>
        /// <param name="handled"/>
        /// <param name="prevReturnValue"/>
        /// <returns/>
        public bool LOCATE_FOR_OTHERS0(Mozart.SeePlan.Simulation.AoFactory factory, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, bool prevReturnValue)
        {
            FabLot lot = hb.ToFabLot();

            if (lot.LotID == "TH9A1308N3B")
            {
                Console.WriteLine();
            }

            if (lot.IsHold || lot.IsMove)
            {
                var router = EntityControl.Instance;

                string           dispatchKey = router.GetLotDispatchingKey(hb);
                DispatchingAgent da          = factory.GetDispatchingAgent(dispatchKey);

                lot.IsInitHold = true;
                da.Take(hb);

                return(true);
            }

            return(false);
        }