|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
3 o5 \' T: z, X5 [% r
5 n: [8 p% c' n- W& N我的问题是,在每个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中的数值,不知道会不会有什么不妥。! w* ]5 ]% C. I
8 _0 `2 g$ T# p- [% s
begin P_read arriving& K, o |( m- k
while 1=1 do begin
' O5 O w u8 @4 A* q read A_tote from "data.txt" with delimiter "\n"
8 D8 F# j7 x8 |, ?; \ read A_time from "data.txt" with delimiter "\n"! i2 ?1 v9 \& l( p k0 J. s
read A_leave from "data.txt" with delimiter "\n"0 q4 `' g8 g( P9 ?7 v N
read A_picks from "data.txt" with delimiter "\n"; Q4 _) w9 ?* }4 H6 |2 S
set load type to A_tote# i/ \: Y( _/ A5 y; K. D8 \
if A_tote="tote 1" then set A_induct to 14 S* ?+ R. i0 M, s8 @" U
else if A_tote="tote 2" then set A_induct to 2
" X' X: X8 V7 o+ ]) O* B6 M$ ] else set A_induct to 3
1 M; r1 A9 L8 K) ?* p set A_i to 00 R6 a6 o. Y; }. x7 \
clone 1 load to P_induction7 @, F- [4 u% J9 A( }
wait for A_time sec
: o) l/ O: ~5 x5 X1 r/ [ end6 {% _1 P: ?# i8 s U
end
, ]4 E6 `% T& l' y ^3 y* k
! V5 t4 h# l E% _( }# mbegin P_induction arriving, b6 y. l3 b# c# o% A% _
if A_induct=1 then clone 1 load to P_pick1% x/ g( V7 W- e. x7 E! U
else if A_induct=2 then clone 1 load to P_pick2
! I+ w- v) |# n9 T- L8 o' i else clone 1 load to P_pick3
& _9 D4 t6 T' g$ D0 y( cend0 s7 p) Q+ O+ }! f1 _
+ n8 ~6 ? D* N5 P! g9 Qbegin P_pick1 arriving
0 n) {1 E4 M. O set A_i to 1# ?; j: G4 E1 R6 K: ^
move into Q_induct1- Q; Z6 I& n' [6 L
move into pickaisle.induct17 y% d) Z2 E t( C I' W- B7 f
while A_i<=30 do begin3 g6 {" `. L X; W& [; y' d
travel to pickaisle.con(A_i)- c* Z+ N+ t3 Z6 h7 j* ?
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
8 q. M& U; m' o else wait for 10 sec
8 h3 I, X& k! P' l if A_i=A_leave then send to die; F% E6 |$ x- s: T3 ~/ `: I
else inc A_i by 1
* s3 K7 y; j ~- F2 j) V. f end# ~& ]; I Y+ _, @% g( j
end; `- H) L, q' j8 A2 H# `7 T
0 e$ C: P9 K/ Q9 k& K
begin P_pick2 arriving
6 i. [$ T/ ~1 J0 M7 C D" @ set A_i to 11
G, `2 i2 V$ ? move into Q_induct2
% x( U3 \# V) b9 S; h+ b move into pickaisle.induct2
3 G4 {' L7 L( o# _7 C+ J: P while A_i<=30 do begin0 l) ~5 c4 q s4 x9 W
travel to pickaisle.con(A_i)
3 g' g' \( S, _3 P4 q: { r0 ~ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
/ Z/ R5 x0 Z; D6 s0 h else wait for 10 sec6 U8 ]7 S# ^6 A: x$ f0 R5 ~+ ]
if A_i=A_leave then send to die C* e6 X; T8 i/ G
else inc A_i by 1
/ E0 Q; f3 C A6 @/ G. K end) i" d; N. i3 L6 D6 ?
end3 u( v6 l w0 ?/ ]3 Q* K) ?
. V$ C' V+ O8 v
begin P_pick3 arriving9 Y' F/ R, N% n' D7 }! y G
set A_i to 210 Y7 u- m. l& c# ?. y; `9 e$ H, x
move into Q_induct31 g4 Q8 k( \+ Y7 b9 M9 S
move into pickaisle.induct3* p( W" Y! z' W: ^+ d) y
while A_i<=30 do begin: }1 |2 w- f7 E6 W# C
travel to pickaisle.con(A_i) H( [3 y5 S9 _ p/ | y# {
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec' i p) u) p* N+ h. x+ x3 x
else wait for 10 sec( v2 E1 S l/ \. C
if A_i=A_leave then send to die
, O4 F& s6 Q4 e; S1 e/ X! ~. } else inc A_i by 17 D9 F4 W# m6 V# R
end
! G2 c9 K, n# b0 G! L1 lend |
最佳答案
查看完整内容
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,其它按你的 ...
|