|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
% w% s4 p2 ^: ?8 P& y
6 f# i J: c8 C我的问题是,在每个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中的数值,不知道会不会有什么不妥。
* S* m- D% a* h/ N3 F
2 i" m/ g- m" f! S% _) k( K% `begin P_read arriving
2 p$ G3 Q( E0 D6 Y0 z$ T while 1=1 do begin9 y/ r" z) Y* E
read A_tote from "data.txt" with delimiter "\n"8 R( B& e- H1 t2 S
read A_time from "data.txt" with delimiter "\n"2 h |2 g+ C# ]5 k/ V( a9 s7 I/ f, h( w
read A_leave from "data.txt" with delimiter "\n"
* `* q$ U9 Y# V5 [8 s8 g( s: j6 ^ read A_picks from "data.txt" with delimiter "\n"
, z$ S9 E2 {" a J' ]# a set load type to A_tote7 ^2 Z3 W& r" x' w8 z/ V6 w
if A_tote="tote 1" then set A_induct to 1
" S! q0 E' A% A* R1 O3 Q m: Z else if A_tote="tote 2" then set A_induct to 28 L' n* p8 k0 Y- M
else set A_induct to 3
4 G# F" f8 c; s2 S" A- G) | set A_i to 0/ \$ e6 h {, l+ c) U5 f
clone 1 load to P_induction
" Z1 M3 `7 F( W( o5 @3 }; o wait for A_time sec
( C a% [( p, i2 E# C) {+ l end
7 K3 s. @8 v( B( B+ e0 eend
) p, r* P- z, d; Z; \. u y9 H# u2 j3 X8 W0 S7 {
begin P_induction arriving/ t" \* T- c* F2 O
if A_induct=1 then clone 1 load to P_pick1
$ h" S S. U* G6 R" N, o. K* W0 S else if A_induct=2 then clone 1 load to P_pick2
$ g9 e! u3 _2 q4 i8 V2 W; R4 i. l; B; ^3 v else clone 1 load to P_pick3
8 p/ m& {( v% ?' vend
# e1 s5 C3 R* {& H8 S
' k7 e* M) N+ G3 [6 abegin P_pick1 arriving
) \) U" `/ N. K+ c: }1 v set A_i to 1) @* ~% M% @$ Y
move into Q_induct13 G, q/ [) I2 A% E( i" J U
move into pickaisle.induct1
7 ~- h4 `: e8 C0 M+ p) E# u2 B while A_i<=30 do begin
4 @2 b5 @8 s, i) @5 d travel to pickaisle.con(A_i)+ z: ?, t, Q$ o% M; k: Y
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% N0 Q% {- T) y
else wait for 10 sec; B N: H" w+ ?0 r2 `6 R) X7 y5 L# I
if A_i=A_leave then send to die* r" p2 F; g1 m8 X
else inc A_i by 1# u" i+ C5 e, O" P1 q% }
end
. h% F! Z, g, q' v6 iend6 @9 s5 J! ?2 F |7 s- V
6 c; y4 i# B/ bbegin P_pick2 arriving
% l5 x, y3 N0 }) R# f) P# o set A_i to 11
& Q3 t' N; @4 D( J7 M& R; k move into Q_induct2: ^+ u0 n1 G( h) x" c
move into pickaisle.induct2
9 T! c1 w( u( t$ f( o w9 ]: s while A_i<=30 do begin
) V$ i! d! d0 E9 ] travel to pickaisle.con(A_i)
9 J# }+ m5 ?! u* x$ S& f if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec8 X$ L; e" ^ O" u
else wait for 10 sec
0 P7 v8 O( R4 q/ G& w: h7 _ if A_i=A_leave then send to die
1 V0 X$ F6 `1 Y8 t& _5 t3 x2 b else inc A_i by 1
- p+ u$ _4 b4 u( B h! h7 v; G' o end3 J5 A+ v! Q/ j j7 c2 f/ R$ b
end
) R) `- \4 u3 y- ^# X" R5 j
8 U/ O7 X, f7 N8 g! }) Ubegin P_pick3 arriving
, I+ t4 f, G2 P2 n- H ? set A_i to 210 o+ j" W5 g- u7 E6 t4 s
move into Q_induct3" ~; t4 u5 c2 R2 F2 Z$ `. V
move into pickaisle.induct3
* B- s" s1 r/ [, r/ y while A_i<=30 do begin
" L5 Z& f, E1 `# W, D, n travel to pickaisle.con(A_i)! P* X- i* {( c) R# g9 }' o5 S
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec* s4 [, K: Z" ?% I
else wait for 10 sec0 I$ p0 k8 x v. w" c, B
if A_i=A_leave then send to die; }( q. _# \8 U4 K/ e0 I5 x
else inc A_i by 1) V/ M2 |- i. E
end& d# p3 A. s* n; j! ]8 U) Z' `
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,其它按你的 ...
|