Commit c0d9d8c6 张东亮

当VMI线空料串放满后,AGV将云仓各入料口的空料串回收到分盘线

1 个父辈 43725118
...@@ -458,11 +458,6 @@ namespace DeviceLibrary ...@@ -458,11 +458,6 @@ namespace DeviceLibrary
tarPlace = SettingString.T4_1; tarPlace = SettingString.T4_1;
return true; return true;
} }
//if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.T4_1, ClientLevel.Middle, true))
//{
// tarPlace = SettingString.T4_1;
// return true;
//}
//检查点料机D1是否需要空料串 //检查点料机D1是否需要空料串
if (BoxReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.D1)) if (BoxReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.D1))
{ {
...@@ -474,7 +469,11 @@ namespace DeviceLibrary ...@@ -474,7 +469,11 @@ namespace DeviceLibrary
tarPlace = SettingString.A2; tarPlace = SettingString.A2;
return true; return true;
} }
if (BoxReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.A8))
{
tarPlace = SettingString.A8;
return true;
}
} }
//退料线 //退料线
......
using Common; using Common;
using System.Collections.Generic;
using System.Security.Policy;
namespace DeviceLibrary namespace DeviceLibrary
{ {
...@@ -7,7 +9,13 @@ namespace DeviceLibrary ...@@ -7,7 +9,13 @@ namespace DeviceLibrary
/// </summary> /// </summary>
public class BoxReelStringJobType : JobType public class BoxReelStringJobType : JobType
{ {
List<string> outStringNodes = new List<string>()
{
SettingString.T1_2,
SettingString.T2_2,
SettingString.T3_2,
SettingString.T5_2
};
/// <summary> /// <summary>
/// 料仓料串任务 /// 料仓料串任务
/// </summary> /// </summary>
...@@ -50,47 +58,20 @@ namespace DeviceLibrary ...@@ -50,47 +58,20 @@ namespace DeviceLibrary
} }
else//其他小车 else//其他小车
{ {
foreach (var node in outStringNodes)
//检查入料口1是否有空料串要出
if (FindNeedLeaveMission(currentAgv, SettingString.T1_2, out rfid))
{
if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2))
{
LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.T5_1, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.T1_2, rfid);
}
}
//检查入料口2是否有空料串要出
if (FindNeedLeaveMission(currentAgv, SettingString.T2_2, out rfid))
{
if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2))
{
LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.T2_2, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.T2_2, rfid);
}
}
//检查入料口3是否有空料串要出
if (FindNeedLeaveMission(currentAgv, SettingString.T3_2, out rfid))
{
if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2))
{
LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.T3_2, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.T3_2, rfid);
}
}
//检查入料口5是否有空料串要出
if (FindNeedLeaveMission(currentAgv, SettingString.T5_2, out rfid))
{ {
if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2)) if (FindNeedLeaveMission(currentAgv, node, out rfid))
{ {
LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.T5_2, rfid)); if (FindNeedEnterMission(currentAgv, SettingString.D1)
return new GetShelfJob(currentAgv.Place, SettingString.T5_2, rfid); || FindNeedEnterMission(currentAgv, SettingString.A2)
|| FindNeedEnterMission(currentAgv, SettingString.A8))
{
LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, node, rfid));
return new GetShelfJob(currentAgv.Place, node, rfid);
}
} }
} }
//FindNeedEnterMission(currentAgv, SettingString.T1_1, ClientLevel.Middle, false) || FindNeedEnterMission(currentAgv, SettingString.T2_1, ClientLevel.Middle, false) ||
// FindNeedEnterMission(currentAgv, SettingString.T3_1, ClientLevel.Middle, false) || FindNeedEnterMission(currentAgv, SettingString.T5_1, ClientLevel.Middle, false) ||
// FindNeedEnterMission(currentAgv, SettingString.T1_1, ClientLevel.High, false) || FindNeedEnterMission(currentAgv, SettingString.T2_1, ClientLevel.High, false) ||
// FindNeedEnterMission(currentAgv, SettingString.T3_1, ClientLevel.High, false) || FindNeedEnterMission(currentAgv, SettingString.T5_1, ClientLevel.High, false)
//检查入料口需要满料,且点料机D2/A1出满料串 //检查入料口需要满料,且点料机D2/A1出满料串
if (FindNeedEnterMission(currentAgv, SettingString.T1_1) || FindNeedEnterMission(currentAgv, SettingString.T2_1) || if (FindNeedEnterMission(currentAgv, SettingString.T1_1) || FindNeedEnterMission(currentAgv, SettingString.T2_1) ||
FindNeedEnterMission(currentAgv, SettingString.T3_1) || FindNeedEnterMission(currentAgv, SettingString.T5_1)) FindNeedEnterMission(currentAgv, SettingString.T3_1) || FindNeedEnterMission(currentAgv, SettingString.T5_1))
...@@ -145,7 +126,7 @@ namespace DeviceLibrary ...@@ -145,7 +126,7 @@ namespace DeviceLibrary
} }
return false; return false;
} }
public static bool FindNeedEnter(Agv_Info agv, string nodeName, ClientLevel level= ClientLevel.Low, bool ignoreLevel = true) public static bool FindNeedEnter(Agv_Info agv, string nodeName, ClientLevel level = ClientLevel.Low, bool ignoreLevel = true)
{ {
int nodeIdx = NodeManager.FindNode(nodeName); int nodeIdx = NodeManager.FindNode(nodeName);
if (nodeIdx > -1) if (nodeIdx > -1)
...@@ -153,7 +134,7 @@ namespace DeviceLibrary ...@@ -153,7 +134,7 @@ namespace DeviceLibrary
if (ignoreLevel) if (ignoreLevel)
nodeIdx = NodeManager.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedEnter)); nodeIdx = NodeManager.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedEnter));
else else
nodeIdx = NodeManager.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedEnter)&& s.Level.Equals(level)); nodeIdx = NodeManager.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedEnter) && s.Level.Equals(level));
if (nodeIdx > -1) if (nodeIdx > -1)
return true; return true;
} }
...@@ -170,9 +151,9 @@ namespace DeviceLibrary ...@@ -170,9 +151,9 @@ namespace DeviceLibrary
/// <param name="agv">当前agv</param> /// <param name="agv">当前agv</param>
/// <param name="nodeName">需要查询的节点</param> /// <param name="nodeName">需要查询的节点</param>
/// <returns></returns> /// <returns></returns>
public static bool FindNeedEnterMission(Agv_Info agv, string nodeName, ClientLevel level = ClientLevel.Low,bool ignoreLevel=true) public static bool FindNeedEnterMission(Agv_Info agv, string nodeName, ClientLevel level = ClientLevel.Low, bool ignoreLevel = true)
{ {
if (FindNeedEnter(agv, nodeName, level,ignoreLevel)) if (FindNeedEnter(agv, nodeName, level, ignoreLevel))
{ {
int idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(nodeName))); int idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(nodeName)));
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!