|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
6 s/ O' D) C8 H* E4 g) w+ n, k5 ]% 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中的数值,不知道会不会有什么不妥。# W* t: z1 X. E' L6 L: l
# Z8 N J- V0 C9 jbegin P_read arriving/ T) i' x% W: j
while 1=1 do begin% M+ d. a4 @; w u9 i+ b0 N- C
read A_tote from "data.txt" with delimiter "\n"
- F' J0 Z2 s& f6 Z; e read A_time from "data.txt" with delimiter "\n"
/ ~: ]# r) f4 v- v, h# _ read A_leave from "data.txt" with delimiter "\n"% _0 h, w- S# x9 L& N. o
read A_picks from "data.txt" with delimiter "\n" Z9 X! J: W+ Q7 Q6 ]. P
set load type to A_tote0 r/ g* Z8 X# m1 x& |
if A_tote="tote 1" then set A_induct to 19 i8 i- ~2 W/ K* ]! G' N
else if A_tote="tote 2" then set A_induct to 2
6 Q0 y% C1 | J7 o else set A_induct to 3
! w; i! f0 L& g- J set A_i to 02 U u; Q) K" ?8 i$ J! c
clone 1 load to P_induction0 |& L0 N" |4 _
wait for A_time sec
, g+ g4 `$ i3 p D; L! ?0 D: Y4 q end
' H0 X! D: I5 Q( Z. ?5 oend
% L& j; m: G1 d7 @/ T( s8 n. w# g: P' v
begin P_induction arriving
; i0 z+ @0 D+ }4 v if A_induct=1 then clone 1 load to P_pick1" S6 [" o- e- h! i3 a# |% @' M
else if A_induct=2 then clone 1 load to P_pick2
8 p5 B2 z9 ^/ S" d3 F7 l else clone 1 load to P_pick30 k& h: K- q/ D+ y
end* s5 B, K z. `; E/ Y M6 B7 H4 G
|4 m, \% w( S' k0 H* v4 D! r
begin P_pick1 arriving
* j3 |3 n3 B2 N& l3 |( b set A_i to 1
* z' j6 h, [% L move into Q_induct1' Q) M9 P9 R4 V) q
move into pickaisle.induct1- O& _+ x' v1 o+ |6 v
while A_i<=30 do begin
K2 A/ Q0 A1 r( l, j( r travel to pickaisle.con(A_i)
8 v ^$ g5 c1 y" K if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
) e) f( S. R K3 C else wait for 10 sec
2 S$ e# J; ~& Q9 P4 y$ L1 R/ y% K% q/ d if A_i=A_leave then send to die8 Y* a! ?$ @ `( f+ a- d! [
else inc A_i by 1) D* ^2 p4 ?: Y s% V0 D% n# y$ `8 `
end- q; j T/ h0 e4 {; |
end
0 |8 q8 f$ I6 P7 s8 {. o8 l( H- N# ]
begin P_pick2 arriving
1 P, ?! U1 j! T8 d set A_i to 11
f! v/ h" | n9 w+ F- W# R8 o move into Q_induct25 V- _( A+ v3 d1 C' {8 Z
move into pickaisle.induct20 B5 H7 E9 T& C# \* {( H8 ^# J
while A_i<=30 do begin
- D2 E" M& u0 p: Q3 X8 k; X travel to pickaisle.con(A_i)
* i2 F8 X! G# x" ` if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
4 E* P' Q8 A, k( Q8 }0 r( S5 n& T, [( X) [ else wait for 10 sec
! m( c7 I$ |, f* A$ u! [ if A_i=A_leave then send to die
, J+ F5 _* b5 V, d else inc A_i by 1
' f* j& Z3 M$ Y/ z7 @" i end
# r1 l2 f% F5 \. Jend' W( m# `4 J& ?7 d9 {( G+ ?, l
4 s M6 t" G" M: o7 @ o, k2 w( r
begin P_pick3 arriving
8 [& X# n4 x0 ?. ~. L1 y2 m set A_i to 21
/ h3 l5 ` W! k/ @; U7 ~" J( ] move into Q_induct3) G# e6 s( w8 i! m8 S' F$ r; l, u
move into pickaisle.induct3* Q) p! v! r6 G
while A_i<=30 do begin
9 O# n" r- ?' ^. i# d3 g travel to pickaisle.con(A_i)
; n/ U. a( s6 h% P: ` if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
; [) j% P' R3 q6 e2 ^; W% Z else wait for 10 sec9 \* A- h0 h5 g
if A_i=A_leave then send to die# j. N8 i% K2 C- ^
else inc A_i by 1
* Q: F* a* K0 [% I( G4 ]2 [. S1 S end
+ {2 W' P6 y: D8 w$ h" ?$ ^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,其它按你的 ...
|