|
@@ -203,11 +203,6 @@ namespace Venus_RT.Modules
|
|
|
StartAlign,
|
|
|
Aligning,
|
|
|
|
|
|
- // PreHeating
|
|
|
- WaitPreHeating,
|
|
|
- StartPreHeating,
|
|
|
- PreHeating,
|
|
|
-
|
|
|
// Loadlock Status
|
|
|
ExchangeWaferWithEFEM,
|
|
|
ExchangeWaferWithTM,
|
|
@@ -219,7 +214,7 @@ namespace Venus_RT.Modules
|
|
|
public ModuleStatus Status { get; set; }
|
|
|
public SchedulerModule Scheduler { get; }
|
|
|
public virtual int SlotNum { get; protected set; }
|
|
|
- public virtual bool IsIdle { get { return Status == ModuleStatus.Idle || Status == ModuleStatus.PreHeating; } }
|
|
|
+ public virtual bool IsIdle { get { return Status == ModuleStatus.Idle; } }
|
|
|
|
|
|
private int _currentActionTime = 0;
|
|
|
|
|
@@ -326,8 +321,6 @@ namespace Venus_RT.Modules
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
- case ModuleStatus.PreHeating:
|
|
|
- return 0;
|
|
|
}
|
|
|
|
|
|
return int.MaxValue;
|
|
@@ -1771,20 +1764,34 @@ namespace Venus_RT.Modules
|
|
|
_dictModuleTask[item.SourceModule].WaferLeaved(wafer, item.DestinationSlot);
|
|
|
}
|
|
|
|
|
|
- private ModuleName GetComingAvailablePM()
|
|
|
+ private ModuleName GetComingAvailablePM(ControlJobInfo cj)
|
|
|
{
|
|
|
+ var cjPMs = new List<ModuleName>();
|
|
|
+ foreach (var pj in _lstProcessJobs)
|
|
|
+ {
|
|
|
+ if(pj.ControlJobName == cj.Name)
|
|
|
+ {
|
|
|
+ foreach(var pm in pj.Sequence.PMs)
|
|
|
+ {
|
|
|
+ if (!cjPMs.Contains(pm))
|
|
|
+ cjPMs.Add(pm);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Dictionary<ModuleName, int> pmAssociatedWaferCount = new Dictionary<ModuleName, int>();
|
|
|
foreach (var mod in _dictModuleTask)
|
|
|
{
|
|
|
- if (ModuleHelper.IsPm(mod.Key) && mod.Value.Scheduler.IsOnline)
|
|
|
+ if (ModuleHelper.IsPm(mod.Key) && mod.Value.Scheduler.IsOnline && cjPMs.Contains(mod.Key))
|
|
|
{
|
|
|
pmAssociatedWaferCount[mod.Key] = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- foreach (var wafer in _lstWaferTasks)
|
|
|
+ var unprocessedWafer = _lstWaferTasks.Where(task => ModuleHelper.IsPm(task.destMod));
|
|
|
+ foreach (var wafer in unprocessedWafer)
|
|
|
{
|
|
|
- if (ModuleHelper.IsPm(wafer.destMod) && _dictModuleTask[wafer.destMod].Scheduler.IsOnline )
|
|
|
+ if (ModuleHelper.IsPm(wafer.destMod) && _dictModuleTask[wafer.destMod].Scheduler.IsOnline)
|
|
|
{
|
|
|
pmAssociatedWaferCount[wafer.destMod]++;
|
|
|
}
|
|
@@ -1802,7 +1809,7 @@ namespace Venus_RT.Modules
|
|
|
var cj = _lstControlJobs.Find(c => c.JetState == EnumJetCtrlJobState.PreJobClean || c.JetState == EnumJetCtrlJobState.Processing);
|
|
|
if (cj != null)
|
|
|
{
|
|
|
- var pm = GetComingAvailablePM();
|
|
|
+ var pm = GetComingAvailablePM(cj);
|
|
|
if (pm != ModuleName.System)
|
|
|
{
|
|
|
foreach (var wafer in cj.LotWafers)
|
|
@@ -2034,56 +2041,9 @@ namespace Venus_RT.Modules
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- else // must check whole system wafer existance to avoid path blocked
|
|
|
+ else
|
|
|
{
|
|
|
- var vacWaferCount = _lstWaferTasks.Where(task => ModuleHelper.IsPm(task.currentMod) || ModuleHelper.IsTMRobot(task.currentMod) || ModuleHelper.IsLoadLock(task.currentMod)).Count();
|
|
|
- var preferWaferVacCount = _dictModuleTask.Where(mod => ModuleHelper.IsPm(mod.Key) && mod.Value.Scheduler.IsOnline).Count() +
|
|
|
- (LLInOutPath == SequenceLLInOutPath.AInAOut ? _LLASlotNumber / 2 : (LLInOutPath == SequenceLLInOutPath.BInBOut ? _LLBSlotNumber / 2 : _LLASlotNumber));
|
|
|
- var inOutIndicator = vacWaferCount - preferWaferVacCount;
|
|
|
- if (inOutIndicator < 0)
|
|
|
- {
|
|
|
- // ready to push in
|
|
|
- var readyLLs = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 10 && !IsLLReservedByTM(mod.Key) && GetLLReadyInOutSlots(mod.Key).emptySlot.Count > 1).OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
- if (readyLLs.Count > 0 && atmWaferCount >= 1)
|
|
|
- {
|
|
|
- ExchangeWaferWithLL(readyLLs.First().Key);
|
|
|
- }
|
|
|
- // forward wafer to system
|
|
|
- else if (atmWaferCount < 2)
|
|
|
- {
|
|
|
- ForwardATMWafers(ModuleName.LLA);
|
|
|
- }
|
|
|
-
|
|
|
- if (_efemSchdActions.Count == 0)
|
|
|
- {
|
|
|
- var readyReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 2 && !IsLLReservedByTM(mod.Key) && GetLLReadyInOutSlots(mod.Key).outSlot.Count >= 1).OrderByDescending(mod => GetLLReadyInOutSlots(mod.Key).outSlot.Count).ToList();
|
|
|
- if (readyReturnLL.Count > 0)
|
|
|
- {
|
|
|
- ExchangeWaferWithLL(readyReturnLL.First().Key);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- // ready double return LL
|
|
|
- var readyDoubleReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 10 && !IsLLReservedByTM(mod.Key) && GetLLReadyInOutSlots(mod.Key).outSlot.Count > 1).OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
- if (readyDoubleReturnLL.Count > 0)
|
|
|
- {
|
|
|
- ExchangeWaferWithLL(readyDoubleReturnLL.First().Key);
|
|
|
- }
|
|
|
-
|
|
|
- // ready single return LL
|
|
|
- var readySingleReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 2 && !IsLLReservedByTM(mod.Key) && GetLLReadyInOutSlots(mod.Key).outSlot.Count == 1).OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
- if (readySingleReturnLL.Count > 0)
|
|
|
- {
|
|
|
- ExchangeWaferWithLL(readySingleReturnLL.First().Key);
|
|
|
- }
|
|
|
-
|
|
|
- if (atmWaferCount == 0 || _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 15).Count() == 0)
|
|
|
- {
|
|
|
- ForwardATMWafers(ModuleName.LLA);
|
|
|
- }
|
|
|
- }
|
|
|
+ RoutingSameLLInOutATMSystem();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2120,54 +2080,98 @@ namespace Venus_RT.Modules
|
|
|
ExchangeWaferWithLL(inLL);
|
|
|
}
|
|
|
}
|
|
|
- else // must check whole system wafer existance to avoid path blocked
|
|
|
+ else
|
|
|
{
|
|
|
- var vacWaferCount = _lstWaferTasks.Where(task => ModuleHelper.IsPm(task.currentMod) || ModuleHelper.IsTMRobot(task.currentMod) || ModuleHelper.IsLoadLock(task.currentMod)).Count();
|
|
|
- var preferWaferVacCount = _dictModuleTask.Where(mod => ModuleHelper.IsPm(mod.Key) && mod.Value.Scheduler.IsOnline).Count() +
|
|
|
- (LLInOutPath == SequenceLLInOutPath.AInAOut ? _LLASlotNumber / 2 : (LLInOutPath == SequenceLLInOutPath.BInBOut ? _LLBSlotNumber / 2 : _LLASlotNumber));
|
|
|
- var inOutIndicator = vacWaferCount - preferWaferVacCount;
|
|
|
- if (inOutIndicator < 0)
|
|
|
+ RoutingSameLLInOutATMSystem();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void RoutingSameLLInOutATMSystem()
|
|
|
+ {
|
|
|
+ var atmWaferCount = _lstWaferTasks.Where(wafer => ModuleHelper.IsEFEMRobot(wafer.currentMod) || ModuleHelper.IsAligner(wafer.currentMod)).Count();
|
|
|
+ var vacWaferCount = _lstWaferTasks.Where(task => ModuleHelper.IsPm(task.currentMod) || ModuleHelper.IsTMRobot(task.currentMod) || ModuleHelper.IsLoadLock(task.currentMod)).Count();
|
|
|
+ var preferWaferVacCount = _dictModuleTask.Where(mod => ModuleHelper.IsPm(mod.Key) && mod.Value.Scheduler.IsOnline).Count() +
|
|
|
+ (LLInOutPath == SequenceLLInOutPath.AInAOut ? _LLASlotNumber / 2 : (LLInOutPath == SequenceLLInOutPath.BInBOut ? _LLBSlotNumber / 2 : _LLASlotNumber));
|
|
|
+ var inOutIndicator = vacWaferCount - preferWaferVacCount;
|
|
|
+ if (inOutIndicator < 0)
|
|
|
+ {
|
|
|
+ // ready to push in
|
|
|
+ var readyLLs = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) &&
|
|
|
+ ((mod.Key != ModuleName.LLA && LLInOutPath == SequenceLLInOutPath.BInBOut) || (mod.Key != ModuleName.LLB && LLInOutPath == SequenceLLInOutPath.AInAOut)) &&
|
|
|
+ mod.Value.TimeToReady <= 10 &&
|
|
|
+ !IsLLReservedByTM(mod.Key) &&
|
|
|
+ GetLLReadyInOutSlots(mod.Key).emptySlot.Count > 1).
|
|
|
+ OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
+
|
|
|
+ if (readyLLs.Count > 0 && atmWaferCount >= 1)
|
|
|
+ {
|
|
|
+ if (ExchangeWaferWithLL(readyLLs.First().Key))
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // forward wafer to system
|
|
|
+ if (atmWaferCount < 2)
|
|
|
{
|
|
|
- // ready to push in
|
|
|
- var readyLLs = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 10 && !IsLLReservedByTM(mod.Key) && GetLLReadyInOutSlots(mod.Key).emptySlot.Count > 1).OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
- if (readyLLs.Count > 0 && atmWaferCount >= 1)
|
|
|
- {
|
|
|
- ExchangeWaferWithLL(readyLLs.First().Key);
|
|
|
- }
|
|
|
- // forward wafer to system
|
|
|
- else if (atmWaferCount < 2)
|
|
|
- {
|
|
|
- ForwardATMWafers(ModuleName.LLA);
|
|
|
- }
|
|
|
+ var targetLL = readyLLs.Count > 0 ? readyLLs.First().Key : (LLInOutPath == SequenceLLInOutPath.BInBOut ? ModuleName.LLB : ModuleName.LLA);
|
|
|
+ ForwardATMWafers(targetLL);
|
|
|
+ }
|
|
|
|
|
|
- if (_efemSchdActions.Count == 0)
|
|
|
+ if (_efemSchdActions.Count == 0)
|
|
|
+ {
|
|
|
+ var readyReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) &&
|
|
|
+ ((mod.Key != ModuleName.LLA && LLInOutPath == SequenceLLInOutPath.BInBOut) || (mod.Key != ModuleName.LLB && LLInOutPath == SequenceLLInOutPath.AInAOut)) &&
|
|
|
+ mod.Value.TimeToReady <= 5 &&
|
|
|
+ !IsLLReservedByTM(mod.Key) &&
|
|
|
+ GetLLReadyInOutSlots(mod.Key).outSlot.Count >= 1).
|
|
|
+ OrderByDescending(mod => GetLLReadyInOutSlots(mod.Key).outSlot.Count).ToList();
|
|
|
+
|
|
|
+ if (readyReturnLL.Count > 0)
|
|
|
{
|
|
|
- var readyReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 2 && !IsLLReservedByTM(mod.Key) && GetLLReadyInOutSlots(mod.Key).outSlot.Count >= 1).OrderByDescending(mod => GetLLReadyInOutSlots(mod.Key).outSlot.Count).ToList();
|
|
|
- if (readyReturnLL.Count > 0)
|
|
|
- {
|
|
|
- ExchangeWaferWithLL(readyReturnLL.First().Key);
|
|
|
- }
|
|
|
+ ExchangeWaferWithLL(readyReturnLL.First().Key);
|
|
|
}
|
|
|
}
|
|
|
- else
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // ready double return LL
|
|
|
+ var readyDoubleReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) &&
|
|
|
+ mod.Value.TimeToReady < 10 &&
|
|
|
+ !IsLLReservedByTM(mod.Key) &&
|
|
|
+ GetLLReadyInOutSlots(mod.Key).outSlot.Count > 1).
|
|
|
+ OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
+
|
|
|
+ if (readyDoubleReturnLL.Count > 0)
|
|
|
{
|
|
|
- // ready double return LL
|
|
|
- var readyDoubleReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 10 && !IsLLReservedByTM(mod.Key) && GetLLReadyInOutSlots(mod.Key).outSlot.Count > 1).OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
- if (readyDoubleReturnLL.Count > 0)
|
|
|
- {
|
|
|
- ExchangeWaferWithLL(readyDoubleReturnLL.First().Key);
|
|
|
- }
|
|
|
+ if (ExchangeWaferWithLL(readyDoubleReturnLL.First().Key))
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- // ready single return LL
|
|
|
- var readySingleReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 2 && !IsLLReservedByTM(mod.Key) && GetLLReadyInOutSlots(mod.Key).outSlot.Count == 1).OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
- if (readySingleReturnLL.Count > 0)
|
|
|
- {
|
|
|
- ExchangeWaferWithLL(readySingleReturnLL.First().Key);
|
|
|
- }
|
|
|
+ // ready single return LL
|
|
|
+ var readySingleReturnLL = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) &&
|
|
|
+ mod.Value.TimeToReady < 2 &&
|
|
|
+ !IsLLReservedByTM(mod.Key) &&
|
|
|
+ GetLLReadyInOutSlots(mod.Key).outSlot.Count == 1).
|
|
|
+ OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
+
|
|
|
+ if (readySingleReturnLL.Count > 0)
|
|
|
+ {
|
|
|
+ if (ExchangeWaferWithLL(readySingleReturnLL.First().Key))
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (atmWaferCount == 0)
|
|
|
+ {
|
|
|
+ // ready to push in
|
|
|
+ var readyLLs = _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) &&
|
|
|
+ ((mod.Key != ModuleName.LLA && LLInOutPath == SequenceLLInOutPath.BInBOut) || (mod.Key != ModuleName.LLB && LLInOutPath == SequenceLLInOutPath.AInAOut)) &&
|
|
|
+ mod.Value.TimeToReady <= 10 &&
|
|
|
+ !IsLLReservedByTM(mod.Key) &&
|
|
|
+ GetLLReadyInOutSlots(mod.Key).emptySlot.Count > 1).
|
|
|
+ OrderBy(mod => mod.Value.TimeToReady).ToList();
|
|
|
|
|
|
- if (atmWaferCount == 0 || _dictModuleTask.Where(mod => ModuleHelper.IsLoadLock(mod.Key) && mod.Value.TimeToReady < 15).Count() == 0)
|
|
|
+ if (readyLLs.Count > 0)
|
|
|
{
|
|
|
- ForwardATMWafers(ModuleName.LLA);
|
|
|
+ ForwardATMWafers(readyLLs.First().Key);
|
|
|
}
|
|
|
}
|
|
|
}
|