|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢3 \+ ~+ \ S2 v S6 E- E. ]
4 }2 o. B V+ c7 {3 k1 {我的问题是,在每个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中的数值,不知道会不会有什么不妥。4 b, a9 Q9 G, L f
: n* A( j3 B! bbegin P_read arriving: N+ \! b7 H% q/ M4 o( z& b6 ~
while 1=1 do begin" A& d( p" ^$ ]
read A_tote from "data.txt" with delimiter "\n"- B6 w* w e6 O! b, B
read A_time from "data.txt" with delimiter "\n"* C% m( _6 J, J u3 A7 z
read A_leave from "data.txt" with delimiter "\n"
2 x: a# w4 ]( X/ C0 z6 V read A_picks from "data.txt" with delimiter "\n"+ l6 ?1 T7 K9 V& K9 A$ P
set load type to A_tote
6 F4 k! \; a7 `0 R. M5 W if A_tote="tote 1" then set A_induct to 1. F J: t+ I( h- I
else if A_tote="tote 2" then set A_induct to 28 P. e0 O0 x; y+ n+ x; {
else set A_induct to 3
; X! ~3 n- p/ h! |, {4 s; o' b set A_i to 0
) P' J/ F! W7 |. ^% x$ i clone 1 load to P_induction
( ?- S* {/ ] k p0 b' m: P wait for A_time sec
4 D% H+ [/ k F) ^7 n5 U- }. | end
* |6 N4 Y! t4 [end8 f' F {, u* R% K" |
3 F8 l- P* \8 T' H" Jbegin P_induction arriving1 @4 L# x+ `8 y$ l
if A_induct=1 then clone 1 load to P_pick1( H9 w/ D, {+ @# @- e+ u8 k6 w0 _
else if A_induct=2 then clone 1 load to P_pick2
+ W0 n: v4 z. E. M/ m0 c4 K( ^! K6 Q else clone 1 load to P_pick30 X% g5 P7 z4 e4 E R9 m
end/ y+ d( b2 U7 C, D0 A
9 @+ {8 u3 }4 h
begin P_pick1 arriving2 D5 V, a& F- D$ A7 U
set A_i to 1
S! ?+ [7 E+ ~ move into Q_induct1 P4 p, i- E. v5 F4 N! P$ O
move into pickaisle.induct1
! ^" }! M! f: I" q" d( } while A_i<=30 do begin
) K& m$ a+ r! ~ travel to pickaisle.con(A_i)
% v' J! y: n# _+ ` if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
0 H k9 j9 x7 i1 R; w0 K else wait for 10 sec/ ^5 ]: X& X' ]- v2 ~ d
if A_i=A_leave then send to die9 i3 i2 G2 G3 x) x2 U( a7 W+ J
else inc A_i by 1
6 M" N0 K: X5 T0 v M, Y end
/ C# U' K% V% J; Nend
7 V" o5 L& D4 m* j* s! i5 Q d4 }" d% Z+ W% L. m: E4 e: \: }! t
begin P_pick2 arriving% H' Z, s4 S5 h# b3 J1 b9 U
set A_i to 11
1 o6 v) K% F) S+ [% C move into Q_induct2
' y I$ y% p6 a! n" B$ z move into pickaisle.induct2
# ]. `' F, m! h7 _ while A_i<=30 do begin
7 k/ I7 z; }5 ~5 M. x travel to pickaisle.con(A_i) A) g5 P6 ]- ?/ q) w5 {5 E, e
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec. P7 s& n' R1 G# U, T
else wait for 10 sec9 r7 }" y3 u& |! y7 c5 z
if A_i=A_leave then send to die
6 _: Q$ Z' o# |" M else inc A_i by 1% y O4 u7 G: J7 j
end3 h+ A e/ ?6 I* g$ R. q! Z
end- |! ]: T, {4 c1 C4 a
4 w: N. j, p$ P7 u0 f6 Xbegin P_pick3 arriving
3 S$ ]. m' h* D set A_i to 21
. c4 [& P2 V" w2 P! o, o move into Q_induct38 X8 ^+ Y( K) ?0 `4 H$ m p
move into pickaisle.induct3
( r: K+ c5 c' l V- I' ` while A_i<=30 do begin- ?3 y3 c$ Y# L9 |* E
travel to pickaisle.con(A_i)& c3 \2 j- A# g- R
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec/ E% F; L, R2 n$ _. V; _. X0 h5 M+ R
else wait for 10 sec
' a$ G* r0 T, `: J if A_i=A_leave then send to die
4 l8 j9 ^+ M( |( m2 o. |# u5 h else inc A_i by 1
% g: s( k7 y' W* [6 j) v end/ q+ Y; X6 _5 u7 B7 s6 a
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,其它按你的 ...
|