|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢 [6 e2 z: Z5 Z) _$ f+ U- |& j
' }; J6 m: h% R2 D( e/ ?3 t7 ^# Y1 n: t
我的问题是,在每个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中的数值,不知道会不会有什么不妥。" P( x( O" v2 Y4 b' c8 c [; x+ R
9 r% \3 J, [! b, D' a) Sbegin P_read arriving! m% X3 e) Q* O g- Q2 _6 a
while 1=1 do begin5 u& Y: x0 u: I! L7 l, T+ o
read A_tote from "data.txt" with delimiter "\n"
. }' \; n, H. {1 K" E2 K% ?+ U3 F. h# e read A_time from "data.txt" with delimiter "\n"+ Y, ]" ^% L8 t( U# \
read A_leave from "data.txt" with delimiter "\n"( \4 \: d) R: x* V( S6 U
read A_picks from "data.txt" with delimiter "\n"! {; K" v/ ^" X8 k- @: X
set load type to A_tote1 v( w! N) `; h7 L
if A_tote="tote 1" then set A_induct to 14 O& F& A/ S- ? L9 x# G
else if A_tote="tote 2" then set A_induct to 2) `" m. e0 A: ~9 F( K( g. [
else set A_induct to 3
3 V0 [" n) v [1 b set A_i to 06 o+ V4 Q9 O8 j; @
clone 1 load to P_induction4 O) m5 C# \# J+ S4 l
wait for A_time sec* O _9 f M4 m- v2 G
end
6 y* P2 j! S0 q3 k2 M: Zend3 l! a, ]% i$ r( U* h' a
% e) [% v( i7 m3 H2 _begin P_induction arriving
! r& \ y c9 Z, P( q# ^# b7 e( \: s if A_induct=1 then clone 1 load to P_pick1
) d8 J0 b' d1 { E- ~ else if A_induct=2 then clone 1 load to P_pick2
# n. i0 M n0 ^9 z1 o else clone 1 load to P_pick3
5 N1 [% V1 _# |end1 T+ w$ r0 _* L
& l; G. B: w3 n" G9 P1 \$ Hbegin P_pick1 arriving
- D9 ^/ u: a5 B7 f3 _& a set A_i to 1
- [6 F/ X$ \2 s( ]1 Q( v move into Q_induct1- w% z1 F2 a, r% `& W
move into pickaisle.induct12 _0 R a4 F3 R; T
while A_i<=30 do begin3 i+ U( L8 N, X; T% w: @7 |3 T; N
travel to pickaisle.con(A_i)) Q( L# Z" P" h% C
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec2 d% N8 @* ]/ \4 w# m
else wait for 10 sec8 P+ w0 S" w$ y
if A_i=A_leave then send to die' X9 G; v3 ?' j: l! X, N
else inc A_i by 1/ Z& f/ _9 y; b9 n4 O, R7 J- b
end) W8 o8 i& ^7 _8 j% m. D3 K1 z
end8 k9 D. a2 n- o$ t6 e- u; G
5 g+ J) H8 }! u
begin P_pick2 arriving& a ~2 m& f. E0 v$ M
set A_i to 11
" @/ w M& U @1 \9 m( X$ n4 [! i move into Q_induct2
) l$ a' q+ K' ]( L% k move into pickaisle.induct2, c/ C! l5 w- d; v% s5 I2 [0 }
while A_i<=30 do begin
" O- o& D9 b6 H travel to pickaisle.con(A_i)+ \6 ~, H W5 e( R
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec j+ z( {' ^( W3 W% T
else wait for 10 sec& P- p3 q5 }/ A" R, |
if A_i=A_leave then send to die& f9 \7 D- m) s+ q
else inc A_i by 13 f6 h, l+ Q/ ~) i' ~" n9 \: [$ }
end
2 i& h6 W& Z6 r; nend( b8 W- t; r; z. s+ t
+ _" k+ S3 J1 p2 F1 C. n7 K
begin P_pick3 arriving
* Y, Y' d0 f. s! E set A_i to 21- t' ]/ P/ Q9 x1 A j# u
move into Q_induct3
m4 B5 H2 l' }5 \* ` move into pickaisle.induct3
9 |% O; H. \$ l while A_i<=30 do begin1 J! w: i1 m4 E
travel to pickaisle.con(A_i)' o; Q6 \0 ]$ p; ], r" c% @: Y8 h
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec: U, j+ r7 d( X/ S, I8 g4 J, J5 G
else wait for 10 sec
+ V( N* }# l: I/ E0 p9 }% l if A_i=A_leave then send to die9 N: m4 p+ `: {; q+ z1 O( Q- u8 t
else inc A_i by 1
( i( H5 X# [) l* N2 n$ Y end2 ^4 g/ e, O( A' u
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,其它按你的 ...
|