|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢" I1 q* j" Y3 @, G$ B
2 E P( O& @/ C+ i" W我的问题是,在每个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中的数值,不知道会不会有什么不妥。
& A7 P r! h- s
, T1 l O: |5 [. ]( hbegin P_read arriving3 j) c% Y2 t& w- t9 L0 U" A
while 1=1 do begin0 @& Y2 h) K, c9 `1 j* Y
read A_tote from "data.txt" with delimiter "\n"
2 }5 S, s' f$ R# Y6 R" H read A_time from "data.txt" with delimiter "\n"
% S" s/ t: F/ L! ^ read A_leave from "data.txt" with delimiter "\n"
, Z3 M; o- ?( H+ }. _ read A_picks from "data.txt" with delimiter "\n"8 L+ m6 }% w' x
set load type to A_tote
0 ^4 e- ?! p9 _ if A_tote="tote 1" then set A_induct to 16 G/ A1 J j G
else if A_tote="tote 2" then set A_induct to 2
f- s, U, i: T2 K' ] else set A_induct to 3 / K- v7 o# |6 F$ V2 K9 F
set A_i to 0
" J- t+ K8 ?# l clone 1 load to P_induction( w. q( W4 {$ n
wait for A_time sec$ f$ z: F$ N L9 J) v- X! y
end* |& Z, m1 t9 b* c8 Q" Z
end# l2 K, y* |5 g6 a6 x7 W
8 p* c( V& ~ y3 m/ G2 n& |
begin P_induction arriving
2 ?7 _! c/ j; l3 k if A_induct=1 then clone 1 load to P_pick1) U" @- ^8 p8 x8 K4 r1 G! E
else if A_induct=2 then clone 1 load to P_pick2
4 j' H( o( J3 ? else clone 1 load to P_pick3
4 g7 y! i+ M6 r8 G3 r; v: Pend
' T1 i1 }0 h- N8 @" r' a1 ?2 J1 z( h! e2 n
begin P_pick1 arriving/ }: ^0 |& B' F0 K) `
set A_i to 1
! Y* j9 Q" x7 t6 Y6 n, h2 ? move into Q_induct11 u- c$ g) t3 j/ D
move into pickaisle.induct1
- G8 f5 j3 o( O9 ?6 L while A_i<=30 do begin
2 X& x6 C) W: J" ]; M travel to pickaisle.con(A_i)
7 i) [! F. W( B( F! L8 y9 h if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
' Y, ~/ [: R& f. i else wait for 10 sec- w- K0 \6 u4 @0 k+ }- C2 O
if A_i=A_leave then send to die
9 {% j8 I5 |0 D0 b+ L% K- s; E0 z w else inc A_i by 1" l* j( |6 ^- S9 E4 o. R
end
* L' g* G! m4 S! E+ V8 }end
: z) g6 M/ x, K, x( z5 K$ j# ^% E& w4 ~# |5 b5 J b! h p
begin P_pick2 arriving
+ x6 P+ x/ M4 ~+ t% K% p6 T% D set A_i to 113 x) a2 f' T% R$ N3 r: U% d
move into Q_induct2! q1 |: g* ^5 S0 Z7 _: t$ g& A
move into pickaisle.induct2- V" z# ~3 f5 O- g8 G
while A_i<=30 do begin! S1 c3 s6 S; ?+ L1 S
travel to pickaisle.con(A_i)/ l1 ~9 F& S k* S+ w
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec6 I# t+ B: \" I* E
else wait for 10 sec
5 C6 d3 S9 L9 Z4 v3 s2 y! B if A_i=A_leave then send to die1 Y7 [: Z* a+ V/ l k* S' {
else inc A_i by 1
+ K7 ^( A( }4 {/ g6 C end
3 M0 ^7 F% Z5 L' Q0 p. ^end
$ q N6 m# t* q: ?$ _* ?' {
- r a; c) d2 Jbegin P_pick3 arriving
$ Z3 D. h2 b" |) S9 f, J$ R& q set A_i to 21, I8 k! S3 L5 |& P U( I7 D
move into Q_induct3
/ ~+ Z9 @3 m4 D+ T9 X0 w$ S move into pickaisle.induct3
2 {- L1 {6 k2 j9 Q3 K/ W! r while A_i<=30 do begin
3 W4 p7 [5 I6 T3 H5 O travel to pickaisle.con(A_i)
+ ~# k* T" O1 Y, T if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 C9 L3 `4 i. B9 W/ [1 _) ^' b else wait for 10 sec `+ c) h9 T0 g0 i! w1 U4 K
if A_i=A_leave then send to die# |& k* r' s; e7 }! p* K
else inc A_i by 1% c' @- a" {7 e3 m0 j) T/ O8 A
end
% b# b9 b" }. e+ n4 e6 ` Dend |
最佳答案
查看完整内容
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,其它按你的 ...
|