|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢. b1 E5 l! i ]
; _- Z! N2 E8 M4 Q7 I; L* I
我的问题是,在每个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中的数值,不知道会不会有什么不妥。7 i5 i7 u0 W7 p% O
! R9 r8 H6 O+ D6 G# R$ T* X( V
begin P_read arriving
1 J$ m6 @; S/ }9 m while 1=1 do begin4 @4 C5 }3 R: e
read A_tote from "data.txt" with delimiter "\n"3 O. V+ V3 q. ^/ N5 b
read A_time from "data.txt" with delimiter "\n"* K m; O0 u% s+ Z
read A_leave from "data.txt" with delimiter "\n"
6 F! K" C+ D! ~# K {; |, L# E read A_picks from "data.txt" with delimiter "\n". t5 w5 q$ v# O0 l
set load type to A_tote
- r+ J- }6 L2 O, o if A_tote="tote 1" then set A_induct to 1$ a* r" s; O" b' v$ Q: J7 b
else if A_tote="tote 2" then set A_induct to 29 L9 E$ G- a9 `7 j: F
else set A_induct to 3 6 o: X0 j+ c O: b9 Q
set A_i to 08 F6 ]! M) d$ Z( N! k8 I
clone 1 load to P_induction& B4 C4 d% J' j) f. R5 G
wait for A_time sec, ^6 } U, W9 I$ c* S
end
( A/ m5 T+ F( `. Q9 cend
( x4 S. U- }7 z, Y, W5 G
3 p3 }9 X& X% R$ r. Ubegin P_induction arriving
5 A& u0 K( S1 ?$ \5 W if A_induct=1 then clone 1 load to P_pick1) M( a3 ?' U- [- a
else if A_induct=2 then clone 1 load to P_pick2
8 L& C% I2 X" \6 g else clone 1 load to P_pick3
6 |0 t' x, |' jend
$ r8 o! X" I. U
8 T9 ^- h* h1 V: O( h. b, Rbegin P_pick1 arriving
' e8 }( G2 s; D7 L7 n9 {# z% V set A_i to 1
* q1 k3 Q9 c1 z+ f; \6 [7 ?* s6 q9 Y move into Q_induct19 g& l) s) j" v+ W( @: V) X9 F
move into pickaisle.induct1
0 Z! e! Y- A8 W- K while A_i<=30 do begin
% {8 j2 A0 |: e0 V! ` travel to pickaisle.con(A_i)9 ^8 h. G4 a3 s! P8 [! v* F! f
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
2 @# L- Z! d/ u& p; ` else wait for 10 sec& H* o- W9 I+ g
if A_i=A_leave then send to die
2 K i0 Z+ W+ O* S+ c else inc A_i by 1! E8 v' m! W4 X& L! k: v% K* @9 F
end
. S0 l6 c; D, d2 T/ send
2 x: V5 y5 l1 F
- X7 }( |+ ~* ^' x5 _0 f" V7 Obegin P_pick2 arriving: \5 r* J( A2 h7 {3 c* ]* P! O0 B
set A_i to 11
, s) Q. S/ m5 X5 J9 E move into Q_induct24 l1 X+ I3 Y5 P- v, u" a: W
move into pickaisle.induct2% g# Q4 \" g% ~
while A_i<=30 do begin
& J) D# z6 |) i0 l3 k4 M" J4 p. C travel to pickaisle.con(A_i)/ u! ?$ E; z3 n* x% Z- Y
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec9 w' O' a& Y$ J% N
else wait for 10 sec/ O6 f; K# i. H7 c2 p e
if A_i=A_leave then send to die) f. Y5 R. J: C' U* ~
else inc A_i by 1$ ]. R4 i) I4 e8 Q( [: e$ T8 H
end/ V e1 M$ F5 v+ X& h! u6 ]+ u, R
end
$ R3 K/ w0 X9 W& I
5 T0 Q8 I ^9 d9 S- v0 i( w$ Z# Ubegin P_pick3 arriving. l4 T U0 h* A5 c9 X
set A_i to 21. W" y6 h3 n7 D6 j
move into Q_induct3
$ S1 M* \+ ?+ u3 ?( j move into pickaisle.induct3
5 Q; V( B- F1 }& X6 L while A_i<=30 do begin
& E0 ~1 [( s% M! ]' S travel to pickaisle.con(A_i)
! H d& q; l# z1 u2 q# } if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- P; G' M' t& v9 r8 I4 o2 L else wait for 10 sec# W4 s$ x1 O% L1 D5 {1 P8 q! Y
if A_i=A_leave then send to die! t9 o& {/ ^+ b' ?2 d+ ^. w
else inc A_i by 10 X9 `# z0 E' ]; H
end
8 E$ p9 E& p1 t. Fend |
最佳答案
查看完整内容
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,其它按你的 ...
|