/// <summary> /// </summary> /// <param name="factory"/> /// <param name="hb"/> /// <param name="handled"/> public void ON_END_LOCATE_WIP0(Mozart.SeePlan.Simulation.AoFactory factory, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled) { if (SimHelper.IsCellRunning) { Console.WriteLine(); } }
/// <summary> /// </summary> /// <param name="hb"/> /// <param name="handled"/> public void ON_TRANSFERED0(Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled) { FabLot lot = hb.ToFabLot(); FabPlanInfo plan = lot.CurrentFabPlan; plan.TransferEndTime = AoFactory.Current.NowDT; }
/// <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="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public Time GET_TRANSFER_TIME0(Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, Mozart.Simulation.Engine.Time prevReturnValue) { //FabLot lot = hb.Sample as FabLot; //if (lot.PreviousStep != null) // return Time.FromMinutes(lot.PreviousFabStep.TransferTime); return(Time.Zero); }
/// <summary> /// /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public bool IS_NEED_SETUP0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, bool prevReturnValue) { FabLot lot = hb.Sample as FabLot; FabAoEquipment eqp = aeqp.ToFabAoEquipment(); bool isNeedSetup = ResHelper.IsNeedSetup(eqp, lot); return(isNeedSetup); }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public DateTime FIX_START_TIME0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, DateTime prevReturnValue) { FabLot lot = hb.ToFabLot(); var now = aeqp.NowDT; var trackInTime = lot.Wip.LastTrackInTime; //한개의 RunWip만 설비에 투입가능하도록 처리(LOCATE_FOR_RUN0)하여 조정 필요없음. ////RunWip 수량을 고려하여 마지막 RunWip의 TrackInTime을 기준으로 이전 RunWip의 TrackInTime 조정 //var runList = (aeqp.Target as FabEqp).InitRunWips; //if(runList != null) //{ // //해당 Lot 삭제 // if (runList.Remove(lot) == false) // Logger.MonitorInfo("[WARNING] mismatch run wip : LOT_ID={0}", lot.LotID); // int count = runList.Count; // if (runList != null && count > 0) // { // var prevlot = runList[count - 1]; // DateTime outTime = prevlot.Wip.LastTrackInTime; // for (int i = count - 2; i >= 0; i--) // { // var currLot = runList[i]; // if (currLot.UnitQty <= 0) // continue; // FabStep wipStep = currLot.Wip.InitialStep as FabStep; // float currTactTime = wipStep.GetTactTime(eqpID, currLot.CurrentProductID); // DateTime availableTime = outTime.AddSeconds(-(currTactTime * currLot.UnitQty)); // DateTime tkTime = currLot.Wip.LastTrackInTime; // outTime = LcdHelper.Min(tkTime, availableTime); // } // float tactTime = lot.CurrentFabStep.GetTactTime(eqpID, lot.CurrentProductID); // outTime = outTime.AddSeconds(-(tactTime * lot.UnitQty)); // trackInTime = LcdHelper.Min(outTime, trackInTime); // } //} //TODO : WriteErrorHist if (trackInTime == DateTime.MinValue || trackInTime == DateTime.MaxValue) { trackInTime = aeqp.NowDT; } else if (trackInTime > now) { trackInTime = now; } return(trackInTime); }
//public Step GET_NEXT_STEP1(Mozart.SeePlan.Simulation.ILot lot, Mozart.SeePlan.DataModel.LoadInfo loadInfo, Mozart.SeePlan.DataModel.Step step, DateTime now, ref bool handled, Mozart.SeePlan.DataModel.Step prevReturnValue) //{ // FabPlanInfo plan = loadInfo as FabPlanInfo; // FabProduct prod = plan.Product; // FabLot mlot = lot as FabLot; // #region PartChange // if (prod.HasNextInterBom) // { // FabInterBom bom; // prod.TryGetNextInterRoute(step as FabStep, out bom); // if (bom != null) // { // plan.InterBom = bom; // mlot.Product = bom.ChangeProduct; // } // } // #endregion // if (plan.InterBom != null) // return plan.InterBom.ChangeStep; // return step.GetDefaultNextStep(); //} /// <summary> /// </summary> /// <param name="hb"/> /// <param name="handled"/> public void ON_DONE0(Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled) { FabLot lot = hb.ToFabLot(); InFlowMaster.OnDoneWipLocation(hb); if (SimHelper.IsTftRunning) { InOutProfileMaster.AddOut(lot, AoFactory.Current.NowDT); } }
/// <summary> /// </summary> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public Time GET_TRANSFER_TIME0(Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, Time prevReturnValue) { try { return(TimeSpan.Zero); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(Time)); } }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="handled"/> public void ON_TRACK_OUT0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled) { //FabAoEquipment feqp = aeqp as FabAoEquipment; //FabLot flot = hb.Sample as FabLot; //FabStep step = flot.CurrentStep as FabStep; //PreInspector.UpdateLastEventTime(aeqp, step, flot.CurrentProductID); //※TrackOut시점에는 Step이 바껴있지 않음. //InFlowMaster.ChangeWipLocation(hb, EventType.TrackOut); //if (aeqp.EqpID == "THCVD500") // Console.WriteLine(); }
/// <summary> /// </summary> /// <param name="hb"/> /// <param name="ao"/> /// <param name="now"/> /// <param name="handled"/> public void ON_END_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.OnEndTask(x as FabLot)); if (ao is AoEquipment) { FabAoEquipment aeqp = ao as FabAoEquipment; MaskMaster.EndTask(lot, aeqp); JigMaster.EndTask(lot, aeqp); } }
/// <summary> /// </summary> /// <param name="agent"/> /// <param name="hb"/> /// <param name="handled"/> public void ON_EXIT_CONTROL0(Mozart.SeePlan.Simulation.InOutAgent agent, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled) { //if (InputMart.Instance.SimulationRunType != SimRunType.TFT_CF) // return; //Outputs.EqpPlan plan = new Outputs.EqpPlan(); //FabLot lot = hb.Sample as FabLot; //plan.VERSION_NO = ModelContext.Current.VersionNo; //plan.FACTORY_ID = lot.CurrentFactoryID; //plan.SHOP_ID = lot.CurrentShopID; //plan.LOT_ID = lot.LotID; //plan.BATCH_ID = lot.BatchID; //plan.STEP_ID = lot.CurrentShopID + "00000"; //plan.STEP_TYPE = "Front-In"; //plan.PRODUCT_ID = lot.CurrentProductID; //plan.UNIT_QTY = lot.UnitQty; //plan.EQP_ID = string.IsNullOrEmpty(lot.CurrentPlan.ResID) ? Constants.NULL_ID : lot.CurrentPlan.ResID; //plan.LAYER_ID = lot.CurrentFabStep.LayerID; //plan.PROCESS_ID = lot.CurrentProcessID; //plan.PRODUCT_KIND = lot.CurrentFabProduct.ProductKind; //plan.START_TIME = agent.NowDT; //plan.END_TIME = agent.NowDT; //plan.EQP_STATUS = "BUSY"; //plan.WIP_STEP_ID = Constants.NULL_ID; //if (lot.FrontInTarget != null) //{ // var mo = lot.FrontInTarget.Mo.FirstOrDefault(); // if (mo != null) // { // plan.TARGET_DATE = lot.FrontInTarget.TargetDate; // plan.DEMAND_ID = mo.DemandID; // plan.DEMAND_PLAN_DATE = mo.DueDate; // plan.TAR_PLAN_QTY = Convert.ToDecimal(mo.Qty); // plan.TARGET_PRODUCT_ID = mo.ProductID; // } //} //OutputMart.Instance.EqpPlan.Add(plan); //InFlowAgent.ChangeWipLocation(lot, EventType.Release); }
/// <summary> /// </summary> /// <param name="hb"/> /// <param name="bucketer"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public Time GET_BUCKET_TIME0(Mozart.SeePlan.Simulation.IHandlingBatch hb, AoBucketer bucketer, ref bool handled, Time prevReturnValue) { try { Time tm = new Time(); MicronBEAssyBELot lot = hb as MicronBEAssyBELot; MicronBEAssyBEStep step = hb.CurrentStep as MicronBEAssyBEStep; foreach (StepTat time in InputMart.Instance.StepTat.DefaultView) { if (step.StepID != time.STEP_ID) { continue; } if (lot.Product.LineID != time.LINE_ID) { continue; } if (lot.Product.ProductID != time.PRODUCT_ID) { continue; } double runTatBySec = (double)time.RUN_TAT; tm = TimeSpan.FromSeconds(runTatBySec); break; } return(tm); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(Time)); } }
public static SetupType CheckSetupProfile(WorkEqp weqp, Mozart.SeePlan.Simulation.IHandlingBatch hb) { try { MicronBEAssyBELot lot = hb as MicronBEAssyBELot; var workLots = weqp.Step.Profiles[weqp]; var lastLot = workLots.Last().Lot as MicronBEAssyBELot; if (lastLot.Product.ProductID != lot.Product.ProductID) { return(SetupType.PART_CHG); } return(SetupType.NONE); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(SetupType.NONE); } }
/// <summary> /// </summary> /// <param name="da"/> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public Time GET_HOLD_TIME0(Mozart.SeePlan.Simulation.DispatchingAgent da, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, Mozart.Simulation.Engine.Time prevReturnValue) { Time t = Time.Zero; FabLot lot = hb.ToFabLot(); FabWipInfo wip = lot.Wip; //FabPlanInfo plan = lot.CurrentFabPlan; if (lot.IsInitHold) { t = wip.AvailableTime - da.NowDT; lot.HoldStartTime = da.NowDT; lot.HoldTime = t; lot.IsInitHold = false; // Hold → ExitHold → IsHold 이므로 false로 설정해야됨. 바꿔주지 않을 경우 계속 Hold됨. } return(t); }
/// <summary> /// </summary> /// <param name="hb"/> /// <param name="now"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public IHandlingBatch[] STEP_CHANGE0(Mozart.SeePlan.Simulation.IHandlingBatch hb, DateTime now, ref bool handled, Mozart.SeePlan.Simulation.IHandlingBatch[] prevReturnValue) { FabLot lot = hb.ToFabLot(); FabPlanInfo plan = lot.CurrentFabPlan; /* * StepChange */ ILot[] lots = hb.StepChange(now); //설비의 OutPort에서 Lot을 모으는 InterceptMove를 사용할 경우 해당 위치에서 별도 집계 필요함. InFlowMaster.ChangeWipLocation(hb, EventType.TrackOut); //FabPlanInfo prev = lot.PreviousFabPlan; ////InLineMap 다음StepSkip //if (prev.IsLoaded && prev.FabStep.StdStep.IsBaseEqp(prev.ResID)) //{ // plan = lot.CurrentFabPlan; // plan.TransferStartTime = now; // plan.TransferEndTime = now; // plan.EqpInEndTime = now; // plan.EqpInStartTime = now; // plan.Start(now, null); // plan.End(now, null); // lots = hb.StepChange(now); //} QTimeMaster.StepChange(lots, now); return(lots); }
/// <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); }
/// <summary> /// </summary> /// <param name="factory"/> /// <param name="hb"/> /// <param name="handled"/> public void LOCATE_FOR_RUN0(Mozart.SeePlan.Simulation.AoFactory factory, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled) { var wipInitiator = ServiceLocator.Resolve <WipInitiator>(); FabLot lot = hb.Sample as FabLot; string eqpID = wipInitiator.GetLoadingEquipment(hb); AoEquipment aeqp = factory.GetEquipment(eqpID); if (aeqp == null) { //If there is not Equipment, handle through Bucketing. factory.AddToBucketer(hb); Logger.Warn("Eqp {0} is invalid, so locate running wip to dummy bucket. check input data!", eqpID ?? "-"); } else { //// Checks WIP state that is Run, but processing is completed and located in Outport. //bool trackOut = wipInitiator.CheckTrackOut(factory, hb); //if (trackOut) //{ // aeqp.AddOutBuffer(hb); //} //else //{ // aeqp.AddRun(hb); //} var eqp = aeqp.Target as FabEqp; var runWips = eqp.InitRunWips; bool lastRunWip = runWips[runWips.Count - 1] == lot; if (eqp.State == ResourceState.Up && lastRunWip) { MaskMaster.InitLocate(aeqp, hb); JigMaster.InitLocate(aeqp, hb); aeqp.AddRun(hb); //※초기Run재공은 OnTrackIn 이벤트 발생안함. } else { DateTime tkInTime = lot.Wip.LastTrackInTime; var procTimeInfo = aeqp.GetProcessTime(hb); double processTime = procTimeInfo.FlowTime.TotalSeconds + (procTimeInfo.TactTime.TotalSeconds * (hb.UnitQty - 1)); DateTime tkOutTime = tkInTime.AddSeconds(processTime); Time delay = Time.Max((tkOutTime - aeqp.NowDT), Time.Zero); if (delay > Time.Zero) { object[] args = new object[2] { aeqp, hb }; aeqp.AddTimeout(delay, SimHelper.OnEqpOutBuffer, args); InFlowMaster.ChangeWipLocation(hb, EventType.TrackIn); lot.CurrentPlan.LoadedResource = eqp; } else { aeqp.AddOutBuffer(hb); } } } }
public static void CollectEqpPlan(Mozart.SeePlan.Simulation.IHandlingBatch hb, AoEquipment equip, string status) { try { MicronBEAssyBELot lot = hb as MicronBEAssyBELot; string eqpID = string.Empty; if (equip != null) { eqpID = equip.EqpID; } string waitPlanKey = SimulationHelper.GetEqpPlanKey(lot, string.Empty, LoadState.WAIT.ToString()); if (InputMart.Instance.EqpPlans.ContainsKey(waitPlanKey)) { InputMart.Instance.EqpPlans.Remove(waitPlanKey); } string waitPlanKeyWithEqp = SimulationHelper.GetEqpPlanKey(lot, eqpID, LoadState.WAIT.ToString()); if (InputMart.Instance.EqpPlans.ContainsKey(waitPlanKeyWithEqp)) { InputMart.Instance.EqpPlans.Remove(waitPlanKeyWithEqp); } string key = SimulationHelper.GetEqpPlanKey(lot, eqpID, status); string arrivalTimeKey = lot.LotID.Split('_')[0] + lot.CurrentStepID; EqpPlan plan; if (InputMart.Instance.EqpPlans.TryGetValue(key, out plan) == false) { MicronBEAssyEqp eqp; InputMart.Instance.MicronBEAssyEqp.TryGetValue(eqpID, out eqp); plan = new EqpPlan(); plan.LINE_ID = lot.LineID; plan.PRODUCT_ID = status != LoadingStates.BUSY.ToString() && status != LoadState.WAIT.ToString() ? status : lot.Product.ProductID; plan.LOT_ID = status != LoadingStates.BUSY.ToString() && status != LoadState.WAIT.ToString() ? Mozart.SeePlan.StringUtility.IdentityNull : lot.LotID; plan.INIT_STEP = status != LoadingStates.BUSY.ToString() && status != LoadState.WAIT.ToString() ? Mozart.SeePlan.StringUtility.IdentityNull : lot.WipInfo.InitialStep.StepID; plan.ARRIVAL_TIME = status != LoadingStates.BUSY.ToString() && status != LoadState.WAIT.ToString() ? default(DateTime) : FindHelper.GetNowDT(); plan.PROCESS_ID = lot.CurrentStep.Process.ProcessID; plan.STEP_ID = lot.CurrentStepID; plan.EQP_ID = eqpID; //plan.STEP_GROUP = eqp == null ? Mozart.SeePlan.StringUtility.IdentityNull : eqp.StepGroup.ToString(); plan.QTY = lot.UnitQty; plan.STATUS = status; plan.DESIGN_ID = lot.Product.DesignID(); plan.SEQUENCE = lot.CurrentStep.Sequence; plan.COMP_SEQ = lot.Product is AssyMcpPart ? (lot.Product as AssyMcpPart).CompSeq : 1; plan.IS_BASE = UtilityHelper.IsYN(lot.Product.IsBase()); plan.STEP_GROUP = (lot.CurrentStep as MicronBEAssyBEStep).StepGroup; if (lot.Product is AssyMcpProduct) { plan.FINAL_PROD_ID = lot.Product.ProductID; } else if (lot.Product is AssyMcpPart) { plan.FINAL_PROD_ID = (lot.Product as AssyMcpPart).FinalProduct.ProductID; } else { plan.FINAL_PROD_ID = lot.Product.ProductID; } InputMart.Instance.EqpPlans.Add(key, plan); if (status == LoadState.WAIT.ToString()) { DateTime arTime; if (InputMart.Instance.ArrivalTime.TryGetValue(arrivalTimeKey, out arTime) == false) { InputMart.Instance.ArrivalTime.Add(arrivalTimeKey, plan.ARRIVAL_TIME); } } else { plan.START_TIME = FindHelper.GetNowDT(); plan.END_TIME = FindHelper.GetNowDT(); } } else { DateTime arTime; plan.END_TIME = FindHelper.GetNowDT(); InputMart.Instance.ArrivalTime.TryGetValue(arrivalTimeKey, out arTime); plan.ARRIVAL_TIME = status == LoadingStates.SETUP.ToString() ? default(DateTime) : arTime; key = SimulationHelper.GetEqpPlanKey(lot, eqpID, LoadingStates.SETUP.ToString()); EqpPlan setupPlan; if (InputMart.Instance.EqpPlans.TryGetValue(key, out setupPlan)) { setupPlan.PRODUCT_ID = lot.Product.ProductID; } } } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }
public static SetupType CheckSetup(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb) { try { MicronBEAssyBELot lot = hb as MicronBEAssyBELot; MicronBEAssyPlanInfo plan = aeqp.LastPlan as MicronBEAssyPlanInfo; if (plan == null) { return(SetupType.NONE); } if (plan.ProductID != lot.Product.ProductID) { return(SetupType.PART_CHG); } return(SetupType.NONE); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(SetupType.NONE); } }
/// <summary> /// </summary> /// <param name="cproc"/> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public string[] GET_LOADABLE_CHAMBERS1(Mozart.SeePlan.Simulation.AoChamberProc2 cproc, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, string[] prevReturnValue) { var eqp = cproc.Parent as FabAoEquipment; var lot = hb.ToFabLot(); //if (eqp.EqpID == "THCVD300" && lot != null && lot.LotID == "TH011661N0H") // Console.WriteLine("B"); var info = eqp.EqpDispatchInfo; //var loadableList = eqp.GetLoadableSubEqps(lot, false); var loadableList = eqp.GetLoadableSubEqps(lot); int count = loadableList == null ? 0 : loadableList.Count; string[] arr = new string[count]; //loadable sub eqp별 EqpDispatchInfo 설정 if (loadableList != null) { for (int i = 0; i < count; i++) { var subEqp = loadableList[i]; arr[i] = subEqp.SubEqpID; subEqp.EqpDispatchInfo = info; } } eqp.EndDispatch_ParallelChamber(); return(arr); }
public MicronBEAssyWorkLot(Mozart.SeePlan.Simulation.IHandlingBatch hb, Mozart.Simulation.Engine.Time availableTime, object stepKey, Mozart.SeePlan.DataModel.Step step) : base(hb, availableTime, stepKey, step) { }
/// <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); } }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public double GET_PROCESS_UNIT_SIZE1(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, double prevReturnValue) { double unitSize = SeeplanConfiguration.Instance.LotUnitSize; if (aeqp.IsBatchType() == false) { unitSize = hb.UnitQty; } return(unitSize); }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="state">SETUP/BUSY/IDLERUN/IDLE/WAIT_SETUP(PM/DOUWN 호출 안됨)</param> /// <param name="handled"/> public void LOADING_STATE_CHANGED0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb, Mozart.SeePlan.Simulation.LoadingStates state, ref bool handled) { var eqp = aeqp.ToFabAoEquipment(); var now = eqp.NowDT; if (eqp.IsParallelChamber) { return; } if (ModelContext.Current.EndTime == now) { return; } //PM/Down 이벤트 예외사항 처리 if (SimHelper.IgnoreStateChange(eqp, state)) { return; } var lot = hb.ToFabLot(); if (state == LoadingStates.SETUP || state == LoadingStates.BUSY) { SetCurrentMask(eqp, lot); } eqp.OnStateChanged(state, lot); }
/// <summary> /// </summary> /// <param name="factory"/> /// <param name="hb"/> /// <param name="handled"/> public void ON_BEGIN_LOCATE_WIP0(Mozart.SeePlan.Simulation.AoFactory factory, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled) { }
/// <summary> /// </summary> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public string GET_LOADING_EQUIPMENT0(Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, string prevReturnValue) { FabLot lot = hb.Sample as FabLot; return(lot.WipInfo.WipEqpID); }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="loadableChambers"/> /// <param name="hb"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public ISet <string> GET_NEED_SETUP_CHAMBERS0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.ChamberInfo[] loadableChambers, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled, ISet <string> prevReturnValue) { FabLot lot = hb.ToFabLot(); FabEqp eqp = aeqp.Target as FabEqp; List <FabSubEqp> list = ChamberMaster.GetSubEqps(eqp, loadableChambers); return(ChamberMaster.GetNeedSetupChamberIDs(list, lot)); }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="handled"/> public void ON_TRACK_IN0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb, ref bool handled) { ResHelper.CheckContinueousQty(aeqp, hb); }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="state">WaitSetup/StartSetup/EndSetup/FirstLoading/LastLoading/FirstUnloading/LastUnloading</param> /// <param name="handled"/> public void PROCESS_STATE_CHANGED0(Mozart.SeePlan.Simulation.AoEquipment aeqp, Mozart.SeePlan.Simulation.IHandlingBatch hb, Mozart.SeePlan.Simulation.ProcessStates state, ref bool handled) { FabAoEquipment eqp = aeqp.ToFabAoEquipment(); FabLot lot = hb.ToFabLot(); var now = aeqp.NowDT; if (eqp.EqpID == "THCVD300") { Console.WriteLine(); } //Setup이 있을 경우 FirstLoading이 없음. if (state == ProcessStates.FirstLoading) { DispatchLogHelper.WriteDispatchLog_ParallelChamber(eqp, lot); eqp.LastLoadingTime = now; //if (eqp.LastLoadingTime >= eqp.LastIdleStartTime) // eqp.LastIdleStartTime = DateTime.MinValue; //eqp.LastIdleRunStartTime = DateTime.MinValue; eqp.LoadCount++; } //else if (state == ProcessStates.LastLoading) //{ // eqp.LastIdleRunStartTime = now; //} //else if (state == ProcessStates.LastUnloading) //{ // eqp.LastIdleStartTime = now; //} else if (state == ProcessStates.StartSetup) { DispatchLogHelper.WriteDispatchLog_ParallelChamber(eqp, lot); } else if (state == ProcessStates.EndSetup) { eqp.LoadCount = 1; eqp.SetupCount++; //eqp.LastIdleStartTime = DateTime.MinValue; //eqp.LastIdleRunStartTime = DateTime.MinValue; } }
/// <summary> /// </summary> /// <param name="da"/> /// <param name="hb"/> /// <param name="destCount"/> /// <param name="handled"/> public void ON_NOT_FOUND_DESTINATION0(Mozart.SeePlan.Simulation.DispatchingAgent da, Mozart.SeePlan.Simulation.IHandlingBatch hb, int destCount, ref bool handled) { FabLot lot = hb.ToFabLot(); //TODO: if (lot.CurrentFabStep.StdStep.IsMandatory) { ErrHist.WriteIf(string.Format("{0}/{1}/{2}", "NotFoundArrange", lot.CurrentFabStep.StepID, lot.CurrentProductID), ErrCategory.SIMULATION, ErrLevel.INFO, lot.CurrentFactoryID, lot.CurrentShopID, lot.LotID, lot.CurrentProductID, lot.CurrentProductVersion ?? lot.Wip.ProductVersion, lot.CurrentProcessID, Constants.NULL_ID, lot.CurrentStepID, "ON NOT FOUND DESTINATION0", string.Format("Check Arrange → LOT_ID:{0}", lot.ToString()) ); return; } da.Factory.AddToBucketer(hb); }