|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
$ C! ~$ ~. n# R: a
. y% ?7 g* o% 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中的数值,不知道会不会有什么不妥。
1 P0 ]$ I* D) Z, i3 r
3 z, S9 n* E8 T, x! r5 qbegin P_read arriving, I6 T& d6 B1 I2 l$ E
while 1=1 do begin; k4 V# l; ~" e, B' b& m
read A_tote from "data.txt" with delimiter "\n"
$ u6 i% `# o l3 a7 H read A_time from "data.txt" with delimiter "\n"! s, {! m1 z2 @: e# t m4 }& Z
read A_leave from "data.txt" with delimiter "\n"4 c7 v) X% v, z [" b& K
read A_picks from "data.txt" with delimiter "\n"
9 I% s# g1 Z+ t set load type to A_tote0 G& x* ]# c' p% g8 Z6 m5 v
if A_tote="tote 1" then set A_induct to 1
4 B |, @3 e0 u B; F! i A else if A_tote="tote 2" then set A_induct to 2& P6 z2 Q, C2 K7 u
else set A_induct to 3 3 p8 s# z( F3 [/ F* b4 W; U
set A_i to 0
: t3 D. S# Z5 N8 ]8 } clone 1 load to P_induction0 x o+ E; x+ j) J
wait for A_time sec
5 u$ R# } M5 e end
6 v% m; E' O4 {4 h# f- X8 n4 [end
9 u. L" |# D' k5 c: \
1 M( m7 a! ]/ c4 w$ `$ ]begin P_induction arriving
2 p. {& P1 g1 p. A if A_induct=1 then clone 1 load to P_pick1+ Y- }' B" X. M1 [7 M+ l
else if A_induct=2 then clone 1 load to P_pick20 M R5 Q; [2 d, w ~( q4 M; {% W& m0 i
else clone 1 load to P_pick39 X3 R# d9 ]% o# L- M# V D
end
& E S* B& t( Q3 \5 @+ A: l, L/ g. w a- F0 q2 [/ R
begin P_pick1 arriving
6 y; B# C/ L3 L1 O set A_i to 1
; z3 z6 t! c$ P! S move into Q_induct18 Q* j1 Z& k" ^$ w f: Y' }
move into pickaisle.induct16 V* d l4 ^ U: [6 ^/ n1 r' F
while A_i<=30 do begin+ V' j: u3 J* R3 ]- `# }% _
travel to pickaisle.con(A_i)
_/ H3 E( x0 @ G' _ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec3 j' M5 [% V& {( t% O' C; i; q# u& R
else wait for 10 sec
5 }* }/ s* ^& }6 Y" t/ ~ if A_i=A_leave then send to die1 D+ ]6 R% ]5 w
else inc A_i by 1% N) ^: _- s) @ x" d. X; W5 c
end
* _) d# j2 J @% ~, |end
1 O% y$ g }* A: p( P4 O7 Q( Q/ i d9 d, t/ e' x% H$ b
begin P_pick2 arriving
2 K) `9 N. |3 F4 B7 p/ q+ Z set A_i to 11
: \; A5 v1 G: ^" }( ~+ x move into Q_induct2
5 `# X0 ]' k5 A* R# j1 B6 y$ n H move into pickaisle.induct2
+ ? \1 l5 t2 M% k while A_i<=30 do begin
% W& f4 Z* n6 p5 v5 v9 d0 o travel to pickaisle.con(A_i)
6 \: m- h5 l+ Y$ L: P5 j if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec. @. n4 y) f) S! K' ?: i3 m
else wait for 10 sec
4 ~2 f o% T1 Z# h) J2 _ if A_i=A_leave then send to die
! {% j: V: E) Y2 j else inc A_i by 1! D+ |7 ^ v) Z8 o
end V% u6 g. }' c6 V; c3 e
end% r+ k) ?! Q8 j2 j! X
4 g6 f, C* ]. u$ P" g
begin P_pick3 arriving
" e7 Q; b- t8 [7 B7 w1 | set A_i to 21+ w, |& s6 {# Z
move into Q_induct3) K* ~. l- P4 z1 K9 ?
move into pickaisle.induct37 X; C ]; o$ F- `
while A_i<=30 do begin
# w. q/ g+ S$ u7 \! w8 ~ travel to pickaisle.con(A_i)" ?$ y/ m& ^) D) Z4 A W
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
0 Q5 r* h) K+ g W else wait for 10 sec
" }- T( ^, X9 g6 y: z if A_i=A_leave then send to die! f8 p& o* v5 t$ H. z
else inc A_i by 1
7 g! l" I' [ A8 H( E ]1 b end
& w. q6 B( x$ V% j- L. [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,其它按你的 ...
|