|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢& ?$ J5 y( d( N$ e" C
' }/ B! s) P. n; i
我的问题是,在每个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中的数值,不知道会不会有什么不妥。 F# t7 ?+ H$ g# j- e+ P0 G# h; n# z9 J, ^
2 a4 G+ N, n! ?) H& H1 @
begin P_read arriving
6 m4 D' n" c. q7 C/ U while 1=1 do begin0 R. e7 z% H( A7 E4 ~/ \
read A_tote from "data.txt" with delimiter "\n"
& d) \+ z/ ]) Y% I6 u* c$ E* w read A_time from "data.txt" with delimiter "\n"
& e1 c/ [+ {$ T% ?" k1 j read A_leave from "data.txt" with delimiter "\n"
+ p5 j. Z, J6 w6 i; S) S: A- [ read A_picks from "data.txt" with delimiter "\n"
) V; E3 M+ v$ F8 c set load type to A_tote7 H! f4 q# u7 U! U4 I: @. Q
if A_tote="tote 1" then set A_induct to 1
* D W+ V1 {2 z' r3 X! p else if A_tote="tote 2" then set A_induct to 2
! q) ~- Y( j8 n) p0 _) H8 Y else set A_induct to 3 - E) C% ]- Z5 S+ w3 y$ G4 k9 B6 m
set A_i to 08 n* Z( L* G2 G( j
clone 1 load to P_induction
" ?% `( J: t3 K- s! ^- ` wait for A_time sec2 w$ I2 F$ [9 e" l! |
end. [5 C" d0 x! e0 G0 I! S9 l. o
end
) M- D" v. r; J S$ J, o+ k }; e& |) f8 H
begin P_induction arriving, K8 ]& P2 i. f$ S9 E
if A_induct=1 then clone 1 load to P_pick1
A/ u9 \& x. c/ B$ S9 r: y" H( W else if A_induct=2 then clone 1 load to P_pick2 o3 v# K0 v/ Q8 _, |& [/ o
else clone 1 load to P_pick3) E" G) {+ `1 S/ D1 d6 @
end
, V4 s( G/ U. g* e& J% l3 o. {; U' f& Q- M4 D% J
begin P_pick1 arriving
5 R, t& N( p" `* G9 h7 T) P set A_i to 12 U* N$ l9 f. N! p4 t1 S1 h& M3 e
move into Q_induct1; @ s5 n) f# F' M/ h. b1 ~* I
move into pickaisle.induct12 F% t* g% C# @* Y* z! j4 ~: y: b
while A_i<=30 do begin4 D7 V. i: }0 \/ _, \9 c
travel to pickaisle.con(A_i)5 {8 r) _* P0 o5 n5 t4 ?# k) {3 G
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec) k4 @, ~& h5 I7 g4 o( W
else wait for 10 sec$ r+ \4 q, e ^- w7 A g
if A_i=A_leave then send to die
% l$ f: {5 w; u# Y, E- S- x else inc A_i by 1
5 [/ @, e5 e' x$ X; |. g end
, V* O7 l' W, f9 O, mend6 |% P$ n8 K) ^. \+ N4 N- i8 [) T
: Y e, I5 [9 _8 c! U/ z& b6 L
begin P_pick2 arriving
" p) h! ` } p set A_i to 118 `0 s( E* _5 y: l
move into Q_induct2) d( x. ^0 d2 \+ u2 V
move into pickaisle.induct2
8 B; ^* R* d7 W! j while A_i<=30 do begin7 X! U- L* J" g4 `
travel to pickaisle.con(A_i)/ b E. h# l5 r3 e6 ^7 w0 {7 ?) Z
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 Z! {5 l( e7 _- ^
else wait for 10 sec+ B% z2 S9 G4 b% k: Y
if A_i=A_leave then send to die( D/ m# Y9 M3 o8 f I8 n8 P
else inc A_i by 1
7 T8 I5 N/ |- V8 J6 Q end
. \$ G. A) j1 @- Q% Hend
3 A6 f* ^: j+ z: A0 j, L" \- _9 ~/ @2 J2 t8 X
begin P_pick3 arriving, M- o; W, n: @* Y" N
set A_i to 212 u; m& \: z5 b1 A9 `
move into Q_induct39 N/ M3 |3 b/ \% w6 W
move into pickaisle.induct3
; E" ^; n+ ^( w( P0 c* |3 Z- V while A_i<=30 do begin- P- y4 c; q! o1 v7 o2 t" p
travel to pickaisle.con(A_i)) C. e/ S. i( R7 `) ]* m$ } R
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 y# Z& t7 k7 }# \5 b6 i
else wait for 10 sec7 |. L3 \" J8 L4 T' Y6 C) ?" ?
if A_i=A_leave then send to die/ @3 \4 [. \- l
else inc A_i by 1
, K1 e6 I2 Z* D1 V: M: z end
: y6 _& S/ o& u1 n) j+ R6 tend |
最佳答案
查看完整内容
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,其它按你的 ...
|