|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
# X; G: x- D3 k, s! c, b0 H4 U- x# T3 Y: o, I/ p
我的问题是,在每个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中的数值,不知道会不会有什么不妥。7 _6 v N% b w
. H; C1 m4 c! c; L, d N2 Obegin P_read arriving3 m8 d: c9 K* U8 j) y2 ~
while 1=1 do begin& |4 }; g+ U6 f, p8 D
read A_tote from "data.txt" with delimiter "\n"! h" `- C5 ^/ K. R- r+ Z9 }7 ]
read A_time from "data.txt" with delimiter "\n"
0 v6 U7 X3 x; h& y' ? O read A_leave from "data.txt" with delimiter "\n"
' }* u. o) ~3 d) g read A_picks from "data.txt" with delimiter "\n"
* o3 n3 A% \% m set load type to A_tote
. B0 `' Z& v4 K% U3 c4 v if A_tote="tote 1" then set A_induct to 11 t9 c& E% w; e- s0 Y+ q1 {+ Q
else if A_tote="tote 2" then set A_induct to 2
2 h9 e7 D) C1 |- s else set A_induct to 3 3 s: ~4 W4 v% d2 l) l4 o6 `# H
set A_i to 08 F; |: r' V# v0 S/ v1 m$ U
clone 1 load to P_induction( T$ ]) n+ K, E( K9 E9 V; m7 M r; g1 q
wait for A_time sec
4 u$ Y% g! G& ~/ P5 E$ J) E) c2 Y end0 B5 a& N" {/ E/ f: |; j9 Q
end
; Q7 K% @' g9 ?3 Z. h5 S0 c( b2 L8 B3 J! w4 g
begin P_induction arriving
# b; a' L% ?& v4 G7 Q if A_induct=1 then clone 1 load to P_pick1 e. L( x* K/ k7 W: |8 q8 k
else if A_induct=2 then clone 1 load to P_pick2
5 @" O2 O5 {4 l3 i4 _/ L/ U0 O else clone 1 load to P_pick3
' ~ V, n7 V3 E9 p& S, L! jend
& @; T: e" l' ^& \1 R; s0 n6 _8 _7 Z9 v8 N/ e0 Q$ m$ }9 {. b
begin P_pick1 arriving
. g* Y+ G6 T2 r' s5 l6 [: b set A_i to 16 T2 B' J9 E9 t0 X/ G! F* w0 H4 e
move into Q_induct1/ U" c2 Z* ]9 r
move into pickaisle.induct1
4 j9 P. B3 X0 e4 d/ { while A_i<=30 do begin" V9 V% V7 L' s/ | P! t% ]
travel to pickaisle.con(A_i), i4 J9 B7 @5 n) I2 R5 b
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec, r7 G" D3 m$ y8 O3 q0 s
else wait for 10 sec
; }) c3 D3 l6 ?1 l, @1 R- m if A_i=A_leave then send to die
; @4 ^- M! V# k) V# l9 X( C else inc A_i by 1
9 c+ S) _) {7 V7 ^1 P0 f end" q1 ?% w8 _0 K5 @; ~( H
end
' Y8 a5 y/ \6 s: v- {8 P8 Y
' Z* t0 P+ A0 H dbegin P_pick2 arriving
- e6 x0 B. O! r/ p' n set A_i to 119 `$ B3 W+ y+ `
move into Q_induct2- j. B; H) {2 |0 B
move into pickaisle.induct27 }% c9 O5 @) |) x
while A_i<=30 do begin
& \. a% K# h+ Z; d! u travel to pickaisle.con(A_i)
) Y/ y3 t0 F4 e5 {& V8 t if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
' Z5 {. Z1 c: y0 o4 q1 @) I else wait for 10 sec- H4 A2 |0 d$ ]/ ~: t
if A_i=A_leave then send to die0 |& t+ O* a7 Y$ _! a
else inc A_i by 1
- N- L' c. I+ |! b+ O/ G f, D end5 l2 H [% m Z3 O8 l$ R
end
6 j) H& s$ G8 K/ u8 ]( z
d9 E! d3 O9 A' R( r& m6 Ebegin P_pick3 arriving$ e8 `5 `4 O/ r1 w2 r3 n
set A_i to 21! o. e2 ]* {9 R) s# S" V; ~
move into Q_induct3# m5 r, G5 b& i1 ?' B: J
move into pickaisle.induct34 l! _8 t; B1 [* M/ T
while A_i<=30 do begin
& p/ N( Q4 \4 d7 X4 m: x" ^7 \ travel to pickaisle.con(A_i)
E2 C+ |+ W$ f if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec6 t! k8 `% r1 Y6 K/ F4 z8 {
else wait for 10 sec, z; y' b- B. i! W2 h
if A_i=A_leave then send to die
9 o# s: p6 w% ?0 J0 S, B9 R& o else inc A_i by 1
8 g. ~& B6 k, V/ @7 ]& R# B end( e3 J: @/ n( _
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,其它按你的 ...
|