|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
9 `' x- n1 ]+ [5 P5 }. m6 Y# U, A
我的问题是,在每个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 }; O$ X! V" n: y; m
( w, u; J4 y" L
begin P_read arriving
8 A" e( B& b/ A& Y# o while 1=1 do begin
) |+ I! ?4 I8 H read A_tote from "data.txt" with delimiter "\n"2 q, W, |3 t1 ^* J7 _3 m C
read A_time from "data.txt" with delimiter "\n"
+ {( n) o* a7 B2 A/ m3 j f% G, c read A_leave from "data.txt" with delimiter "\n"
5 P9 r D: F0 R( b- J7 w8 l3 q read A_picks from "data.txt" with delimiter "\n"
g6 O$ ^- u: V5 q3 S [) L* ~ set load type to A_tote
, W+ Y/ D0 f- h5 _( d if A_tote="tote 1" then set A_induct to 1
) Q0 w: a" ]: T- O, Q6 F else if A_tote="tote 2" then set A_induct to 2
2 F4 T/ T4 {4 V4 W {9 I else set A_induct to 3
/ r5 C, n6 g. B' a& L- P6 B set A_i to 09 c/ J& N/ v9 U; h
clone 1 load to P_induction
5 G% T0 H4 |8 \3 c' a) n8 ? wait for A_time sec
- q; K! K: R, s5 E8 [2 @ end
7 n5 }/ x3 l! w; {end% O" O9 p3 q. _% s* G
/ S; y; F3 i% g: Z2 Ebegin P_induction arriving" ]: `6 c* O2 O9 S
if A_induct=1 then clone 1 load to P_pick1% c3 b: L! W/ h
else if A_induct=2 then clone 1 load to P_pick2
& Y e M* f; b: H" v/ G else clone 1 load to P_pick3( }: K( N, v- Y) f
end
! S$ A4 x5 M l
. x+ r+ U( R1 i# k) } n' ebegin P_pick1 arriving3 X0 x9 c, p+ B! K6 S8 R' N5 W
set A_i to 1( i% Q0 A7 Q& c+ u& Z
move into Q_induct1
0 U* S- R# w; F0 j6 W$ P, a move into pickaisle.induct1
+ ?. L7 V% y8 e: v- d P- k% `( L while A_i<=30 do begin3 |6 u3 u9 y0 \* }- m, D+ I
travel to pickaisle.con(A_i)/ I) ^, f; N7 L( W* e7 q
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% k: a7 Z4 ^- m& Y, E
else wait for 10 sec
{( }( c6 k0 c* H. s+ ~ v, g( Z if A_i=A_leave then send to die' m( d* m( }; v' Y
else inc A_i by 1( `' f0 U! Y' g( C
end
: A* f+ m6 X! j* nend
$ s! b+ R! `4 D
" \0 B$ f" z: y) \; f% ]" Ybegin P_pick2 arriving
! \4 t" u C0 o- P8 m1 t1 q set A_i to 11( P# \: C5 {/ R3 o, x
move into Q_induct2
, _' l6 V( g" T9 Y move into pickaisle.induct29 Z2 r) w9 k3 v; G
while A_i<=30 do begin
! K3 S; ` ^% b- X7 l% z* H travel to pickaisle.con(A_i)5 w0 x: s4 b) y& `( _5 Z1 t
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
z3 p3 B8 v4 s- Z+ j, I- u else wait for 10 sec$ L5 y: f! X4 L7 m3 c: O1 @
if A_i=A_leave then send to die
* r9 `- D5 K& j8 v- }# v4 R0 Q else inc A_i by 1
" k$ Q4 n* c; T1 i$ B) ]% A end
( i4 B9 M, Z" `' S# ?# @3 pend
* c% I- r) D2 @6 T1 U
0 l! ~6 v: g9 Z9 w1 A w+ Hbegin P_pick3 arriving3 [2 R7 }8 [% Q+ m1 n# j0 w. {0 g5 f
set A_i to 21
7 O# `' m3 z3 t( p- K move into Q_induct39 h/ q5 X& t$ Y. T' o ~! V \
move into pickaisle.induct35 t X0 s: m/ _9 s2 R o: p
while A_i<=30 do begin
& O5 Q$ R& t, [% s travel to pickaisle.con(A_i)- l! ~5 t+ Z0 G, r! D
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
# m+ w- Y: ~- u8 n+ G2 E7 S else wait for 10 sec
4 F5 |/ s( i) _ if A_i=A_leave then send to die
4 _# A8 |7 T. \0 y! i* g else inc A_i by 1. l2 q4 S3 C4 T7 [1 Y1 t5 S$ P
end5 O6 T6 M2 _8 j" u* k% u
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,其它按你的 ...
|