|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
1 B7 [( p- P0 d# |1 i+ Q( H! n2 B% P% y
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
! d2 k- x9 `; Z( R0 ]+ N+ S1 B7 s* x/ ~
begin P_read arriving2 D8 c$ I- ~, n6 F. n. @4 e5 _% A; I
while 1=1 do begin2 z1 g/ Y. p5 r6 E
read A_tote from "data.txt" with delimiter "\n"9 |: x/ J+ w/ \/ m. k# }0 y' s
read A_time from "data.txt" with delimiter "\n" A- G# _ q9 v
read A_leave from "data.txt" with delimiter "\n"% I( O0 l# w' p4 R8 H7 v7 G
read A_picks from "data.txt" with delimiter "\n"
0 Y, S; {9 i6 M3 m: v set load type to A_tote
# V1 t7 j1 ^! I! ^! h' P+ ~$ ^ if A_tote="tote 1" then set A_induct to 1
: j; L) e" y0 ^ w2 I0 m8 m, D; U else if A_tote="tote 2" then set A_induct to 2
- |' L" t- k6 H0 Y" n else set A_induct to 3
: [6 d- D* \( `0 @. Z set A_i to 0
+ [4 t3 q2 Y3 O; m2 x5 [' W# R9 w clone 1 load to P_induction
. E. u) S4 `2 x; J9 n wait for A_time sec
) N5 j0 Q. Y) ?. i1 j+ @+ m end7 o/ V: q* b1 |$ f
end
1 a3 P( @) B/ [# q- F. r8 [% i" Q4 l; R! b; Q0 }
begin P_induction arriving- ?4 n% O$ l1 i V
if A_induct=1 then clone 1 load to P_pick13 ?6 ~* t4 {" }, f/ @( x- s9 \
else if A_induct=2 then clone 1 load to P_pick2
, w$ F# O, j" T) E0 V. @+ x: v0 G else clone 1 load to P_pick3
* N* L# }3 W0 C( D/ a( s# Q8 Bend3 ^4 p' e4 }) r8 G+ ^+ y- T6 A
2 m2 ]; F3 l7 i# r8 ?8 U% E; A
begin P_pick1 arriving
- ]% K+ i5 u% k+ c# w- C8 ?1 |9 ? set A_i to 17 _$ k& D( D y/ K6 {$ Z
move into Q_induct1
& }! O# ?- L$ \- ^ move into pickaisle.induct18 B/ z' c4 u6 C- z: C
while A_i<=30 do begin
P: M4 q5 y7 a travel to pickaisle.con(A_i)5 g: X$ T% i+ {9 ?$ E* P
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
0 ]4 f4 _% p; q# s+ T9 x else wait for 10 sec! q2 ]2 z9 C+ v' C3 W, W
if A_i=A_leave then send to die
& r3 t' w8 `& i3 l' A else inc A_i by 1
+ B# p% G. \( w3 t3 {$ w7 x' k end
2 I: J0 ^6 W- D1 ?$ T/ Y5 I' `end
. j. x: X2 v4 e, C, K& y9 a' R- ?# K
begin P_pick2 arriving
! v, o' M7 Y+ i% | set A_i to 11
, h; d3 A) K0 [7 n5 r7 @ move into Q_induct2
~" v' ] C: T) f0 H2 N move into pickaisle.induct2
\3 \& ^- m1 Q, Z: Q8 ]- e* a while A_i<=30 do begin6 Y& r9 ~3 X8 S/ D& ~" H
travel to pickaisle.con(A_i)( _) ~' u- C* H
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
2 I5 U& j5 |3 n" d' ~" K else wait for 10 sec
" M, H% t0 R2 O6 W$ t if A_i=A_leave then send to die
8 x- N, x' J5 y5 ?; {7 {0 D6 ^; n else inc A_i by 16 C8 X' n% Q/ `, |( n2 A
end
' g. J6 y- U6 V* c1 l2 Cend
0 Q. d) S. m, a) t8 d2 r) a$ }3 L4 R" j+ j' x
begin P_pick3 arriving
9 j8 {. r. O) Y set A_i to 21
; F1 ~6 k8 k1 ?9 ^" G6 @ move into Q_induct3
; f( O) @& Q) Q move into pickaisle.induct38 N" `$ n8 u; n% S4 b
while A_i<=30 do begin( U& o7 L; Z. g& t' m
travel to pickaisle.con(A_i)
2 ]) b) Z; w% C- T if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
/ l7 n) o, g& ^$ x1 \, _ else wait for 10 sec. A' i8 j0 S+ G5 c8 b
if A_i=A_leave then send to die6 `* e2 l9 {/ S& N O/ Y
else inc A_i by 1" a7 o/ w$ y) s8 ^- C! r" _5 y; H
end
1 v8 |: f4 t& c" ~2 p+ Send |
最佳答案
查看完整内容
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,其它按你的 ...
|