|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢* o. L( J& i t4 n( O9 ~& V9 E
$ r ?0 P3 x% f我的问题是,在每个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中的数值,不知道会不会有什么不妥。8 a( }0 [" s* m7 j% j9 h, C; x6 T0 T
4 b9 k R9 j' y0 p% d5 l+ {
begin P_read arriving- o6 W2 W8 \2 R2 A6 ~1 T! p2 O3 F
while 1=1 do begin( I8 S% }; X: |3 I! c( H
read A_tote from "data.txt" with delimiter "\n"3 F- e, K0 O! [' k# O/ C' n* a
read A_time from "data.txt" with delimiter "\n"
+ W. K, B3 J& Q. z7 |0 ^9 W: c read A_leave from "data.txt" with delimiter "\n"
6 B. u% {5 P5 e( i8 \# Q4 X read A_picks from "data.txt" with delimiter "\n"+ U( K8 t/ s2 d- V# F
set load type to A_tote
# g1 f0 f* d3 {/ \* H9 n8 H if A_tote="tote 1" then set A_induct to 1
7 h9 C3 e, F, [) ]8 i else if A_tote="tote 2" then set A_induct to 2
; G* \( W# j4 ^* N else set A_induct to 3 q$ \1 t$ m7 `. U4 Y* Q1 Z
set A_i to 0) R7 b2 z, ^4 T3 ]" O( w
clone 1 load to P_induction- P2 f' N4 \( m8 P* \1 F0 p k
wait for A_time sec1 V. D. } K( Y" c" H( E' G# H
end- V8 ^2 r" I5 V3 t# a( o
end7 X0 n; k2 W8 ?$ ^% [# s/ ?! K6 |
4 X% q) q/ M& [6 y
begin P_induction arriving) W. U' ]4 [8 `
if A_induct=1 then clone 1 load to P_pick1$ l* u/ m+ q K [, ?0 p. |
else if A_induct=2 then clone 1 load to P_pick2
% H% @5 o) a7 S5 K8 k else clone 1 load to P_pick3
7 {5 Y5 ?. Y: ~5 ?" ~ ?: qend0 ^; G0 f8 X+ H) q4 T, P$ _- G
4 o! c1 Z3 A# \
begin P_pick1 arriving B+ P) k/ |' a; Q8 }3 D: B$ i
set A_i to 1( ]3 ~, h7 N& ]1 @! M; ], M
move into Q_induct1( {8 E& S5 T2 e7 X9 Z
move into pickaisle.induct10 O6 }+ v. H7 U0 p+ v) z$ ^
while A_i<=30 do begin
' t/ D5 k4 K0 Y- i2 S+ [ V9 g, N8 W travel to pickaisle.con(A_i)
. b) H, _+ C/ |# }) {, ]) u J if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
0 V/ ?' j" ^% S else wait for 10 sec
! A+ R! A* Y; b0 ^. r6 N3 |" D/ S* y if A_i=A_leave then send to die
I [0 I, `- w else inc A_i by 1& C; J9 [- \9 }7 A% P
end# K3 k7 }$ a% u# {" s% H0 r& @
end
- P' L) a: B6 {: u- M& @7 p% m% O/ x% q: I& s0 ]# m8 J
begin P_pick2 arriving
+ X2 s& k& r0 ^* W/ C2 o set A_i to 11
7 G: i" l* M( d5 G, C0 H6 F move into Q_induct2
0 T& F% ^# E1 A* g move into pickaisle.induct2& k$ p1 f' W! E" Q, D4 v1 S# T- [
while A_i<=30 do begin, U+ I3 o$ H. M& U
travel to pickaisle.con(A_i)5 u9 N! [- P0 S$ {) t
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
' O- m& g4 h% ~ else wait for 10 sec
4 K6 B2 }6 I4 s' |" ~ if A_i=A_leave then send to die5 X J6 L7 S l" I: K
else inc A_i by 15 C3 {2 I" G% E2 ]
end
8 k! k1 m3 o, \. k& J% |% hend: l0 [& t" Y! a9 C
/ Q: `( `" r" b& h# t: d9 M
begin P_pick3 arriving
$ F0 Z6 B6 Y/ W6 S3 d8 H4 ] set A_i to 218 {* b! l! Z; v& R2 H
move into Q_induct3
6 }, ~. T O7 g9 v( C6 n5 K$ f move into pickaisle.induct31 P; G ^% E6 M: [
while A_i<=30 do begin. _/ a. B3 c2 B8 N
travel to pickaisle.con(A_i)
9 ?3 W4 j# X7 I4 d: z if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec6 O/ ]* A0 M& }: n$ H ~
else wait for 10 sec% F9 [# ~$ w Q- T8 I9 O
if A_i=A_leave then send to die; a2 D" {, a( p; H, V( B/ J
else inc A_i by 1
# g$ [6 `/ F, G+ \& b( C end
4 [1 {1 s( A0 Y! [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,其它按你的 ...
|