|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢2 Q# I- h6 {2 A+ G* |# n% ~
( E! \, U$ U8 E: O5 w( W
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
6 R3 g- Z+ R4 C9 ~; [' k* m
; D- E2 b% j Q, _; gbegin P_read arriving
6 R% r# d0 @4 F0 }" a, s* d/ N while 1=1 do begin
3 B; ^" Z% J, f5 X/ W, t read A_tote from "data.txt" with delimiter "\n"
( W9 E- `" x/ a& S9 }: M read A_time from "data.txt" with delimiter "\n"1 N9 r9 w4 F( c( u1 }
read A_leave from "data.txt" with delimiter "\n"+ t; C, h, G+ L" b
read A_picks from "data.txt" with delimiter "\n"8 A+ M4 G, N+ K6 x
set load type to A_tote, c- v* c4 l# ~
if A_tote="tote 1" then set A_induct to 1# r n0 X$ u( l# d' Z# @3 Q
else if A_tote="tote 2" then set A_induct to 2
2 Y# F8 a; f- n) O, p4 m else set A_induct to 3
: Y/ _) ~ G( s0 r set A_i to 0
$ A" M, Y; S$ B) Y clone 1 load to P_induction; H/ Q0 n( u2 F2 H3 P
wait for A_time sec
' F- j! f' _! ~5 { end4 }* R: R- p1 x& z: c4 A& U: _
end: O' Z |* H5 [) d! V. `: I
Z6 } h8 c) ^* m" `3 {
begin P_induction arriving9 |) \. ]. O9 z8 D K* U0 U' C
if A_induct=1 then clone 1 load to P_pick1
' K3 N1 Y# b( ? else if A_induct=2 then clone 1 load to P_pick2
7 g' B& v* D5 A2 V else clone 1 load to P_pick3; N, e* L! U' L, O) X
end
; n4 e/ c6 Y, W, L" q& C3 |+ o; {+ h% M
begin P_pick1 arriving
6 y0 t2 w, }- B8 f6 Z2 J; } set A_i to 1 e5 }$ y' G, F& j
move into Q_induct1: f$ X7 j& Y2 K- O" V% b8 e7 K
move into pickaisle.induct1 [1 H4 [: T4 ~% l, b% A
while A_i<=30 do begin' H) u9 G) }" W- M5 A( v: O
travel to pickaisle.con(A_i)( G6 j+ b% O& U* t/ [9 X: v
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
( ]' y! I5 @+ e1 F7 @% x5 W else wait for 10 sec
' ^8 F5 z! t/ k if A_i=A_leave then send to die
) Z C8 W$ \# w2 H ~3 A( w else inc A_i by 1% T) V0 a T" \$ ?: u# x8 C# V; C
end; o9 z$ T" J" ~& y: ?& G
end% B- j A+ d" b$ \, u) {" l I8 \
2 t4 [2 k1 x2 \6 A% k( X
begin P_pick2 arriving6 {9 u6 m+ K9 n+ C$ Z" |- P
set A_i to 11' \5 i0 x8 O5 E% U
move into Q_induct2
" @% z" U9 }* j move into pickaisle.induct2, E5 b7 g0 k; {: E: ^- a$ B3 M
while A_i<=30 do begin$ L+ U! x. Y6 }3 c% e
travel to pickaisle.con(A_i)
9 m2 E: k6 N* D4 I if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec4 y3 @ E K4 P9 m5 s
else wait for 10 sec
8 k$ n! r4 D9 _9 j if A_i=A_leave then send to die9 I3 X2 ]# c' z& \" T4 n0 d
else inc A_i by 12 ]; o6 [& m9 m% F
end* e( k/ A+ Q+ v8 F3 ?# g( S& w
end
+ ^& {" |+ _ x# m0 b/ ]7 ]1 |8 Q, j% N6 ~" }, @" C* o
begin P_pick3 arriving5 H ^$ ^9 h4 e t
set A_i to 212 A- @/ H$ I1 b* I; R
move into Q_induct3* t! l' \5 b3 V( B
move into pickaisle.induct3
3 z; b" ^4 E& a# N9 D$ m* y while A_i<=30 do begin
O+ m l; B) Z, l' w( B5 B travel to pickaisle.con(A_i)
& h* Q$ E3 b/ N- Z5 B if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ U+ z. h5 j7 x/ l else wait for 10 sec# x; Q8 F& F* H: ?
if A_i=A_leave then send to die; R/ v' k$ F9 C# M5 }3 \; ]
else inc A_i by 1
& Z, U0 k* O$ E! e6 f" X end0 A' c9 ^) U" f) T! F$ Z) J
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,其它按你的 ...
|