|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
9 W. Y2 q7 ?$ W3 |0 G4 s% @: |
; ~" C7 s4 V- P2 g; R. Q我的问题是,在每个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中的数值,不知道会不会有什么不妥。/ E* M; |, f ~6 [
1 O) o3 Y% F; f1 M; | R8 jbegin P_read arriving8 S7 R) r8 N# R$ a I9 A
while 1=1 do begin
+ l- E p% c$ @9 f2 J$ Z read A_tote from "data.txt" with delimiter "\n"1 G' G, A |' _& W. M! ~/ T8 B
read A_time from "data.txt" with delimiter "\n". v' Y/ z" T |
read A_leave from "data.txt" with delimiter "\n"
" w C+ A7 R! B/ ~' H8 k read A_picks from "data.txt" with delimiter "\n"
1 ]2 `3 R: W4 }( L8 f* R set load type to A_tote0 W" Z( v: ?# y$ V
if A_tote="tote 1" then set A_induct to 1" a m6 x2 n& V
else if A_tote="tote 2" then set A_induct to 2 _! U3 c0 {+ l
else set A_induct to 3
! x+ |' J1 t1 d8 ^+ J: B' b set A_i to 0
$ d/ X) q7 w' \/ ?8 ] clone 1 load to P_induction5 @6 M" Q5 c# X* n
wait for A_time sec
y1 L- v( V5 q$ V) r! @; t6 P end
# E' c/ R3 x; n: K0 G" v7 d/ A' send
! Y* ^2 @& {6 c6 T: t* n; x
, G+ F7 E/ z# Q) p- y6 bbegin P_induction arriving
F+ a% Q$ F, L! J: `+ |5 V if A_induct=1 then clone 1 load to P_pick1
1 f; J* [" M0 H9 }/ I else if A_induct=2 then clone 1 load to P_pick28 _. t2 u; T. n- R" b$ e+ l
else clone 1 load to P_pick3
- ?) T- T# l. T' C4 V5 C+ g+ f; x9 eend
+ e4 j: P" A9 L2 I3 l6 H
+ h8 y) }# u+ A0 O" V. Rbegin P_pick1 arriving! z: C0 L1 n5 [
set A_i to 1
; F% W' G; `0 |) Q move into Q_induct1
4 E+ j- @5 S9 a move into pickaisle.induct1
; O1 [4 R4 D( |0 Q/ e- \ while A_i<=30 do begin! K' I& T) x1 E/ O, y
travel to pickaisle.con(A_i)% |+ R7 o7 `6 Y( e* p
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% X7 k+ l6 f1 p' C0 O; ~
else wait for 10 sec
; ?% ~; i( W8 _ if A_i=A_leave then send to die+ _7 r# @: ?( x/ b
else inc A_i by 1& C& V$ ?. {6 }% `4 `
end
! g' Z7 [. ^3 X) @( |end
: E" V( d2 C1 C( q3 ^% n; i! i) I& Q7 t& e
begin P_pick2 arriving
# X( ~7 B. {) N5 z/ c5 K7 G set A_i to 11
7 i& C+ x$ Z S move into Q_induct2+ r# H- ?9 J4 d, k, p7 Z) z
move into pickaisle.induct2+ {' M# |, C/ r j
while A_i<=30 do begin
% U8 v/ C( e1 O) z: K! f travel to pickaisle.con(A_i)
) y2 H) n2 e; J3 v* X5 s if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
/ y* a/ G+ Z6 x6 T$ G8 {. | else wait for 10 sec
3 }+ ~& W1 z$ ^7 C, K- { if A_i=A_leave then send to die
2 o: c! G5 P5 ], D% K else inc A_i by 1
+ L0 q' X. c$ [3 c end
: R3 n- k1 A, Y6 ~0 k0 j6 z% cend7 l" j5 i6 Y. I0 ^/ V4 f. w
0 k* b; }+ f7 @3 Vbegin P_pick3 arriving
, l+ G( t/ X3 K# o set A_i to 212 J' \) r& f; U- O
move into Q_induct3- U6 ?; ~5 n' A, }" V9 C( F3 I% l1 ~' N
move into pickaisle.induct3: W; c2 F3 u: T& Z, L
while A_i<=30 do begin
; e! u, W2 y F# W/ q# [ travel to pickaisle.con(A_i)
' X5 E. n- @; v) f/ F* L if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
" c; w" |* a, r. O else wait for 10 sec" w; e5 b. t3 d0 U! m# Z
if A_i=A_leave then send to die$ _7 X0 s( }. b! N
else inc A_i by 1
5 Z' T& w9 G5 u: p5 c end
$ V! G* h3 |. e. h# n7 u' O5 O! Send |
最佳答案
查看完整内容
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,其它按你的 ...
|