경로로직

This commit is contained in:
backuppc
2026-03-03 17:29:27 +09:00
parent 1a4b8a6a54
commit 30e1ce41ee
17 changed files with 462 additions and 598 deletions

View File

@@ -109,16 +109,16 @@ namespace Project
//버퍼의 경우 직전에 멈추기 때문에 스테이션종류를 보정해준다
var StationType = currNode.StationType;
if (StationType == StationType.Normal && targetNode.StationType == StationType.Buffer)
StationType = StationType.Buffer;
if (StationType == Station.Normal && targetNode.StationType == Station.Buffer)
StationType = Station.Buffer;
ERunStep nextStep = ERunStep.READY;
switch (StationType)
{
case StationType.Loader: nextStep = ERunStep.LOADER_IN; break;
case StationType.Cleaner: nextStep = ERunStep.UNLOADER_IN; break;
case StationType.Buffer: nextStep = ERunStep.BUFFER_IN; break;
case StationType.Plating: nextStep = ERunStep.CLEANER_IN; break;
case Station.Loder: nextStep = ERunStep.LOADER_IN; break;
case Station.Cleaner: nextStep = ERunStep.UNLOADER_IN; break;
case Station.Buffer: nextStep = ERunStep.BUFFER_IN; break;
case Station.Plating: nextStep = ERunStep.CLEANER_IN; break;
default:
PUB.log.AddE($"[{logPrefix}-{cmd}] 해당 노드타입({StationType})은 작업을 지원하지 않습니다.");
return;
@@ -190,16 +190,16 @@ namespace Project
//버퍼의 경우 직전에 멈추기 때문에 스테이션종류를 보정해준다
var StationType = currNode.StationType;
if (StationType == StationType.Normal && targetNode.StationType == StationType.Buffer)
StationType = StationType.Buffer;
if (StationType == Station.Normal && targetNode.StationType == Station.Buffer)
StationType = Station.Buffer;
ERunStep nextStep = ERunStep.READY;
switch (StationType)
{
case StationType.Loader: nextStep = ERunStep.LOADER_OUT; break;
case StationType.Cleaner: nextStep = ERunStep.UNLOADER_OUT; break;
case StationType.Buffer: nextStep = ERunStep.BUFFER_OUT; break;
case StationType.Plating: nextStep = ERunStep.CLEANER_OUT; break;
case Station.Loder: nextStep = ERunStep.LOADER_OUT; break;
case Station.Cleaner: nextStep = ERunStep.UNLOADER_OUT; break;
case Station.Buffer: nextStep = ERunStep.BUFFER_OUT; break;
case Station.Plating: nextStep = ERunStep.CLEANER_OUT; break;
default:
PUB.logdebug.Add($"[AI_TRACE] REJECTED: Unsupported station type {StationType} for command {cmd}");
PUB.log.AddE($"[{logPrefix}-{cmd}] 해당 노드타입({StationType})은 작업을 지원하지 않습니다.");
@@ -287,7 +287,7 @@ namespace Project
//노드가 들어왔는데. 일반 노드라면.. 턴 정보를 제거한다.
if (PUB._virtualAGV.CurrentNode != null &&
PUB._virtualAGV.CurrentNode.StationType != StationType.Buffer &&
PUB._virtualAGV.CurrentNode.StationType != Station.Buffer &&
PUB._virtualAGV.Turn != AGVTurn.None)
{
PUB.log.AddAT($"[{logPrefix}-Goto] 현재노드위치가 버퍼가 아니라서 턴정보를 초기화합니다{PUB._virtualAGV.Turn}");