|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
( F7 G# ^3 l Z5 b5 p7 \8 J
3 y/ [- {5 e* X0 Z& c; k+ R5 n( y我的问题是,在每个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+ @: _; k/ V
' R( j0 @$ [0 G9 ~ Qbegin P_read arriving: Q3 I* W- s; J; t! s8 D" q
while 1=1 do begin, d( Q3 j" p# t2 r' K# ^. J" w
read A_tote from "data.txt" with delimiter "\n"- I0 N6 F3 h0 x, A' v
read A_time from "data.txt" with delimiter "\n"
# D" X4 `! e# D. O; K; o0 {. g- T read A_leave from "data.txt" with delimiter "\n"2 G" M) O& |) ^4 k- ^4 g
read A_picks from "data.txt" with delimiter "\n"
! r5 r8 ~" ^8 V- w: F( O set load type to A_tote
5 @- J! ~. p& A; j1 R+ \1 W2 u8 P6 Z if A_tote="tote 1" then set A_induct to 1
6 u4 F5 l! F) T. y else if A_tote="tote 2" then set A_induct to 2
3 [1 L8 @* Y! S* z else set A_induct to 3 2 X4 A" R1 i L
set A_i to 0
; l6 m8 `: c9 N" I+ n clone 1 load to P_induction7 r% ^: Y* |- K
wait for A_time sec
6 O* c5 V7 z. c- { end
" U' Z- S: d9 ^, N G, Iend
0 H4 }6 `' j3 Y- _/ x* ^; N' K" v& L3 }
begin P_induction arriving
3 ~8 y6 ~$ p1 p, p if A_induct=1 then clone 1 load to P_pick1
) B& b& L. _ |7 u: s( w else if A_induct=2 then clone 1 load to P_pick2
[6 r' N4 J7 l+ n else clone 1 load to P_pick3
2 U) i, p! t C Cend8 n5 z1 `3 E J1 ]1 X* V: g5 \
4 D% J W# Y+ Kbegin P_pick1 arriving/ A2 c7 J3 k/ z8 a& X" ~- B2 g- S: |+ {9 x
set A_i to 1" K' J2 x. E- r
move into Q_induct1
9 P3 |0 m6 J j move into pickaisle.induct1' {( _/ g& @! z4 Q; {9 l; ? f- }+ ~
while A_i<=30 do begin
3 o5 j4 q# x) G& h) r7 K travel to pickaisle.con(A_i)
; f% q, p7 L Z: x2 K if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 C& b! @9 o' j' _9 x4 [' L8 i
else wait for 10 sec
' I& {- T9 t9 z( {+ N* K if A_i=A_leave then send to die3 `* f9 V+ I5 r6 a% E
else inc A_i by 1
& y3 d3 X6 Y$ }; f6 M# w end$ O' G/ \# k5 S) S3 o
end' e0 _- S, c$ E2 A" v" C% c1 W" g4 d
2 L s: d( q% }/ ^begin P_pick2 arriving' M2 i; I4 c/ s( ^( [9 {& e
set A_i to 11
6 |! k% C9 k! d3 O4 v5 V move into Q_induct2
& N9 m3 |( L2 H- V7 S" W$ Q' D% | move into pickaisle.induct2
1 n% ?) R3 y& c) S* p$ v7 H while A_i<=30 do begin" o, }8 k0 [ X k$ k, u
travel to pickaisle.con(A_i)
$ Z# D4 S% V* D% z0 F j! s if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
8 B3 U+ Q" w" K# m2 a else wait for 10 sec
8 V, }# V) i- l! [/ }& B$ R/ S( G if A_i=A_leave then send to die
# n0 \9 ]8 P0 {. ~$ ~- p else inc A_i by 1
! e" _# `2 _8 q+ _4 d) x end
) Z+ u- S. z8 o' {- yend8 {! t) u% [" b M
( a4 [% d4 F2 A3 u: z4 M
begin P_pick3 arriving* D& G: D Z! L) i% s
set A_i to 21
! m2 J9 f4 {0 @, N* h. O1 S move into Q_induct3' E$ k8 A6 ]3 {- W7 L* o
move into pickaisle.induct3
* l8 g+ n6 m, L. I4 E while A_i<=30 do begin
3 ]8 u' ?# U5 @4 k; j' Q travel to pickaisle.con(A_i)
$ Y4 D! K( \) W! N n if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 M0 u( C3 O/ P2 D
else wait for 10 sec
3 v4 _' d8 T$ F* _9 b) J if A_i=A_leave then send to die
6 [+ u/ O1 Q/ |/ H7 r else inc A_i by 11 n% C8 U4 G! v4 }' u. p1 y+ _
end. l+ |6 A0 Y) Z5 @
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,其它按你的 ...
|