|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢5 j# k% k% i$ ~
; I0 r, ?0 Y7 a7 O0 t" ~" G我的问题是,在每个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中的数值,不知道会不会有什么不妥。
' W1 I" @: {1 R" E' I! k1 w7 u3 V# u; s# b
begin P_read arriving
# H, y9 e" S$ i4 `: l while 1=1 do begin
# Z' M" }3 s6 S! q f read A_tote from "data.txt" with delimiter "\n"2 U: {% d/ X: k. S+ y7 {) U) F2 W
read A_time from "data.txt" with delimiter "\n"
4 \2 V: n$ P! Q p read A_leave from "data.txt" with delimiter "\n"
9 S" B& W( E v, ^ read A_picks from "data.txt" with delimiter "\n"' w/ ]3 N4 [$ r
set load type to A_tote
* z9 i) I+ `! ^. ^0 I if A_tote="tote 1" then set A_induct to 1! w1 t8 l, r$ B
else if A_tote="tote 2" then set A_induct to 2# D W1 Q# ~/ v
else set A_induct to 3 # g/ f6 e" i u+ a
set A_i to 0$ X# M6 Z& [, @ D; {' Q" \
clone 1 load to P_induction, H( ~6 D0 s" ^" Z7 y; b7 P
wait for A_time sec
. J7 D3 N5 m' I- e: M2 K end& o) F$ g$ k+ L# D. f4 ^
end" {! ~0 j9 `. ]% t, R7 A
' _' m' x, g4 R: w, D3 X: S
begin P_induction arriving
' G `/ N# n0 p$ [% s" k5 {) b if A_induct=1 then clone 1 load to P_pick1, _9 K7 q& c6 Q2 Y9 \/ ?
else if A_induct=2 then clone 1 load to P_pick2/ \4 f& k2 W8 a# e. I4 O
else clone 1 load to P_pick3
1 d. U, J( f9 S1 qend1 Y3 \. |# M% P) C
6 Z, K: j( N# u }/ N% T6 t
begin P_pick1 arriving) R5 |% L( Y+ v) P# W q# i
set A_i to 1
% E4 y# f$ I5 Y" T/ X" N( j6 l5 n move into Q_induct13 l5 K( u/ K" h! x0 ~6 v1 C8 N
move into pickaisle.induct1
" w M8 _( o8 c' ~( l4 N$ S while A_i<=30 do begin0 o s$ I4 [: n; W2 M
travel to pickaisle.con(A_i)) K* p* b0 {8 p5 g$ B! i
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec4 ?, ]( W. Y2 o: c) ^! Q) l0 Q
else wait for 10 sec
1 i9 Y8 A2 h8 Z* ^ N if A_i=A_leave then send to die
1 `! a \0 y, g2 ~ else inc A_i by 1$ b l, ~+ ]% u3 k4 G
end2 t9 E, q: Y: I$ A$ @. v
end; z3 j: Y& d" r+ h$ r# j8 O
3 o! d/ T* |- M3 Ubegin P_pick2 arriving
- |3 ^* r' y6 X5 u+ }) | set A_i to 11
2 ^* Q& B5 o7 x5 x. Y move into Q_induct2
1 G6 ?# K; F, V" Q move into pickaisle.induct29 H& F' o3 a, u5 g6 D
while A_i<=30 do begin7 u" a$ c8 `, V9 }$ j" r! B
travel to pickaisle.con(A_i)
: l& D* v: z2 c! j9 C if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% W v+ m, K0 b
else wait for 10 sec" T0 D& d* L( J8 j0 i
if A_i=A_leave then send to die6 W5 F; P0 a( l8 J+ a/ X% W# Y
else inc A_i by 17 u% i2 l6 Q! X
end
' q# @3 z) X7 f; Send
- H: z- e5 f3 ?0 |: R% v& R2 O+ h# y! n
begin P_pick3 arriving% A4 F3 ^2 p7 m @, g
set A_i to 216 {$ u: P4 i4 o& x- W( {9 S$ t
move into Q_induct3
. Z$ O/ t( L5 i3 }- P4 L% M move into pickaisle.induct3
0 v& L* X" C: \7 {; |1 T3 O& O4 `% ^' z while A_i<=30 do begin0 l( Q" |3 k) L# T
travel to pickaisle.con(A_i)
9 \: z$ C3 K; F* ?! ?8 j& i! B if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
: i* z. J8 l! M; e else wait for 10 sec
d( j/ X- ]; i2 ]$ v if A_i=A_leave then send to die. n1 u9 z0 w! D0 ]$ M
else inc A_i by 1$ q2 D) O1 F6 B
end4 p! a2 r5 o. Z+ Y2 t( m; q
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,其它按你的 ...
|