|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢8 ^2 x; t( K% Y( r2 g0 ~
3 [- Q0 C0 T2 a+ 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中的数值,不知道会不会有什么不妥。( s" ^* V3 w" c! w' H
3 n& Z1 @, ]3 c. n8 m2 P. }" D) K
begin P_read arriving0 [% y% N7 ]1 Y$ Y$ H
while 1=1 do begin+ y! B0 g' u, k! ?% O! `$ [
read A_tote from "data.txt" with delimiter "\n"
- ]& {' r: O" q" l* `" F4 b read A_time from "data.txt" with delimiter "\n"; x8 _# o1 C1 z: r' z: F
read A_leave from "data.txt" with delimiter "\n"
4 [2 k( S% A+ h: m/ ?% d read A_picks from "data.txt" with delimiter "\n"
7 q) ~+ Z' W* \' b0 i5 }. H set load type to A_tote
0 v: B: H: _) y1 n! a if A_tote="tote 1" then set A_induct to 1
4 L6 x% \0 ~ e4 C& ^7 k/ s z else if A_tote="tote 2" then set A_induct to 2
% r6 l s0 s; t+ P4 O/ U else set A_induct to 3 9 X; n8 ^ M7 H6 K% ?) Y; m9 t. {
set A_i to 0& d5 @. t9 T4 D7 A4 V4 u
clone 1 load to P_induction
7 c- N- G3 p# V wait for A_time sec0 ]4 n3 N/ @: N
end
% ^1 p1 [( N' v" V+ O! K fend) u4 y" z- `" z2 R) L
1 g; V; A6 C( x2 j9 D, l
begin P_induction arriving, M5 x- H$ W/ c- u& N
if A_induct=1 then clone 1 load to P_pick1
2 J$ b/ w8 b. N! k else if A_induct=2 then clone 1 load to P_pick2
# A& a+ i/ c, A) } else clone 1 load to P_pick3
& E: `5 v8 [$ [& _8 b# r+ bend( s8 X2 v- k1 R
# ]# V7 z: N$ m
begin P_pick1 arriving* _* }9 N5 [( T7 A @3 F( l
set A_i to 1* G/ X1 a; m# s; P0 d" e2 y1 \1 m( B
move into Q_induct10 u- H, r2 p. o8 F' T7 V
move into pickaisle.induct1
* O7 g# R9 ]6 u I6 E while A_i<=30 do begin* w$ ?& w2 Q8 N x
travel to pickaisle.con(A_i)) p/ ^* |- q6 Y$ k H: k
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
) {1 z" Y: U4 J$ D else wait for 10 sec: m, D7 v% A9 ], u( S! V8 T
if A_i=A_leave then send to die
' P- O2 c6 Z4 A8 R/ c" E else inc A_i by 1
- n1 _& C% k: r' h. C end
" S- E' x- ?$ D a. M4 Q* U: v& Q# qend
' g) t: S/ o6 Z) e( O* b+ B
Z3 P( b6 I8 _) E; n7 Vbegin P_pick2 arriving
% q% e" ^- `& P# z, v( a- x set A_i to 118 n' z) B7 I6 @4 E* z" G6 ~
move into Q_induct2
' T4 ?% O. w, g2 ~ move into pickaisle.induct25 ~. r/ L% R3 ]8 N& K4 j: E; v
while A_i<=30 do begin% m* R# ]% v. C. o! |+ z
travel to pickaisle.con(A_i)
4 k9 h) P: v) a if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
! y8 R' i9 d3 F* y3 n6 b else wait for 10 sec D! \) c6 Y1 t8 V& I# p- P
if A_i=A_leave then send to die1 i2 B. T0 F- S. G9 m* k
else inc A_i by 15 _5 u3 b. P4 L! r. w6 p
end0 q' D; t/ j* U7 J8 R6 {9 W
end5 f8 c2 Y7 A4 w
! S' v4 _* {$ f% E5 x; F% K& o I
begin P_pick3 arriving/ k' f- O9 |7 N) V- B6 y
set A_i to 21' ~% @' d# p3 R5 Z D
move into Q_induct33 F- E8 G) U! I3 t8 F# `
move into pickaisle.induct3
' J6 R1 Z; h; }- s while A_i<=30 do begin
6 y% @ T: I6 l, U8 r8 k travel to pickaisle.con(A_i)
7 U: H) l9 g$ f- x4 C0 g if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
* G% S! p0 \9 j& w& b: l else wait for 10 sec! [! k/ b; r c7 {9 s
if A_i=A_leave then send to die
% s0 |7 U7 q' Y R else inc A_i by 1; v6 A+ M$ q+ u1 E* _! d" H
end% r( Q/ e I$ C2 W* }7 p
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,其它按你的 ...
|