|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢2 F1 ~* o- @! L1 ?5 h. ]
9 W2 Q7 k2 n) b( u2 Y; I' B
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
) Q2 d/ J& D( d, m. K/ K
+ x5 m. N8 r" Y( l4 obegin P_read arriving
8 L% }/ [9 u+ V$ z$ O% _/ e. `: _( R while 1=1 do begin
* _" ]/ J4 Q/ D* M read A_tote from "data.txt" with delimiter "\n"
% z7 l+ b2 i$ e5 z; S5 c& [* } read A_time from "data.txt" with delimiter "\n"' P: {& V6 `, t. F
read A_leave from "data.txt" with delimiter "\n"8 B" M8 h( a. L l+ k
read A_picks from "data.txt" with delimiter "\n"' z m- [- P2 Q2 @) P* U0 r
set load type to A_tote7 ~) U9 o& h' B9 a; C
if A_tote="tote 1" then set A_induct to 1
3 B. @7 O. Y6 o# A# I else if A_tote="tote 2" then set A_induct to 2
' g2 u, b6 e) S else set A_induct to 3 6 c4 I; Y; ?. }. a; X; ?; t; d
set A_i to 0
+ p' ]: q3 A$ F" R* f clone 1 load to P_induction
! u3 e4 Z' B" j3 H8 C7 W6 K* X5 Y wait for A_time sec% \5 W: r8 e0 z+ a5 O8 S9 N
end
* c1 x8 ]% u9 k9 Tend
6 p. E: m! S" t D( V% t. w! `4 H) ~) l! P+ n6 ~# G# C# T
begin P_induction arriving" } F# W* B) w) u) w) k9 Q) v
if A_induct=1 then clone 1 load to P_pick19 {+ p; v! G3 [3 P* O* C( d
else if A_induct=2 then clone 1 load to P_pick2
8 `' j; Q+ ^6 ]3 Y3 D! i9 g& k else clone 1 load to P_pick3
2 p3 _3 [: W& T t; Yend5 D' ]/ {& K! f3 O" \
' x, N9 V" ]9 P7 z3 |begin P_pick1 arriving
4 _* n% l# E/ [, t, p set A_i to 1! Q0 C2 I" U. L: ~& ] l5 c* G
move into Q_induct1$ D$ a7 D6 P: G: P
move into pickaisle.induct1
5 |, l# A8 E2 D5 ]. M" V8 f5 m while A_i<=30 do begin
, a; O) S+ I, M" u7 |3 j travel to pickaisle.con(A_i)5 z5 p) Q. [$ H
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec. ^6 G) c# C* L* ~ z8 [% {0 g
else wait for 10 sec
* g$ D) f8 c4 J& O i7 m if A_i=A_leave then send to die& I; Y8 C% y8 J! R' p4 N
else inc A_i by 1" U( v* }! q: K, r% Q( P
end% f8 h+ m& n! x% A) Z
end
$ @0 X; q* f0 k9 e
, P3 Z$ D5 A u2 X; ]begin P_pick2 arriving
8 s8 C4 o; r& B set A_i to 11
, a( q' s2 H, j V( @$ Q( F# |' T move into Q_induct22 ?( I5 y- D; n( p3 N% u1 ?
move into pickaisle.induct2/ [8 v) `( k5 L w; h
while A_i<=30 do begin0 A8 M8 ]: E* B8 @
travel to pickaisle.con(A_i)3 ?1 i- V2 }% c: v0 X) I4 m
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
1 m' W* ^8 x1 `. c( K3 [( q else wait for 10 sec
0 j- \/ h! ~* K) a if A_i=A_leave then send to die
5 o6 |7 t0 t+ z! {) k4 { else inc A_i by 1
- S! |! Z% n% ?5 K end
# C+ i! l/ B% H* Yend1 n5 d! i+ m/ v. {" \
/ D: C3 @, D8 d1 _begin P_pick3 arriving; b+ r" W/ ?8 ^& h, o
set A_i to 21
) d" v! \( v: a& R move into Q_induct3* T; a! F$ N: X3 j
move into pickaisle.induct3
x* R- M% q& B' G$ ~. x while A_i<=30 do begin
& V1 Y; }; H7 Y# A3 U8 ` travel to pickaisle.con(A_i)6 g# u- ]# X( O4 c! Y2 k
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec! f2 h2 _/ c# U" `* n# K
else wait for 10 sec. w8 H$ M, N( C8 @" q0 P5 F
if A_i=A_leave then send to die
7 t3 w2 {- Q$ V2 q o- w else inc A_i by 1
/ w. Y& p- Q6 ?1 u3 v8 x end
+ h# [* x/ \( l! Iend |
最佳答案
查看完整内容
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,其它按你的 ...
|