|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
! L/ Z. ^1 ^: Y# d8 O
# K, L' J5 P$ S2 C9 c) Z我的问题是,在每个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中的数值,不知道会不会有什么不妥。# G0 Y! i+ K) r9 `( b0 y# ]
& ]! M. W; A! X# d1 {6 Vbegin P_read arriving# A/ t3 }- ^' J7 o- `
while 1=1 do begin
$ K* B- p( K& Z7 `( q read A_tote from "data.txt" with delimiter "\n"
q7 Y2 p* L- j* i! r& b+ B read A_time from "data.txt" with delimiter "\n"& H5 V* h! q: [; C
read A_leave from "data.txt" with delimiter "\n"0 P' A0 e9 j1 Q% ^$ Y, |% | ]
read A_picks from "data.txt" with delimiter "\n"
' B; L7 [. ~! S/ l3 q7 _9 h0 k9 d set load type to A_tote3 Y, q. l$ E9 a
if A_tote="tote 1" then set A_induct to 1! X1 v3 \( {( U( a& j( `
else if A_tote="tote 2" then set A_induct to 2
/ y/ `. C0 ?2 y+ T, U% o4 l; G4 c% F else set A_induct to 3 6 s3 u+ T# S/ s/ M
set A_i to 0) W- P1 a; \( b5 j h$ ^: D# ]
clone 1 load to P_induction- Z" U0 v, ]. N9 _7 `9 H& ]
wait for A_time sec! ^& F1 s5 I* ]+ u
end
' V E* f$ r2 A. Fend
0 O: ~$ w" | x Q1 ?8 |/ U/ q, v$ m$ q/ D$ q
begin P_induction arriving
- v8 u% }2 O4 ^% ~1 u1 R4 t if A_induct=1 then clone 1 load to P_pick1
0 c& ]( T3 h7 G2 j else if A_induct=2 then clone 1 load to P_pick2) t5 w9 ^( X' J6 k" c5 i9 ?* q; M
else clone 1 load to P_pick3$ u2 E9 H0 s3 W% [' y' U# S) L4 C
end
- V; ?) ?+ H5 w3 Z' T" ]8 k
7 \& V- \1 J% v! t9 P+ o2 Y" @! F8 F9 ^begin P_pick1 arriving* Q. Z+ R6 n0 x/ @1 z' y
set A_i to 1% v! c+ _: X+ w6 A' g
move into Q_induct1. ]# Y" d8 `; x
move into pickaisle.induct1
1 N" c5 G, E7 t while A_i<=30 do begin
3 I! R/ J4 F8 @! O% t3 h+ z8 X9 i* v4 Y travel to pickaisle.con(A_i)
( [% Q1 p2 Q' p; `8 j; J1 w+ p7 s2 ^ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
/ J0 g1 O. X! K/ }1 J else wait for 10 sec
3 m+ ]( G; v8 y5 l) L% W2 K- X if A_i=A_leave then send to die7 w3 O% q( v- ]* n' h) M! ^
else inc A_i by 11 V9 J" B% \: d
end
4 A7 q, z9 i+ L) w6 ^3 f$ W- O( Qend
$ u9 I: }, V/ t9 l% e
- e, v) U) U$ j9 t; R8 Ibegin P_pick2 arriving- ^: b. r/ r! |7 I g5 N. r5 m0 O
set A_i to 11
5 n" |: C m4 ]$ ]6 M: j, F4 c move into Q_induct23 W& R/ B# b3 q! Q4 `7 ]- Z* L
move into pickaisle.induct2- Y, u8 ~% j1 \8 g N
while A_i<=30 do begin8 X2 O1 W$ ~* o* S' Y
travel to pickaisle.con(A_i)" }) ?$ X( B w/ r& i' z7 J
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
8 y/ N9 P7 n6 u4 B4 a else wait for 10 sec
7 V' d' [* w. a! E if A_i=A_leave then send to die) x# R% y% i) |6 V
else inc A_i by 1
/ O; E, N# l) d: o- Y2 W4 Q end
' K' w% U* X1 U8 ]9 ]% y% O! Z& |end/ e; o. e$ ?! }4 _3 J7 V
( p8 e/ r0 \$ T' P; N3 S& Ibegin P_pick3 arriving
% @8 ]# P+ R( I" I$ ? set A_i to 21
d( K% T! Y5 n move into Q_induct3$ M7 e/ N1 c: f! V9 J A; \
move into pickaisle.induct3/ O5 r B6 l1 J
while A_i<=30 do begin
# |+ d% d! B m" J% c9 ^ travel to pickaisle.con(A_i)2 Z& O- i1 w* P9 L% T/ P
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- }" I& a5 l& s8 O else wait for 10 sec# L* u( H& b4 N: y8 F" K
if A_i=A_leave then send to die) i; c; G' L) p, n$ r
else inc A_i by 19 M5 t2 a- [- j* y8 q( \1 M9 p
end1 X* N: v$ ]1 c0 l$ }, b8 d
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,其它按你的 ...
|