Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张东亮
/
Qisda-SO1037-AGVDispatch
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 98db4f3b
由
张东亮
编写于
2022-12-19 15:14:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
待机点获取过枫林们任务不过门以及台车项目调用正确任务
1 个父辈
5fad85aa
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
65 行增加
和
22 行删除
DeviceLibrary/bean/job/Job.cs
DeviceLibrary/manager/NodeManager.cs
DeviceLibrary/bean/job/Job.cs
查看文件 @
98db4f3
...
@@ -234,11 +234,18 @@ namespace DeviceLibrary
...
@@ -234,11 +234,18 @@ namespace DeviceLibrary
public
void
PutLiftShelfOn
(
AgvInfo
agv
,
string
nodeName
)
public
void
PutLiftShelfOn
(
AgvInfo
agv
,
string
nodeName
)
{
{
if
(
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
if
((
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车领用
))
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车领用
))&&
(!
JobParam
.
GetMissionInfo
().
needBack
))
{
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}_{nodeName}{SettingString._Big}"
);
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}_{nodeName}{SettingString._Big}"
);
}
}
else
if
((
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车领用
))
&&
(
JobParam
.
GetMissionInfo
().
needBack
))
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}_{nodeName}"
);
}
else
if
(
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
半成品入库与领用
)
else
if
(
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
半成品入库与领用
)
&&
!
JobParam
.
GetMissionInfo
().
needBack
)
&&
!
JobParam
.
GetMissionInfo
().
needBack
)
{
{
...
@@ -274,11 +281,16 @@ namespace DeviceLibrary
...
@@ -274,11 +281,16 @@ namespace DeviceLibrary
{
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}_{nodeName}"
);
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}_{nodeName}"
);
}
}
else
if
(
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
else
if
(
(
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车领用
))
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车领用
))
&&
!
missionInfo
.
needBack
)
{
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}_{nodeName}{SettingString._Big}"
);
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}_{nodeName}{SettingString._Big}"
);
}
}
else
if
((
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车领用
))&&
(
missionInfo
.
needBack
))
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}_{nodeName}"
);
}
else
if
(
missionInfo
.
projectType
.
Equals
(
ProjectType
.
半成品入库与领用
)
else
if
(
missionInfo
.
projectType
.
Equals
(
ProjectType
.
半成品入库与领用
)
&&
!
missionInfo
.
needBack
)
&&
!
missionInfo
.
needBack
)
{
{
...
@@ -348,8 +360,8 @@ namespace DeviceLibrary
...
@@ -348,8 +360,8 @@ namespace DeviceLibrary
/// <param name="agv"></param>
/// <param name="agv"></param>
public
void
PutShelfOn
(
AgvInfo
agv
)
public
void
PutShelfOn
(
AgvInfo
agv
)
{
{
if
(
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
if
(
(
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车领用
))
JobParam
.
GetMissionInfo
().
projectType
.
Equals
(
ProjectType
.
空台车领用
))
&&(!
JobParam
.
GetMissionInfo
().
needBack
)
)
{
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}{SettingString._Big}"
);
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}{SettingString._Big}"
);
}
}
...
@@ -386,8 +398,8 @@ namespace DeviceLibrary
...
@@ -386,8 +398,8 @@ namespace DeviceLibrary
{
{
if
(
missionInfo
!=
null
)
if
(
missionInfo
!=
null
)
{
{
if
(
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
if
(
(
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车归还
)
||
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车领用
))
missionInfo
.
projectType
.
Equals
(
ProjectType
.
空台车领用
))
&&(!
missionInfo
.
needBack
))
{
{
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}{SettingString._Big}"
);
AllocateTask
(
agv
,
$
"{SettingString.PutShelfOn}{SettingString._Big}"
);
}
}
...
@@ -524,10 +536,9 @@ namespace DeviceLibrary
...
@@ -524,10 +536,9 @@ namespace DeviceLibrary
if
(
JobParam
.
GetMissionInfo
()
!=
null
)
if
(
JobParam
.
GetMissionInfo
()
!=
null
)
{
{
MissionInfo
missionInfo
=
JobParam
.
GetMissionInfo
();
MissionInfo
missionInfo
=
JobParam
.
GetMissionInfo
();
service
.
model
.
ProjectType
type
=
JobParam
.
GetMissionInfo
().
projectType
;
//service.model.ProjectType type = JobParam.GetMissionInfo().projectType;
if
(
type
.
Equals
(
service
.
model
.
ProjectType
.
空台车领用
)
||
if
((!
missionInfo
.
needBack
))
//(type.Equals(service.model.ProjectType.空台车领用) && !missionInfo.needBack) ||
type
.
Equals
(
service
.
model
.
ProjectType
.
空台车归还
)
||
//(type.Equals(service.model.ProjectType.空台车归还) && !missionInfo.needBack) ||
(!
missionInfo
.
needBack
))
{
{
return
false
;
return
false
;
}
}
...
...
DeviceLibrary/manager/NodeManager.cs
查看文件 @
98db4f3
...
@@ -11,6 +11,7 @@ using static DeviceLibrary.Node;
...
@@ -11,6 +11,7 @@ using static DeviceLibrary.Node;
using
System.Runtime.CompilerServices
;
using
System.Runtime.CompilerServices
;
using
static
System
.
Net
.
Mime
.
MediaTypeNames
;
using
static
System
.
Net
.
Mime
.
MediaTypeNames
;
using
System.Runtime.ConstrainedExecution
;
using
System.Runtime.ConstrainedExecution
;
using
log4net.Util
;
namespace
DeviceLibrary.manager
namespace
DeviceLibrary.manager
{
{
...
@@ -208,7 +209,7 @@ namespace DeviceLibrary.manager
...
@@ -208,7 +209,7 @@ namespace DeviceLibrary.manager
static
void
InitLinesInAirShower
()
static
void
InitLinesInAirShower
()
{
{
//添加3D的
//添加3D的
linesInAirShower
.
Add
(
"3D"
,
new
List
<
string
>()
{
"S
1
Tail"
});
linesInAirShower
.
Add
(
"3D"
,
new
List
<
string
>()
{
"S
3
Tail"
});
//添加4C的
//添加4C的
linesInAirShower
.
Add
(
"4C"
,
new
List
<
string
>()
{
"C14Tail"
,
"C15Tail"
});
linesInAirShower
.
Add
(
"4C"
,
new
List
<
string
>()
{
"C14Tail"
,
"C15Tail"
});
}
}
...
@@ -223,28 +224,53 @@ namespace DeviceLibrary.manager
...
@@ -223,28 +224,53 @@ namespace DeviceLibrary.manager
isIn
=
true
;
isIn
=
true
;
isAirDoor
=
false
;
isAirDoor
=
false
;
if
(
agv
.
Scope
.
Workshop
.
Equals
(
"1F"
))
return
false
;
if
(
agv
.
Scope
.
Workshop
.
Equals
(
"1F"
))
return
false
;
return
false
;
//
return false;
try
try
{
{
if
(
cur
==
null
)
cur
=
agv
.
Place
;
if
(
cur
==
null
)
cur
=
agv
.
Place
;
if
(
next
==
null
)
next
=
agv
.
Place
;
if
(
next
==
null
)
next
=
agv
.
Place
;
if
(!
cur
.
Workshop
.
Equals
(
next
.
Workshop
))
//if (!cur.Workshop.Equals(next.Workshop))
//{
// if (cur.Equals("4D") && next.Workshop.Equals("4C"))
// {
// return true;
// }
// else if (cur.Workshop.Equals("4C") && next.Workshop.Equals("4D"))
// {
// isIn = false;
// return true;
// }
//}
//else//在相同车间
{
{
if
(
cur
.
Equals
(
"4D"
)
&&
next
.
Workshop
.
Equals
(
"4C"
))
if
(
cur
.
Type
.
Equals
(
NodeType
.
Lift
)
||
cur
.
Type
.
Equals
(
NodeType
.
Standby
)
||
cur
.
Type
.
Equals
(
NodeType
.
AutoCharge
))
{
{
if
(
linesInAirShower
.
ContainsKey
(
next
.
Workshop
)&&
linesInAirShower
[
next
.
Workshop
].
Contains
(
next
.
Name
))
{
//电梯到风淋门内
isAirDoor
=
true
;
isIn
=
true
;
return
true
;
return
true
;
}
}
else
if
(
cur
.
Workshop
.
Equals
(
"4C"
)
&&
next
.
Workshop
.
Equals
(
"4D"
))
}
else
if
(
next
.
Type
.
Equals
(
NodeType
.
Lift
)
||
next
.
Type
.
Equals
(
NodeType
.
Standby
)
||
next
.
Type
.
Equals
(
NodeType
.
AutoCharge
))
{
{
if
(
linesInAirShower
.
ContainsKey
(
cur
.
Workshop
)
&&
linesInAirShower
[
cur
.
Workshop
].
Contains
(
cur
.
Name
))
{
//风淋门内到电梯
isAirDoor
=
true
;
isIn
=
false
;
isIn
=
false
;
return
true
;
return
true
;
}
}
}
}
else
//在相同车间
else
if
(
cur
.
Type
.
Equals
(
NodeType
.
Node
)
&&
next
.
Type
.
Equals
(
NodeType
.
Node
))
{
{
if
(
linesInAirShower
.
ContainsKey
(
cur
.
Workshop
))
//当前点在风淋门内
if
(
linesInAirShower
.
ContainsKey
(
cur
.
Workshop
)
&&
linesInAirShower
.
ContainsKey
(
next
.
Workshop
))
{
{
if
(
linesInAirShower
.
ContainsKey
(
next
.
Workshop
))
//目标点在风淋门内
if
(
linesInAirShower
[
cur
.
Workshop
].
Contains
(
cur
.
Name
))
//当前点在风淋门内
{
if
(
linesInAirShower
[
next
.
Workshop
].
Contains
(
next
.
Name
))
//目标点在风淋门内
{
{
return
false
;
return
false
;
}
}
...
@@ -257,7 +283,7 @@ namespace DeviceLibrary.manager
...
@@ -257,7 +283,7 @@ namespace DeviceLibrary.manager
}
}
else
//当前点在风淋门外
else
//当前点在风淋门外
{
{
if
(
linesInAirShower
.
ContainsKey
(
next
.
Workshop
))
//目标点在风淋门内
if
(
linesInAirShower
[
next
.
Workshop
].
Contains
(
next
.
Name
))
//目标点在风淋门内
{
{
isAirDoor
=
true
;
isAirDoor
=
true
;
return
true
;
return
true
;
...
@@ -268,6 +294,12 @@ namespace DeviceLibrary.manager
...
@@ -268,6 +294,12 @@ namespace DeviceLibrary.manager
}
}
}
}
}
}
else
{
return
false
;
}
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -298,7 +330,7 @@ namespace DeviceLibrary.manager
...
@@ -298,7 +330,7 @@ namespace DeviceLibrary.manager
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"NeedCrossDoor"
,
ex
);
LogUtil
.
error
(
"NeedCross
Two
Door"
,
ex
);
}
}
return
false
;
return
false
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论