|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢* Y2 i$ f! g+ J' G. x# {
G! B0 v8 d, _2 G; L! {- Z# A
我的问题是,在每个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 F. \; j3 l! Y6 H6 C( C2 p) p
& x2 { k9 h! Z- n* Abegin P_read arriving
% s1 a4 _7 B k0 N" A. X8 u while 1=1 do begin
& ?0 x' l6 X5 I) b0 B" Z, _ read A_tote from "data.txt" with delimiter "\n"" Y5 Z6 E2 K5 L5 t% V4 [
read A_time from "data.txt" with delimiter "\n"4 Y6 a/ ~6 N6 L1 S W* o& B; l$ v; e9 U
read A_leave from "data.txt" with delimiter "\n"1 Z+ \% H0 o: v. H, j
read A_picks from "data.txt" with delimiter "\n"$ L- b/ I- d. P1 a
set load type to A_tote
! ~$ Q. k0 l: m8 h, q: E if A_tote="tote 1" then set A_induct to 11 L9 l) z3 v) w3 Y0 p5 K
else if A_tote="tote 2" then set A_induct to 2! _( L! D7 s8 Q0 b+ s# E
else set A_induct to 3 $ ~# t2 R1 {, [, ^
set A_i to 0
a% k3 r; |/ Y, l5 H clone 1 load to P_induction/ V! G8 L) Y, {3 k
wait for A_time sec. {" D: c. e/ J5 v5 ]4 {0 R: r
end$ K2 D" f# d+ {; `+ V1 B
end: d( u9 ] g6 m3 Q$ T
+ o7 T3 t# Y& y2 r2 B9 l# Dbegin P_induction arriving' g2 z2 b' _; A) e1 K* I4 L) d
if A_induct=1 then clone 1 load to P_pick1; N: s! u2 p" V
else if A_induct=2 then clone 1 load to P_pick2! a6 ^- i* x- [6 h) N& a
else clone 1 load to P_pick3
7 y5 [% l' J9 t. u" J0 s! {8 Tend- @0 M* B+ f) |+ y7 W
6 w. g/ Y9 `! O0 I. Mbegin P_pick1 arriving+ j- {" O% f5 l" M
set A_i to 16 O1 w4 Q- T4 H: N, U
move into Q_induct1
+ `$ j3 L1 B2 t move into pickaisle.induct13 h2 e+ w( O$ @+ `4 p6 @! ~
while A_i<=30 do begin
. i) Y% E: D3 t$ X2 G# q- \ travel to pickaisle.con(A_i)
. H! m! L0 U0 e: W4 B' m if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec" A1 Q, F. J$ Y) ?% n# e
else wait for 10 sec2 n. ~; s! W# u" _4 x6 r
if A_i=A_leave then send to die h) e) q/ V" y6 Q+ g1 ~
else inc A_i by 1
- N- e- T! M- ^' q end5 C% Z9 O7 d1 ^- B
end
2 q9 C$ w$ Q( D2 ~7 S/ A
& }/ J2 Y3 T: g) u3 kbegin P_pick2 arriving
' Z5 w. b. R4 X& h! W. u s set A_i to 11
8 H0 H( I7 [3 }) B0 @ move into Q_induct2: ? j6 c, \1 l* \' r
move into pickaisle.induct2" |* a5 c1 r$ o/ k3 e
while A_i<=30 do begin
- W M9 F! f: r1 K+ c& Q) k travel to pickaisle.con(A_i)
1 T- ]" f, d" }; x! k if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec, ]& D9 J/ }$ B q2 } C1 P
else wait for 10 sec
1 F; e2 Y7 n2 E, j' V7 D' H! | if A_i=A_leave then send to die4 N$ C( J$ U" l
else inc A_i by 1! I% i+ I: D2 I& f/ p8 g
end
9 m; y5 e% F! F2 ]$ dend
/ ~8 X% n- n3 F! e& z" K. p: W, s7 Z i
begin P_pick3 arriving
$ t4 m( U6 |) I) n8 P- H. Q. u set A_i to 219 C$ E! H& v; D& T
move into Q_induct39 H) g! U, |; E' j
move into pickaisle.induct36 J# M& @" R3 o* S1 D) e
while A_i<=30 do begin0 s" c8 x5 S. l0 Z
travel to pickaisle.con(A_i); G- F' H6 d" W. i& p
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
# s2 ~- B2 J- U( E else wait for 10 sec+ Y. k6 l/ N" ?7 J- r
if A_i=A_leave then send to die
( e, _, b- j3 s0 F1 l/ g a else inc A_i by 16 a7 R. f- T2 Y
end
c) a1 J# L. [% ]. v: S/ yend |
最佳答案
查看完整内容
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,其它按你的 ...
|