|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢8 K1 s8 e9 ^& x" _1 ~$ }& c
4 k2 ^4 G6 v& } x; o我的问题是,在每个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中的数值,不知道会不会有什么不妥。
; _/ @; R( g. [3 }: z
' o1 E. }5 `5 X7 h, ibegin P_read arriving
6 }( u+ m& e: G0 G4 U$ T1 Q) H while 1=1 do begin
' [/ @; ^ p$ h read A_tote from "data.txt" with delimiter "\n"
$ U( G* S2 p; z: s9 b+ t read A_time from "data.txt" with delimiter "\n"
# ~% q; c! W' }- @& x read A_leave from "data.txt" with delimiter "\n"
1 E: f' h1 T. o% D read A_picks from "data.txt" with delimiter "\n"7 I, b& A: d ~2 m- w5 _6 I) b
set load type to A_tote, h' Y- E7 W- `8 T9 m$ t4 @: u' {
if A_tote="tote 1" then set A_induct to 1! o1 R% ^$ H; m% P/ l
else if A_tote="tote 2" then set A_induct to 2
8 K: k( R! B k% s0 U& H6 U else set A_induct to 3 2 o& Z- K) T1 S) u+ g
set A_i to 0+ ^* B; }) D" U% q3 h! u" k
clone 1 load to P_induction) z3 e. M& i' R
wait for A_time sec
) b- V' i7 e8 H5 | end3 x$ K( D0 a1 q0 @/ U# L
end
% i% {. R& N( U9 b* d- Z/ G/ Y% c* w. a/ }, U% x6 Y
begin P_induction arriving. o7 P; a; \" J% Q* @
if A_induct=1 then clone 1 load to P_pick1# P: d* e: F g7 d! ?6 z4 l2 g
else if A_induct=2 then clone 1 load to P_pick2
! T+ k, c# o9 \% w else clone 1 load to P_pick31 ~8 ?8 a* ^0 `! d" [
end
% l4 \: s: F: R" I1 S! e) u- h) j9 z
begin P_pick1 arriving
. U" y/ C! c2 ~* P! I4 l set A_i to 1
6 @% a; p% _! O/ ~8 h move into Q_induct1
% \3 U7 _% o6 e* M2 e move into pickaisle.induct1
7 t8 w! V* @8 o" s! b while A_i<=30 do begin
6 ~) p0 Y7 Q6 ^ travel to pickaisle.con(A_i)6 ? m1 K6 A5 Z/ i5 V: ~
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec! b' h3 _8 I& |5 ]5 J
else wait for 10 sec
( N: z2 k$ v$ _& q9 W if A_i=A_leave then send to die
, O6 H! U. _* G5 s! u else inc A_i by 1
e N% r3 u6 a) m4 @- \. a$ k end
5 L$ N. O6 P+ e* R5 I _end
1 K* [* d4 [ [; W W
' |+ z' _ o, z( M% Lbegin P_pick2 arriving3 V( E) ?" N* _, b
set A_i to 11
- F0 u; q. K. H( }7 w& U' ^" i: ` move into Q_induct2
' I& }( I& J$ L! X Q move into pickaisle.induct2
$ z( D, {* i+ H/ c while A_i<=30 do begin
- r$ _. r/ [$ w% n6 g& |( R9 [ travel to pickaisle.con(A_i)
( D8 X) ], E; k! d; l }, W if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
* W) Y; o4 k4 b" |- B else wait for 10 sec
7 v6 M3 O. \3 p7 @8 l if A_i=A_leave then send to die
) Q& O% c. C( }0 u! h/ u, t else inc A_i by 13 B$ o. S7 ?( G
end9 S, z: L4 Q# O# c0 \8 E4 s: F+ `
end
/ V: P; F. _+ R+ \3 b6 p3 u+ Y$ H0 w
. L( U; V( L. W9 Q2 i) }! sbegin P_pick3 arriving9 F5 M; n% K" ~( G% r9 h- G, o4 S
set A_i to 210 Z$ _ B/ \4 V1 R
move into Q_induct3$ o0 \/ v# s9 f1 \6 j
move into pickaisle.induct3
7 @. h8 F% x1 `7 r, e$ g while A_i<=30 do begin/ {7 J4 _+ U( A8 K, }
travel to pickaisle.con(A_i)
. l- i) Q: {; F) ~6 Z/ S if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
* A& e. U( r# L( p else wait for 10 sec
* P) T! }9 u& C; s1 h2 J if A_i=A_leave then send to die$ p9 M7 `. @* x1 z) }; d
else inc A_i by 1
4 Y) J( s% l: _. V end2 @' C+ \- Q2 A: x, a/ 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,其它按你的 ...
|