|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
$ v4 n! ^7 j6 I
: S: y8 ]: A9 w我的问题是,在每个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中的数值,不知道会不会有什么不妥。/ C; q- I. j/ c$ }5 \" }
! U8 F: _) ?! z. X
begin P_read arriving
! ]- E0 u0 L5 E+ n- C while 1=1 do begin; A+ s- g4 N& x2 E9 R2 T& u
read A_tote from "data.txt" with delimiter "\n"
% t+ ]7 c0 y1 P! q read A_time from "data.txt" with delimiter "\n"& B2 G4 i; _6 y# f8 m6 N8 q
read A_leave from "data.txt" with delimiter "\n"
5 x. O5 _$ V0 R% K read A_picks from "data.txt" with delimiter "\n"7 O& ^) \, t O. _9 {" j
set load type to A_tote1 \- x9 w0 g0 l9 t
if A_tote="tote 1" then set A_induct to 1. f' a& n, I9 G8 Y/ g# _% G
else if A_tote="tote 2" then set A_induct to 24 V/ r/ ^( W1 U& K! A$ ^4 u7 \
else set A_induct to 3
& `1 o( _! }0 ^* t! r* y d set A_i to 0
, S8 b Z) f) y! } clone 1 load to P_induction3 ]5 f4 P, M6 D# j$ ]
wait for A_time sec4 Q8 I3 n- ~: P+ m
end
3 q' ^( m3 \& D; }end. [5 c8 C7 N X' Y) ~
, z7 A2 z0 c) ~" a. ybegin P_induction arriving% e- K9 u* ~2 [
if A_induct=1 then clone 1 load to P_pick1! t s* O- U' E" B6 P& p9 u
else if A_induct=2 then clone 1 load to P_pick2! E( Z6 ?) E7 x. Y9 E
else clone 1 load to P_pick3
8 I3 B( F; F3 ? Y. o: p, t lend1 e0 _; K3 F, F
' U) C1 F' T7 U# a% W# h
begin P_pick1 arriving
! N1 G0 f; j' r3 v- H6 e set A_i to 1/ m8 q, H: h; q5 X! R1 J P
move into Q_induct1" Y# G4 f0 b7 f& j' _0 [; ]5 M! }/ q
move into pickaisle.induct1
, z, G' b6 i( s3 C$ G) f while A_i<=30 do begin( W) S+ H P1 |6 p4 |9 l0 b8 O
travel to pickaisle.con(A_i)
- E, P3 K. L' f5 k if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec( C' f2 ] ^" U- O+ q; Z
else wait for 10 sec
2 b1 y5 x9 O; y% Q" ^/ j if A_i=A_leave then send to die( _: f; y1 L+ l0 h" R l
else inc A_i by 1! `9 H' d) I# k: |7 H% o8 J" h$ q
end
4 _5 p/ s& f' K, e: R- b4 \end
; Q3 z8 p- Q$ g3 p/ |0 Y* r+ `' v7 {+ E3 n6 ?, x2 Z: b5 j
begin P_pick2 arriving& N: t( R7 t! @" P, j2 [2 j2 s
set A_i to 11
* l6 H/ a( o! t& y/ b* e move into Q_induct20 i8 {7 a6 `- H! Y, r
move into pickaisle.induct23 j- B' N9 l. ]
while A_i<=30 do begin
5 E* m5 _% D g- `" v, Z$ y travel to pickaisle.con(A_i)
7 ]0 t+ ~+ I9 _" E$ y/ e if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
& { x0 D+ ~" e0 U- w( ?8 e else wait for 10 sec
& O2 H& s3 X- C0 y; d6 Y! T( A if A_i=A_leave then send to die/ Q+ o4 \7 U" i1 l* ]7 t
else inc A_i by 1! Q. X0 j- }% q( }2 I
end
# q- p' |2 x [& G$ N$ Y. \* x& eend1 {! E5 ]' G' N) m8 T M) Q7 J
5 [( f9 g; |: ?; M( n9 J+ e3 o% l& I; r
begin P_pick3 arriving
5 S6 H* h* Y: E3 s6 C$ j& r set A_i to 216 u. ~4 V8 |# _4 b
move into Q_induct3# k5 L* S2 U( _/ w
move into pickaisle.induct38 X$ I" H+ [1 U6 r9 k
while A_i<=30 do begin" e' O" ?# a# ]" E
travel to pickaisle.con(A_i)
4 v& |/ @0 _( k( b9 Z if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
& J, ^# I( c. g: ?# m% O else wait for 10 sec
% j5 R1 q* l8 z if A_i=A_leave then send to die+ j, M0 z+ u' Y! }; l" k
else inc A_i by 1
M6 t! r8 Z* ^' ~7 w end
, Z. P! f. l1 Uend |
最佳答案
查看完整内容
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,其它按你的 ...
|