|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢- I( D5 T5 A1 b4 {
8 [& {6 n( J, x! |
我的问题是,在每个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中的数值,不知道会不会有什么不妥。' |* j0 U4 S0 {; ^9 c2 S" J
4 x1 _1 |4 L9 J4 s( N$ [; R; }begin P_read arriving
( S) z0 W7 t6 v( O! K while 1=1 do begin
8 s" x- b) m W: D read A_tote from "data.txt" with delimiter "\n"
: u$ @7 j5 S$ @! n read A_time from "data.txt" with delimiter "\n"
S W' k/ e A7 n read A_leave from "data.txt" with delimiter "\n"/ w2 z, |2 E5 [. i
read A_picks from "data.txt" with delimiter "\n"
1 n! \- \* v- h# H/ @+ \ set load type to A_tote Z% r. v: ^4 K, D3 p
if A_tote="tote 1" then set A_induct to 13 z7 F% t. C5 ?. Q4 j
else if A_tote="tote 2" then set A_induct to 2
4 [% T/ l2 @9 m! ]6 \* @% | else set A_induct to 3
9 N+ ~: W) \, U4 n! x2 m: |; } set A_i to 08 l$ {2 \" |1 M7 ~1 J$ m
clone 1 load to P_induction
# p t- [1 H0 U/ K7 O- ~ wait for A_time sec' A, }6 u) U2 g
end( J t$ N7 r' R0 @7 k
end
% m( \& M0 i2 Q# t7 H, O% ~( U0 L
" I- p- b9 N* [' d, G y) ]* fbegin P_induction arriving7 c; J& M, }& P u; z
if A_induct=1 then clone 1 load to P_pick1
( G2 w- d! ?; j6 j' m, m( g else if A_induct=2 then clone 1 load to P_pick26 \0 P4 V* W! o4 D4 n$ a
else clone 1 load to P_pick3# J9 Y) p0 M* ^# s* p+ H7 U
end
X' E1 l% q3 G" H8 Q$ B0 m" F k8 R* `
5 c9 x" C: a2 c* Q% ?3 l+ ^begin P_pick1 arriving
* r V! ?: T6 B0 ~; E6 h- N3 t set A_i to 12 O* |$ v+ _1 p+ N- I7 M3 O$ M6 z
move into Q_induct1
9 s& v* b! S8 ?; V/ L move into pickaisle.induct1
$ Q& {+ z8 ^2 G" w while A_i<=30 do begin6 E$ I( _/ J" W/ Q- [# Y# _( H% D
travel to pickaisle.con(A_i)
1 u( v; F" V! m5 b( i3 h7 E0 v' }$ } if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
( P8 G q! F0 R/ g5 F$ J else wait for 10 sec& [/ h8 c+ P3 I( R- f
if A_i=A_leave then send to die! H) `5 j% w; T( D$ K: X- E
else inc A_i by 1/ n7 ^; {& J0 S L2 n! n O6 x
end9 Z* M9 ?! v; a4 I$ ]
end9 B+ X$ T _; }# Q
$ r! E) [. U, k8 V, a) Q
begin P_pick2 arriving
( `, G T6 O( W. x" l' l set A_i to 11$ V2 @+ Y* E% y! ?# C$ I+ ^
move into Q_induct2
1 X$ S# [3 T$ l! Y% s5 j move into pickaisle.induct2% ^: G P& `3 `/ q1 V- x+ x5 ?
while A_i<=30 do begin
! P. g- c9 F, Q/ {" r2 @ travel to pickaisle.con(A_i)/ u" J$ k+ ^5 B5 E: k
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec) P; K4 o! C/ B/ t4 U1 F/ J, @
else wait for 10 sec
+ U$ {( ~& F _* @ if A_i=A_leave then send to die
, G: q9 u3 N' Q7 x3 h else inc A_i by 1
/ ]( [; N% N2 T9 e3 U# ? end
3 j+ \) v, u( R X, nend5 s4 u+ J. d; x& B
) w3 f1 [9 W& O$ C: d+ ubegin P_pick3 arriving
+ u7 A$ U- u% E+ f4 G+ S& T9 F( H set A_i to 217 ?" E% ~4 ~2 R& ?7 `
move into Q_induct3) ]% u w _0 L% R5 J9 n" }. j
move into pickaisle.induct3
) Q" b* B7 L9 T/ |$ D# Z while A_i<=30 do begin* s' o7 O1 ~7 a. m
travel to pickaisle.con(A_i)3 G2 w% i, p3 K# J7 H( K
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ P. t. P2 r+ S) a4 Z, I else wait for 10 sec: l4 d6 l# a8 x' N9 M2 f1 ]
if A_i=A_leave then send to die
! F3 R7 E6 S) K* Q9 F) G' o else inc A_i by 1$ m. s9 h+ c, S Q8 F/ \
end
6 V. f" R8 R% d7 wend |
最佳答案
查看完整内容
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,其它按你的 ...
|