/// <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); }
private void BuildFabJig(Tool item) { int qty = item.QTY; for (int i = 1; i <= qty; i++) { string jigID = string.Format("{0}_{1}", item.TOOL_ID, i); FabMask mask = CreateHelper.CreateFabMask(item, jigID); JigMaster.AddTool(mask); } }
/// <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="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); } } } }