|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢 t6 m" |& P% g1 e, {, I5 Y) `' O& H3 H* e
5 O* J! M# Z I: K1 j/ M* Z* c
我的问题是,在每个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中的数值,不知道会不会有什么不妥。- V$ o7 D7 @$ n2 w1 k, ~
1 X' w$ H- p: t' I# U
begin P_read arriving9 K, C7 Y$ B% Q2 u
while 1=1 do begin0 O) P9 g8 x D; G! f5 k4 \$ x
read A_tote from "data.txt" with delimiter "\n"
2 q& y, j L6 l3 d& O# y9 V0 g read A_time from "data.txt" with delimiter "\n"9 O9 N2 B, R; G. u
read A_leave from "data.txt" with delimiter "\n"
' O! `5 I2 ^1 K5 ` read A_picks from "data.txt" with delimiter "\n"' b/ B0 K o: z+ B. o5 P9 M* R
set load type to A_tote
Z5 a6 x4 y' r, w) k; N5 o: q* y' Y if A_tote="tote 1" then set A_induct to 13 F- \+ K& \4 Q% M+ o4 q/ N
else if A_tote="tote 2" then set A_induct to 2, N+ m' }* d: p* j4 f: {9 ^
else set A_induct to 3 8 W \9 S8 P# H: ?$ c+ D
set A_i to 09 L' @2 r6 r. P
clone 1 load to P_induction* |. t4 R6 j1 ~$ j$ V7 r
wait for A_time sec2 {9 z% w+ _5 D' W- t! v1 U
end. G; E. o O- S. o
end
, R' K4 V ]- u# r% y) h
6 o$ }% j% F( l& R, D( N1 S# |( ibegin P_induction arriving
$ U: U. N! g6 ^# U* l1 L9 n4 J if A_induct=1 then clone 1 load to P_pick19 m1 b: B$ J: p" x2 R
else if A_induct=2 then clone 1 load to P_pick27 h$ b' k. P" P" I) @- t6 p$ P' J
else clone 1 load to P_pick3
- r& V8 [/ c( `% _9 l' A( B6 {. iend4 q: F* m+ r# ~) L h: {2 Q% H
2 h; e G2 s" J' Q$ ]9 e! \" R0 U
begin P_pick1 arriving
1 K; Z. k* [$ V; J$ l1 l set A_i to 1- B, d& ]: S- g8 }
move into Q_induct10 E. j# ~; u0 e) c- l
move into pickaisle.induct1
# g; k. f0 d4 n/ F, d3 ~- h1 f while A_i<=30 do begin+ S# P: i: z4 ~' ?, n$ X5 `# T
travel to pickaisle.con(A_i)) w2 H/ {5 P" E* Z4 d
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
% f$ s: p& X! w4 M, t1 s- B else wait for 10 sec6 e) J: o" ^; p/ y
if A_i=A_leave then send to die" J( a9 |% x/ M# {/ ^) k
else inc A_i by 16 u4 E) S3 r7 T) j+ \* U
end: F. ^ r2 x2 J4 q1 c: X- o
end
9 s& ]9 G2 p' B8 F( @* V5 o: P, B W+ T; W
begin P_pick2 arriving. I, @( |+ W5 I j! T/ `0 F* w
set A_i to 110 n r& J- ?- M: D; h% @4 A
move into Q_induct2
6 |0 {0 {9 r7 n8 Z) i9 z move into pickaisle.induct2
) L: O" E% h* b: b# X" G while A_i<=30 do begin
$ X+ s7 w8 O" V. X travel to pickaisle.con(A_i)- n) H" _4 x9 ~3 O( i. l! l
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec; O5 _- b+ X# W/ t' B9 z r) p
else wait for 10 sec2 u; R0 a( J: T' z: s% B
if A_i=A_leave then send to die
6 R/ x/ y( t8 l: s) ]5 C else inc A_i by 1( M" X2 x" Y: L& H3 M& N
end
* s' t: ?0 t! g, l$ Rend2 C8 d+ L$ Z; L. m; Y4 A3 N3 F& q
9 t0 F* I! n" D/ B! R
begin P_pick3 arriving3 A T+ ]+ A: b5 p" @
set A_i to 21
7 @4 M: |; S) g1 | move into Q_induct3
$ v7 l- p+ @$ O, O move into pickaisle.induct3
, ~1 c, N* T) s while A_i<=30 do begin, [. C* {! g. `
travel to pickaisle.con(A_i)
0 W( C2 H+ c8 M5 u. r5 H+ n; T7 q if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
& R1 p. u; ^# Q else wait for 10 sec. D/ p$ m& `& [3 E# s
if A_i=A_leave then send to die
& H6 I3 p1 R- v5 c3 D" K" b2 Q; f else inc A_i by 14 J7 ? D$ p, `( E6 K
end* Q! C5 \; W) x
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,其它按你的 ...
|