Commit 5fad85aa 张东亮

启用空台车项目

1 个父辈 ab1c3da7
...@@ -27,7 +27,7 @@ namespace DeviceLibrary.bean.job ...@@ -27,7 +27,7 @@ namespace DeviceLibrary.bean.job
runInfo = $"任务开始,去{JobParam.SrcNode.AliceName}的取料点"; runInfo = $"任务开始,去{JobParam.SrcNode.AliceName}的取料点";
//任务状态变更 //任务状态变更
MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.已分配, out string msg); MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.已分配, out string msg);
AllocateTask(agv, $"{JobParam.SrcNode.Name}_{SettingString.PutShelfOn}"); ToPutShelfOn(agv, $"{JobParam.SrcNode.Name}");
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
} }
else if (JobRunStep.IsStep(RunStep.SD_Line_OneToMany_01_ToPickUpPosition)) else if (JobRunStep.IsStep(RunStep.SD_Line_OneToMany_01_ToPickUpPosition))
...@@ -59,7 +59,7 @@ namespace DeviceLibrary.bean.job ...@@ -59,7 +59,7 @@ namespace DeviceLibrary.bean.job
runInfo = $"在{JobParam.SrcNode.AliceName}拾取料车完成,去{JobParam.CurTargetNode.AliceName}的放料点"; runInfo = $"在{JobParam.SrcNode.AliceName}拾取料车完成,去{JobParam.CurTargetNode.AliceName}的放料点";
//任务状态变更 //任务状态变更
MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.送料, out string msg); MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.送料, out string msg);
AllocateTask(agv, $"{JobParam.CurTargetNode.Name}_{SettingString.TakeShelfOff}"); ToTakeShelfOff(agv, $"{JobParam.CurTargetNode.Name}");
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
} }
} }
...@@ -132,7 +132,7 @@ namespace DeviceLibrary.bean.job ...@@ -132,7 +132,7 @@ namespace DeviceLibrary.bean.job
System.Threading.Thread.Sleep(1000); System.Threading.Thread.Sleep(1000);
runInfo = $"去下一线体{JobParam.CurTargetNode.AliceName}的放料点"; runInfo = $"去下一线体{JobParam.CurTargetNode.AliceName}的放料点";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, $"{JobParam.CurTargetNode.Name}_{SettingString.TakeShelfOff}"); ToTakeShelfOff(agv, $"{JobParam.CurTargetNode.Name}");
} }
else else
{ {
...@@ -142,7 +142,7 @@ namespace DeviceLibrary.bean.job ...@@ -142,7 +142,7 @@ namespace DeviceLibrary.bean.job
runInfo = $"{JobParam.CurTargetNode.AliceName}是最后一个线体,分发结束,需要返回{JobParam.SrcNode.Name}的放料点"; runInfo = $"{JobParam.CurTargetNode.AliceName}是最后一个线体,分发结束,需要返回{JobParam.SrcNode.Name}的放料点";
//任务状态变更 //任务状态变更
MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.返回起始地, out string msg); MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.返回起始地, out string msg);
AllocateTask(agv, $"{JobParam.SrcNode.Name}_{SettingString.TakeShelfOff}"); ToTakeShelfOff(agv, $"{JobParam.SrcNode.Name}");
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
} }
else if (JobParam.GetMissionInfo() != null && !JobParam.GetMissionInfo().needBack) else if (JobParam.GetMissionInfo() != null && !JobParam.GetMissionInfo().needBack)
...@@ -150,7 +150,7 @@ namespace DeviceLibrary.bean.job ...@@ -150,7 +150,7 @@ namespace DeviceLibrary.bean.job
JobRunStep.ToNextStep(RunStep.SD_Line_OnToMany_08_TakeShelfOff); JobRunStep.ToNextStep(RunStep.SD_Line_OnToMany_08_TakeShelfOff);
runInfo = $"{JobParam.CurTargetNode.AliceName}是最后一个线体,分发结束,无需返回,直接卸下"; runInfo = $"{JobParam.CurTargetNode.AliceName}是最后一个线体,分发结束,无需返回,直接卸下";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, $"{SettingString.TakeShelfOff}"); TakeShelfOff(agv);
} }
else else
{ {
...@@ -171,7 +171,7 @@ namespace DeviceLibrary.bean.job ...@@ -171,7 +171,7 @@ namespace DeviceLibrary.bean.job
$"到达{ JobParam.SrcNode.Name }")); $"到达{ JobParam.SrcNode.Name }"));
runInfo = $"到达{JobParam.SrcNode.AliceName}的放料点,准备卸下料车"; runInfo = $"到达{JobParam.SrcNode.AliceName}的放料点,准备卸下料车";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, SettingString.TakeShelfOff); TakeShelfOff(agv);
} }
} }
else if (JobRunStep.IsStep(RunStep.SD_Line_OnToMany_08_TakeShelfOff)) else if (JobRunStep.IsStep(RunStep.SD_Line_OnToMany_08_TakeShelfOff))
......
...@@ -20,7 +20,6 @@ namespace DeviceLibrary.bean.job ...@@ -20,7 +20,6 @@ namespace DeviceLibrary.bean.job
{ {
} }
lift.LiftStatus liftStatus;
public override Job Run(AgvInfo agv) public override Job Run(AgvInfo agv)
{ {
agv.SetJobContext(new bean.agv.JobContext() agv.SetJobContext(new bean.agv.JobContext()
...@@ -37,7 +36,7 @@ namespace DeviceLibrary.bean.job ...@@ -37,7 +36,7 @@ namespace DeviceLibrary.bean.job
JobRunStep.ToNextStep(RunStep.Steel_LiftToLine_01_ToLift); JobRunStep.ToNextStep(RunStep.Steel_LiftToLine_01_ToLift);
runInfo = $"任务开始:去{JobParam.SrcNode.AliceName}"; runInfo = $"任务开始:去{JobParam.SrcNode.AliceName}";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, JobParam.SrcNode.Name); ToLift(agv, JobParam.SrcNode.Name);
} }
else if (JobRunStep.IsStep(RunStep.Steel_LiftToLine_01_ToLift)) else if (JobRunStep.IsStep(RunStep.Steel_LiftToLine_01_ToLift))
{ {
...@@ -60,7 +59,7 @@ namespace DeviceLibrary.bean.job ...@@ -60,7 +59,7 @@ namespace DeviceLibrary.bean.job
JobRunStep.ToNextStep(RunStep.Steel_LiftToLine_03_EnterLift); JobRunStep.ToNextStep(RunStep.Steel_LiftToLine_03_EnterLift);
SetLiftOccupied(JobParam.SrcNode.Name, agv); SetLiftOccupied(JobParam.SrcNode.Name, agv);
runInfo = $"{JobParam.SrcNode.AliceName}门已开启,进电梯取料点"; runInfo = $"{JobParam.SrcNode.AliceName}门已开启,进电梯取料点";
AllocateTask(agv, $"{JobParam.SrcNode.Name}_{SettingString.PutShelfOn}"); ToPutShelfOn(agv, JobParam.SrcNode.Name);
//任务状态变更 //任务状态变更
MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.电梯到达, out string msg); MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.电梯到达, out string msg);
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
...@@ -74,7 +73,6 @@ namespace DeviceLibrary.bean.job ...@@ -74,7 +73,6 @@ namespace DeviceLibrary.bean.job
runInfo = $"到达{JobParam.SrcNode.AliceName}取料点,准备拾取料车"; runInfo = $"到达{JobParam.SrcNode.AliceName}取料点,准备拾取料车";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
PutLiftShelfOn(agv, JobParam.SrcNode.Name); PutLiftShelfOn(agv, JobParam.SrcNode.Name);
//AllocateTask(agv, $"{SettingString.PutShelfOn}_{JobParam.SrcNode.Name}");
} }
} }
else if (JobRunStep.IsStep(RunStep.Steel_LiftToLine_04_PutShelfOn)) else if (JobRunStep.IsStep(RunStep.Steel_LiftToLine_04_PutShelfOn))
...@@ -89,7 +87,7 @@ namespace DeviceLibrary.bean.job ...@@ -89,7 +87,7 @@ namespace DeviceLibrary.bean.job
runInfo = $"在{JobParam.SrcNode.AliceName}拾取料车完成,准备离开"; runInfo = $"在{JobParam.SrcNode.AliceName}拾取料车完成,准备离开";
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
AllocateTask(agv, $"{SettingString.Leave}_{JobParam.SrcNode.Name}"); LeaveLift(agv, $"{JobParam.SrcNode.Name}");
} }
} }
else if (JobRunStep.IsStep(RunStep.Steel_LiftToLine_05_LeaveLift)) else if (JobRunStep.IsStep(RunStep.Steel_LiftToLine_05_LeaveLift))
...@@ -103,6 +101,7 @@ namespace DeviceLibrary.bean.job ...@@ -103,6 +101,7 @@ namespace DeviceLibrary.bean.job
//任务状态变更 //任务状态变更
MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.离开电梯, out string msg); MissionManager.SetMissionState(JobParam.GetMissionInfo().missionId, service.model.MissionState.离开电梯, out string msg);
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
ClearLiftNodeOccupied(agv);
} }
} }
else if (JobRunStep.IsStep(RunStep.Steel_LiftToLine_06_CloseLiftDoor)) else if (JobRunStep.IsStep(RunStep.Steel_LiftToLine_06_CloseLiftDoor))
......
...@@ -90,8 +90,8 @@ namespace DeviceLibrary ...@@ -90,8 +90,8 @@ namespace DeviceLibrary
if (AGVTaskIsFinished(agv)) if (AGVTaskIsFinished(agv))
{ {
JobRunStep.ToNextStep(RunStep.Switch_03_ToLift); JobRunStep.ToNextStep(RunStep.Switch_03_ToLift);
runInfo = $"去{JobParam.CurTargetNode.AliceName},,{missionInfo()}"; runInfo = $"去{JobParam.CurTargetNode.AliceName},{missionInfo()}";
MoveToNode(agv, JobParam.CurTargetNode.Name); //MoveToNode(agv, JobParam.CurTargetNode.Name);
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
} }
} }
...@@ -181,7 +181,7 @@ namespace DeviceLibrary ...@@ -181,7 +181,7 @@ namespace DeviceLibrary
{ {
JobRunStep.ToNextStep(RunStep.Switch_11_ToLift); JobRunStep.ToNextStep(RunStep.Switch_11_ToLift);
runInfo = $"去{JobParam.CurTargetNode.AliceName},{missionInfo()}"; runInfo = $"去{JobParam.CurTargetNode.AliceName},{missionInfo()}";
MoveToNode(agv, JobParam.CurTargetNode.Name); //MoveToNode(agv, JobParam.CurTargetNode.Name);
JobRunStep.Msg = runInfo; JobRunStep.Msg = runInfo;
} }
} }
......
...@@ -456,7 +456,11 @@ namespace DeviceLibrary.manager ...@@ -456,7 +456,11 @@ namespace DeviceLibrary.manager
missionInfo = missions.Where(s => s.destinationWorkshop.Equals(agv.Scope.Workshop) && missionInfo = missions.Where(s => s.destinationWorkshop.Equals(agv.Scope.Workshop) &&
s.sourceWorkshop.Equals(agv.Scope.Workshop) && s.sourceWorkshop.Equals(agv.Scope.Workshop) &&
((s.projectType.Equals(ProjectType.半成品领用)) || (s.sourceWorkshop.Equals(s.destinationWorkshop))) && ((s.projectType.Equals(ProjectType.半成品领用)||
s.projectType.Equals(ProjectType.空台车领用)||
s.projectType.Equals(ProjectType.空台车归还)) ||
(s.sourceWorkshop.Equals(s.destinationWorkshop)))
&&
(s.state == MissionState.创建) && agv.Scope.Tasks.Contains(s.projectType.ToString())).FirstOrDefault(); (s.state == MissionState.创建) && agv.Scope.Tasks.Contains(s.projectType.ToString())).FirstOrDefault();
if (missionInfo != null && AgvCanGetMission(missionInfo)) if (missionInfo != null && AgvCanGetMission(missionInfo))
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!