|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢, G |5 M3 R' H( n
' o& c' [! l5 E' H
我的问题是,在每个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中的数值,不知道会不会有什么不妥。# H6 z9 t9 k" L) q6 _
0 R' o) Q* V) h, s! @
begin P_read arriving0 y8 |: I% i) h1 C
while 1=1 do begin/ ^2 z/ y) `1 N8 A& Y9 P( z4 r
read A_tote from "data.txt" with delimiter "\n"1 A6 a: G& t- b8 m2 b
read A_time from "data.txt" with delimiter "\n"$ f! E6 v, A. ~; s% D- l
read A_leave from "data.txt" with delimiter "\n"0 Q! b. a. _0 M2 t- V5 i2 Q
read A_picks from "data.txt" with delimiter "\n"
) `9 M3 r6 D- G8 L0 t' K4 U- T set load type to A_tote) \' J" j3 r# P* m8 k2 t
if A_tote="tote 1" then set A_induct to 12 b A6 G5 l7 a' Z' C! e
else if A_tote="tote 2" then set A_induct to 27 X5 m0 \8 l9 V A5 q- x
else set A_induct to 3
2 G- z" h4 L) w9 z set A_i to 02 x( c6 Y; c6 i1 J3 s; s
clone 1 load to P_induction o b9 [) {2 K7 _$ s
wait for A_time sec
* [8 O0 ~% W. Q" X end- x& T( k( d6 M
end
9 [& d: L& V: l' A5 G$ F8 U2 L: G: ^! n
begin P_induction arriving- W4 T) v# d% t$ V j4 o c& d
if A_induct=1 then clone 1 load to P_pick10 K. y/ C2 I: Z. t! ?
else if A_induct=2 then clone 1 load to P_pick28 p Z- y, O+ }, S8 t2 _! ?- B
else clone 1 load to P_pick33 F; J" ~( p) F4 N0 y4 A% a
end7 k1 f8 s/ Y# F! U
+ z# J9 h2 t* V% d; {$ o, s6 K) ~
begin P_pick1 arriving' g7 w3 o- t c) U% @
set A_i to 1
5 u3 W; g/ E5 |% m! N move into Q_induct1+ k1 E8 g( t# p8 n4 V/ b
move into pickaisle.induct1) |5 t G6 Y) { S+ U
while A_i<=30 do begin. O; G1 k5 x$ R
travel to pickaisle.con(A_i)$ S- t3 V+ k0 Y* ]# G4 y
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec+ o! n; n$ [; @; L; P& J' w
else wait for 10 sec
6 w P! t' M% H if A_i=A_leave then send to die/ C. d8 m& O' W2 T* q, ?
else inc A_i by 10 G' W8 g' Z6 W8 b' f
end6 F7 s B4 O, ]9 A; u6 c3 V8 y) K- ~
end
# Z# ~6 f0 k# W# v" e6 [* g) Q4 J
begin P_pick2 arriving
0 B4 x' V6 i4 ]. F. B+ J( D1 H set A_i to 11
* L* v0 f" k2 U move into Q_induct2
7 W* a; B2 o' _* V" Y move into pickaisle.induct2
# V" |% d) M& B2 X4 P while A_i<=30 do begin+ F, r, R n+ a
travel to pickaisle.con(A_i)
7 B% u5 d: v6 D% |8 c* h) l if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- {0 |4 ~1 _% K$ a( a/ u# E else wait for 10 sec
8 _; o; I8 K, }) R Y if A_i=A_leave then send to die
# W0 u2 J! k( _7 n5 h else inc A_i by 1
" k# Z8 r: E) H' ]6 U$ a; c% Q& V end
- N! v) a" o" Y0 Eend
: H+ R1 d0 `9 m& V$ o$ g( {, d0 ?/ Y9 q' f8 w
begin P_pick3 arriving
% w, |% `! K; d- D% c2 F set A_i to 21
8 k8 w4 I$ O; Y a- C3 H move into Q_induct3
7 w5 l) G5 i* ~+ ^+ G: H move into pickaisle.induct3
9 I7 |2 c, }% T& D, H0 w while A_i<=30 do begin5 `3 F0 J2 Q& K
travel to pickaisle.con(A_i)4 Y3 W3 F( e( r9 _! V" T9 L
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
6 [* V& Z3 B3 j# K- S' L else wait for 10 sec
6 G& O9 F7 i; S. ]) q8 o% B if A_i=A_leave then send to die$ ^7 t9 v9 `# I+ \9 F
else inc A_i by 19 t9 G' `5 W1 d2 a3 s# Y* s# u
end J2 H" Z) i" o. j2 o$ S' ^
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,其它按你的 ...
|