Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
顾剑亮
/
AGVControl-Qisda-ProductionLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit aeef65a1
由
张东亮
编写于
2021-01-14 13:07:05 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
右侧满,左侧没满。小车不回收料架
1 个父辈
694694fe
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
50 行增加
和
71 行删除
.vs/AGVControl-ProductionLine/v16/.suo
AGVControl-ProductionLine/BLL/Common.cs
AGVControl-ProductionLine/Program.cs
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.exe
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.pdb
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.exe
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.pdb
.vs/AGVControl-ProductionLine/v16/.suo
查看文件 @
aeef65a
此文件类型无法预览
AGVControl-ProductionLine/BLL/Common.cs
查看文件 @
aeef65a
...
...
@@ -350,39 +350,6 @@ namespace AGVControl
return
true
;
}
//tarIdx = Common.nodeInfo.FindIndex(s => s.Name == SettingString.A6 &&
//(s.StateEquals(eNodeStatus.NeedEnter) || s.StateEquals(eNodeStatus.NeedEnterLeave)) && s.IsUse);
//if (tarIdx == -1)
//{
// Common.LogInfo(string.Format("{0} {1}不需要小料架", agv.Name, SettingString.A6));
// //rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.MoveStandby]);
// //if (rtn)
// //{
// // agv.NextPlace = "";
// // agv.TaskSend = rtn ? SettingString.MoveStandby : "";
// // agv.Msg = string.Format("{0} 在{1}已装载小料架,送往{2}", agv.Name, place, SettingString.MoveStandby);
// // Common.LogInfo(string.Format("{0} 在{1}已装载小料架,送往{2}", agv.Name, place, SettingString.MoveStandby));
// //}
//}
//else
//{
// nodeName = SettingString.A6;
// Common.LogInfo(string.Format("{0} {1}需要小料架", agv.Name, SettingString.A6));
// return true;
// //rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Move + SettingString.A6]);
// //if (rtn)
// //{
// // agv.NextPlace = "";
// // tarNodeName = SettingString.A6;
// // Common.nodeInfo[tarIdx].AgvName = agv.Name;
// // agv.TaskSend = rtn ? SettingString.Move + SettingString.A6 : "";
// // agv.Msg = string.Format("{0} 在{1}已装载小料架,送往{2}", agv.Name, place, SettingString.A6);
// // Common.LogInfo(string.Format("{0} 在{1}已装载小料架,送往{2}", agv.Name, place, SettingString.A6));
// // return true;
// //}
//}
}
else
if
(
shelfType
.
Equals
(
eShelfType
.
BigShelf
))
{
...
...
@@ -398,40 +365,6 @@ namespace AGVControl
Common
.
log
.
Debug
(
string
.
Format
(
"{0} {1}需要大料架"
,
agv
.
Name
,
SettingString
.
A5
));
return
true
;
}
//tarIdx = Common.nodeInfo.FindIndex(s => s.Name == SettingString.A6 &&
//(s.StateEquals(eNodeStatus.NeedEnter) || s.StateEquals(eNodeStatus.NeedEnterLeave)) && s.IsUse);
//if (tarIdx == -1)
//{
// Common.LogInfo(string.Format("{0} {1}不需要大料架", agv.Name, SettingString.A6));
// //rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.MoveStandby]);
// //if (rtn)
// //{
// // agv.NextPlace = "";
// // agv.TaskSend = rtn ? SettingString.MoveStandby : "";
// // agv.Msg = string.Format("{0} 在{1}已装载大料架,送往{2}", agv.Name, place, SettingString.MoveStandby);
// // Common.LogInfo(string.Format("{0} 在{1}已装载大料架,送往{2}", agv.Name, place, SettingString.MoveStandby));
// //}
//}
//else
//{
// nodeName = SettingString.A6;
// Common.LogInfo(string.Format("{0} {1}需要大料架", agv.Name, SettingString.A6));
// return true;
// //rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Move + SettingString.A6]);
// //if (rtn)
// //{
// // agv.NextPlace = "";
// // tarNodeName = SettingString.A6;
// // Common.nodeInfo[tarIdx].AgvName = agv.Name;
// // agv.TaskSend = rtn ? SettingString.Move + SettingString.A6 : "";
// // agv.Msg = string.Format("{0} 在{1}已装载大料架,送往{2}", agv.Name, place, SettingString.A6);
// // Common.LogInfo(string.Format("{0} 在{1}已装载大料架,送往{2}", agv.Name, place, SettingString.A6));
// // return true;
// //}
//}
}
return
false
;
...
...
@@ -704,8 +637,6 @@ namespace AGVControl
//双层线是否需要小料架
if
(
CheckA5State
(
agv
,
eShelfType
.
SmallShelf
,
out
string
lineNodeName2
))
{
//if (curPlace.Equals(""))//待机位
// {
//4C车间寻找
if
(
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
{
...
...
@@ -716,8 +647,19 @@ namespace AGVControl
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线需要小料架,准备去4C-"
+
nearNodeName
);
return
true
;
}
idx
=
nodeInfo
.
FindIndex
(
s
=>
s
.
EmptyShelfCnt
>
0
&&
s
.
Name
.
Equals
(
SettingString
.
C4FeederOut
)
&&
s
.
RFID
.
StartsWith
(
"D"
)
&&
s
.
IsUse
);
if
(
idx
>
-
1
)
{
int
idx1
=
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
EnterLeaveShelfJob
&&
((
EnterLeaveShelfJob
)
s
.
CurJob
).
LineName
.
Equals
(
SettingString
.
C4FeederOut
));
if
(
idx1
==
-
1
)
{
nodeName
=
nodeInfo
[
idx
].
Name
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线左侧需要小料架,准备去4C-"
+
nodeName
);
return
true
;
}
}
}
//4D车间寻找
if
(!
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
...
...
@@ -729,9 +671,46 @@ namespace AGVControl
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线需要小料架,准备去4D-"
+
nearNodeName
);
return
true
;
}
idx
=
nodeInfo
.
FindIndex
(
s
=>
s
.
EmptyShelfCnt
>
0
&&
s
.
Name
.
Equals
(
SettingString
.
D4FeederOut
)
&&
s
.
RFID
.
StartsWith
(
"D"
)
&&
s
.
IsUse
);
if
(
idx
>
-
1
)
{
nodeName
=
nodeInfo
[
idx
].
Name
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线左侧需要小料架,准备去4D-"
+
nodeName
);
return
true
;
}
}
}
else
if
(
CheckA5State
(
agv
,
eShelfType
.
BigShelf
,
out
string
lineNodeName3
))
{
//4C车间寻找
if
(
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
{
idx
=
nodeInfo
.
FindIndex
(
s
=>
s
.
EmptyShelfCnt
>
0
&&
s
.
Name
.
Equals
(
SettingString
.
C4FeederOut
)
&&
s
.
RFID
.
StartsWith
(
"C"
)
&&
s
.
IsUse
);
if
(
idx
>
-
1
)
{
int
idx1
=
agvInfo
.
FindIndex
(
s
=>
s
.
CurJob
is
EnterLeaveShelfJob
&&
((
EnterLeaveShelfJob
)
s
.
CurJob
).
LineName
.
Equals
(
SettingString
.
C4FeederOut
));
if
(
idx1
==
-
1
)
{
nodeName
=
nodeInfo
[
idx
].
Name
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线左侧需要小料架,准备去4C-"
+
nodeName
);
return
true
;
}
}
}
//4D车间寻找
if
(!
SettingString
.
C4_AGV_IPs
.
Contains
(
agv
.
IP
))
{
idx
=
nodeInfo
.
FindIndex
(
s
=>
s
.
EmptyShelfCnt
>
0
&&
s
.
Name
.
Equals
(
SettingString
.
D4FeederOut
)
&&
s
.
RFID
.
StartsWith
(
"C"
)
&&
s
.
IsUse
);
if
(
idx
>
-
1
)
{
nodeName
=
nodeInfo
[
idx
].
Name
;
Common
.
log
.
Debug
(
agv
.
Name
+
" 双层线左侧需要小料架,准备去4D-"
+
nodeName
);
return
true
;
}
}
}
else
if
(
CheckA6State
(
agv
,
eShelfType
.
BigShelf
,
out
string
lineNodeName1
))
{
//4C车间备料区寻找
...
...
@@ -932,7 +911,7 @@ namespace AGVControl
{
double
dis
=
Math
.
Sqrt
(
Math
.
Pow
((
agv
.
Position
.
x
-
item
.
position
.
X
),
2
)
+
Math
.
Pow
((
agv
.
Position
.
y
-
item
.
position
.
Y
),
2
));
Common
.
log
.
Debug
(
string
.
Format
(
"{0} 距离{1}={2}"
,
agv
.
Name
,
item
.
Name
,
dis
.
ToString
(
"f2"
)));
if
(
dis
<
minDis
)
if
(
dis
<
minDis
&&
CheckStationState
(
item
,
out
string
rfid
)
)
{
minDis
=
dis
;
nodeName
=
item
.
Name
;
...
...
AGVControl-ProductionLine/Program.cs
查看文件 @
aeef65a
...
...
@@ -51,7 +51,7 @@ namespace AGVControl
Common
.
control
=
new
BLL
.
Control
();
//获取节点位置
Common
.
GetNodesPosition
();
//
Common.GetNodesPosition();
Common
.
control
.
Start
();
Common
.
server
=
new
AgvServer
();
Common
.
server
.
Start
();
...
...
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.exe
查看文件 @
aeef65a
此文件类型无法预览
AGVControl-ProductionLine/bin/Debug/AGVControl-ProductionLine.pdb
查看文件 @
aeef65a
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.exe
查看文件 @
aeef65a
此文件类型无法预览
AGVControl-ProductionLine/obj/Debug/AGVControl-ProductionLine.pdb
查看文件 @
aeef65a
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论