/// <summary> /// </summary> /// <param name="hb"/> /// <param name="ao"/> /// <param name="now"/> /// <param name="handled"/> public void ON_END_TASK0(IHandlingBatch hb, ActiveObject ao, DateTime now, ref bool handled) { try { AoEquipment equip = ao as AoEquipment; MicronBEAssyBELot lot = hb as MicronBEAssyBELot; if (equip == null) { SimulationHelper.CollectEqpPlan(hb, equip, LoadState.BUSY.ToString()); } MicronBEAssyBEStep step = lot.CurrentStep as MicronBEAssyBEStep; //if (step.StepAction != null && step.StepAction.FWTractIn == StepActionInfo.MCP) // lot.ChildLots.Clear(); if (lot.ReservationEqp == equip) { lot.ReservationEqp = null; } } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="state"/> /// <param name="handled"/> public void PROCESS_STATE_CHANGED0(AoEquipment aeqp, IHandlingBatch hb, ProcessStates state, ref bool handled) { try { string status = string.Empty; if (state == ProcessStates.LastLoading || state == ProcessStates.LastUnloading) { status = LoadingStates.BUSY.ToString(); } else if (state == ProcessStates.StartSetup || state == ProcessStates.EndSetup) { status = LoadingStates.SETUP.ToString(); } if (string.IsNullOrEmpty(status)) { return; } SimulationHelper.CollectEqpPlan(hb, aeqp, status); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }
/// <summary> /// </summary> /// <param name="hb"/> /// <param name="ao"/> /// <param name="now"/> /// <param name="handled"/> public void ON_START_TASK0(IHandlingBatch hb, ActiveObject ao, DateTime now, ref bool handled) { try { AoEquipment equip = ao as AoEquipment; MicronBEAssyBELot lot = hb as MicronBEAssyBELot; if (equip == null) { SimulationHelper.CollectEqpPlan(hb, equip, LoadState.BUSY.ToString()); } } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }
/// <summary> /// </summary> /// <param name="da"/> /// <param name="hb"/> /// <param name="handled"/> public void ON_DISPATCH_IN0(DispatchingAgent da, IHandlingBatch hb, ref bool handled) { try { #if DEBUG if (hb.Sample.LotID == "LOT10_L") { Console.WriteLine(); } #endif SimulationHelper.CollectEqpPlan(hb, null, LoadState.WAIT.ToString()); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }
/// <summary> /// </summary> /// <param name="aeqp"/> /// <param name="hb"/> /// <param name="handled"/> public void ON_CUSTOM_LOAD0(AoEquipment aeqp, IHandlingBatch hb, ref bool handled) { try { MicronBEAssyBELot lot = hb as MicronBEAssyBELot; string stepID = hb.CurrentStep.StepID; double stdLotSize = SimulationHelper.GetStdLotSize(stepID, lot.Product.LineID, lot.Product.ProductID); if (stdLotSize > 0 && stdLotSize < lot.UnitQtyDouble) { List <MicronBEAssyBELot> splitLots = SimulationHelper.GetSplitLots(lot, stdLotSize); foreach (MicronBEAssyBELot splitLot in splitLots) { splitLot.ReservationEqp = aeqp; AoFactory.Current.In(splitLot); aeqp.AddInBuffer(splitLot); SimulationHelper.CollectEqpPlan(splitLot, aeqp, LoadState.WAIT.ToString()); } string waitPlanKey = SimulationHelper.GetEqpPlanKey(lot, string.Empty, LoadState.WAIT.ToString()); if (InputMart.Instance.EqpPlans.ContainsKey(waitPlanKey)) { InputMart.Instance.EqpPlans.Remove(waitPlanKey); } } else { AoFactory.Current.In(lot); aeqp.AddInBuffer(lot); } } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); } }