|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢% Y7 k! R, o& _ X1 T
& `. K; l$ f5 F2 P- I2 {
我的问题是,在每个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中的数值,不知道会不会有什么不妥。4 n* Y3 A. l6 s* H, X" ^9 h
( u% \: y: B# g" Wbegin P_read arriving: [: C& H+ W' Z; W, D
while 1=1 do begin* a- B% Z0 M/ ~# z3 j( Q- C) d
read A_tote from "data.txt" with delimiter "\n"% j% h8 s6 E- A. u# Q7 u+ _
read A_time from "data.txt" with delimiter "\n"
7 ^! ]; X, c& S; i1 ? read A_leave from "data.txt" with delimiter "\n"
+ \( y+ W" S- [# _4 D read A_picks from "data.txt" with delimiter "\n". Y$ S0 n8 E! \6 j
set load type to A_tote
( c) T d- N/ S+ x7 U6 g- r if A_tote="tote 1" then set A_induct to 1: Q! U8 s9 O; e3 M- B2 c
else if A_tote="tote 2" then set A_induct to 2
K, f, G2 e% F else set A_induct to 3 3 C" ?! R) B7 M. {0 Z$ E
set A_i to 0( Z/ n D. Y' Q
clone 1 load to P_induction4 O7 ~% p3 O! ^* \' X5 C
wait for A_time sec: w' |$ o {5 T* R# U
end
' a" a, c G( jend
, v0 s9 p7 B5 P+ b/ j2 N: T6 k: X7 W' m" C
begin P_induction arriving
0 S9 J. ~, m8 V if A_induct=1 then clone 1 load to P_pick1( D7 v2 e" {+ Q- v6 d
else if A_induct=2 then clone 1 load to P_pick2% d# S- d$ ]! l% L3 N
else clone 1 load to P_pick3
3 E0 J7 }5 w! e5 W' j8 N% w5 lend; t- O* @ M; q) b& P6 U9 C
1 {! ]; v& d2 R0 A8 gbegin P_pick1 arriving
4 {' [: v0 ]; v+ T9 v set A_i to 1" L9 T# D1 C; _3 I# A: O" h
move into Q_induct15 z1 E! }. p5 O Y: g
move into pickaisle.induct17 G; d) q! l) x4 w- q4 J5 X7 V5 V
while A_i<=30 do begin
# q# ^/ U/ l- O- F9 g! B travel to pickaisle.con(A_i). M# i9 k, K2 y* H& g
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ k3 Q( ?: F. o) b6 ~2 a else wait for 10 sec& L7 h$ P6 N( ~8 B
if A_i=A_leave then send to die0 K3 u3 G2 a. ^3 X9 k9 H& s1 J
else inc A_i by 1% c: d q# }- u2 L l" E& O
end
) N0 q: R5 s' K. [ lend
9 p. i5 C! t3 I
0 \' g0 m, z# J: qbegin P_pick2 arriving) v" G# `% E0 _
set A_i to 11
# K/ c! L2 _1 s% l4 C, S3 f% m move into Q_induct2
9 e1 \% I9 f% d move into pickaisle.induct2, {6 N' ?1 i7 C5 Y
while A_i<=30 do begin6 ^! D1 b6 m% K3 v) ^
travel to pickaisle.con(A_i)
7 |( O. x0 N4 p4 J$ K if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec/ ^% L; r; B5 x# A3 d& J
else wait for 10 sec1 ~0 j: E! x+ N; j3 i
if A_i=A_leave then send to die
6 [: \# i4 \9 R, k7 Y5 ` else inc A_i by 1% x" h- [% g8 u$ R# o
end" l$ b5 V# t4 |$ J8 \, n& J! E
end3 M, P" x5 w4 z
( X5 z1 T. w5 f' {$ P$ Z5 b
begin P_pick3 arriving3 ]$ L) m5 \0 ~& x+ D( ~
set A_i to 21' V# e; k3 _9 u8 C8 R
move into Q_induct36 H3 ?( B8 A- u9 @. `# {+ d* E
move into pickaisle.induct3
$ y0 @6 d" S6 }+ q1 ?& e while A_i<=30 do begin
" e# f. e# ~' U# y8 r. p0 Y travel to pickaisle.con(A_i)9 E5 T S( u* |/ r( M1 I# w
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
, f* a! o, e- l" P0 e0 M/ k else wait for 10 sec
: U4 {0 C. ?0 h0 \9 {; e0 N if A_i=A_leave then send to die; p0 b- i4 @* i( _- k: o! Q3 j& ~
else inc A_i by 1
& K6 L) f# x+ N: s end6 S2 e& Z/ c* G9 `/ B
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,其它按你的 ...
|