|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
& Q; K; E1 o, X2 J4 L! C" t* a% l! |; X) D
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
, M* T' A# K$ Z7 i; C+ n. m) K+ `5 \
begin P_read arriving
! x7 Y+ [+ a2 x4 } X! Z while 1=1 do begin
5 z0 [5 E! D. e9 D* b0 ] read A_tote from "data.txt" with delimiter "\n"# b/ }: K6 y2 a
read A_time from "data.txt" with delimiter "\n"/ i5 Q5 O9 \) s* ^. L) _& O: ^
read A_leave from "data.txt" with delimiter "\n"
( z0 J5 l" ` J* K read A_picks from "data.txt" with delimiter "\n"
U5 i7 `3 `5 U! j1 _0 J set load type to A_tote/ u* Z) X9 r/ y! ~ ^
if A_tote="tote 1" then set A_induct to 1
6 ~9 O- k' M& Z' ~- W/ M( y else if A_tote="tote 2" then set A_induct to 2
9 R4 L+ S. U. s# g$ l! } else set A_induct to 3
8 Y1 [5 T- A. S; { Y set A_i to 0
- e6 P* K. ~/ D clone 1 load to P_induction
8 F' f" Y- y1 ]2 G" K wait for A_time sec9 x0 }/ s3 \3 r$ h+ y! P) E( }* x" o
end" l7 i* A% i! b2 ~1 f
end0 F) f& y+ z1 X) a
' T, \4 Z/ m8 R& ?, q, ]. p/ f
begin P_induction arriving
- ^3 x9 m0 O0 k4 b0 U9 \ if A_induct=1 then clone 1 load to P_pick1
3 ~" w) A- u) q7 f else if A_induct=2 then clone 1 load to P_pick2
7 w! t0 n* f1 \/ D/ A3 U; | else clone 1 load to P_pick3: }0 M# W/ V& B2 j, u; @7 K0 e" ^) U
end
2 B$ \* z1 Y2 l3 P; T3 u- X3 i) @% N3 B) y: p- V
begin P_pick1 arriving
! q4 Z5 b% z: X _ set A_i to 1
6 x. D. Z, y9 U move into Q_induct1$ D: b5 b8 o+ y( ^+ M
move into pickaisle.induct1/ B* Z! p: t/ k
while A_i<=30 do begin
" v, }; I; m* M travel to pickaisle.con(A_i)
5 g4 h. k; D' f3 M if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec5 q2 z8 h7 `7 e! x1 i
else wait for 10 sec
: c. ^9 t' r' L3 R8 U if A_i=A_leave then send to die! O7 {4 H' o' { A% a4 m1 ^
else inc A_i by 14 r( N( T1 r# X7 a% m w2 y
end" Z5 R% e( N. T, b5 P
end' c0 _/ q, N, L" V' ^% E, j3 ?
/ k- V. i3 o8 [/ z
begin P_pick2 arriving+ C. [. U. W5 _: r- }
set A_i to 11% q; @# `8 ?) F) V: U6 Z Q
move into Q_induct2: q' U" w/ S, |8 k% w4 F9 W+ F
move into pickaisle.induct23 W# q. H m5 r' h
while A_i<=30 do begin* X, t/ o+ T" y4 r
travel to pickaisle.con(A_i)$ k3 f! Y9 T1 M' {+ K+ q
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec; ?& t/ Z: D' Z* j/ q) q1 }$ o
else wait for 10 sec' Z6 E! Z* C0 d6 a6 ^& B- [0 z, j4 I; q( c
if A_i=A_leave then send to die
) B$ O& G( u7 H7 w, J else inc A_i by 1+ b8 f1 k2 t# u: j. E
end% H2 b; _/ A+ \
end% r+ V6 D. h( S) P7 K7 ~6 u
y9 h) B) I, R1 I4 i4 @begin P_pick3 arriving$ N$ k# W) V) N" u: S
set A_i to 21; f$ Q( r! N$ X+ E. @. q/ C, @4 l7 H
move into Q_induct3
! s' d3 e: x0 K1 a move into pickaisle.induct3
# b$ a7 V5 W' A$ k while A_i<=30 do begin% x% p, h0 d& x1 H3 j
travel to pickaisle.con(A_i)8 V) N% e: P6 p
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% P4 s7 N( \9 n; X: G. D2 Q0 I
else wait for 10 sec
; b/ S/ c2 U0 f# j- X if A_i=A_leave then send to die
9 `1 _0 h9 V' E) X% l else inc A_i by 1
5 }2 A4 w0 A: W5 {1 \. W6 q end1 _6 k$ D; L5 }/ r/ u) @1 O w
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,其它按你的 ...
|