|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
+ u/ q5 b6 H: ^' L/ L7 }: p5 R! R k$ h1 P p, q! [; L8 m) K8 k
我的问题是,在每个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中的数值,不知道会不会有什么不妥。2 e( D* v v5 A0 r7 L& g, e
; y9 a* l" {7 Q& q1 A: I2 z3 G( ibegin P_read arriving5 [+ ~9 c6 u* N6 E; I& o
while 1=1 do begin
* Y- \: y: I9 y# }- n* K read A_tote from "data.txt" with delimiter "\n"
j" y8 Q( j" b( u read A_time from "data.txt" with delimiter "\n" M& ~6 M a# U8 l1 f/ T
read A_leave from "data.txt" with delimiter "\n"
/ k; H; d& s) p+ A: N. {6 @ read A_picks from "data.txt" with delimiter "\n"9 u# B F4 O! K9 @9 n
set load type to A_tote
1 [1 t$ o, Y5 D8 [ if A_tote="tote 1" then set A_induct to 18 ]' Y% T7 ?4 s0 i* l$ T' a! K
else if A_tote="tote 2" then set A_induct to 2& J" O1 n R& j& Y
else set A_induct to 3
- ^0 ]+ W* @0 Z3 x set A_i to 0" v: I$ `% ?( x
clone 1 load to P_induction3 {' i7 G# A! A
wait for A_time sec5 F/ r8 @: s$ |7 L/ @& c' E# M
end+ ~8 A( I" g/ D& P5 b" e2 Y
end I1 L* c. ] m( O. o1 s% N
# w2 H; Y5 T. X5 U# Q) c
begin P_induction arriving
- d9 b1 y) ]0 t# s8 p5 X if A_induct=1 then clone 1 load to P_pick1# c; o" ]1 J* ?$ L2 Y
else if A_induct=2 then clone 1 load to P_pick2, S3 N$ c$ P/ C4 l9 [
else clone 1 load to P_pick3
4 g4 i6 o, d; l6 w/ h: B% A5 jend, l0 W3 G; `# u. _$ D! q
2 J! r3 [, ~! U7 H( W( d7 i0 f
begin P_pick1 arriving4 O) B+ L8 N/ r/ O$ N t1 x0 }
set A_i to 1
1 k% @/ p$ c( g4 r$ [ f/ q move into Q_induct1. x) k, L1 Y. N; D! z
move into pickaisle.induct1
' Y9 Q9 \6 G5 m while A_i<=30 do begin$ x i1 }- B4 c7 m3 D' `9 A) Z
travel to pickaisle.con(A_i)
( |8 J! c' O# L if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec. s% K& I* m6 p6 ]& V
else wait for 10 sec! S5 {6 }( ]* Q, \9 E
if A_i=A_leave then send to die
# O6 a3 v# J& s& e else inc A_i by 1
# y$ s* j% `( j& L end) V1 |, i' g- s. s
end
$ z" y: `# F; J$ F* u
' _- V, a1 a, ^; O0 K- R W! }/ fbegin P_pick2 arriving5 n) L) D) P2 O9 K6 P( k$ ~5 c
set A_i to 11
) {3 h9 n0 y Y4 i# A/ I( k move into Q_induct2
& e# D* D1 c O1 E5 V3 ~. [ move into pickaisle.induct2, a5 K, \" t+ C8 J
while A_i<=30 do begin) l' o$ m9 f: C! b' C4 O8 T1 h
travel to pickaisle.con(A_i)
( W- N2 X' F% ~& k if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
7 b$ p% \& D9 E4 P5 B! ~1 I H else wait for 10 sec; S) E9 w. B1 K4 [
if A_i=A_leave then send to die
4 x, G7 S' r8 J& M, e else inc A_i by 1
+ j/ e& G2 g4 P( U5 G; o8 o* _ end" Z. x$ a* f* C. M" `& c
end
/ p$ ^: K4 t; j, Y5 g/ e9 U
% Z: k8 n: K: C% _6 }begin P_pick3 arriving
5 R) e3 S, Q) R) U) y/ o2 c set A_i to 21
[' @0 X5 K- Z$ Y6 i2 _ N5 n move into Q_induct3
) O4 I: F; f9 }% m$ B8 d8 O* u# U; f move into pickaisle.induct3
5 K$ |4 f% R8 y6 o6 y3 Y% s while A_i<=30 do begin
( f9 g$ M( g4 s7 K' I& A travel to pickaisle.con(A_i)
2 I" v4 J. m0 ~0 Y if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
) e) d# x% G- l% a1 T else wait for 10 sec* }8 Q& c0 W9 z& N. R
if A_i=A_leave then send to die
5 m( K$ Y$ e- M3 [ ] else inc A_i by 1& B- X# w( {: T1 m+ V2 s p. U
end
5 u1 j% B# j8 S3 [# z7 o# F4 hend |
最佳答案
查看完整内容
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,其它按你的 ...
|