|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢5 r5 |6 A7 X" Q$ N
& w! j' Z+ u, R我的问题是,在每个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中的数值,不知道会不会有什么不妥。" {5 Z0 e) e, o" W- a; J
8 B8 H+ e* ~" v* h5 J6 x* {- jbegin P_read arriving9 i; v2 Y& r9 x
while 1=1 do begin
% `: c# t1 n) L0 `( F4 T& X6 K read A_tote from "data.txt" with delimiter "\n"
" T* H, `- N! r1 t read A_time from "data.txt" with delimiter "\n"
, s @4 A2 I3 y9 g3 E read A_leave from "data.txt" with delimiter "\n"
m8 F; D2 W& O% R5 y8 [ read A_picks from "data.txt" with delimiter "\n"6 _) z3 j1 W& p6 N
set load type to A_tote
/ W# F* ^ H4 M5 D0 @9 r8 ~- [6 Y: I if A_tote="tote 1" then set A_induct to 1
: D8 Q. E. Q. N. ~, Y else if A_tote="tote 2" then set A_induct to 2) y$ R s. h9 m6 p- O" w
else set A_induct to 3 . X5 i$ \4 J0 k( |
set A_i to 0
$ d1 e' a! i# f clone 1 load to P_induction
/ i( m b* D2 S: v# J9 j8 _7 M \6 ` wait for A_time sec
& }5 u4 S2 x+ y! U( K' O& w end& G3 X" S0 }8 U+ ^. _' C8 {
end
" ^& A+ Y7 `: E/ b: r% O0 }" K* Y4 E# n" ~% D j @( N( n N
begin P_induction arriving
2 r1 o+ ~ a% R3 y; f* B5 e if A_induct=1 then clone 1 load to P_pick13 }# \. r" f6 q" n
else if A_induct=2 then clone 1 load to P_pick2
# O" M* x9 Z5 z" c$ a else clone 1 load to P_pick3+ b. y u m- f1 d. p N
end _. y3 M2 E% Q5 t0 d1 L |4 `1 a4 c
& m! h' F8 P" d, Lbegin P_pick1 arriving9 U: i9 \ t# u' O( o; J
set A_i to 1
( O [6 D# ?9 K move into Q_induct10 \$ p6 P( h) [3 h& m: K+ E) d
move into pickaisle.induct1: K9 z+ } d7 G
while A_i<=30 do begin
s0 Z& L( @2 Q4 j travel to pickaisle.con(A_i)
- ]( X" Q$ G$ l% {" b9 a% G5 I/ { if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec8 B1 T+ s( P5 s" d9 h. i: p
else wait for 10 sec, y. k' [3 Y6 _$ A {/ ^
if A_i=A_leave then send to die, O2 I. J/ _) ^+ P
else inc A_i by 1
! w; @& H, e5 D0 m9 e- ?3 h. v end+ K2 K) G9 O/ V# C
end
H5 t/ u/ E* T4 V
% k+ ?: r+ C3 X2 v2 J+ {" Wbegin P_pick2 arriving
# [: H4 }/ t" b% E8 g set A_i to 110 a; [: _) a: J) P% Y1 g7 |6 Y" t
move into Q_induct2$ @- e% X5 n% j: r7 M4 ]2 l/ X V
move into pickaisle.induct2
0 y! J3 z2 `$ \, P, |7 h% T while A_i<=30 do begin7 m$ `# N1 D* N' x1 l
travel to pickaisle.con(A_i)7 B& y- }. ~5 `, M
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- y1 S# d# X, M else wait for 10 sec* b: @$ p g) Q# ?+ q% C
if A_i=A_leave then send to die& l! ?3 y! T o& @
else inc A_i by 1( c* J+ l+ O; n0 Q3 A6 t, M
end
% Q- }& M3 O$ U% c8 y" aend
& w- l( Q( x+ V' C9 w/ h
0 Y0 D& Z. t9 Y0 X' ^+ U3 P* W7 ibegin P_pick3 arriving* c) \8 O2 P' z2 J$ y& i
set A_i to 21% ]* x: Q. u, V& K, R( V8 h
move into Q_induct3, c- p I0 q7 r4 T0 c/ R3 N+ _
move into pickaisle.induct3
' [8 b: W: h% y while A_i<=30 do begin
- {& H: q8 D1 ]/ s) N+ |/ U& B travel to pickaisle.con(A_i)
! v2 \7 q% n& M" q$ f( u! { if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec# J. U Z( H) Z
else wait for 10 sec
0 d; a$ O# U: V. Y( [* x! q if A_i=A_leave then send to die
6 I$ g; `8 Y' u2 f: T; a else inc A_i by 13 ?; W# {. W' r+ ^9 z0 R3 E
end6 W! T5 {5 {2 A. l( _- X( x* X" T
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,其它按你的 ...
|