|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
& M+ {+ K* w5 c6 v* K. Q/ J, h# {
我的问题是,在每个P_pick的process中的while循环内,总显示错误Expecting QueuePtr or Location, but found PathPtr. 在我定义所有的attribute的时候,从来没有定义过任何QueuePtr or location or PathPtr,为什么会出现这种错误呢。 我这里面A_picks是一个30x1的array的load attribute,我想用A_i这个load attribute来读取这个array中的数值,不知道会不会有什么不妥。9 c/ ~7 Q. b6 t! O
. f# G3 c% u/ I/ a: ^: cbegin P_read arriving. Z- j6 K! L1 z. [0 g
while 1=1 do begin
) Y2 o' O& J5 M0 C read A_tote from "data.txt" with delimiter "\n"
8 B/ I* ?* x% ^/ w0 ] read A_time from "data.txt" with delimiter "\n"
: r6 O3 v# T) G: ?7 } read A_leave from "data.txt" with delimiter "\n". k2 z* O& c$ i1 L" o3 q
read A_picks from "data.txt" with delimiter "\n"3 k. L& k+ ]! `; D$ d' W7 L
set load type to A_tote
2 x/ L8 X3 A) a. `' c% h if A_tote="tote 1" then set A_induct to 1
e8 d" K9 ^3 I- x7 Z2 ? else if A_tote="tote 2" then set A_induct to 2; c) J7 s% E9 x; F
else set A_induct to 3
7 d% n3 R8 D$ Q1 I set A_i to 02 c; h! ?, t' ]% H& x2 E* n
clone 1 load to P_induction' D- j6 i+ K$ \' T7 a1 }, x/ p
wait for A_time sec# M% t' z1 d5 }% D" f! G& u
end0 Z: b0 L# [( h
end
) z7 N( K5 Q+ g6 K \
5 d5 f- L. T$ r6 i: fbegin P_induction arriving8 A u/ q/ t# C v% I: m- l5 p, B
if A_induct=1 then clone 1 load to P_pick1* D+ c$ ~4 q- g; A( p/ |
else if A_induct=2 then clone 1 load to P_pick2
* W) G( j0 B4 K; o else clone 1 load to P_pick36 @: W& C( v7 W2 T
end/ r% J8 } e0 P" i4 u' ^
% ~. W$ v* k0 Y$ M; K+ J
begin P_pick1 arriving
' P J, I# }7 c: } set A_i to 1; P7 E+ N, i8 P# G. J, }. M9 w
move into Q_induct1
1 ?9 ^8 F5 I; s5 }8 O& K" K move into pickaisle.induct1
" u* V8 {3 e8 @% N0 ~% j while A_i<=30 do begin/ v* [" z6 v" z, J! m
travel to pickaisle.con(A_i)
8 [# X* u+ I5 R* b8 l, d9 G( Z if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec. ?! F! w2 E# a1 T$ ]$ r
else wait for 10 sec- L: j3 m1 A9 \/ E
if A_i=A_leave then send to die
& w1 R9 c5 w; t# [; H w/ ]- J else inc A_i by 1
. V% T- \7 H+ e. ~ end
& o7 ]& O! `4 G: fend
, @) m4 Z0 x3 K& L1 R3 D% }7 h
1 I% B a0 E, Bbegin P_pick2 arriving
1 U0 U8 c/ l) P! c set A_i to 112 \0 j" p. [5 J" R* W2 d+ `
move into Q_induct28 C3 M8 ?/ l2 F
move into pickaisle.induct2
B, y1 C* V/ E while A_i<=30 do begin
6 p$ o5 [( X9 v6 @) v travel to pickaisle.con(A_i)4 z- l; G& Q/ Z. ]( \. ~9 i
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec" D$ V1 t: o( i4 K
else wait for 10 sec
- ^" G* X z4 A1 N; D if A_i=A_leave then send to die
7 B! @, i% g3 U8 G3 L else inc A_i by 1
) f2 {/ G9 o* `/ T/ m. P& z end
/ W. ]- g! g, y \end
$ @. n- w! q: `5 e
5 i. V! b* d2 _# M) j" pbegin P_pick3 arriving% b w0 f8 { | a5 _
set A_i to 21
1 J% `/ c( t- n+ P, E( S+ W move into Q_induct3
/ ~( h9 O+ ], w) J7 r2 G move into pickaisle.induct31 P$ a3 X! ]2 }; [* C
while A_i<=30 do begin
+ `# w7 B' w8 F8 ~: h travel to pickaisle.con(A_i)2 j! f% @' H/ s ?. t6 [
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% Q, `# o$ n8 q g& R' P- Y
else wait for 10 sec
3 W+ }- k% L% o% P1 P/ {' x8 @ if A_i=A_leave then send to die# o! j9 M$ z' G; `
else inc A_i by 15 h4 o" w; |0 e7 k n* \5 _
end
9 A) f" v# n6 t5 ^end |
最佳答案
查看完整内容
pickaisle.induct1/2/3是个什么东东?
move into后面,应该是一个station或control point,或者Queue/Container/Vehicle/Segment之类的东西。看你的报错信息,这个induct是个path么?
AutoMod Editor的语法报错信息,有时候会指在下一行,必要的时候要把上下几行都看一下。
另外,你的几个P_pick是完全重复的,建议以如下方式修改,可以减少代码编写量:
1. 创建一个Process:名称为P_pick,number of Processes为3,其它按你的 ...
|