|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
2 O9 k+ Z+ `4 D: V; F. U" S8 T1 n4 F( J
我的问题是,在每个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中的数值,不知道会不会有什么不妥。0 `8 k3 J, V4 C9 P r( y
/ h& x9 P9 X, K7 u7 ]% d* V2 hbegin P_read arriving+ ?% A! @& \: o
while 1=1 do begin
! I& P/ @/ C2 c( M3 G8 k" ^ read A_tote from "data.txt" with delimiter "\n"& C7 L- F' j4 O0 A* W1 r& }
read A_time from "data.txt" with delimiter "\n"
0 V1 B% j, q* C% p read A_leave from "data.txt" with delimiter "\n"" l- Q6 j4 t4 }5 ^
read A_picks from "data.txt" with delimiter "\n"& A0 k, f6 w. V* }/ r: b
set load type to A_tote" y' M% x4 k2 D+ P
if A_tote="tote 1" then set A_induct to 1
x# K5 P, V( V; v7 K7 | else if A_tote="tote 2" then set A_induct to 2. v; X. R/ v9 N* T
else set A_induct to 3
$ h5 P l0 k1 D* y set A_i to 0( i8 ?: l8 x' f+ Y _4 ]4 j n
clone 1 load to P_induction' Z7 R* }" X- q' P, a$ k3 N
wait for A_time sec7 U# [* g7 G" `$ |3 H
end
3 b) ]- Q) {2 O+ y- X+ ?1 k+ Yend$ s M3 r1 j( d) c: R; Z: f
2 ^. Z6 r0 }1 V1 Y3 \begin P_induction arriving
" P! Z+ Q; J1 O: M) Q* ~; U if A_induct=1 then clone 1 load to P_pick1
7 g/ {% O& G2 F$ e# z else if A_induct=2 then clone 1 load to P_pick26 Y6 d! V8 T$ |9 w. |3 D+ Q$ n. E5 ^
else clone 1 load to P_pick3
* V! E8 n! x9 v- o/ k" D# {% bend
. f, l9 @8 z P. f" `7 e! H, e1 b5 L }5 E
begin P_pick1 arriving0 E Y, g* x. m" L( \$ ^
set A_i to 1& B2 f0 T, J9 w4 |% Z% g9 f
move into Q_induct1
5 S9 i, O3 ]5 u- J: I' f f2 E move into pickaisle.induct1
4 v. |3 }8 p5 f- G while A_i<=30 do begin+ A, n. [! s/ a( w
travel to pickaisle.con(A_i)
* `- @% d& r; t; X0 m if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec" n, M' D% V. @3 A. D6 {' Z7 u2 o
else wait for 10 sec# t% A" H* @& G& Z+ r7 a8 w. y
if A_i=A_leave then send to die
" f% ?2 C4 `& `4 ?# K6 N+ B else inc A_i by 1
& U/ M/ R8 e: S end8 b7 W2 @' h7 r; O5 |% m% N
end
U+ P' W1 t0 W
2 F1 O, }- S0 w4 ^* |& ?begin P_pick2 arriving" S2 j: `+ z( ?. c+ l
set A_i to 11% |. W4 P7 W* a+ u( Q& b# q0 T3 i
move into Q_induct2
6 S9 j+ J$ n$ C. p: s" r4 n move into pickaisle.induct2. Q& r6 R' e1 k N( K6 N0 M
while A_i<=30 do begin8 q0 b+ s" @) R, t1 [: F3 A' R. R
travel to pickaisle.con(A_i)
) B6 y6 a% | R8 I2 k( I' L( ?+ ?! M if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec- |* P7 w9 ^" I9 u( }
else wait for 10 sec
. M# c+ K! N, R/ N. l9 a( Z if A_i=A_leave then send to die8 G3 r) [$ C# k8 ^, C
else inc A_i by 1
& P+ h; v& T' K/ Q) S end
- z+ w; ^0 |- R( cend s1 e: p% c8 o x
3 t( I6 p: B. j1 g u1 w& \begin P_pick3 arriving! k/ s& `) s4 y( D7 d4 O4 F- E
set A_i to 21
' G+ ]% f/ I9 a1 } m0 R move into Q_induct3' D! k: v% s/ j5 q0 N6 x
move into pickaisle.induct3
$ n l0 K, _" k1 ^! r/ k while A_i<=30 do begin+ I! s& D- V1 ?- _( h' g1 c3 M! ~7 T8 r
travel to pickaisle.con(A_i); E6 p" C! D! j) F+ ~) }+ f/ ?2 G
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec' ~* Z& e. p9 ]5 \1 ]3 Z
else wait for 10 sec- P# S9 f7 p) n( _! |9 [
if A_i=A_leave then send to die* g$ ~% X9 `5 G/ X m
else inc A_i by 1; a) [+ @4 x' X: B' u( D
end: r/ O/ |- A( O& |' x% q
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,其它按你的 ...
|